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