]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RALICE/AliAttrib.h
08-oct-2007 NvE ADC (de)calibration function formula corrected for TWR data in IceDB2...
[u/mrichter/AliRoot.git] / RALICE / AliAttrib.h
index 5eac67e5ac85d53740e55f614a9a2b03d0686246..c890014d4ac8a2ff61eb5e23d58787fbb8d3d0d2 100644 (file)
@@ -10,6 +10,7 @@
 #include "TObjArray.h"
 #include "TObjString.h"
 #include "TString.h"
+#include "TF1.h"
 
 class AliAttrib
 {
@@ -33,6 +34,8 @@ class AliAttrib
   Int_t GetGainFlag(TString name) const;       // Provide gain flag of the name-specified attribute slot
   Int_t GetOffsetFlag(Int_t j=1) const;        // Provide offset flag of the j-th attribute slot
   Int_t GetOffsetFlag(TString name) const;     // Provide offset flag of the name-specified attribute slot
+  Int_t GetCalWord(Int_t j=1) const;           // Provide calib. word of the j-th attribute slot
+  Int_t GetCalWord(TString name) const;        // Provide calib word of the name-specified attribute slot
   void ResetGain(Int_t j=1);                   // Reset j-th gain value and flag
   void ResetGain(TString name);                // Reset name-specified gain value and flag
   void ResetOffset(Int_t j=1);                 // Reset j-th offset value and flag
@@ -44,6 +47,12 @@ class AliAttrib
   void SetAlive(TString name);                 // Indicate name-specified attribute slot as 'active'
   Int_t GetDeadValue(Int_t j=1) const;         // Return the 'dead flag' of the j-th attribute slot
   Int_t GetDeadValue(TString name) const;      // Return the 'dead flag' of the name-specified attribute slot
+  void Lock(Int_t j=1);                        // Indicate j-th attribute slot as 'locked'
+  void Lock(TString name);                     // Indicate name-specified attribute slot as 'locked'
+  void Unlock(Int_t j=1);                      // Indicate j-th attribute slot as 'unlocked'
+  void Unlock(TString name);                   // Indicate name-specified attribute slot as 'unlocked'
+  Int_t GetLockValue(Int_t j=1) const;         // Return the 'lock flag' of the j-th attribute slot
+  Int_t GetLockValue(TString name) const;      // Return the 'lock flag' of the name-specified attribute slot
   void SetEdgeOn(Int_t j=1);                   // Indicate j-th slot as 'detector edge module'
   void SetEdgeOn(TString name);                // Indicate name-spcified slot as 'detector edge module'
   void SetEdgeOff(Int_t j=1);                  // Indicate j-th slot as 'detector non-edge module'
@@ -60,9 +69,21 @@ class AliAttrib
   virtual void List(TString name) const;       // Printout of name-specified attribute data
   virtual void Load(AliAttrib& a,Int_t j=0);   // Load j-th slot or all attributes of the input AliAttrib
   virtual void Load(AliAttrib& a,TString name);// Load name-specified slot attributes of the input AliAttrib
+  void AddNamedSlot(TString s);                // Add a new slot with the specified name
+  virtual Int_t GetNslots() const;             // Provide the number of exising slots
   void SetSlotName(TString s,Int_t j=1);       // Set user defined name for the j-th slot
   TString GetSlotName(Int_t j=1) const;        // Provide user defined name for the j-th slot
   Int_t GetSlotIndex(TString name) const;      // Provide the slot index of the matching name
+  void SetCalFunction(TF1* f,Int_t j=1);       // Set calibration function of the j-th attribute slot
+  void SetCalFunction(TF1* f,TString name);    // Set calibration function of the name-specified attribute slot
+  void SetDecalFunction(TF1* f,Int_t j=1);     // Set de-calibration function of the j-th attribute slot
+  void SetDecalFunction(TF1* f,TString name);  // Set de-calibration function of the name-specified attribute slot
+  TF1* GetCalFunction(Int_t j=1) const;        // Get calibration function of the j-th attribute slot
+  TF1* GetCalFunction(TString name) const;     // Get calibration function of the name-specified attribute slot
+  TF1* GetDecalFunction(Int_t j=1) const;      // Get de-calibration function of the j-th attribute slot
+  TF1* GetDecalFunction(TString name) const;   // Get de-calibration function of the name-specified attribute slot
+  Int_t GetNcalfuncs() const;                  // Provide the number of calibration functions
+  Int_t GetNdecalfuncs() const;                // Provide the number of de-calibration functions
 
  protected:
   void SetCalFlags(Int_t gf,Int_t of,Int_t j); // Set flags for gain and/or offset settings
@@ -70,7 +91,9 @@ class AliAttrib
   TArrayF* fOffsets;                           // Offset values
   TArrayI* fCalflags;                          // Flags to mark dead, edge, and gain/offset calibrated signals
   TObjArray* fNames;                           // User defined names for the various slots
+  TObjArray* fCalfuncs;                        // Explicit signal calibration functions
+  TObjArray* fDecalfuncs;                      // Explicit signal de-calibration functions
 
- ClassDef(AliAttrib,3) // Generic handling of detector signal (calibration) attributes.
+ ClassDef(AliAttrib,6) // Generic handling of detector signal (calibration) attributes.
 };
 #endif