1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONCalibParamNI
8 /// \brief Implementation of AliMUONVCalibParam for tuples of ints
10 // Author Laurent Aphecetche
12 #ifndef ALIMUONCALIBPARAMNI_H
13 #define ALIMUONCALIBPARAMNI_H
15 #ifndef ALIMUONVCALIBPARAM_H
16 # include "AliMUONVCalibParam.h"
19 class AliMUONCalibParamNI : public AliMUONVCalibParam
22 AliMUONCalibParamNI();
23 AliMUONCalibParamNI(Int_t dimension, Int_t theSize, Int_t id0, Int_t id1, Int_t fillWithValue=0, Int_t packingValue=0);
24 AliMUONCalibParamNI(const AliMUONCalibParamNI& other);
25 AliMUONCalibParamNI& operator=(const AliMUONCalibParamNI& other);
27 virtual ~AliMUONCalibParamNI();
29 /// Own clone methods (as the default TObject::Clone turned out to be pretty slow !)
30 virtual TObject* Clone(const char* = "") const { return new AliMUONCalibParamNI(*this); }
33 virtual Int_t Dimension() const { return fDimension; }
35 virtual void Print(Option_t* opt="") const;
37 virtual void SetValueAsFloat(Int_t i, Int_t j, Float_t value);
38 virtual void SetValueAsFloatFast(Int_t i, Int_t j, Float_t value);
39 virtual void SetValueAsInt(Int_t i, Int_t j, Int_t value);
40 virtual void SetValueAsIntFast(Int_t i, Int_t j, Int_t value);
42 /// Return size - the number of float pair we hold
43 virtual Int_t Size() const { return fSize; }
45 virtual Float_t ValueAsFloat(Int_t i, Int_t j=0) const;
46 virtual Float_t ValueAsFloatFast(Int_t i, Int_t j=0) const;
47 virtual Int_t ValueAsInt(Int_t i, Int_t j=0) const;
48 virtual Int_t ValueAsIntFast(Int_t i, Int_t j=0) const;
50 virtual Bool_t UnpackValue(Int_t value, Int_t& a, Int_t& b) const;
52 virtual Bool_t PackValues(Int_t a, Int_t b, Int_t& packedValue) const;
54 virtual Bool_t IsPacked() const;
57 void CopyTo(AliMUONCalibParamNI& destination) const;
58 Int_t Index(Int_t i, Int_t j) const;
59 Int_t IndexFast(Int_t i, Int_t j) const;
62 Int_t fDimension; ///< dimension of this object
63 Int_t fSize; ///< The number of float pair we hold
64 Int_t fN; ///< The total number of floats we hold (fDimension*fSize)
65 Int_t fPackingFactor; ///< packing factor, i.e. value = a*fPackingFactor + b
68 Int_t* fValues; //[fN] The values array
70 ClassDef(AliMUONCalibParamNI,3) // Container for calibration parameters