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