StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
daqDump.C
1 // $Id: daqDump.C,v 1.1 2010/01/22 21:09:43 fine Exp $
2 // *-- Author : Valery Fine(fine@bnl.gov) 22/01/2010
3 
6 void daqDump(const char* daqFile="/star/rcf/test/daq/2009/115/st_physics_10115020_raw_5020001.daq", int maxEvents=-1))
9 {
10  // Dump the "Event Header" for each DAQ Event from the input daqFile
11  // daqFile - the DAQ file name
12  // maxEvents - the max number of events to dump
13  // -1 process ALL events from the DAQ file
14 
15  // Load the shared libs
16  gROOT->Macro("Load.C");
17  Info(__FILE__, "Enabling Logger...");
18  gROOT->LoadMacro("LoadLogger.C");
19  LoadLogger();
20  gSystem->Load("RTS");
21  gSystem->Load("StDaqLib");
22  gSystem->Load("StDAQMaker");
23  gSystem->Load("StIOMaker");
24  chain = new StBFChain();
25  cout << "Create chain " << chain->GetName() << endl;
26  chain->SetFlags("in");
27  StMaker *ioMk = new StIOMaker("IO","r",daqFile);
28  ioMk->SetDebug(0);
29  // Execute the chain
30  chain->Init(); // start the chain
31  while ( maxEvents &&( chain->MakeEvent() == kStOK ) ) {
32  chain->GetEvtHddr()->Print();
33  if (maxEvents >=0 ) --maxEvents;
34  }
35  chain->Finish(); // close chain
36  delete chain;
37 }
virtual Int_t Finish()
Definition: StChain.cxx:85
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237
Definition: Stypes.h:40