00001 #ifndef __EMCTOWERCONTENTV2_H__
00002 #define __EMCTOWERCONTENTV2_H__
00003
00004 #ifndef __EMCTOWERCONTENT_H__
00005 #include "emcTowerContent.h"
00006 #endif
00007
00012 class emcTowerContentv2 : public emcTowerContent
00013 {
00014
00015 public:
00016
00017 emcTowerContentv2();
00018
00019 virtual ~emcTowerContentv2();
00020
00021 int ADC(void) const { return fADC; }
00022
00023 int AMUPre(void) const { return fAMUPre; }
00024
00025 int AMUPost(void) const { return fAMUPost; }
00026
00027 int AMUTAC(void) const { return fAMUTAC; }
00028
00029 int BeamClock(void) const { return fBeamClock; }
00030
00031 int Channel(void) const { return fChannel; }
00032
00033 int DataError(void) const { return fDataError; }
00034
00035 float Energy(void) const { return fEnergy; }
00036
00037 unsigned int ErrorNeighbours(void) const { return fErrorNeighbours; }
00038
00039 int FEM(void) const { return fFEM; }
00040
00041 bool hasCalib(void) const { return fHasCalib; }
00042 bool hasDC(void) const { return fHasDC; }
00043 bool hasGain(void) const { return true; }
00044 bool hasRaw(void) const { return fHasRaw; }
00045
00046 bool canHaveCalib() const { return true; }
00047 bool canHaveDC() const { return true; }
00048 bool canHaveGain() const { return true; }
00049 bool canHaveRaw() const { return true; }
00050
00051 int HG(void) const { return fHG; }
00052 int HGPost(void) const { return fHGPost; }
00053 int HGPre(void) const { return fHGPre; }
00054
00055 float Gain(void) const { return fGain; }
00056
00057 void identify(std::ostream& os=std::cout) const;
00058
00059 int isValid() const;
00060
00061 bool isSimulated(void) const { return false; }
00062
00063 bool isMerged(void) const { return false; }
00064
00065 bool isZero(void) const;
00066
00067 int LG(void) const { return fLG; }
00068 int LGPost(void) const { return fLGPost; }
00069 int LGPre(void) const { return fLGPre; }
00070
00071 void print(std::ostream& out=std::cout, int level=0) const;
00072
00073 void Reset();
00074
00075 void SetADCTDC(int adc, int tdc, int hg=0, int lg=0);
00076
00077 void SetCalibrated(float energy, float tof);
00078
00079 void SetDataError(int dataerror);
00080
00081 void SetGain(float gain);
00082
00083 void SetID(int fem, int channel);
00084
00085 void SetNeighbours(unsigned int error, unsigned int warning);
00086
00087 void SetRaw(int hgpost, int hgpre,
00088 int lgpost, int lgpre,
00089 int tac,
00090 int amupre=0,
00091 int amupost=0,
00092 int amutac=0,
00093 int beamclock=0);
00094
00095 int TAC(void) const { return fTAC; }
00096 int TDC(void) const { return fTDC; }
00097 float ToF(void) const { return fTOF; }
00098
00099 int TowerID(void) const { return fTowerID; }
00100
00101 unsigned int WarnNeighbours(void) const { return fWarnNeighbours; }
00102
00103 void Zero(void);
00104
00105 private:
00106
00107 bool fHasCalib;
00108 bool fHasDC;
00109 bool fHasRaw;
00110 int fFEM;
00111 int fChannel;
00112 int fDataError;
00113 unsigned int fErrorNeighbours;
00114 unsigned int fWarnNeighbours;
00115 int fHGPost;
00116 int fHGPre;
00117 int fLGPost;
00118 int fLGPre;
00119 int fTAC;
00120 int fTDC;
00121 int fADC;
00122 int fHG;
00123 int fLG;
00124 int fTowerID;
00125 int fBeamClock;
00126 short fAMUPre;
00127 short fAMUPost;
00128 short fAMUTAC;
00129 float fEnergy;
00130 float fTOF;
00131 float fGain;
00132
00133 ClassDef(emcTowerContentv2,1)
00134 };
00135
00136 #endif