51 int fgtSingleEvents(
const Char_t *filenameIn =
"testfile.daq",
52 const Char_t *filenameOut =
"testfile.root",
55 Bool_t cutShortEvents = 0 ){
61 cout <<
"Is Cosmic" << endl;
63 cout <<
"Is not cosmic" << endl;
69 cout <<
"Constructing the chain" << endl;
70 analysisChain =
new StChain(
"eemcAnalysisChain");
72 std::string fgtDbMkrName =
"";
78 cout <<
"Loading St_db_Maker" << endl;
79 gSystem->Load(
"libStDb_Tables.so");
80 gSystem->Load(
"StDbLib.so");
81 gSystem->Load(
"St_db_Maker");
82 gSystem->Load(
"StDbBroker");
84 TString dir0 =
"MySQL:StarDb";
85 TString dir1 =
"$STAR/StarDb";
87 dbMkr->SetDateTime(20120115,1);
89 cout <<
"Loading StFgtDbMaker" << endl;
90 gSystem->Load(
"StFgtDbMaker");
92 cout <<
"Constructing StFgtDbMaker" << endl;
96 fgtDbMkrName = fgtDbMkr->
GetName();
103 cout <<
"Constructing the daq reader" << endl;
105 daqRdr->setIsCosmic( isCosmic );
106 daqRdr->cutShortEvents( cutShortEvents );
108 cout <<
"Constructing the A2C converter" << endl;
111 a2cMkr->setAbsThres( 100 );
114 a2cMkr->
setFgtDb( fgtDbMkr->getDbTables() );
118 cout <<
"Constructing the QA Maker" << endl;
120 qaMkr->setFilename( filenameOut );
125 cout <<
"Initializing" << endl;
126 ierr = analysisChain->Init();
129 cout <<
"Error initializing" << endl;
136 cout <<
"max nevents = " << nevents << endl;
137 for(
int i=0; i<nevents && !ierr; ++i ){
140 cout <<
"\ton event number " << i << endl;
143 analysisChain->
Clear();
146 ierr = analysisChain->
Make();
153 cout <<
"finish" << endl;
156 cerr <<
"\tall done" << endl;
165 gSystem->Load(
"libPhysics");
166 gSystem->Load(
"St_base");
167 gSystem->Load(
"StChain");
168 gSystem->Load(
"StFgtUtil");
169 gSystem->Load(
"StUtilities");
170 gSystem->Load(
"StEvent");
171 cout <<
"loaded StEvent library" << endl;
173 gSystem->Load(
"RTS");
174 gSystem->Load(
"StFgtUtil");
175 gSystem->Load(
"StFgtDbMaker");
176 gSystem->Load(
"StFgtRawDaqReader");
179 gSystem->Load(
"StFgtA2CMaker");
180 gSystem->Load(
"StFgtQaMakers");
void setRelThres(Float_t thres)
set to below -kFgtMaxAdc (-4096) to skip cut
virtual void Clear(Option_t *option="")
User defined functions.
void setFgtDb(StFgtDb *fgtDb)
set to zero to skip cut
virtual const char * GetName() const
special overload