00001 // $Id: StMcEventReadMacro.C,v 1.24 2006/08/15 21:43:04 jeromel Exp $ 00002 // $Log: StMcEventReadMacro.C,v $ 00003 // Revision 1.24 2006/08/15 21:43:04 jeromel 00004 // Fix rhic -> rhic.bnl.gov 00005 // 00006 // Revision 1.23 2005/10/06 20:25:21 fisyak 00007 // Don't need db 00008 // 00009 // Revision 1.22 2005/09/29 00:46:19 fisyak 00010 // Persistent McEvent 00011 // 00012 // Revision 1.21 2005/07/07 19:43:42 calderon 00013 // Load EEmcUtil. 00014 // Add switch for Igt. 00015 // 00016 // Revision 1.20 2005/05/11 21:02:57 calderon 00017 // Add switch for SSD. 00018 // 00019 // Revision 1.19 2005/04/18 20:13:59 calderon 00020 // Add switches to load/or not the Fgt and Fst hits. 00021 // 00022 // Revision 1.18 2002/08/15 14:49:27 calderon 00023 // Go back to loading St_Tables instead of loading each table individually... 00024 // (as was the case since revision 1.12 back in April 2000!) 00025 // 00026 // Revision 1.17 2001/04/09 17:47:15 calderon 00027 // load StEmcUtil instead of St_emc_Maker 00028 // 00029 // Revision 1.16 2000/06/22 23:54:30 calderon 00030 // add gSystemLoad->("libglobal_Tables"); because it is needed for year2a 00031 // 00032 // Revision 1.15 2000/06/06 03:03:30 calderon 00033 // Use with new Emc classes. 00034 // 00035 // Revision 1.14 2000/04/20 17:02:42 calderon 00036 // Modified macros to continue looping when status = 3 00037 // Pick up maker with name "StMcAnalysisMaker" instead of "McAnalysis" 00038 // in StAssociator.C 00039 // 00040 // Revision 1.13 2000/04/13 22:00:24 calderon 00041 // set dst branch and appropriate tables as per Kathy 00042 // 00043 // Revision 1.12 2000/04/12 17:39:02 kathy 00044 // change to only load table libraries needed: lib*_Tables instead of all tables: St_Tables 00045 // 00046 // Revision 1.11 2000/01/19 21:00:40 kathy 00047 // update macros to use standard default xdf files in /afs/rhic.bnl.gov/star/data/samples 00048 // 00049 // Revision 1.10 2000/01/12 20:29:15 calderon 00050 // Changed default file to the one produced weekly by Lidia in 00051 // /star/rcf/test/dev/tfs_Linux/Tue/year_2a/hc_standard/ 00052 // 00053 // Revision 1.9 1999/12/14 18:18:01 calderon 00054 // using new StMcEvent, StEvent & StAssociationMaker 00055 // 00056 // Revision 1.8 1999/12/03 01:01:33 calderon 00057 // Updated for new StMcEvent 2.0 and StMcEventMaker. 00058 // Uses StTpcDb to get the geometry info (calib has some problems still). 00059 // 00060 // Revision 1.7 1999/11/03 22:47:33 calderon 00061 // Changed default file. Previous one no longer existed. 00062 // 00063 // Revision 1.6 1999/07/28 21:29:34 calderon 00064 // Modified event loop: use 'if' and 'goto' to avoid using 'for' 00065 // 00066 // Revision 1.5 1999/07/28 20:27:46 calderon 00067 // Version with SL99f libraries 00068 // 00069 // Revision 1.4 1999/07/23 19:57:26 calderon 00070 // Load StarClassLibrary before loading StMcEvent 00071 // 00072 // Revision 1.3 1999/07/23 14:35:43 calderon 00073 // Updated names of default files and of packages 00074 // 00075 // Revision 1.2 1999/07/23 10:53:52 kathy 00076 // put in header info in Manuel's macros 00077 // 00078 // 00080 // owner: Manuel Calderon de la Barca Sanchez 00081 // 00082 // what it does: reads .geant.root file, 00083 // loads StMcEvent by putting StMcEventMaker in chain 00084 // 00085 // note: for more info on StMcEvent and StAssociationMaker, do a 00086 // cvs checkout and say "make" in the doc/tex directory - you'll 00087 // get a ps file with user guide and reference manual. 00089 // 00090 // 00091 //====================================================================== 00092 class StChain; 00093 class St_DataSet; 00094 St_DataSet *Event; 00095 TBrowser *brow=0; 00096 00097 00098 // The acual file to be used is passed as an argument to the macro, or a default can be set 00099 00100 void StMcEventReadMacro(Int_t nevents=1, 00101 const char *MainFile= "/star/rcf/test/new/trs_sl302.ittf/year_2005/cucu200_minbias/rcf1216_05_200evts.geant.root") { 00102 gROOT->LoadMacro("bfc.C"); 00103 bfc(-1,"in,McEvent,nodefault",MainFile); 00104 // IO Maker 00105 StIOMaker *IOMk = (StIOMaker *) chain->Maker("inputStream"); 00106 IOMk->SetDebug(); 00107 IOMk->SetIOMode("r"); 00108 IOMk->SetBranch("*",0,"0"); //deactivate all branches 00109 IOMk->SetBranch("geantBranch",0,"r"); 00110 IOMk->SetBranch("dstBranch",0,"r"); 00111 // StMcEvent 00112 StMcEventMaker *mcEventReader = (StMcEventMaker *) chain->Maker("StMcEventMaker"); 00113 mcEventReader->doPrintEventInfo = true; 00114 mcEventReader->doPrintMemoryInfo = false; 00115 mcEventReader->doUseTpc = true; 00116 mcEventReader->doUseSvt = true; 00117 mcEventReader->doUseSsd = true; 00118 mcEventReader->doUseFtpc = true; 00119 mcEventReader->doUseRich = true; 00120 mcEventReader->doUseBemc = true; 00121 mcEventReader->doUseBsmd = true; 00122 mcEventReader->doUseIst = true; 00123 mcEventReader->doUseFst = true; 00124 mcEventReader->doUseFgt = true; 00125 mcEventReader->doUseIgt = true; 00126 00127 chain->PrintInfo(); 00128 Int_t initStat = chain->Init(); // This should call the Init() method in ALL makers 00129 if (initStat) chain->Fatal(initStat, "during Init()"); 00130 chain->EventLoop(1,nevents); 00131 }
1.5.9