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