emcTowerContentv1.h

Go to the documentation of this file.
00001 #ifndef __EMCTOWERCONTENTV1_H__
00002 #define __EMCTOWERCONTENTV1_H__
00003 
00004 #ifndef __EMCTOWERCONTENT_H__
00005 #include "emcTowerContent.h"
00006 #endif
00007 
00012 class emcTowerContentv1 : public emcTowerContent 
00013 {
00014 
00015 public:
00016 
00017   emcTowerContentv1();
00018 
00019   virtual ~emcTowerContentv1();
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 hasRaw(void) const { return fHasRaw; }
00044 
00045   bool canHaveCalib() const { return true; }
00046   bool canHaveDC() const { return true; }
00047   bool canHaveRaw() const { return true; }
00048 
00049   int HG(void) const { return fHG; }
00050   int HGPost(void) const { return fHGPost; }
00051   int HGPre(void) const { return fHGPre; }
00052   
00053   void identify(std::ostream& os=std::cout) const;
00054   
00055   int isValid() const;
00056 
00057   bool isSimulated(void) const { return false; }
00058 
00059   bool isMerged(void) const { return false; }
00060 
00061   bool isZero(void) const;
00062   
00063   int LG(void) const { return fLG; }
00064   int LGPost(void) const { return fLGPost; }
00065   int LGPre(void) const { return fLGPre; }
00066   
00067   void print(std::ostream& out=std::cout, int level=0) const;
00068   
00069   void Reset();
00070   
00071   void SetADCTDC(int adc, int tdc, int hg=0, int lg=0);
00072   
00073   void SetCalibrated(float energy, float tof);
00074   
00075   void SetDataError(int dataerror);
00076   
00077   void SetID(int fem, int channel);
00078 
00079   void SetNeighbours(unsigned int error, unsigned int warning);
00080   
00081   void SetRaw(int hgpost, int hgpre, 
00082               int lgpost, int lgpre,
00083               int tac,
00084               int amupre=0,
00085               int amupost=0,
00086               int amutac=0,
00087               int beamclock=0);
00088   
00089   int TAC(void) const { return fTAC; }
00090   int TDC(void) const { return fTDC; }
00091   float ToF(void) const { return fTOF; }
00092   
00093   int TowerID(void) const { return fTowerID; }
00094   
00095   unsigned int WarnNeighbours(void) const { return fWarnNeighbours; }
00096   
00097   void Zero(void);
00098   
00099 private:
00100   
00101   bool fHasCalib;
00102   bool fHasDC;
00103   bool fHasRaw;
00104   int fFEM;
00105   int fChannel;
00106   int fDataError;
00107   unsigned int fErrorNeighbours;
00108   unsigned int fWarnNeighbours;
00109   int fHGPost;
00110   int fHGPre;
00111   int fLGPost;
00112   int fLGPre;
00113   int fTAC;
00114   int fTDC;
00115   int fADC;
00116   int fHG;
00117   int fLG;
00118   int fTowerID;
00119   int fBeamClock;
00120   short fAMUPre;
00121   short fAMUPost;
00122   short fAMUTAC;
00123   float fEnergy;
00124   float fTOF;
00125 
00126   ClassDef(emcTowerContentv1,1) // EMCAL Tower data Version 1
00127 };
00128 
00129 #endif