StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rdEzt2Print.C
1 int rdEzt2Print(
2  int nEve=5,
3  Int_t nFiles = 10,
4  char* file="R6020035.lis",
5  char* inDir = "./"
6  ){
7  inDir="/star/data05/scratch/eemcdb/muDst/2005/034/";
8  file="st_physics_6034014_raw_1020001.MuDst.root";
9  gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
10  loadSharedLibraries();
11  cout << " loading done " << endl;
12 
13  // create chain
14  chain = new StChain("StChain");
15 
16  printf("adding muDst from '%s' ....\n",file);
17  // Now we add Makers to the chain...
18  muMk = new StMuDstMaker(0,0,inDir,file,"MuDst.root",nFiles);
19  TChain* tree=muMk->chain(); assert(tree);
20  int nEntries=tree->GetEntries();
21  printf("total eve in chain =%d\n",nEntries);
22  printf("in=%s%s=\n",inDir,file);
23  //return;
24 
25  muMk->SetStatus("*",0);
26  muMk->SetStatus("MuEvent",1);
27  muMk->SetStatus("EztAll",1);
28  chain->Init();
29  chain->ls(3);
30  muMk->printArrays();
31 
32  printf("All Ezt-branches set\n");
33  int eventCounter=0;
34  int stat=0;
35 
36  //---------------------------------------------------
37  while ( 1) {// loop over events
38  if(eventCounter>=nEve) break;
39  eventCounter++;
40  chain->Clear();
41  stat = chain->Make();
42  if(stat) break;
43 
44  EztEventHeader *eHead= muMk->muDst()->eztHeader();
45  EztEmcRawData *eETow= muMk->muDst()->eztETow();
46  EztEmcRawData *eESmd= muMk->muDst()->eztESmd();
47  EztTrigBlob *eTrig= muMk->muDst()->eztTrig();
48  printf("\n\n ====================%d processing ==============\n", eventCounter);
49 
50  eHead->print();
51  // eETow->print(0); // 0 -less , 1 -more printing
52  // eESmd->print(0); // 0 -less , 1 -more printing
53  // eTrig->print(0); // 0 -less , 1 -more printing
54  int tMinB=muMk->muDst()->event()->triggerIdCollection().nominal().isTrigger(66007);
55  int tEHT10=muMk->muDst()->event()->triggerIdCollection().nominal().isTrigger(66210);
56  printf("trig: minB=%d EHT10=%d\n",tMinB,tEHT10);
57  // break;
58  }
59  printf("sorting done, nEve=%d of %d\n",nEve, nEntries);
60 
61 }
TTree * tree()
Returns pointer to the current TTree, the top level io structure that holds the event, track, v0, etc. information in branches of that tree.
Definition: StMuDstMaker.h:427
StMuDst * muDst()
Definition: StMuDstMaker.h:425
StMuDstMaker(const char *name="MuDst")
Default constructor.
static EztEmcRawData * eztESmd()
returns pointer to eztESmd +pre/post
Definition: StMuDst.h:459
static EztTrigBlob * eztTrig()
returns pointer to eztTrig
Definition: StMuDst.h:448
static EztEventHeader * eztHeader()
returns pointer to eztHeader
Definition: StMuDst.h:442
static EztEmcRawData * eztETow()
returns pointer to ETOW
Definition: StMuDst.h:456
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
Definition: StMuDst.h:320
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
Definition: StMuDstMaker.h:426
void SetStatus(const char *arrType, int status)