1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 #include "AliMUONVCalibParam.h"
23 /// \class AliMUONVCalibParam
25 /// Defines an interface for a calibration container object.
27 /// Note that a VCalibParam object is identified by a pair (id0,id1),
28 /// where each member of the pair is a 16 bits word, so that id0 and id1
29 /// can be packed into a single 32 bits word.
31 /// id1 might be left to zero if not required (e.g. for calibparam which
32 /// can be identified by a single integer)
34 /// \author Laurent Aphecetche, Subatech
37 ClassImp(AliMUONVCalibParam)
40 //_____________________________________________________________________________
41 AliMUONVCalibParam::AliMUONVCalibParam() : TObject()
43 /// Default constructor
46 //_____________________________________________________________________________
47 AliMUONVCalibParam::AliMUONVCalibParam(Int_t id0, Int_t id1) : TObject()
49 /// constructor for 2D
50 SetUniqueID(BuildUniqueID(id0,id1));
53 //_____________________________________________________________________________
54 AliMUONVCalibParam::~AliMUONVCalibParam()
59 //_____________________________________________________________________________
61 AliMUONVCalibParam::BuildUniqueID(Int_t id0, Int_t id1)
63 /// Build a single index from the pair (id0,id1)
64 return ( id0 | ( id1 << 16 ) );
67 //_____________________________________________________________________________
69 AliMUONVCalibParam::DecodeUniqueID(UInt_t uniqueID, Int_t& id0, Int_t& id1)
71 /// Convert single integer into a pair (i,j)
76 //_____________________________________________________________________________
78 AliMUONVCalibParam::ID0(UInt_t uniqueID)
80 /// Extract id0 from uniqueID
81 return uniqueID & 0xFFFF;
84 //_____________________________________________________________________________
86 AliMUONVCalibParam::ID0() const
88 /// Extract first identifier
89 return ID0(GetUniqueID());
92 //_____________________________________________________________________________
94 AliMUONVCalibParam::ID1(UInt_t uniqueID)
96 /// Extract id1 from uniqueID
97 return ( uniqueID & 0xFFFF0000 ) >> 16;
100 //_____________________________________________________________________________
102 AliMUONVCalibParam::ID1() const
104 /// Extract second identifier
105 return ID1(GetUniqueID());
108 //_____________________________________________________________________________
110 AliMUONVCalibParam::GetName() const
112 /// Build a name for this object
113 return Form("I=%d,J=%d",ID0(),ID1());
116 //_____________________________________________________________________________
118 AliMUONVCalibParam::SetValueAsDouble(Int_t, Int_t, Double_t)
120 /// By default, this one does not exist
121 AliFatal("Not implemented");
124 //_____________________________________________________________________________
126 AliMUONVCalibParam::ValueAsDouble(Int_t , Int_t ) const
128 /// By default, this one does not exist
129 AliFatal("Not implemented");