14 TH1D refMult(
"refMult",
"refMult",100,0.,100.);
16 void exampleRefMult(
const char* dir=
"",
const char* file=
"/star/u/laue/afsWork/dAu200.lis",
const char* filter=
"st:MuDst.root",
const
17 char* outFile=
"test.root") {
18 gROOT->LoadMacro(
"StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
19 loadSharedLibraries();
32 cout <<
"time to load chain: " << timer.elapsedTime() <<endl;
36 cout << maker->
chain()->GetEntries() <<
" events in chain" << endl;
37 TMemStat memStat(
"exampleRefMult");
38 while ( !(iret=maker->
Make()) ) {
41 int referenceMultiplicity = muEvent->
refMult();
42 refMult->Fill(referenceMultiplicity);
43 cout <<
" #" << counter;
44 cout <<
" refMult= "<< referenceMultiplicity;
45 cout <<
" used= "<< memStat.Used();
46 cout <<
" size= "<< memStat.ProgSize();
51 if (counter) cout <<
"time/event " << timer.elapsedTime()/counter <<endl;
52 cout <<
" # of events:" << counter << endl;
56 TFile f(outFile,
"RECREATE");
StMuDstMaker(const char *name="MuDst")
Default constructor.
static void setLevel(unsigned int level)
sets the debug level
unsigned short refMult(int vtx_id=-1)
Reference multiplicity of charged particles as defined in StEventUtilities/StuRefMult.hh for vertex vtx_id (-1 is default index from StMuDst)
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.