]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONVCalibParam.cxx
Changes in AliESDEvent fwd declarations (Ch. Klein-Boesing)
[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
3d1463c8 22//-----------------------------------------------------------------------------
85fec35d 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
3d1463c8 35//-----------------------------------------------------------------------------
7bda16d5 36
5398f946 37/// \cond CLASSIMP
7bda16d5 38ClassImp(AliMUONVCalibParam)
5398f946 39/// \endcond
7bda16d5 40
85fec35d 41//_____________________________________________________________________________
a1546c3a 42AliMUONVCalibParam::AliMUONVCalibParam() : TObject()
85fec35d 43{
a1546c3a 44 /// Default constructor
45}
46
47//_____________________________________________________________________________
48AliMUONVCalibParam::AliMUONVCalibParam(Int_t id0, Int_t id1) : TObject()
49{
50 /// constructor for 2D
51 SetUniqueID(BuildUniqueID(id0,id1));
85fec35d 52}
53
7bda16d5 54//_____________________________________________________________________________
55AliMUONVCalibParam::~AliMUONVCalibParam()
56{
5398f946 57/// Destructor.
7bda16d5 58}
a1546c3a 59
60//_____________________________________________________________________________
61UInt_t
62AliMUONVCalibParam::BuildUniqueID(Int_t id0, Int_t id1)
63{
64 /// Build a single index from the pair (id0,id1)
65 return ( id0 | ( id1 << 16 ) );
66}
67
68//_____________________________________________________________________________
69void
70AliMUONVCalibParam::DecodeUniqueID(UInt_t uniqueID, Int_t& id0, Int_t& id1)
71{
72 /// Convert single integer into a pair (i,j)
73 id0 = ID0(uniqueID);
74 id1 = ID1(uniqueID);
75}
76
77//_____________________________________________________________________________
78Int_t
79AliMUONVCalibParam::ID0(UInt_t uniqueID)
80{
81 /// Extract id0 from uniqueID
82 return uniqueID & 0xFFFF;
83}
84
85//_____________________________________________________________________________
86Int_t
87AliMUONVCalibParam::ID0() const
88{
89 /// Extract first identifier
90 return ID0(GetUniqueID());
91}
92
93//_____________________________________________________________________________
94Int_t
95AliMUONVCalibParam::ID1(UInt_t uniqueID)
96{
97 /// Extract id1 from uniqueID
98 return ( uniqueID & 0xFFFF0000 ) >> 16;
99}
100
101//_____________________________________________________________________________
102Int_t
103AliMUONVCalibParam::ID1() const
104{
105 /// Extract second identifier
106 return ID1(GetUniqueID());
107}
108
109//_____________________________________________________________________________
110const char*
111AliMUONVCalibParam::GetName() const
112{
113 /// Build a name for this object
114 return Form("I=%d,J=%d",ID0(),ID1());
115}
116
117//_____________________________________________________________________________
118void
119AliMUONVCalibParam::SetValueAsDouble(Int_t, Int_t, Double_t)
120{
121 /// By default, this one does not exist
122 AliFatal("Not implemented");
123}
124
125//_____________________________________________________________________________
126Double_t
127AliMUONVCalibParam::ValueAsDouble(Int_t , Int_t ) const
128{
129 /// By default, this one does not exist
130 AliFatal("Not implemented");
131 return 0;
132}
133