00001
00002
00003
00006
00007
00008 void daqDump(const char* daqFile="/star/rcf/test/daq/2009/115/st_physics_10115020_raw_5020001.daq", int maxEvents=-1))
00009 {
00010
00011
00012
00013
00014
00015
00016 gROOT->Macro("Load.C");
00017 Info(__FILE__, "Enabling Logger...");
00018 gROOT->LoadMacro("LoadLogger.C");
00019 LoadLogger();
00020 gSystem->Load("RTS");
00021 gSystem->Load("StDaqLib");
00022 gSystem->Load("StDAQMaker");
00023 gSystem->Load("StIOMaker");
00024 chain = new StBFChain();
00025 cout << "Create chain " << chain->GetName() << endl;
00026 chain->SetFlags("in");
00027 StMaker *ioMk = new StIOMaker("IO","r",daqFile);
00028 ioMk->SetDebug(0);
00029
00030 chain->Init();
00031 while ( maxEvents &&( chain->MakeEvent() == kStOK ) ) {
00032 chain->GetEvtHddr()->Print();
00033 if (maxEvents >=0 ) --maxEvents;
00034 }
00035 chain->Finish();
00036 delete chain;
00037 }