32 class StFgtCosmicMaker;
38 StFgtCosmicMaker *cosmicMkr = 0;
42 int makeCosmicStatus(
const Char_t *filenameIn =
"testfile.sfs",
43 const Char_t *pedfilename =
"testfile.Ped.txt",
44 const Char_t *filenameOut =
"testfile.Status.txt",
47 Bool_t cutShortEvents = 1 ){
53 cout <<
"Constructing the chain" << endl;
54 analysisChain =
new StChain(
"eemcAnalysisChain");
56 cout <<
"Constructing the cosmic maker" << endl;
57 cosmicMkr =
new StFgtCosmicMaker(
"cosmicMaker", filenameIn );
58 cosmicMkr->cutShortEvents( cutShortEvents );
60 Short_t timeBinMask = (1<<timeBin);
62 cout <<
"Constructing the A2C maker" << endl;
64 adcCorrector->setPedReaderFile( pedfilename );
65 adcCorrector->setTimeBinMask( timeBinMask );
66 adcCorrector->setAbsThres( -10000 );
68 adcCorrector->doRemoveOtherTimeBins( 1 );
71 cout <<
"Constructing the Status Maker" << endl;
73 statusMkr->setToSaveToDb( 0 );
74 statusMkr->setToSaveToFile( filenameOut );
76 cout <<
"Initializing" << endl;
77 ierr = analysisChain->Init();
80 cout <<
"Error initializing" << endl;
87 cout <<
"max nevents = " << nevents << endl;
88 for(
int i=0; i<nevents && !ierr; ++i ){
91 cout <<
"\n\nevent number " << i << endl;
94 analysisChain->
Clear();
97 ierr = analysisChain->
Make();
104 cout <<
"finish" << endl;
107 cerr <<
"\tall done" << endl;
116 gSystem->Load(
"libPhysics");
117 gSystem->Load(
"St_base");
118 gSystem->Load(
"StChain");
119 gSystem->Load(
"StFgtUtil");
120 gSystem->Load(
"StUtilities");
121 gSystem->Load(
"StEvent");
122 cout <<
"loaded StEvent library" << endl;
124 gSystem->Load(
"StFgtUtil");
125 gSystem->Load(
"StFgtRawMaker");
126 gSystem->Load(
"RTS");
127 gSystem->Load(
"StFgtPedMaker");
128 gSystem->Load(
"StFgtStatusMaker");
129 gSystem->Load(
"StFgtA2CMaker");
void setRelThres(Float_t thres)
set to below -kFgtMaxAdc (-4096) to skip cut
virtual void Clear(Option_t *option="")
User defined functions.