StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcEventReadMacro.C
1 // $Id: StMcEventReadMacro.C,v 1.24 2006/08/15 21:43:04 jeromel Exp $
2 // $Log: StMcEventReadMacro.C,v $
3 // Revision 1.24 2006/08/15 21:43:04 jeromel
4 // Fix rhic -> rhic.bnl.gov
5 //
6 // Revision 1.23 2005/10/06 20:25:21 fisyak
7 // Don't need db
8 //
9 // Revision 1.22 2005/09/29 00:46:19 fisyak
10 // Persistent McEvent
11 //
12 // Revision 1.21 2005/07/07 19:43:42 calderon
13 // Load EEmcUtil.
14 // Add switch for Igt.
15 //
16 // Revision 1.20 2005/05/11 21:02:57 calderon
17 // Add switch for SSD.
18 //
19 // Revision 1.19 2005/04/18 20:13:59 calderon
20 // Add switches to load/or not the Fgt and Fst hits.
21 //
22 // Revision 1.18 2002/08/15 14:49:27 calderon
23 // Go back to loading St_Tables instead of loading each table individually...
24 // (as was the case since revision 1.12 back in April 2000!)
25 //
26 // Revision 1.17 2001/04/09 17:47:15 calderon
27 // load StEmcUtil instead of St_emc_Maker
28 //
29 // Revision 1.16 2000/06/22 23:54:30 calderon
30 // add gSystemLoad->("libglobal_Tables"); because it is needed for year2a
31 //
32 // Revision 1.15 2000/06/06 03:03:30 calderon
33 // Use with new Emc classes.
34 //
35 // Revision 1.14 2000/04/20 17:02:42 calderon
36 // Modified macros to continue looping when status = 3
37 // Pick up maker with name "StMcAnalysisMaker" instead of "McAnalysis"
38 // in StAssociator.C
39 //
40 // Revision 1.13 2000/04/13 22:00:24 calderon
41 // set dst branch and appropriate tables as per Kathy
42 //
43 // Revision 1.12 2000/04/12 17:39:02 kathy
44 // change to only load table libraries needed: lib*_Tables instead of all tables: St_Tables
45 //
46 // Revision 1.11 2000/01/19 21:00:40 kathy
47 // update macros to use standard default xdf files in /afs/rhic.bnl.gov/star/data/samples
48 //
49 // Revision 1.10 2000/01/12 20:29:15 calderon
50 // Changed default file to the one produced weekly by Lidia in
51 // /star/rcf/test/dev/tfs_Linux/Tue/year_2a/hc_standard/
52 //
53 // Revision 1.9 1999/12/14 18:18:01 calderon
54 // using new StMcEvent, StEvent & StAssociationMaker
55 //
56 // Revision 1.8 1999/12/03 01:01:33 calderon
57 // Updated for new StMcEvent 2.0 and StMcEventMaker.
58 // Uses StTpcDb to get the geometry info (calib has some problems still).
59 //
60 // Revision 1.7 1999/11/03 22:47:33 calderon
61 // Changed default file. Previous one no longer existed.
62 //
63 // Revision 1.6 1999/07/28 21:29:34 calderon
64 // Modified event loop: use 'if' and 'goto' to avoid using 'for'
65 //
66 // Revision 1.5 1999/07/28 20:27:46 calderon
67 // Version with SL99f libraries
68 //
69 // Revision 1.4 1999/07/23 19:57:26 calderon
70 // Load StarClassLibrary before loading StMcEvent
71 //
72 // Revision 1.3 1999/07/23 14:35:43 calderon
73 // Updated names of default files and of packages
74 //
75 // Revision 1.2 1999/07/23 10:53:52 kathy
76 // put in header info in Manuel's macros
77 //
78 //
80 // owner: Manuel Calderon de la Barca Sanchez
81 //
82 // what it does: reads .geant.root file,
83 // loads StMcEvent by putting StMcEventMaker in chain
84 //
85 // note: for more info on StMcEvent and StAssociationMaker, do a
86 // cvs checkout and say "make" in the doc/tex directory - you'll
87 // get a ps file with user guide and reference manual.
89 //
90 //
91 //======================================================================
92 class StChain;
93 class St_DataSet;
95 TBrowser *brow=0;
96 
97 
98 // The acual file to be used is passed as an argument to the macro, or a default can be set
99 
100 void StMcEventReadMacro(Int_t nevents=1,
101  const char *MainFile= "/star/rcf/test/new/trs_sl302.ittf/year_2005/cucu200_minbias/rcf1216_05_200evts.geant.root") {
102  gROOT->LoadMacro("bfc.C");
103  bfc(-1,"in,McEvent,nodefault",MainFile);
104  // IO Maker
105  StIOMaker *IOMk = (StIOMaker *) chain->Maker("inputStream");
106  IOMk->SetDebug();
107  IOMk->SetIOMode("r");
108  IOMk->SetBranch("*",0,"0"); //deactivate all branches
109  IOMk->SetBranch("geantBranch",0,"r");
110  IOMk->SetBranch("dstBranch",0,"r");
111  // StMcEvent
112  StMcEventMaker *mcEventReader = (StMcEventMaker *) chain->Maker("StMcEventMaker");
113  mcEventReader->doPrintEventInfo = true;
114  mcEventReader->doPrintMemoryInfo = false;
115  mcEventReader->doUseTpc = true;
116  mcEventReader->doUseSvt = true;
117  mcEventReader->doUseSsd = true;
118  mcEventReader->doUseFtpc = true;
119  mcEventReader->doUseRich = true;
120  mcEventReader->doUseBemc = true;
121  mcEventReader->doUseBsmd = true;
122  mcEventReader->doUseIst = true;
123  mcEventReader->doUseFst = true;
124  mcEventReader->doUseFgt = true;
125  mcEventReader->doUseIgt = true;
126 
127  chain->PrintInfo();
128  Int_t initStat = chain->Init(); // This should call the Init() method in ALL makers
129  if (initStat) chain->Fatal(initStat, "during Init()");
130  chain->EventLoop(1,nevents);
131 }
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
Definition: StIOInterFace.h:35
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
Bool_t doPrintMemoryInfo
lots of screen output
Definition: AgUStep.h:26