/// @brief Class containing constants for PHOS and EMCAL
/// loaded libraries
+
#include "Rtypes.h"
#include "TString.h"
-
#ifndef ALIHLTCALOCONSTANTS_H
#define ALIHLTCALOCONSTANTS_H
-
-
-#define fgkALTROMAXSAMPLES 1008 /**<The maximum number of samples of the ALTRO*/
-#define fgkALTROMAXPRESAMPLES 15 //Constant
-#define fgkNGAINS 2
-#define fgkHIGHGAIN 1
-#define fgkLOWGAIN 0
-#define fkMAXBINVALUE 1023 //Constant
-
-
+#include "AliCaloConstants.h"
class AliHLTCaloConstants
{
-
public:
-
AliHLTCaloConstants();
virtual ~AliHLTCaloConstants();
- virtual Int_t GetMAXHOSTS() const = 0;
- virtual Int_t GetDEFAULTEVENTPORT() const = 0;
- // virtual Int_t GetMAXBINVALUE() const = 0;
-
+ virtual void InitConstants() = 0;
+
+ // Common PHOS / EMCAL stuff
+ static Int_t GetALTROMAXSAMPLES() { return ALTRO::ALTROMAXSAMPLES; };
+ static Int_t GetNGAINS() { return ALTRO::NGAINS; };
+ static Int_t GetHIGHGAIN() { return ALTRO::HIGHGAIN; };
+ static Int_t GetLOWGAIN() { return ALTRO::LOWGAIN; };
+ static Double_t GetHGLGFACTOR() { return CALO::HGLGFACTOR;}; //FR
+ static Int_t GetMAXBINVALUE() { return ALTRO::MAXBINVALUE; };
+ static Int_t GetCSPSPERFEE() { return CALO::CSPSPERFEE; };
+ static Int_t GetNALTROS() { return ALTRO::NALTROS; };
+ static Int_t GetNALTROCHANNELS() { return ALTRO::NALTROCHANNELS; };
+ static Int_t GetNBRANCHES() { return CALO::NBRANCHES; };
+ //static Int_t GetMAXHWADDRESSES() { return CALO::MAXHWADDRESSES; }
+ static Int_t GetMAXHWADDRESSES() { return PHOS::MAXHWADDR; }
+ // Detector specific stuff
+ // PHOS Only, bad move somewher else, PTH
+ virtual Int_t GetNZROWSRCU() const { return 56 ; } ;
+ virtual Int_t GetNXCOLUMNSRCU() const { return 16; } ;
+ // END PHOS Only
+
+ virtual Int_t GetNZROWSMOD() const = 0;
+ virtual Int_t GetNXCOLUMNSMOD() const = 0;
+ virtual Int_t GetNMODULES() const = 0;
+ virtual Int_t GetNRCUSPERMODULE() const = 0;
+ virtual Int_t GetNFEECS() const = 0;
- // virtual Int_t GetALTROMAXSAMPLES() const = 0;
-
-
- static Int_t GetALTROMAXSAMPLES() { return fgkALTROMAXSAMPLES; };
- static Int_t GetALTROMAXPRESAMPLES() { return fgkALTROMAXPRESAMPLES; } ;
- static Int_t GetNGAINS() { return fgkNGAINS; };
- static Int_t GetHIGHGAIN() { return fgkHIGHGAIN; };
- static Int_t GetLOWGAIN() { return fgkLOWGAIN; };
- static Int_t GetMAXBINVALUE() {return fkMAXBINVALUE; };
-
-
+ Int_t GetDDLOFFSET() const { return fkDDLOFFSET; }
+ Float_t GetCELLSTEP() const { return fkCELLSTEP; }
- virtual Int_t GetNZROWSRCU() const = 0;
- virtual Int_t GetNXCOLUMNSRCU() const = 0;
- virtual Int_t GetNZROWSMOD() const = 0;
- virtual Int_t GetNXCOLUMNSMOD() const = 0;
-
-
- // virtual Int_t GetNGAINS() const = 0;
- virtual Int_t GetNDATATYPES() const = 0;
- virtual Int_t GetPFMAXPATHLENGTH() const = 0;
- virtual Int_t GetPFDEFAULTNSAMPLES() const = 0;
- virtual Int_t GetPFDEFAULTSTARTINDEX() const = 0;
- virtual Double_t GetDEFAULTTAU() const = 0;
- virtual Int_t GetDEFAULTFS() const = 0;
- virtual Int_t GetMODULE0() const = 0;
- virtual Int_t GetMODULE1() const = 0;
- virtual Int_t GetMODULE2() const = 0;
- virtual Int_t GetMODULE3() const = 0;
- virtual Int_t GetMODULE4() const = 0;
- virtual Int_t GetCSPSPERFEE() const = 0;
- virtual Int_t GetRCU0() const = 0;
- virtual Int_t GetRCU1() const = 0;
- virtual Int_t GetRCU2() const = 0;
- virtual Int_t GetRCU3() const = 0;
- virtual Int_t GetZ0() const = 0;
- virtual Int_t GetZ1() const = 0;
- virtual Int_t GetX0() const = 0;
- virtual Int_t GetX1() const = 0;
- virtual Int_t GetNMODULES() const = 0;
- virtual Int_t GetNRCUS() const = 0;
- virtual Int_t GetNRCUSPERMODULE() const = 0;
- virtual Int_t GetNRCUSPERTOTAL() const = 0;
- virtual Int_t GetNFEECS() const = 0;
- virtual Int_t GetNALTROS() const = 0;
- virtual Int_t GetNALTROCHANNELS() const = 0;
- virtual Int_t GetNBRANCHES() const = 0;
- virtual Float_t GetCELLSTEP() const = 0;
- // EMCAL specific
- virtual Float_t GetMAXCELLSTEPETA() const { return 0; }; //FR
- virtual Float_t GetMINCELLSTEPETA() const { return 0; }//FR
- virtual Float_t GetCELLSTEPPHI() const { return 0; } //FR
- virtual Float_t GetCELLHEIGHT() const { return 0; } //FR
- virtual Float_t GetCELLANGLE() const { return 0; } //FR
- virtual Float_t GetRADLENGTH() const { return 0; } //FR
- virtual Float_t GetCRITICENERGY() const { return 0; }; //FR
- virtual Float_t GetCJ() const { return 0; }
- // end
- virtual Int_t GetNRCUSPERSECTOR() const = 0;
- virtual Int_t GetDDLOFFSET() const = 0;
- virtual TString GetDETNAME() const = 0;
-
-
- // private:
-
- public:
-
+ //EMCAL specific, !! Move somewhere else, PTH
+ Float_t GetCELLSTEPPHI() const { return fkCELLSTEPPHI; } //FR
+ Float_t GetCELLHEIGHT() const { return fkCELLHEIGHT; } //FR
+ Float_t GetCELLANGLE() const { return fkCELLANGLE; } //FR
+ Float_t GetRADLENGTH() const { return fkRADLENGTH; } //FR
+ Float_t GetCRITICENERGY() const { return fkCRITICENERGY; } //FR
+ Float_t GetCJ() const { return fkCJ;} //FR
+ TString GetDETNAME() { return fkDETNAME; };
+
+protected:
+ //EMCAL specific, !! Move somewhere else, PTH
+ // @todo: These variables should be declared constant, doesnt work right now
+ // because the default copy contructor is called somewhere.
+
+ Float_t fkCELLSTEPPHI;
+ Float_t fkCELLHEIGHT;
+ Float_t fkCELLANGLE;
+ Float_t fkRADLENGTH;
+ Float_t fkCRITICENERGY;
- /* static const Int_t fgkALTROMAXSAMPLES; /\**<The maximum number of samples of the ALTRO*\/ */
- /* static const Int_t fgkALTROMAXPRESAMPLES; //Constant */
- /* static const Int_t fgkNGAINS; */
- /* static const Int_t fgkHIGHGAIN; //Constan */
- /* static const Int_t fgkLOWGAIN; //Constant */
- /* static const Int_t fkMAXBINVALUE;//Constant */
+ Float_t fkCJ;
+ Float_t fkCELLSTEP; //Constant
+ Int_t fkDDLOFFSET; //Constant
+ TString fkDETNAME;
- ClassDef(AliHLTCaloConstants, 1);
-};
-
-
-/* const Int_t AliHLTCaloConstants::fgkALTROMAXSAMPLES = 1008; /\**<The maximum number of samples of the ALTRO*\/ */
-/* const Int_t AliHLTCaloConstants::fgkALTROMAXPRESAMPLES = 15; //Constant */
-/* const Int_t AliHLTCaloConstants::fgkNGAINS = 2; */
-/* const Int_t AliHLTCaloConstants::fgkHIGHGAIN = 1; */
-/* const Int_t AliHLTCaloConstants::fgkLOWGAIN =0; */
-/* const Int_t AliHLTCaloConstants::fkMAXBINVALUE = 1023;//Constant */
+private:
+ AliHLTCaloConstants(const AliHLTCaloConstants & );
+ AliHLTCaloConstants & operator = (const AliHLTCaloConstants &);
+ ClassDef(AliHLTCaloConstants, 1)
+};