StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StL2_2009EmulatorMaker.cxx
1 //
3 // StL2_2008EmulatorMaker Jan Balewski (Fall, 2007)
4 //
5 // Goal:
6 //
7 //
9 // StEvent
10 #include "StEventTypes.h"
11 
12 //MuDst
13 #include "StMuDSTMaker/COMMON/StMuTypes.hh"
14 
15 //L2 stuff
16 #include "L2algoUtil/L2btowCalAlgo09.h"
17 #include "L2algoUtil/L2etowCalAlgo09.h"
18 #include "L2jetAlgo/L2jetAlgo2009.h"
19 #include "L2pedAlgo/L2pedAlgo09.h"
20 #include "L2gammaAlgo/L2bemcGamma2009.h"
21 #include "L2gammaAlgo/L2eemcGamma2009.h"
22 #include "L2upsilon/L2Upsilon2009.h"
23 #include "L2algoUtil/l2Algorithm.h" // L2 results offsets
24 #include "StL2_2009EmulatorMaker.h"
25 
26 ClassImp(StL2_2009EmulatorMaker)
27 
28 StL2_2009EmulatorMaker::StL2_2009EmulatorMaker(const char *name) : StMaker(name){
29 }
30 
31 //========================================
32 StL2_2009EmulatorMaker::~StL2_2009EmulatorMaker(){
33 }
34 
35 #if 1 // disable for now, fix it one pp 2009 run starts,Jan
36 //========================================
37 //========================================
38 Int_t
39 StL2_2009EmulatorMaker::InitRun(int runNo){
40  //WARN: do NOT use runNo for any setup - it would break for M-C
41  //WARN: do NOT use runNo to controll setup of L2-algos- it would break for M-C
42 
43  initRun1();
44 
45  LOG_INFO << Form("::setupL2Algos2009(), dbDate=%d ", mYearMonthDay)<<endm;
46 
47  //setup every algo one by one, params may be time dependent
48  mL2algo.push_back(new L2btowCalAlgo09("btowCal",mL2EmcDb,mL2EmcGeom,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_BTOW_CAL));
49  mL2algo.push_back(new L2etowCalAlgo09("etowCal",mL2EmcDb,mL2EmcGeom,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_ETOW_CAL));
50  mL2algo.push_back(new L2pedAlgo09("ped",mL2EmcDb,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_EMC_PED));
51  mL2algo.push_back(new L2jetAlgo2009("jet",mL2EmcDb,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_DIJET));
52  mL2algo.push_back(new L2jetAlgo2009("jetHigh",mL2EmcDb,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_DIJET_HIGH));
53  mL2algo.push_back(new L2bemcGamma2009("bGamma",mL2EmcDb,mL2EmcGeom,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_BGAMMA));
54  mL2algo.push_back(new L2eemcGamma2009("eGamma",mL2EmcDb,mL2EmcGeom,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_EGAMMA));
55  mL2algo.push_back(new L2Upsilon2009("upsilon",mL2EmcDb,mL2EmcGeom,mL2EmcDb->logPath,L2RESULTS_2009_OFFSET_UPSILON));
56 
57  initRun2(runNo);
58 
59  LOG_INFO << "::InitRun() done, run=" <<runNo<<" isMC="<<mMCflag<<endm;
60  return kStOK;
61 }
62 #endif
63 //_____________________________________________________________________________
64 Int_t
65 StL2_2009EmulatorMaker::Init() {
66  init();
67  LOG_INFO <<Form("Init()")<<endm;
68 
69  return StMaker::Init();
70 }
71 
72 //========================================
73 void
74 StL2_2009EmulatorMaker::Clear(const Option_t*){
75  clear();
76  //slows down code: LOG_DEBUG<<"StL2_2009EmulatorMaker::Clear()"<<endm;
77 }
78 
79 
80 //========================================
81 Int_t
83 
84  make();
85  return kStOK;
86 }
87 
88 //========================================
89 Int_t
91  finish();
92  return kStOK;
93 }
94 
95 
96 #if 0
97 //_____________________________________________________________________________
98 void
99 StL2_2009EmulatorMaker::initHistoA(TString core) {
100  LOG_INFO <<Form("initHistoA(),")<<endm;
101 
102  assert(mHList);
103  memset(hA,0,sizeof(hA));
104 
105  hA[0]=0;
106  hA[1]=new TH1F(core+"trgID", "event counter for Jan",10,1,11);
107 
108  //.... add histos to the list
109  int i;
110  for(i=0;i<mxAH;i++) {
111  if( hA[i]==0) continue;
112  mHList->Add( hA[i]);
113  }
114 }
115 #endif
Definition: Stypes.h:40