]>
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$ | |
7aeeaf38 | 18 | Revision 1.4 2006/04/05 08:35:38 hristov |
19 | Coding conventions (S.Arcelli, C.Zampolli) | |
20 | ||
340693af | 21 | Revision 1.3 2006/03/28 14:57:30 arcelli |
22 | updates to handle new V5 geometry & some re-arrangements | |
23 | ||
d4ad0d6b | 24 | Revision 1.2 2006/02/13 17:22:26 arcelli |
25 | just Fixing Log info | |
26 | ||
762446e0 | 27 | Revision 1.1 2006/02/13 16:10:48 arcelli |
28 | Add classes for TOF Calibration (C.Zampolli) | |
29 | ||
6dc9348d | 30 | author: 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 | ||
48 | ClassImp(AliTOFCalPadZ) | |
49 | ||
50 | //________________________________________________________________ | |
51 | ||
52 | AliTOFCalPadZ::AliTOFCalPadZ(){ | |
53 | fCh = 0; | |
d4ad0d6b | 54 | fNpadX=0; |
6dc9348d | 55 | } |
56 | //________________________________________________________________ | |
57 | ||
58 | AliTOFCalPadZ::AliTOFCalPadZ(AliTOFChannel *ch): | |
59 | fCh(ch) | |
60 | { | |
d4ad0d6b | 61 | fNpadX = 0; |
62 | } | |
63 | //________________________________________________________________ | |
6dc9348d | 64 | |
d4ad0d6b | 65 | AliTOFCalPadZ::AliTOFCalPadZ(AliTOFGeometry *geom){ |
340693af | 66 | //ctor with TOF geometry |
d4ad0d6b | 67 | fCh = 0; |
68 | fGeom = geom; | |
69 | fNpadX = fGeom->NpadX(); | |
70 | } | |
71 | //________________________________________________________________ | |
72 | ||
73 | AliTOFCalPadZ::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 | //________________________________________________________________ | |
82 | AliTOFCalPadZ::AliTOFCalPadZ(const AliTOFCalPadZ &source) | |
83 | :TObject() | |
84 | { | |
85 | // copy constructor | |
86 | ||
87 | this->fGeom=source.fGeom; | |
88 | ||
89 | } | |
90 | ||
91 | //_____________________________________________________________________________ | |
92 | AliTOFCalPadZ& AliTOFCalPadZ::operator=(const AliTOFCalPadZ &source) | |
93 | { | |
94 | // assignment operator | |
95 | ||
96 | this->fGeom=source.fGeom; | |
97 | return *this; | |
98 | ||
99 | } | |
100 | ||
6dc9348d | 101 | //________________________________________________________________ |
102 | ||
103 | AliTOFCalPadZ::~AliTOFCalPadZ() | |
104 | { | |
105 | delete[] fCh; | |
106 | } | |
107 | //________________________________________________________________ | |
108 | ||
109 | void 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 | } |