Refactoring of constants usage. Some parameters common to
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 May 2010 02:35:49 +0000 (02:35 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 May 2010 02:35:49 +0000 (02:35 +0000)
PHOS / EMCAL was moved to the CALO directpry.
In particluar. 1 ) Max number of ALTRO samples, 2 ) Max number of
ALTRO presamples, 3 ) Number of gains (2), 4) Max bin value ( 1023 since it is a 10 bit ADC ).

HLT/CALO/AliHLTCaloConstants.h
HLT/EMCAL/AliHLTEMCALConstants.cxx
HLT/EMCAL/AliHLTEMCALConstants.h
HLT/PHOS/AliHLTPHOSConstants.cxx
HLT/PHOS/AliHLTPHOSConstants.h

index 65d3d35..6b42f89 100644 (file)
 
 
 
+#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
+
+
+
+
 class AliHLTCaloConstants
 {
 
@@ -26,51 +36,52 @@ public:
 
   AliHLTCaloConstants();
   virtual ~AliHLTCaloConstants();
-  
   virtual Int_t GetMAXHOSTS() const = 0;                                               
   virtual Int_t GetDEFAULTEVENTPORT() const = 0;                                       
-  virtual Int_t GetMAXBINVALUE() const = 0;                                            
-  virtual Int_t GetHIGHGAIN() const = 0;                                               
-  virtual Int_t GetLOWGAIN() const = 0;                                                        
-                                                               
-  virtual Int_t GetALTROMAXSAMPLES() const = 0;                                                
-  virtual Int_t GetALTROMAXPRESAMPLES() const = 0;                                      
-                                                               
+  //   virtual Int_t GetMAXBINVALUE() 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; };     
+
+  
   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 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;                                                         
@@ -90,12 +101,34 @@ public:
   // end
   virtual Int_t GetNRCUSPERSECTOR() const = 0;                                                 
   virtual Int_t GetDDLOFFSET() const = 0;
-  
   virtual TString GetDETNAME() const = 0;
 
-  
-private:
-  ClassDef(AliHLTCaloConstants, 1);
 
+  // private:
+
+ public:
+
+  /* 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  */
+
+
+  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 */
+
+
+
+
 #endif
index ce4000e..aa046d8 100644 (file)
@@ -31,16 +31,16 @@ AliHLTEMCALConstants::AliHLTEMCALConstants() :
   AliHLTCaloConstants(),
   fkMAXHOSTS(20),
   fkDEFAULTEVENTPORT(42001),
-  fkMAXBINVALUE(1023),
-  fkHIGHGAIN(1),
-  fkLOWGAIN(0),
-  fkALTROMAXSAMPLES(1008),
-  fkALTROMAXPRESAMPLES(15),
+  //   fkMAXBINVALUE(1023),
+  //  fkHIGHGAIN(1),
+  //  fkLOWGAIN(0),
+  //  fkALTROMAXSAMPLES(1008),
+  //  fkALTROMAXPRESAMPLES(15),
   fkNZROWSRCU(56),
   fkNXCOLUMNSRCU(16),
   fkNZROWSMOD(48),
   fkNXCOLUMNSMOD(24),
-  fkNGAINS(2),
+  // fkNGAINS(2),
   fkNDATATYPES(10),
   fkPFMAXPATHLENGTH(256),
   fkPFDEFAULTNSAMPLES(70),
index b9844ec..c210459 100644 (file)
@@ -35,18 +35,19 @@ public:
 
   Int_t GetMAXHOSTS() const { return fkMAXHOSTS;}
   Int_t GetDEFAULTEVENTPORT() const { return fkDEFAULTEVENTPORT; }
-  Int_t GetMAXBINVALUE() const { return fkMAXBINVALUE; } 
-  Int_t GetHIGHGAIN() const { return fkHIGHGAIN;} 
-  Int_t GetLOWGAIN() const { return fkLOWGAIN;} 
+  // Int_t GetMAXBINVALUE() const { return fkMAXBINVALUE; } 
+  //  Int_t GetHIGHGAIN() const { return fkHIGHGAIN;} 
+  //   Int_t GetLOWGAIN() const { return fkLOWGAIN;} 
   
-  Int_t GetALTROMAXSAMPLES() const {return fkALTROMAXSAMPLES;} 
-  Int_t GetALTROMAXPRESAMPLES() const { return fkALTROMAXPRESAMPLES;} 
+  //  Int_t GetALTROMAXSAMPLES() const {return fkALTROMAXSAMPLES;} 
+  //  Int_t GetALTROMAXPRESAMPLES() const { return fkALTROMAXPRESAMPLES;} 
  
   Int_t GetNZROWSRCU() const { return fkNZROWSRCU;}
   Int_t GetNXCOLUMNSRCU() const { return fkNXCOLUMNSRCU;} 
   Int_t GetNZROWSMOD() const { return fkNZROWSMOD;} 
   Int_t GetNXCOLUMNSMOD() const { return fkNXCOLUMNSMOD;} 
-  Int_t GetNGAINS() const { return fkNGAINS;} 
+  //   Int_t GetNGAINS() const { return fkNGAINS;} 
   Int_t GetNDATATYPES() const { return fkNDATATYPES;} 
  
   Int_t GetPFMAXPATHLENGTH() const { return fkPFMAXPATHLENGTH;} 
@@ -103,18 +104,20 @@ private:
 
   const Int_t fkMAXHOSTS;//Constant
   const Int_t fkDEFAULTEVENTPORT;//Constant
-  const Int_t fkMAXBINVALUE;//Constant
-  const Int_t fkHIGHGAIN;//Constant
-  const Int_t fkLOWGAIN;//Constant
+  //  const Int_t fkMAXBINVALUE;//Constant
+  //  const Int_t fkHIGHGAIN;//Constant
+  //  const Int_t fkLOWGAIN;//Constant
 
-  const Int_t fkALTROMAXSAMPLES; /**<The maximum number of samples of the ALTRO*/
-  const Int_t fkALTROMAXPRESAMPLES; //Constant
+  //  const Int_t fkALTROMAXSAMPLES; /**<The maximum number of samples of the ALTRO*/
+  //  const Int_t fkALTROMAXPRESAMPLES; //Constant
 
   const Int_t fkNZROWSRCU; /**<Number of rows per module*/ 
   const Int_t fkNXCOLUMNSRCU;//Constant
   const Int_t fkNZROWSMOD;  /**<Number of rows per module*/ 
   const Int_t fkNXCOLUMNSMOD;  /**<Number of columns per module*/ 
-  const Int_t fkNGAINS;  /**<Number of gains per ALTRO channel*/
+
+  //   const Int_t fkNGAINS;  /**<Number of gains per ALTRO channel*/
   const Int_t fkNDATATYPES;//Constant
 
   const Int_t fkPFMAXPATHLENGTH;//Constant
index b8cd4e2..76b7660 100644 (file)
@@ -31,16 +31,16 @@ AliHLTPHOSConstants::AliHLTPHOSConstants() :
   AliHLTCaloConstants(),
   fkMAXHOSTS(20),
   fkDEFAULTEVENTPORT(42001),
-  fkMAXBINVALUE(1023),
-  fkHIGHGAIN(1),
-  fkLOWGAIN(0),
-  fkALTROMAXSAMPLES(1008),
-  fkALTROMAXPRESAMPLES(15),
+  //  fkMAXBINVALUE(1023),
+  //  fkHIGHGAIN(1),
+  // fkLOWGAIN(0),
+  //  fkALTROMAXSAMPLES(1008),
+  //  fkALTROMAXPRESAMPLES(15),
   fkNZROWSRCU(56),
   fkNXCOLUMNSRCU(16),
   fkNZROWSMOD(56),
   fkNXCOLUMNSMOD(64),
-  fkNGAINS(2),
+  //   fkNGAINS(2),
   fkNDATATYPES(10),
   fkPFMAXPATHLENGTH(256),
   fkPFDEFAULTNSAMPLES(70),
index b741d63..346f21c 100644 (file)
@@ -26,18 +26,19 @@ public:
 
   Int_t GetMAXHOSTS() const { return fkMAXHOSTS;}                              
   Int_t GetDEFAULTEVENTPORT() const { return fkDEFAULTEVENTPORT; }             
-  Int_t GetMAXBINVALUE() const { return fkMAXBINVALUE; }                       
-  Int_t GetHIGHGAIN() const { return fkHIGHGAIN;}                              
-  Int_t GetLOWGAIN() const { return fkLOWGAIN;}                                
+  //  Int_t GetMAXBINVALUE() const { return fkMAXBINVALUE; }                   
+
+  //  Int_t GetHIGHGAIN() const { return fkHIGHGAIN;}                          
+  //  Int_t GetLOWGAIN() const { return fkLOWGAIN;}                            
                                                                                
-  Int_t GetALTROMAXSAMPLES() const {return fkALTROMAXSAMPLES;}                         
-  Int_t GetALTROMAXPRESAMPLES() const { return fkALTROMAXPRESAMPLES;}          
+  //  Int_t GetALTROMAXSAMPLES() const {return fkALTROMAXSAMPLES;}                     
+  //  Int_t GetALTROMAXPRESAMPLES() const { return fkALTROMAXPRESAMPLES;}              
                                                                                
   Int_t GetNZROWSRCU() const { return fkNZROWSRCU;}                            
   Int_t GetNXCOLUMNSRCU() const { return fkNXCOLUMNSRCU;}                      
   Int_t GetNZROWSMOD() const { return fkNZROWSMOD;}                            
   Int_t GetNXCOLUMNSMOD() const { return fkNXCOLUMNSMOD;}                      
-  Int_t GetNGAINS() const { return fkNGAINS;}                                  
+  //  Int_t GetNGAINS() const { return fkNGAINS;}                                      
   Int_t GetNDATATYPES() const { return fkNDATATYPES;}                          
                                                                                
   Int_t GetPFMAXPATHLENGTH() const { return fkPFMAXPATHLENGTH;}                
@@ -87,18 +88,18 @@ private:
   /** Constant members */
   const Int_t fkMAXHOSTS;                  //Constant
   const Int_t fkDEFAULTEVENTPORT;          //Constant
-  const Int_t fkMAXBINVALUE;          //Constant
-  const Int_t fkHIGHGAIN;          //Constant
-  const Int_t fkLOWGAIN;          //Constant
+  //   const Int_t fkMAXBINVALUE;          //Constant
+  //  const Int_t fkHIGHGAIN;          //Constant
+  //  const Int_t fkLOWGAIN;          //Constant
 
-  const Int_t fkALTROMAXSAMPLES; /**<The maximum number of samples of the ALTRO*/
-  const Int_t fkALTROMAXPRESAMPLES;           //Constant
+  //  const Int_t fkALTROMAXSAMPLES; /**<The maximum number of samples of the ALTRO*/
+  //   const Int_t fkALTROMAXPRESAMPLES;           //Constant
 
   const Int_t fkNZROWSRCU; /**<Number of rows per module*/ 
   const Int_t fkNXCOLUMNSRCU;          //Constant
   const Int_t fkNZROWSMOD;  /**<Number of rows per module*/ 
   const Int_t fkNXCOLUMNSMOD;  /**<Number of columns per module*/ 
-  const Int_t fkNGAINS;  /**<Number of gains per ALTRO channel*/
+  //   const Int_t fkNGAINS;  /**<Number of gains per ALTRO channel*/
   const Int_t fkNDATATYPES;          //Constant
 
   const Int_t fkPFMAXPATHLENGTH;          //Constant