13 #include "TClassTable.h"
15 #include "TDataSetIter.h"
16 #include "StBFChain.h"
17 #include "StIOMaker.h"
18 void bfc (
const Int_t
Last,
21 const Char_t *outfile,
22 const Char_t *TreeFile);
25 #define BIT(n) (1 << (n))
26 #define SETBIT(n,i) ((n) |= (1 << i))
27 #define CLRBIT(n,i) ((n) &= ~(1 << i))
28 #define TESTBIT(n,i) ((Bool_t)(((n) & (1 << i)) != 0))
39 void dEdx(Int_t nevents=1000,
41 "/star/data08/reco/dAuMinBias/FullField/P03ih/2003/040/st_physics_4040004_raw_0010010.event.root",
45 const char* rootFile=
"", Int_t mode = 2)
47 if (gClassTable->GetID(
"TTable") < 0) {
48 gSystem->Load(
"libTable");
52 gROOT->LoadMacro(
"bfc.C");
57 TString Chain(
"in,TpcHitMover,CorrX,OSpaceZ2,OGridLeak3D,dEdxY2,magF,StEvent,mysql,NoDefault");
58 TString RootFile(rootFile);
60 RootFile = gSystem->BaseName(MainFile);
61 RootFile.ReplaceAll(
".event",
"");
63 chain = bfc(-1,Chain.Data(),MainFile,0,RootFile.Data());
65 StMaker *tofCalib = chain->Maker(
"tofCalib");
66 if (tofCalib) chain->AddAfter(
"tofCalib",dEdxY2);
69 SETBIT(Mode,StdEdxY2Maker::kCalibration);
70 SETBIT(Mode,StdEdxY2Maker::kGASHISTOGRAMS);
74 SETBIT(Mode,StdEdxY2Maker::kDoNotCorrectdEdx);
75 if ((mode/1000)%10) SETBIT(Mode,StdEdxY2Maker::kMakeTree);
76 SETBIT(Mode,StdEdxY2Maker::kPadSelection);
77 SETBIT(Mode,StdEdxY2Maker::kPadSelection);
78 SETBIT(Mode,StdEdxY2Maker::kAlignment);
86 cout <<
" set dEdxY2 Mode " << Mode <<
" =======================================" << endl;
87 dEdxY2->SetMode(Mode);
89 if (! gROOT->IsBatch()) dEdxY2->SetDebug(1);
90 StMaker *db = chain->Maker(
"db");
91 if (db) db->SetDebug(1);
92 if (nevents >= 0) chain->Init();
96 inMk->SetBranch(
"histBranch",0,
"0");
97 inMk->SetBranch(
"eventBranch",0,
"0");
98 inMk->SetBranch(
"runcoBranch",0,
"0");
99 inMk->SetBranch(
"dstBranch",0,
"r");
101 chain->EventLoop(1,nevents);
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual TDataSet * Last() const
Return the last object in the list. Returns 0 when list is empty.