]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/CALO/AliHLTCaloConstants.h
NULL pointer protections
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloConstants.h
index 055f1284a0b190f2cdd3a3dcba1cfdc99131fdf3..14c374831f4c554031ebf0c250b72c595b9a35fa 100644 (file)
 #ifndef ALIHLTCALOCONSTANTS_H
 #define ALIHLTCALOCONSTANTS_H
 
-
-namespace CaloHLTConst
-{
-  //Constants related to the ALTRO chip (Common to EMCAL / PHOS )
-  const int MAXBINVALUE = 1023;
-  const int NGAINS         =   2;    
-  const int HIGHGAIN    =   0;
-  const int LOWGAIN     =   1;
-  const int ALTROMAXSAMPLES = 1008;    /**<The maximum number of samples of the ALTRO*/
-  const int ALTROMAXPRESAMPLES = 15;        
-  const int NALTROS        =   4;      /**<Number of ALTROs per frontend card*/
-  const int NALTROCHANNELS =  16;
-
-  //FEE constants common to PHOS EMCAL
-  const int CSPSPERFEE    = 32;
-  const int NBRANCHES      =   2;   
+#include "AliCaloConstants.h"
+
+
+// namespace CaloHLTConst
+// {
+//   const int MAXHOSTS=20;
+//   //Constants related to the ALTRO chip (Common to EMCAL / PHOS )
+//   const int MAXBINVALUE = 1023;
+//   const int NGAINS         =   2;    
+//   const int HIGHGAIN    =   1;
+//   const int LOWGAIN     =   0;
+//   const int ALTROMAXSAMPLES = 1008;    /**<The maximum number of samples of the ALTRO*/
+//   const int ALTROMAXPRESAMPLES = 15;        
+//   const int NALTROS        =   4;      /**<Number of ALTROs per frontend card*/
+//   const int NALTROCHANNELS =  16;
+
+//   //FEE constants common to PHOS EMCAL
+//   const int CSPSPERFEE    = 32;
+//   const int NBRANCHES      =   2;   
+//   const int MAXHWADDRESSES = 4096;
   
-  namespace EmcalHLTConst
-  {
-    const int NZROWSMOD      =  48;   /**<Number of rows per module*/       
-    const int NXCOLUMNSMOD   =  24;   /**<Number of columns per module*/ 
-    const int NRCUSPERSECTOR = 4;
-    const int NMODULES    =    10;    /**<Number of modules of the EMCAL detector*/
-    const int NRCUSPERMODULE =  2 ;   /**<Number of RCUs per Module*/
-    const int NFEECS         =  9; 
-  };
-
-  namespace PhosHLTConst
-  {
-    const int NZROWSMOD      =  56;   /**<Number of rows per module*/       
-    const int NXCOLUMNSMOD   =  64;   /**<Number of columns per module*/ 
-    const int NMODULES    =    5;     /**<Number of modules of the EMCAL detector*/
-    const int NRCUSPERMODULE =  4 ;   /**<Number of RCUs per Module*/
-    const int NFEECS         =  14;   /**<Number of Frontend cards per branch*/
-  };
-};
+//   namespace EmcalHLTConst
+//   {
+//     const int NZROWSMOD      =  48;   /**<Number of rows per module*/       
+//     const int NXCOLUMNSMOD   =  24;   /**<Number of columns per module*/ 
+//     const int NRCUSPERSECTOR = 4;     /**<Number of RCUs per sector*/
+//     const int NMODULES    =    10;    /**<Number of modules of the EMCAL detector*/
+//     const int NRCUSPERMODULE =  2 ;   /**<Number of RCUs per Module*/
+//     const int NFEECS         =  9;    /**<Number of Frontend cards per branch*/
+//   };
+  
+//   namespace PhosHLTConst
+//   {
+//     const int NZROWSMOD      =  56;   /**<Number of rows per module*/       
+//     const int NXCOLUMNSMOD   =  64;   /**<Number of columns per module*/ 
+//     const int NMODULES    =    5;     /**<Number of modules of the PHOS detector*/
+//     const int NRCUSPERMODULE =  4 ;   /**<Number of RCUs per Module*/
+//     const int NFEECS         =  14;   /**<Number of Frontend cards per branch*/
+//   };
+  
+// };
+
+
+// namespace CALO  =  CaloHLTConst; // just for easier notation
+// namespace EMCAL =  CaloHLTConst::EmcalHLTConst;
+// namespace PHOS  =  CaloHLTConst::PhosHLTConst;
 
 
-namespace CALO  =  CaloHLTConst; // just for easier notation
-namespace EMCAL =  CaloHLTConst::EmcalHLTConst;
-namespace PHOS  =  CaloHLTConst::PhosHLTConst;
 
 
 class AliHLTCaloConstants
@@ -68,22 +75,18 @@ public:
   virtual void InitConstants() = 0; 
 
   // Common PHOS / EMCAL stuff
-  static  Int_t GetALTROMAXSAMPLES()    { return CALO::ALTROMAXSAMPLES; }; 
-  static  Int_t GetNGAINS()             { return CALO::NGAINS; };      
-  static  Int_t GetHIGHGAIN()           { return CALO::HIGHGAIN; };
-  static  Int_t GetLOWGAIN()          { return CALO::LOWGAIN; }; 
-  static  Int_t GetMAXBINVALUE()      { return CALO::MAXBINVALUE; };   
-  static  Int_t GetCSPSPERFEE()       { return CALO::CSPSPERFEE; };                                    
-  static  Int_t GetNALTROS()           { return CALO::NALTROS; };                                      
-  static  Int_t GetNALTROCHANNELS()    { return CALO::NALTROCHANNELS; };                                       
+  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  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; }
 
   // Detector specific stuff
-
-  //  virtual Int_t GetNZROWSRCU() const      = 0; 
-  // virtual Int_t GetNXCOLUMNSRCU() const   = 0;
-  
   // PHOS Only, bad move somewher else, PTH
   virtual Int_t GetNZROWSRCU() const  { return   56 ; } ; 
   virtual Int_t GetNXCOLUMNSRCU() const { return 16; } ;
@@ -92,9 +95,7 @@ public:
   virtual Int_t GetNZROWSMOD() const      = 0; 
   virtual Int_t GetNXCOLUMNSMOD() 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;
   
   Int_t GetDDLOFFSET() const { return fkDDLOFFSET; }
@@ -112,10 +113,6 @@ public:
   TString GetDETNAME() { return fkDETNAME; };
 
 protected:
-  TString fkDETNAME;
-  Float_t fkCELLSTEP; //Constant
-  Int_t fkDDLOFFSET;   //Constant
-  
   //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.
@@ -126,10 +123,17 @@ protected:
   Float_t fkCELLANGLE;
   Float_t fkRADLENGTH;
   Float_t fkCRITICENERGY;
   Float_t fkCJ;
-  
+  Float_t fkCELLSTEP; //Constant
+
+  Int_t fkDDLOFFSET;   //Constant
+  TString fkDETNAME;
+
 private:
-  
+  AliHLTCaloConstants(const AliHLTCaloConstants & );
+  AliHLTCaloConstants & operator = (const AliHLTCaloConstants &); 
+
   ClassDef(AliHLTCaloConstants, 1)
 };