]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONVCalibParam.cxx
New class AliESDEvent, backward compatibility with the old AliESD (Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONVCalibParam.cxx
CommitLineData
7bda16d5 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
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**************************************************************************/
15
16// $Id$
17
18#include "AliMUONVCalibParam.h"
19
a1546c3a 20#include "AliLog.h"
21
85fec35d 22///
23/// \class AliMUONVCalibParam
24///
25/// Defines an interface for a calibration container object.
26///
a1546c3a 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.
30///
31/// id1 might be left to zero if not required (e.g. for calibparam which
32/// can be identified by a single integer)
33///
34/// \author Laurent Aphecetche, Subatech
7bda16d5 35
5398f946 36/// \cond CLASSIMP
7bda16d5 37ClassImp(AliMUONVCalibParam)
5398f946 38/// \endcond
7bda16d5 39
85fec35d 40//_____________________________________________________________________________
a1546c3a 41AliMUONVCalibParam::AliMUONVCalibParam() : TObject()
85fec35d 42{
a1546c3a 43 /// Default constructor
44}
45
46//_____________________________________________________________________________
47AliMUONVCalibParam::AliMUONVCalibParam(Int_t id0, Int_t id1) : TObject()
48{
49 /// constructor for 2D
50 SetUniqueID(BuildUniqueID(id0,id1));
85fec35d 51}
52
7bda16d5 53//_____________________________________________________________________________
54AliMUONVCalibParam::~AliMUONVCalibParam()
55{
5398f946 56/// Destructor.
7bda16d5 57}
a1546c3a 58
59//_____________________________________________________________________________
60UInt_t
61AliMUONVCalibParam::BuildUniqueID(Int_t id0, Int_t id1)
62{
63 /// Build a single index from the pair (id0,id1)
64 return ( id0 | ( id1 << 16 ) );
65}
66
67//_____________________________________________________________________________
68void
69AliMUONVCalibParam::DecodeUniqueID(UInt_t uniqueID, Int_t& id0, Int_t& id1)
70{
71 /// Convert single integer into a pair (i,j)
72 id0 = ID0(uniqueID);
73 id1 = ID1(uniqueID);
74}
75
76//_____________________________________________________________________________
77Int_t
78AliMUONVCalibParam::ID0(UInt_t uniqueID)
79{
80 /// Extract id0 from uniqueID
81 return uniqueID & 0xFFFF;
82}
83
84//_____________________________________________________________________________
85Int_t
86AliMUONVCalibParam::ID0() const
87{
88 /// Extract first identifier
89 return ID0(GetUniqueID());
90}
91
92//_____________________________________________________________________________
93Int_t
94AliMUONVCalibParam::ID1(UInt_t uniqueID)
95{
96 /// Extract id1 from uniqueID
97 return ( uniqueID & 0xFFFF0000 ) >> 16;
98}
99
100//_____________________________________________________________________________
101Int_t
102AliMUONVCalibParam::ID1() const
103{
104 /// Extract second identifier
105 return ID1(GetUniqueID());
106}
107
108//_____________________________________________________________________________
109const char*
110AliMUONVCalibParam::GetName() const
111{
112 /// Build a name for this object
113 return Form("I=%d,J=%d",ID0(),ID1());
114}
115
116//_____________________________________________________________________________
117void
118AliMUONVCalibParam::SetValueAsDouble(Int_t, Int_t, Double_t)
119{
120 /// By default, this one does not exist
121 AliFatal("Not implemented");
122}
123
124//_____________________________________________________________________________
125Double_t
126AliMUONVCalibParam::ValueAsDouble(Int_t , Int_t ) const
127{
128 /// By default, this one does not exist
129 AliFatal("Not implemented");
130 return 0;
131}
132