Implementation of VCalibParam for N integers per channel (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONCalibParamNI.h
CommitLineData
96fea1fd 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2* See cxx source for full Copyright notice */
3
4// $Id$
5
6/// \ingroup calib
7/// \class AliMUONCalibParamNI
8/// \brief Implementation of AliMUONVCalibParam for tuples of ints
9///
10// Author Laurent Aphecetche
11
12#ifndef ALIMUONCALIBPARAMNI_H
13#define ALIMUONCALIBPARAMNI_H
14
15#ifndef ALIMUONVCALIBPARAM_H
16# include "AliMUONVCalibParam.h"
17#endif
18
19class AliMUONCalibParamNI : public AliMUONVCalibParam
20{
21public:
22 AliMUONCalibParamNI();
23 AliMUONCalibParamNI(Int_t dimension, Int_t theSize, Int_t fillWithValue=0, Int_t packingValue=0);
24 AliMUONCalibParamNI(const AliMUONCalibParamNI& other);
25 AliMUONCalibParamNI& operator=(const AliMUONCalibParamNI& other);
26
27 virtual ~AliMUONCalibParamNI();
28
29 /// Return dimension
30 virtual Int_t Dimension() const { return fDimension; }
31
32 virtual void Print(Option_t* opt="") const;
33
34 virtual void SetValueAsFloat(Int_t i, Int_t j, Float_t value);
35 virtual void SetValueAsInt(Int_t i, Int_t j, Int_t value);
36
37 /// Return size - the number of float pair we hold
38 virtual Int_t Size() const { return fSize; }
39
40 virtual Float_t ValueAsFloat(Int_t i, Int_t j=0) const;
41 virtual Int_t ValueAsInt(Int_t i, Int_t j=0) const;
42
43 virtual Bool_t UnpackValue(Int_t value, Int_t& a, Int_t& b) const;
44
45 virtual Bool_t PackValues(Int_t a, Int_t b, Int_t& packedValue) const;
46
47 virtual Bool_t IsPacked() const;
48
49private:
50 void CopyTo(AliMUONCalibParamNI& destination) const;
51 Int_t Index(Int_t i, Int_t j) const;
52
53private:
54 Int_t fDimension; ///< dimension of this object
55 Int_t fSize; ///< The number of float pair we hold
56 Int_t fN; ///< The total number of floats we hold (fDimension*fSize)
57 Int_t fPackingFactor; ///< packing factor, i.e. value = a*fPackingFactor + b
58
59 /// The values array
60 Int_t* fValues; //[fN] The values array
61
62 ClassDef(AliMUONCalibParamNI,1) // Container for calibration parameters
63};
64
65#endif