]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFCalPadZ.cxx
Important bugfix. Missing reset of the equipment header data. It was causing a wrong...
[u/mrichter/AliRoot.git] / TOF / AliTOFCalPadZ.cxx
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 /*
17 $Log$
18 Revision 1.5  2006/04/16 22:29:05  hristov
19 Coding conventions (Annalisa)
20
21 Revision 1.4  2006/04/05 08:35:38  hristov
22 Coding conventions (S.Arcelli, C.Zampolli)
23
24 Revision 1.3  2006/03/28 14:57:30  arcelli
25 updates to handle new V5 geometry & some re-arrangements
26
27 Revision 1.2  2006/02/13 17:22:26  arcelli
28 just Fixing Log info
29
30 Revision 1.1  2006/02/13 16:10:48  arcelli
31 Add classes for TOF Calibration (C.Zampolli)
32
33 author: Chiara Zampolli, zampolli@bo.infn.it
34 */  
35
36 ///////////////////////////////////////////////////////////////////////////////
37 //                                                                           //
38 // class for TOF calibration : PadZ                                          //
39 //                                                                           //
40 ///////////////////////////////////////////////////////////////////////////////
41
42 #include "TBrowser.h"
43
44 #include "AliLog.h"
45
46 #include "AliTOFCalPadZ.h"
47 #include "AliTOFChannel.h"
48 #include "AliTOFGeometryV5.h"
49
50 ClassImp(AliTOFCalPadZ)
51
52 //________________________________________________________________
53
54 AliTOFCalPadZ::AliTOFCalPadZ(){
55   fCh = 0;
56   fNpadX=0;
57 }
58 //________________________________________________________________
59
60 AliTOFCalPadZ::AliTOFCalPadZ(AliTOFChannel *ch):
61   fCh(ch)
62 {  
63   fNpadX = 0;
64 }
65 //________________________________________________________________
66
67 AliTOFCalPadZ::AliTOFCalPadZ(AliTOFGeometry *geom){
68   //ctor with TOF geometry
69   fCh = 0;
70   fGeom = geom;
71   fNpadX = fGeom->NpadX();
72 }
73 //________________________________________________________________
74
75 AliTOFCalPadZ::AliTOFCalPadZ(AliTOFGeometry *geom,AliTOFChannel *ch):
76   fCh(ch)
77 {  
78   //ctor with TOF geometry and cal channel
79   fGeom = geom;
80   fNpadX = fGeom->NpadX();
81 }
82
83 //________________________________________________________________
84 AliTOFCalPadZ::AliTOFCalPadZ(const AliTOFCalPadZ &source)
85   :TObject()
86 {
87   // copy constructor
88
89   this->fGeom=source.fGeom;
90
91 }
92
93 //_____________________________________________________________________________
94 AliTOFCalPadZ& AliTOFCalPadZ::operator=(const AliTOFCalPadZ &source)
95 {
96   // assignment operator
97
98   this->fGeom=source.fGeom;
99   return *this;
100
101 }
102
103 //________________________________________________________________
104
105 AliTOFCalPadZ::~AliTOFCalPadZ()
106   {
107     delete[] fCh;
108   }
109 //________________________________________________________________
110
111 void AliTOFCalPadZ::Browse(TBrowser *b)
112 {
113   //Add cal object to browsable list
114   if(fGeom==0x0){
115     AliInfo("V5 TOF Geometry is taken as the default");
116     AliTOFGeometry *geom = new AliTOFGeometryV5();
117     fNpadX = geom->NpadX();
118     delete geom;
119   }
120   char name[10];
121   for(Int_t i=0; i<fNpadX; ++i) {
122     snprintf(name,sizeof(name),"PadX %2.2d",i);
123     b->Add(new AliTOFChannel(fCh[i]),name);
124   }
125 }