8 void TestRead(
const char* infile,
const char* outfile)
10 if (gClassTable->GetID(
"TTable") < 0) gSystem->Load(
"libTable");
11 gSystem->Load(
"St_base");
12 gSystem->Load(
"StChain");
13 gSystem->Load(
"St_Tables");
14 gSystem->Load(
"StMagF");
15 gSystem->Load(
"StUtilities");
16 gSystem->Load(
"StTreeMaker");
17 gSystem->Load(
"StIOMaker");
18 gSystem->Load(
"StarClassLibrary");
19 gSystem->Load(
"StTpcDb");
20 gSystem->Load(
"StDbUtilities");
21 gSystem->Load(
"StEvent");
22 gSystem->Load(
"StEventUtilities");
23 gSystem->Load(
"StMcEvent");
24 gSystem->Load(
"StMcEventMaker");
25 gSystem->Load(
"StAssociationMaker");
26 gSystem->Load(
"StMcAnalysisMaker");
27 gSystem->Load(
"StStrangeMuDstMaker");
28 gSystem->Load(
"StMuDSTMaker");
29 gSystem->Load(
"JetFinder");
31 cout <<
" loading done " << endl;
39 TH2* dEtaVsdPhi =
new TH2D(
"dEtaVsdPhi",
"#Delta#eta vs #Delta#phi",40, -pi, pi, 40, -1., 1.);
41 cout <<
" --- Set Cuts ---"<<endl;
45 cuts.triggerPtCut = 3.0;
46 cuts.pseudoRapidityCutOff = 1.0;
47 cuts.minNumberOfFitPoints = 22;
48 cuts.minNumberOfPoints = 25;
51 cout <<
" --- Create Filter ---"<<endl;
53 enum ioType {kWrite=0, kRead=1};
55 cout <<
"Read from file:\t"<<infile<<endl;
57 myFilter->setCuts(cuts);
59 cout <<
" --- Create HistMaker ---"<<endl;
61 myHister->setCuts(cuts);
62 myHister->setdEtaVsdPhi(dEtaVsdPhi);
64 cout <<
" --- Loop on events ---"<<endl;
65 int nEvents=myFilter->nEvents();
66 for (
int iev=0; iev<nEvents; ++iev) {
68 if (fmod(static_cast<double>(iev),1000.)==0.) {
69 cout <<
"\t --- chugging on event:\t"<<iev<<
"\t of :"<<nEvents<<endl;
75 myHister->fill(event);
78 cout <<
" --- Save Histograms --- "<<endl;
79 TFile* ofile =
new TFile(outfile,
"RECREATE");
static void setLevel(unsigned int level)
sets the debug level