StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGenericL2Emulator.h
1 // $Id: StGenericL2Emulator.h,v 1.13 2009/02/04 20:25:38 rfatemi Exp $
2 
3 /* \class StGenericL2Emulator
4 \author Jan Balewski
5 
6 Interfaces L2 algos to the STAR ofl software
7 
8  */
9 
10 
11 #ifndef STAR_StGenericL2Emulator
12 #define STAR_StGenericL2Emulator
13 #include <vector>
14 
15 class StTriggerSimuMaker;
16 class StEEmcDb;
17 class StEmcGeom;
18 class StEmcDecoder;
19 class L2EmcDb;
20 
21 #include "L2algoUtil/L2VirtualAlgo.h"
22 #include "StVirtualTriggerSimu.h"
23 
24 
26  private:
27  int mTotInpEve;
28  TString mOutPath;
29  TString mSetPath;
30 
31  void doBanksFromStRawData();
32  void doBanksFromMuDst();
33 
34  // needed to regenerate raw data banks
35  StEEmcDb *mDbE;
36  StEmcGeom *mGeomB;
37  StEmcDecoder *mMappB;
38  // StTriggerSimuMaker *mHeadMaker;
39  //void setHeadMaker(StTriggerSimuMaker *maker) { mHeadMaker = maker; }
40 
41 
42  protected:
43  int mMCflag; // set mcFlag=0 for real data
44  int mYear;
45  bool mUseMuDst;
46 
47  // holds all instantiated L2algos
48  L2VirtualAlgo **mL2algo; // actual algos
49  int mL2algoN; //# of existing algos (time-stamp dependent)
50 
51  L2EmcDb *mL2EmcDb;
52  int mYearMonthDay,mHourMinSec;
53  TString mSetupPath;
54 
55  //replicas of oryginal daq data containers, tmp open for export
56  unsigned short *mBTOW_BANK;
57  unsigned short *mETOW_BANK;
58  int mBTOW_in, mETOW_in;
59  void *mTrigData; // I do not want to deal with this content here
60 
61  void init();
62  void make();
63  void addTriggerList();
64  void initRun1(); // before algos are initialized
65  void initRun2(int runNo); // after algos are initialized
66  void finish();
67  void clear();
68 
69  public:
71  virtual ~StGenericL2Emulator();
72  void printBEtowers();
73  void printBEblocks();
74 
75  unsigned short *getBtowBank(){return mBTOW_BANK;}
76  unsigned short *getEtowBank(){return mETOW_BANK;}
77  int getBtowIn(){return mBTOW_in;}
78  int getEtowIn(){return mETOW_in;}
79 
80  void useStEvent() {mUseMuDst=false;}
81  void setMC(int x=true) {mMCflag=x;}
82  void setSetupPath(char *x) { mSetupPath=x;}
83  void setOutPath(char *x) { mOutPath=x;}
84 
85  vector <int> mAcceptTriggerList;
86  vector <int> mVetoTriggerList;
87  StTriggerSimuDecision isTrigger(int trigId);
88 
90  const unsigned int* result() const;
91 
92  ClassDef(StGenericL2Emulator,0)
93 };
94 
95 #endif
96 
97 // $Log: StGenericL2Emulator.h,v $
98 // Revision 1.13 2009/02/04 20:25:38 rfatemi
99 // Update class StEemcDb
100 //
101 // Revision 1.12 2009/01/26 15:09:07 fisyak
102 // Add missing (in ROOT 5.22) includes
103 //
104 // Revision 1.11 2008/01/17 01:56:52 kocolosk
105 // export 128-byte emulated L2Result
106 //
107 // Revision 1.10 2007/12/09 15:56:52 rfatemi
108 // allow BEMC to take adc from StEvent instead of MuDst
109 //
110 // Revision 1.9 2007/11/19 22:18:17 balewski
111 // most L2algos provide triggerID's
112 //
113 // Revision 1.8 2007/11/18 21:58:53 balewski
114 // L2algos triggerId list fixed
115 //
116 // Revision 1.7 2007/11/13 00:12:26 balewski
117 // added offline triggerID, take1
118 //
119 // Revision 1.6 2007/11/08 21:29:10 balewski
120 // now L2emu runs on M-C
121 //
122 // Revision 1.5 2007/11/06 22:07:20 balewski
123 // added timeStamp controlled L2 setup from Jason
124 //
125 // Revision 1.4 2007/11/02 17:42:56 balewski
126 // cleanup & it started to work w/ L2upsilon
127 //
128 // Revision 1.3 2007/10/25 02:06:54 balewski
129 // added L2upsilon & binary event dump
130 //
131 // Revision 1.2 2007/10/23 02:47:11 balewski
132 // cleanup
133 //
134 // Revision 1.1 2007/10/22 23:09:58 balewski
135 // split L2 to generic and year specific, not finished
136 //
const unsigned int * result() const
bag of 64 bytes whose interpretation changes year-by-year
void printBEblocks()
regenerated banks
void printBEtowers()
hits in StEvent