StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fzd2print.C
1 #include <iostream.h>
2 
3 class St_geant_Maker;
4 class EEmcMCData;
5 
6 
7 TBrowser *b = 0;
8 St_geant_Maker *geant= 0;
9 // reads .fzd file and prints on the screen
10 
11 // ______________________________________________
12 void fzd2print(const Int_t Nevents=1, const Char_t *fzfile ="/star/u/spinka/EEMC_sim1/Data/singleGamma1.fzd") {
13  Int_t i=0;
14  gSystem->Load("St_base");
15  gSystem->Load("StChain");
16  gSystem->Load("StarClassLibrary");
17 
18  gROOT->LoadMacro("$STAR/StRoot/macros/bfc.C");
19  gSystem->Load("StEEmcUtil.so");
20  bfc(0,"fzin sim_T gen_T nodefault ",fzfile);
21  /* note, if BFC crashes due to missing DB time stamp your fzd file is strange
22  you can overcome the crash by everwiting event time stamp with
23  the value of your choice. Add sdt20090101 to the chain options.
24  Note, you take responsibility for content of DB for this time stamp.
25  Jan B.
26  */
27 
28  EEmcMCData *evIN=new EEmcMCData;
29 
30  for (i=1; i<=Nevents; i++ ) {
31  chain->Clear();
32  if (chain->Make(i)>=kStEOF) break;
33  printf("%2d ====================================\n",i);
34  int nh=-1;
35  nh = evIN->readEventFromChain(chain);
36  printf(" actual RAW geant EEMC hits =%d nh\n",nh);
37  evIN->print();
38 
39  }
40 }
41 
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StChain.cxx:77
Definition: Stypes.h:43
virtual Int_t Make()
Definition: StChain.cxx:110