StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dumpL2info.C
1 dumpL2info() {
2  gROOT->Macro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
3  gStyle->SetPadGridX(0);
4  gStyle->SetPadGridY(0);
5 
6  muMk=new StMuDstMaker(0,0,"","/star/data42/reco/productionMinBias/ReversedFullField/P05ic/2004/008/st_physics_5008027_raw_4020001.MuDst.root");
7  muMk->Init();
8 
9  const Int_t n_evt=100;
10  const Int_t max_trig=32;
11  TrgDataType2005 *trgDataStruct = new TrgDataType2005;
12  memset(trgDataStruct,0,sizeof(TrgDataType2005));
13  for (Int_t i_evt=0; i_evt<n_evt; i_evt++) {
14  Int_t ret=muMk->Make();
15  if (ret)
16  break;
17  StMuEvent *event=muMk->muDst()->event();
18  cout << "Run " << event->runId() << ", event " << event->eventId() << endl;
19  StTriggerId &nom_trig=event->triggerIdCollection().nominal();
20  cout << "Triggers ";
21  for (Int_t i_trig=0; i_trig<max_trig; i_trig++) {
22  if (nom_trig.triggerId(i_trig)!=0)
23  cout << nom_trig.triggerId(i_trig) << " (v " << nom_trig.version(i_trig)<< ") ";
24  else if (i_trig==0)
25  cout << "WHAAAAAAT??? No trigger Id ????" << endl;
26  }
27  cout << endl;
28  cout << "vertex: " << event->primaryVertexPosition() << endl;
29 
30  // L2 stuff
31  cout << "L2Result.GetSize " << event->L2Result().GetSize() << endl;
32  StTriggerData2005 *trgData = new StTriggerData2005(trgDataStruct,event->runId());
33  for (Int_t i_trig=0; i_trig<7; i_trig++) {
34  cout << "L2 trig " << i_trig << " : isTrig "
35  << trgData->isL2Triggered((StL2AlgorithmId)i_trig) << endl;
36  }
37  int L2ResSize=event->L2Result().GetSize();
38  int k;
39  cout << "\nL2result size="<<L2ResSize<<" dump raw values :"<<endl;
40  for(k=0;k<L2ResSize;k++) {
41  cout<<"k="<<k<<" val/dec="<<L2Res[k]<<endl;
42  }
43  delete trgData;
44  }
45 }
virtual int Make()
StMuDst * muDst()
Definition: StMuDstMaker.h:425
virtual int Init()
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
Definition: StMuDst.h:320