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