]>
Commit | Line | Data |
---|---|---|
1fbffa23 | 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" | |
b721efb7 | 13 | #include "TF1.h" |
1fbffa23 | 14 | |
15 | class AliAttrib | |
16 | { | |
17 | public: | |
18 | AliAttrib(); // Default constructor | |
19 | virtual ~AliAttrib(); // Destructor | |
261c0caf | 20 | AliAttrib(const AliAttrib& a); // Copy constructor |
21 | Int_t GetNgains() const; // Provide the number of specified gains | |
22 | Int_t GetNoffsets() const; // Provide the number of specified offsets | |
23 | Int_t GetNcalflags() const; // Provide the number of specified calib. flags | |
24 | Int_t GetNnames() const; // Provide the maximum number of specified names | |
1fbffa23 | 25 | void SetGain(Double_t gain,Int_t j=1); // Set gain of the j-th attribute slot |
2cb7369d | 26 | void SetGain(Double_t gain,TString name); // Set gain of the name-specified attribute slot |
261c0caf | 27 | Float_t GetGain(Int_t j=1) const; // Provide gain of the j-th attribute slot |
2cb7369d | 28 | Float_t GetGain(TString name) const; // Provide gain of the name-specified attribute slot |
1fbffa23 | 29 | void SetOffset(Double_t off,Int_t j=1); // Set offset value of the j-th attribute slot |
2cb7369d | 30 | void SetOffset(Double_t off,TString name); // Set offset value of the name specified attribute slot |
261c0caf | 31 | Float_t GetOffset(Int_t j=1) const; // Provide offset value of the j-th attribute slot |
2cb7369d | 32 | Float_t GetOffset(TString name) const; // Provide offset value of the name-specified attribute slot |
261c0caf | 33 | Int_t GetGainFlag(Int_t j=1) const; // Provide gain flag of the j-th attribute slot |
2cb7369d | 34 | Int_t GetGainFlag(TString name) const; // Provide gain flag of the name-specified attribute slot |
261c0caf | 35 | Int_t GetOffsetFlag(Int_t j=1) const; // Provide offset flag of the j-th attribute slot |
2cb7369d | 36 | Int_t GetOffsetFlag(TString name) const; // Provide offset flag of the name-specified attribute slot |
1fbffa23 | 37 | void ResetGain(Int_t j=1); // Reset j-th gain value and flag |
2cb7369d | 38 | void ResetGain(TString name); // Reset name-specified gain value and flag |
1fbffa23 | 39 | void ResetOffset(Int_t j=1); // Reset j-th offset value and flag |
2cb7369d | 40 | void ResetOffset(TString name); // Reset name-specified offset value and flag |
1fbffa23 | 41 | void DeleteCalibrations(Int_t mode=0); // User selected delete of gains and/or offsets |
42 | void SetDead(Int_t j=1); // Indicate j-th attribute slot as 'dead' | |
2cb7369d | 43 | void SetDead(TString name); // Indicate name-specified attribute slot as 'dead' |
1fbffa23 | 44 | void SetAlive(Int_t j=1); // Indicate j-th attribute slot as 'active' |
2cb7369d | 45 | void SetAlive(TString name); // Indicate name-specified attribute slot as 'active' |
261c0caf | 46 | Int_t GetDeadValue(Int_t j=1) const; // Return the 'dead flag' of the j-th attribute slot |
2cb7369d | 47 | Int_t GetDeadValue(TString name) const; // Return the 'dead flag' of the name-specified attribute slot |
1fbffa23 | 48 | void SetEdgeOn(Int_t j=1); // Indicate j-th slot as 'detector edge module' |
2cb7369d | 49 | void SetEdgeOn(TString name); // Indicate name-spcified slot as 'detector edge module' |
1fbffa23 | 50 | void SetEdgeOff(Int_t j=1); // Indicate j-th slot as 'detector non-edge module' |
2cb7369d | 51 | void SetEdgeOff(TString name); // Indicate name-specified slot as 'detector non-edge module' |
1fbffa23 | 52 | void IncreaseEdgeValue(Int_t j=1); // Increase the edge value of the j-th slot by 1 |
2cb7369d | 53 | void IncreaseEdgeValue(TString name); // Increase the edge value of the name-specified slot by 1 |
1fbffa23 | 54 | void DecreaseEdgeValue(Int_t j=1); // Decrease the edge value of the j-th slot by 1 |
2cb7369d | 55 | void DecreaseEdgeValue(TString name); // Decrease the edge value of the name-specified slot by 1 |
1fbffa23 | 56 | void SetEdgeValue(Int_t val,Int_t j=1); // Set a specific edge value for the j-th slot |
2cb7369d | 57 | void SetEdgeValue(Int_t val,TString name); // Set a specific edge value for the name-specified slot |
261c0caf | 58 | Int_t GetEdgeValue(Int_t j=1) const; // Provide the edge value of the j-th slot |
2cb7369d | 59 | Int_t GetEdgeValue(TString name) const; // Provide the edge value of the name-specified slot |
261c0caf | 60 | virtual void List(Int_t j=0) const; // Printout of attribute data |
2cb7369d | 61 | virtual void List(TString name) const; // Printout of name-specified attribute data |
1fbffa23 | 62 | virtual void Load(AliAttrib& a,Int_t j=0); // Load j-th slot or all attributes of the input AliAttrib |
2cb7369d | 63 | virtual void Load(AliAttrib& a,TString name);// Load name-specified slot attributes of the input AliAttrib |
1fbffa23 | 64 | void SetSlotName(TString s,Int_t j=1); // Set user defined name for the j-th slot |
261c0caf | 65 | TString GetSlotName(Int_t j=1) const; // Provide user defined name for the j-th slot |
66 | Int_t GetSlotIndex(TString name) const; // Provide the slot index of the matching name | |
b721efb7 | 67 | void SetCalFunction(TF1* f,Int_t j=1); // Set calibration function of the j-th attribute slot |
68 | void SetCalFunction(TF1* f,TString name); // Set calibration function of the name-specified attribute slot | |
69 | void SetDecalFunction(TF1* f,Int_t j=1); // Set de-calibration function of the j-th attribute slot | |
70 | void SetDecalFunction(TF1* f,TString name); // Set de-calibration function of the name-specified attribute slot | |
71 | TF1* GetCalFunction(Int_t j=1) const; // Get calibration function of the j-th attribute slot | |
72 | TF1* GetCalFunction(TString name) const; // Get calibration function of the name-specified attribute slot | |
73 | TF1* GetDecalFunction(Int_t j=1) const; // Get de-calibration function of the j-th attribute slot | |
74 | TF1* GetDecalFunction(TString name) const; // Get de-calibration function of the name-specified attribute slot | |
75 | Int_t GetNcalfuncs() const; // Provide the number of calibration functions | |
76 | Int_t GetNdecalfuncs() const; // Provide the number of de-calibration functions | |
1fbffa23 | 77 | |
78 | protected: | |
79 | void SetCalFlags(Int_t gf,Int_t of,Int_t j); // Set flags for gain and/or offset settings | |
80 | TArrayF* fGains; // Gain values | |
81 | TArrayF* fOffsets; // Offset values | |
82 | TArrayI* fCalflags; // Flags to mark dead, edge, and gain/offset calibrated signals | |
83 | TObjArray* fNames; // User defined names for the various slots | |
b721efb7 | 84 | TObjArray* fCalfuncs; // Explicit signal calibration functions |
85 | TObjArray* fDecalfuncs; // Explicit signal de-calibration functions | |
1fbffa23 | 86 | |
b721efb7 | 87 | ClassDef(AliAttrib,4) // Generic handling of detector signal (calibration) attributes. |
1fbffa23 | 88 | }; |
89 | #endif |