AliRoot Core  3dc7879 (3dc7879)
AliMUONVCalibParam.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3 
4 // $Id$
5 
10 // Author Laurent Aphecetche
11 
12 #ifndef ALIMUONVCALIBPARAM_H
13 #define ALIMUONVCALIBPARAM_H
14 
15 #ifndef ROOT_TObject
16 # include "TObject.h"
17 #endif
18 
19 class AliMUONVCalibParam : public TObject
20 {
21 public:
23  //AliMUONVCalibParam(Int_t id0);
24  AliMUONVCalibParam(Int_t id0, Int_t id1);
25  virtual ~AliMUONVCalibParam();
26 
27  virtual const char* GetName() const;
28 
30  virtual Bool_t IsSortable() const { return kTRUE; }
31 
33  virtual Int_t ID0() const;
34 
36  virtual Int_t ID1() const;
37 
39  virtual Int_t Compare(const TObject* object) const;
40 
42  virtual Bool_t IsPacked() const { return kFALSE; }
43 
45  virtual Int_t Dimension() const = 0;
46 
50  virtual void SetValueAsDouble(Int_t i, Int_t j, Double_t value);
51 
53  virtual void SetValueAsDoubleFast(Int_t i, Int_t j, Double_t value);
54 
56  virtual void SetValueAsFloat(Int_t i, Int_t j, Float_t value) = 0;
57 
61  virtual void SetValueAsFloatFast(Int_t i, Int_t j, Float_t value) = 0;
62 
64  virtual void SetValueAsInt(Int_t i, Int_t j, Int_t value) = 0;
65 
67  virtual void SetValueAsIntFast(Int_t i, Int_t j, Int_t value) = 0;
68 
70  virtual Int_t Size() const = 0;
71 
73  virtual Bool_t IsDoublePrecision() const { return kFALSE; }
74 
79  virtual Double_t ValueAsDouble(Int_t i, Int_t j=0) const;
80 
85  virtual Double_t ValueAsDoubleFast(Int_t i, Int_t j=0) const;
86 
90  virtual Float_t ValueAsFloat(Int_t i, Int_t j=0) const = 0;
91 
93  virtual Float_t ValueAsFloatFast(Int_t i, Int_t j=0) const = 0;
94 
98  virtual Int_t ValueAsInt(Int_t i, Int_t j=0) const = 0;
99 
101  virtual Int_t ValueAsIntFast(Int_t i, Int_t j=0) const = 0;
102 
104  virtual Bool_t UnpackValue(Int_t /*value*/, Int_t& /*a*/, Int_t& /*b*/) const { return kFALSE; }
105 
107  virtual Bool_t PackValues(Int_t /*a*/, Int_t /*b*/, Int_t& /*packedValue*/) const { return kFALSE; }
108 
110  static Float_t InvalidFloatValue() { return 1E38; }
111 
112  static UInt_t BuildUniqueID(Int_t id0, Int_t id1);
113  static void DecodeUniqueID(UInt_t uniqueID, Int_t& id0, Int_t& id1);
114 
115 protected:
116 
117  static Int_t ID0(UInt_t uniqueID);
118  static Int_t ID1(UInt_t uniqueID);
119 
120  ClassDef(AliMUONVCalibParam,0) // Base class for a calibration data holder (usually for 64 channels)
121 };
122 
123 #endif
virtual Bool_t IsSortable() const
Advertise that we can be sorted in TCollections.
static Float_t InvalidFloatValue()
Return 1E38 as invalid float value.
virtual Bool_t UnpackValue(Int_t, Int_t &, Int_t &) const
Unpack a value into a couple (a,b). Returns false if IsPacked()==kFALSE.
virtual Bool_t IsPacked() const
whether or not the value we store are packed, e.g. as v = a*cste + b
virtual Float_t ValueAsFloat(Int_t i, Int_t j=0) const =0
virtual Int_t Size() const =0
The number of channels handled by this object.
virtual Float_t ValueAsFloatFast(Int_t i, Int_t j=0) const =0
Same as above but without bound checking.
virtual void SetValueAsFloat(Int_t i, Int_t j, Float_t value)=0
Set one value, for channel i, dimension j. Consider value is a float.
virtual void SetValueAsDoubleFast(Int_t i, Int_t j, Double_t value)
Same as above but w/o bound checking.
static UInt_t BuildUniqueID(Int_t id0, Int_t id1)
virtual void SetValueAsInt(Int_t i, Int_t j, Int_t value)=0
Set one value, for channel i, dimension j. Consider value is an integer.
virtual Double_t ValueAsDouble(Int_t i, Int_t j=0) const
virtual Bool_t IsDoublePrecision() const
Whether we can store double precision values.
Container of calibration values for a given number of channels.
virtual const char * GetName() const
virtual Int_t ID0() const
First id of this object.
virtual Int_t ID1() const
Second id of this object (might not be required)
virtual void SetValueAsFloatFast(Int_t i, Int_t j, Float_t value)=0
virtual Bool_t PackValues(Int_t, Int_t, Int_t &) const
Pack (a,b) as a single int. Returns false if IsPacked()==kFALSE.
virtual Int_t ValueAsInt(Int_t i, Int_t j=0) const =0
static void DecodeUniqueID(UInt_t uniqueID, Int_t &id0, Int_t &id1)
virtual Int_t Dimension() const =0
j indices in following methods are valid from 0 to Dimension()-1.
virtual Int_t Compare(const TObject *object) const
method for sorting pedestal values ordered by ID0 and ID1
virtual void SetValueAsIntFast(Int_t i, Int_t j, Int_t value)=0
Same as above but w/o bound checkings.
virtual Int_t ValueAsIntFast(Int_t i, Int_t j=0) const =0
Same as above but w/o bound checking.
virtual Double_t ValueAsDoubleFast(Int_t i, Int_t j=0) const
virtual void SetValueAsDouble(Int_t i, Int_t j, Double_t value)