7 void RunElectronAnalysis(Int_t nEntries = 1e5,
8 const Char_t* listname=
"test.list",
9 const Char_t* mipFile=
"/star/u/jkadkins/bemcCalib2012/StRoot/StEmcOfflineCalibrationMaker/macros/mip.gains",
10 const Char_t* geantFile=
"/star/u/jkadkins/bemcCalib2012/StRoot/StEmcOfflineCalibrationMaker/macros/geant_fits.root",
11 const Char_t* outfile=
"testElectronFile.root")
13 gROOT->Macro(
"LoadLogger.C");
14 gROOT->Macro(
"loadMuDst.C");
15 gSystem->Load(
"StTpcDb");
16 gSystem->Load(
"StDaqLib");
17 gSystem->Load(
"StDetectorDbMaker");
18 gSystem->Load(
"St_db_Maker");
19 gSystem->Load(
"StDbUtilities");
20 gSystem->Load(
"StEmcRawMaker");
21 gSystem->Load(
"StMcEvent");
22 gSystem->Load(
"StMcEventMaker");
23 gSystem->Load(
"StEmcSimulatorMaker");
24 gSystem->Load(
"StEmcADCtoEMaker");
25 gSystem->Load(
"StEpcMaker");
26 gSystem->Load(
"StDbBroker");
27 gSystem->Load(
"StEEmcUtil");
28 gSystem->Load(
"StAssociationMaker");
29 gSystem->Load(
"StTriggerUtilities");
30 gSystem->Load(
"StEmcOfflineCalibrationMaker");
35 TChain *ElectronChain =
new TChain(
"calibTree");
37 ifstream filelist(listname,ifstream::in);
40 if (!filelist.good())
break;
42 ElectronChain->Add(file);
49 msg->SwitchOff(
"Could not make BEMC detector");
52 dbMaker->SetDateTime(20120501,200000);
59 cout <<
"Successful Init" << endl;
62 for (Int_t iEntry = 0; iEntry < ElectronChain->GetEntries(); ++iEntry){
63 if (ElectronChain->GetEvent(iEntry) <= 0){
64 cout <<
"BROKEN!" << endl;
68 if (iEntry%10000 == 0)
69 cout <<
"Working on event: " << iEntry << endl;
72 Int_t iret = chain->
Make(iEntry);
74 cout <<
"Bad return code" << endl;
virtual void Clear(Option_t *option="")
User defined functions.