StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcADCtoEMaker.h
1 
13 #ifndef STAR_StEmcADCtoEMaker
14 #define STAR_StEmcADCtoEMaker
15 
16 #include "StMaker.h"
17 #include "TH1.h"
18 #include "TH2.h"
19 #include "tables/St_controlADCtoE_Table.h"
20 #include "StBemcData.h"
21 #include "StEmcRawMaker/defines.h"
22 #include "StEvent/StEnumerations.h"
23 
24 
25 class StEmcCollection;
26 class StEmcDecoder;
27 class StEmcGeom;
28 class StEmcRawData;
29 class StEvent;
30 
31 class StEmcADCtoEMaker : public StMaker
32 {
33 public:
34  StEmcADCtoEMaker(const char *name="Eread");
35  virtual ~StEmcADCtoEMaker();
36  virtual Int_t Init();
37  virtual Int_t InitRun(Int_t);
38  virtual Int_t Make();
39  virtual Int_t Finish();
40 
46  void setCheckStatus(StDetectorId det, int flag, const char* option="");
47 
50  void setDoZeroSuppression(StDetectorId det, int flag) { getControlTable()->DeductPedestal[det-kBarrelEmcTowerId] = flag; }
51 
53  void setPedestalCut(StDetectorId det, float nRMS) { getControlTable()->CutOff[det-kBarrelEmcTowerId] = nRMS; }
54 
56  void setCheckCrateHeaderCorruption(StDetectorId det, int flag) { getControlTable()->CheckCrate[det-kBarrelEmcTowerId] = flag; }
57 
59  {
60  return mBemcData;
61  }
62  inline controlADCtoE_st* getControlTable()
63  {
64  return mBemcData->getControlTable();
65  }
67  Bool_t isCorrupted();
68 
69  void setPrint(Bool_t);
70  inline void setEmbeddingMode(Bool_t a)
71  {
72  mEmbed = a;
73  }
74  inline void saveAllStEvent(Bool_t a)
75  {
76  mBemcData->saveAllStEvent(a);
77  }
78 
79  void printMap(Int_t,char*);
80 
81  virtual const char * GetCVS() const
82  {
83  static const char cvs[]="Tag $Name: $ $Id: StEmcADCtoEMaker.h,v 1.54 2017/06/02 16:41:57 jlzhang Exp $ built " __DATE__ " " __TIME__ ;
84  return cvs;
85  }
86 
87 private:
88 
89  StEvent* mEvent;
90  StBemcData* mBemcData;
91 
92  Bool_t mMyStEvent;
93  Bool_t mEmbed;
94  Bool_t mIsCorrupted;
95  Bool_t mTestedCorruption;
96 
97  virtual Bool_t prepareEnvironment();
98  virtual Bool_t makeBemc();
99  virtual void fillHistograms();
100  virtual void testCorruption();
101 
102 
103  ClassDef(StEmcADCtoEMaker, 3)
104 };
105 
106 #endif
void setEmbeddingMode(Bool_t a)
Set embedding mode (default is kFALSE)
Bool_t isCorrupted()
Returns if BTOW is corrupted or not.
virtual Int_t Init()
Init function. This method initializes the histograms.
void setPrint(Bool_t)
Obsolete function; users can control messages with logger config file.
virtual Int_t Make()
Process each event.
StBemcData * getBemcData()
Return the StBemcData pointer.
void setCheckCrateHeaderCorruption(StDetectorId det, int flag)
suppress hits if crate fails corruption check. Default is true.
controlADCtoE_st * getControlTable()
Return Control table (NULL)
Definition: StBemcRaw.h:215
StEmcADCtoEMaker(const char *name="Eread")
StEmcADCtoEMaker constructor.
virtual Int_t Finish()
Finish function.
StEmcCollection * getEmcCollection()
Return emcCollection.
void printMap(Int_t, char *)
print map for an EMC detector
void setDoZeroSuppression(StDetectorId det, int flag)
void saveAllStEvent(Bool_t a)
Set to kTRUE if all hits are to be saved on StEvent.
Definition: StBemcRaw.h:178
virtual Int_t InitRun(Int_t)
InitRun function.
void setPedestalCut(StDetectorId det, float nRMS)
suppress hits if (adc-ped) < nRMS*pedRMS. Default is 1.5 for BSMD, BPRS.
controlADCtoE_st * getControlTable()
Return Control table (NULL)
void saveAllStEvent(Bool_t a)
Set to kTRUE if all hits are to be saved on StEvent.
virtual ~StEmcADCtoEMaker()
StEmcADCtoEMaker destructor.
void setCheckStatus(StDetectorId det, int flag, const char *option="")