]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDParameters.h
Fixing TOF calib tree task to use the same output handler as in CPass
[u/mrichter/AliRoot.git] / FMD / AliFMDParameters.h
index 91b1daafae8900752302eea1c0bebeab91226240..eebf33b61e4729a39c4d58540a87ef7f98c9e059 100644 (file)
@@ -102,8 +102,10 @@ public:
    *
    * @param forceReInit Force (re-)initalize flag
    * @param what        What to initialize 
+   *
+   * @return 0 on success, bit mask of failed elements otherwise
    */
-  void Init(Bool_t forceReInit=kFALSE, UInt_t what=kAll );
+  UShort_t Init(Bool_t forceReInit=kFALSE, UInt_t what=kAll );
   /** 
    * Initialize the manager.  This tries to read the parameters from
    * CDB.  If that fails, the class uses the hard-coded parameters.
@@ -111,8 +113,10 @@ public:
    * @param pp          Preprocessor 
    * @param forceReInit Force (re-)initalize flag
    * @param what        What to initialize 
+   *
+   * @return 0 on success, bit mask of failed elements otherwise
    */
-  void Init(AliFMDPreprocessor* pp, 
+  UShort_t Init(AliFMDPreprocessor* pp, 
            Bool_t              forceReInit=kFALSE, 
            UInt_t              what=kAll);
   /** 
@@ -135,10 +139,12 @@ public:
    * @param path        Where to look for the CSV files
    * @param forceReInit Always reinitialise 
    * @param what        What calibrations to load. 
+   *
+   * @return 0 on success, bit mask of failed elements otherwise
    */  
-  void Init(const char* path, 
-           Bool_t      forceReInit=kFALSE, 
-           UInt_t      what=kAll);
+  UShort_t Init(const char* path, 
+               Bool_t      forceReInit=kFALSE, 
+               UInt_t      what=kAll);
   
   /** 
    * Automatically generate a dead map from the pedestals and gains.
@@ -239,11 +245,11 @@ public:
   /** 
    * @param s Zero suppression threshold in ADC counts 
    */
-  void SetZeroSuppression(UShort_t s=0)       { fFixedZeroSuppression = s; }
+  void SetZeroSuppression(UShort_t s=1)       { fFixedZeroSuppression = s; }
   /** 
    * @param r How many times we oversample each strip. 
    */
-  void SetSampleRate(UShort_t r=1)            { fFixedSampleRate = r ;}//(r>2?2:r);}
+  void SetSampleRate(UShort_t r=2)            { fFixedSampleRate = r ;}//(r>2?2:r);}
   /** 
    * @param r How many times we oversample each strip. 
    */
@@ -251,7 +257,7 @@ public:
   /** 
    * @param p Pedestal value in ADC counts 
    */
-  void SetPedestal(Float_t p=10)              { fFixedPedestal = p; }
+  void SetPedestal(Float_t p=100)              { fFixedPedestal = p; }
   /** 
    * @param p Pedestal map 
    */
@@ -259,7 +265,7 @@ public:
   /** 
    * @param w Pedestal width in ADC counts 
    */
-  void SetPedestalWidth(Float_t w=1)          { fFixedPedestalWidth = w; }
+  void SetPedestalWidth(Float_t w=2)          { fFixedPedestalWidth = w; }
   /** 
    * @param t Threshold used for 1 MIP acceptance. 
    */
@@ -288,6 +294,10 @@ public:
    * @param g Gain map 
    */
   void SetGain(AliFMDCalibGain* g) { fPulseGain = g; }
+  /** 
+   * @param g Gain map 
+   */
+  void SetGain(Float_t g=2) { fFixedPulseGain = g; }
   /** @} */
 
   /** @{ */
@@ -632,7 +642,8 @@ protected:
       fPulseGain(o.fPulseGain),
       fDeadMap(o.fDeadMap),
       fAltroMap(o.fAltroMap),
-      fStripRange(o.fStripRange)
+    fStripRange(o.fStripRange), 
+    fRunNo(o.fRunNo)
   {}
   /** 
    * Assignement operator 
@@ -676,44 +687,59 @@ protected:
    * Initialize gains.  Try to get them from CDB 
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitPulseGain(AliFMDPreprocessor* pp=0);
+  UShort_t InitPulseGain(AliFMDPreprocessor* pp=0);
   /**
    * Initialize pedestals.  Try to get them from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitPedestal(AliFMDPreprocessor* pp=0);
+  UShort_t InitPedestal(AliFMDPreprocessor* pp=0);
   /**
    * Initialize dead map.  Try to get it from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitDeadMap(AliFMDPreprocessor* pp=0);
+  UShort_t InitDeadMap(AliFMDPreprocessor* pp=0);
   /**
    * Initialize sample rates.  Try to get them from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitSampleRate(AliFMDPreprocessor* pp=0);
+  UShort_t InitSampleRate(AliFMDPreprocessor* pp=0);
   /**
    * Initialize zero suppression thresholds.  Try to get them from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitZeroSuppression(AliFMDPreprocessor* pp=0);
+  UShort_t InitZeroSuppression(AliFMDPreprocessor* pp=0);
   /**
    * Initialize hardware map.  Try to get it from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitAltroMap(AliFMDPreprocessor* pp=0);
+  UShort_t InitAltroMap(AliFMDPreprocessor* pp=0);
   /**
    * Initialize strip range.  Try to get it from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitStripRange(AliFMDPreprocessor* pp=0);
+  UShort_t InitStripRange(AliFMDPreprocessor* pp=0);
+  Bool_t CheckForNewRun();
 
   Bool_t          fIsInit;                   // Whether we've been initialised  
 
@@ -755,8 +781,9 @@ protected:
   AliFMDCalibDeadMap*         fDeadMap;         // Pulser gain
   AliFMDAltroMapping*         fAltroMap;        // Map of hardware
   AliFMDCalibStripRange*      fStripRange;      // Strip range
+  Int_t                       fRunNo;           // Initialized for this run
   
-  ClassDef(AliFMDParameters,6) // Manager of parameters
+  ClassDef(AliFMDParameters,7) // Manager of parameters
 };
 
 //__________________________________________________________________