]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCalStrip.cxx
Removing wrong inline from the implementation file
[u/mrichter/AliRoot.git] / TOF / AliTOFCalStrip.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:58:08 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 : strips //
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 "AliTOFCalStrip.h"
44#include "AliTOFCalPadZ.h"
45
46ClassImp(AliTOFCalStrip)
47
48//________________________________________________________________
49
50AliTOFCalStrip::AliTOFCalStrip(){
340693af 51 //main ctor
6dc9348d 52 fCh = 0;
d4ad0d6b 53 fGeom= 0x0;
54 fNpadZ = 0;
55 fNpadX = 0;
6dc9348d 56}
57//________________________________________________________________
58
59AliTOFCalStrip::AliTOFCalStrip(AliTOFChannel *ch):
60 fCh(ch)
61{
340693af 62 // ctor with channel
d4ad0d6b 63 fGeom= 0x0;
64 fNpadZ = 0;
65 fNpadX = 0;
66}
67//________________________________________________________________
68
69AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom){
340693af 70 //ctor with geom
d4ad0d6b 71 fCh = 0;
72 fGeom = geom;
73 fNpadZ = fGeom->NpadZ();
74 fNpadX = fGeom->NpadX();
75}
76//________________________________________________________________
6dc9348d 77
d4ad0d6b 78AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom,AliTOFChannel *ch):
79 fCh(ch)
80{
340693af 81 //ctor with channel and geom
d4ad0d6b 82 fGeom = geom;
83 fNpadZ = fGeom->NpadZ();
84 fNpadX = fGeom->NpadX();
6dc9348d 85}
86//________________________________________________________________
87
88AliTOFCalStrip::~AliTOFCalStrip()
89{
340693af 90 //dtor
6dc9348d 91 delete[] fCh;
92}
93
94//________________________________________________________________
95
96AliTOFCalStrip::AliTOFCalStrip(const AliTOFCalStrip& strip):
97 TObject(strip)
98 {
340693af 99 //copy ctor
6dc9348d 100 fCh = strip.fCh;
6dc9348d 101 fNpadZ = strip.fNpadZ;
102 fNpadX = strip.fNpadX;
103
104 }
105//________________________________________________________________
106
107void AliTOFCalStrip::Browse(TBrowser *b){
340693af 108 //add obj to list of browsables
d4ad0d6b 109 if(fGeom==0x0){
110 AliTOFGeometry *geom = new AliTOFGeometryV5();
111 AliInfo("V5 TOF Geometry is taken as the default");
112 fNpadZ = geom->NpadZ();
113 fNpadX = geom->NpadX();
114 delete geom;
115 }
6dc9348d 116 char name[10];
117 for(Int_t i=0; i<fNpadZ; ++i) {
118 snprintf(name,sizeof(name),"PadZ %2.2d",i);
119 b->Add(new AliTOFCalPadZ(&fCh[i*fNpadX]),name);
120 }
121}