16 #include <JANA/JApplication.h>
27 #include <TDirectory.h>
69 TDirectory *
main = gDirectory;
70 gDirectory->mkdir(
"evnt")->cd();
74 evntdata =
new TH1I(
"evntdata",
"Total data words in event",100,0,30000);
75 rocdata =
new TH2I(
"rocdata",
"ROC vs data words",80,0.5,80.5,2000,0.,2000.);
105 JEvent &jevent = eventLoop->GetJEvent();
106 JEventSource *source = jevent.GetJEventSource();
112 if(
string(
"JEventSource_EVIO") == source->className() ) {
119 evioDOMTree *dom = eviosource->GetEVIODOMTree(jevent);
120 evioDOMNodeListP bankList = dom->getNodeList([](evioDOMNodeP n) {
121 return (n->tag==1)&&(n->getContentType()==0x1)&&(n->getParent()->tag>0)&&(n->getSize()>0);
127 japp->RootFillLock(
this);
129 for(
auto bank : *bankList.get()) {
130 nword=bank->getSize();
131 rocdata->Fill(bank->getParent()->tag,nword);
135 japp->RootFillUnLock(
this);
jerror_t init(void)
Called once at program start.
JEventProcessor_EVNT_online()
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
jerror_t fini(void)
Called after last event of last event source has been processed.
~JEventProcessor_EVNT_online()
The JEventSource_EVIO class implements a JEventSource capable of reading in EVIO data from raw data f...
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
int main(int argc, char *argv[])