12 int rdDaq2sanity(
const Char_t *filenameIn =
"st_physics_13027045_raw_0010001.daq",
13 Int_t nevents = 1000 ){
17 std::string daqFileName( filenameIn );
20 TObjArray* HList=
new TObjArray;
22 cout <<
"Constructing the chain" << endl;
23 analysisChain =
new StChain(
"eemcAnalysisChain");
25 std::string fgtDbMkrName =
"";
27 cout <<
"Loading St_db_Maker" << endl;
28 gSystem->Load(
"libStDb_Tables.so");
29 gSystem->Load(
"StDbLib.so");
30 gSystem->Load(
"St_db_Maker");
31 gSystem->Load(
"StDbBroker");
33 TString dir0 =
"MySQL:StarDb";
34 TString dir1 =
"$STAR/StarDb";
36 dbMkr->SetDateTime(20120207,0);
38 cout <<
"Loading StFgtDbMaker" << endl;
39 gSystem->Load(
"StFgtDbMaker");
41 cout <<
"Constructing StFgtDbMaker" << endl;
44 fgtDbMkrName = fgtDbMkr->
GetName();
46 cout <<
"Fgt DB Maker Name " << fgtDbMkrName << endl;
48 cout <<
"Constructing the daq reader" << endl;
50 daqRdr->setIsCosmic( 0 );
51 daqRdr->cutShortEvents(
true );
52 cout <<
"Fgt DB Maker Name " << fgtDbMkrName.data() << endl;
53 cout <<
"Constructing the Time Shape Maker" << endl;
56 gainMk->setHList(HList);
61 cout <<
"Initializing" << endl;
62 ierr = analysisChain->Init();
64 if( nevents < 0 )nevents = 1<<30;
66 cout <<
"max nevents = " << nevents << endl;
67 for(
int i=0; i<nevents && !ierr; ++i ){
69 cout <<
"\ton event number **************" << i << endl;
71 analysisChain->
Clear();
72 ierr = analysisChain->
Make();
75 cout <<
"M: finish" << endl;
78 cerr <<
"\tall done" << endl;
80 TString outFh=filenameIn; outFh=
"pulse.hist.root";
82 cout<<
"Output histo file "<<outFh<<endl;
83 hf=
new TFile(outFh,
"recreate");
87 printf(
"\n Histo saved -->%s<\n",outFh.Data());
89 printf(
"\n Failed to open Histo-file -->%s<, continue\n",outFh.Data());
93 fgtDbMkr->printFgtDumpCSV(
"fgtMapDump.csv");
103 gSystem->Load(
"libPhysics");
104 gSystem->Load(
"St_base");
105 gSystem->Load(
"StChain");
106 gSystem->Load(
"StFgtUtil");
107 gSystem->Load(
"StUtilities");
108 gSystem->Load(
"StEvent");
109 cout <<
"loaded StEvent library" << endl;
111 gSystem->Load(
"StFgtUtil");
112 gSystem->Load(
"StFgtRawMaker");
113 gSystem->Load(
"StFgtRawDaqReader");
114 gSystem->Load(
"RTS");
115 gSystem->Load(
"StFgtSanityMaker");
116 gSystem->Load(
"StFgtDbMaker");
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const
virtual const char * GetName() const
special overload