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"
22 //-----------------------------------------------------------------------------
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
35 //-----------------------------------------------------------------------------
38 ClassImp(AliMUONVCalibParam)
41 //_____________________________________________________________________________
42 AliMUONVCalibParam::AliMUONVCalibParam() : TObject()
44 /// Default constructor
47 //_____________________________________________________________________________
48 AliMUONVCalibParam::AliMUONVCalibParam(Int_t id0, Int_t id1) : TObject()
50 /// constructor for 2D
51 SetUniqueID(BuildUniqueID(id0,id1));
54 //_____________________________________________________________________________
55 AliMUONVCalibParam::~AliMUONVCalibParam()
60 //_____________________________________________________________________________
62 AliMUONVCalibParam::BuildUniqueID(Int_t id0, Int_t id1)
64 /// Build a single index from the pair (id0,id1)
65 return ( id0 | ( id1 << 16 ) );
68 //_____________________________________________________________________________
70 AliMUONVCalibParam::DecodeUniqueID(UInt_t uniqueID, Int_t& id0, Int_t& id1)
72 /// Convert single integer into a pair (i,j)
77 //_____________________________________________________________________________
79 AliMUONVCalibParam::ID0(UInt_t uniqueID)
81 /// Extract id0 from uniqueID
82 return uniqueID & 0xFFFF;
85 //_____________________________________________________________________________
87 AliMUONVCalibParam::ID0() const
89 /// Extract first identifier
90 return ID0(GetUniqueID());
93 //_____________________________________________________________________________
95 AliMUONVCalibParam::ID1(UInt_t uniqueID)
97 /// Extract id1 from uniqueID
98 return ( uniqueID & 0xFFFF0000 ) >> 16;
101 //_____________________________________________________________________________
103 AliMUONVCalibParam::ID1() const
105 /// Extract second identifier
106 return ID1(GetUniqueID());
109 //_____________________________________________________________________________
111 AliMUONVCalibParam::GetName() const
113 /// Build a name for this object
114 return Form("I=%d,J=%d",ID0(),ID1());
117 //_____________________________________________________________________________
119 AliMUONVCalibParam::SetValueAsDouble(Int_t, Int_t, Double_t)
121 /// By default, this one does not exist
122 AliFatal("Not implemented");
125 //_____________________________________________________________________________
127 AliMUONVCalibParam::ValueAsDouble(Int_t , Int_t ) const
129 /// By default, this one does not exist
130 AliFatal("Not implemented");