]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliAttrib.h
Coding Convention Violations
[u/mrichter/AliRoot.git] / RALICE / AliAttrib.h
1 #ifndef ALIATTRIB_H
2 #define ALIATTRIB_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 // $Id$
7
8 #include "TArrayF.h"
9 #include "TArrayI.h"
10 #include "TObjArray.h"
11 #include "TObjString.h"
12 #include "TString.h"
13
14 class AliAttrib
15 {
16  public:
17   AliAttrib();                                 // Default constructor
18   virtual ~AliAttrib();                        // Destructor
19   AliAttrib(AliAttrib& a);                     // Copy constructor
20   Int_t GetNgains();                           // Provide the number of specified gains
21   Int_t GetNoffsets();                         // Provide the number of specified offsets
22   Int_t GetNcalflags();                        // Provide the number of specified calib. flags
23   Int_t GetNnames();                           // Provide the maximum number of specified names
24   void SetGain(Double_t gain,Int_t j=1);       // Set gain of the j-th attribute slot
25   Float_t GetGain(Int_t j=1);                  // Provide gain of the j-th attribute slot
26   void SetOffset(Double_t off,Int_t j=1);      // Set offset value of the j-th attribute slot
27   Float_t GetOffset(Int_t j=1);                // Provide offset value of the j-th attribute slot
28   Int_t GetGainFlag(Int_t j=1);                // Provide gain flag of the j-th attribute slot
29   Int_t GetOffsetFlag(Int_t j=1);              // Provide offset flag of the j-th attribute slot
30   void ResetGain(Int_t j=1);                   // Reset j-th gain value and flag
31   void ResetOffset(Int_t j=1);                 // Reset j-th offset value and flag
32   void DeleteCalibrations(Int_t mode=0);       // User selected delete of gains and/or offsets
33   void SetDead(Int_t j=1);                     // Indicate j-th attribute slot as 'dead'
34   void SetAlive(Int_t j=1);                    // Indicate j-th attribute slot as 'active'
35   Int_t GetDeadValue(Int_t j=1);               // Return the 'dead flag' of the j-th attribute slot
36   void SetEdgeOn(Int_t j=1);                   // Indicate j-th slot as 'detector edge module'
37   void SetEdgeOff(Int_t j=1);                  // Indicate j-th slot as 'detector non-edge module'
38   void IncreaseEdgeValue(Int_t j=1);           // Increase the edge value of the j-th slot by 1
39   void DecreaseEdgeValue(Int_t j=1);           // Decrease the edge value of the j-th slot by 1
40   void SetEdgeValue(Int_t val,Int_t j=1);      // Set a specific edge value for the j-th slot
41   Int_t GetEdgeValue(Int_t j=1);               // Provide the edge value of the j-th slot
42   virtual void List(Int_t j=0);                // Printout of attribute data
43   virtual void Load(AliAttrib& a,Int_t j=0);   // Load j-th slot or all attributes of the input AliAttrib
44   void SetSlotName(TString s,Int_t j=1);       // Set user defined name for the j-th slot
45   TString GetSlotName(Int_t j=1);              // Provide user defined name for the j-th slot
46   Int_t GetSlotIndex(TString name);            // Provide the slot index of the matching name
47
48  protected:
49   void SetCalFlags(Int_t gf,Int_t of,Int_t j); // Set flags for gain and/or offset settings
50   TArrayF* fGains;                             // Gain values
51   TArrayF* fOffsets;                           // Offset values
52   TArrayI* fCalflags;                          // Flags to mark dead, edge, and gain/offset calibrated signals
53   TObjArray* fNames;                           // User defined names for the various slots
54
55  ClassDef(AliAttrib,1) // Generic handling of detector signal (calibration) attributes.
56 };
57 #endif