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