]>
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:48 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 : PlateB // | |
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 "AliTOFCalStrip.h" |
46 | #include "AliTOFCalPlateB.h" | |
47 | #include "AliTOFChannel.h" | |
48 | ||
49 | ClassImp(AliTOFCalPlateB) | |
50 | ||
51 | //________________________________________________________________ | |
52 | ||
53 | AliTOFCalPlateB::AliTOFCalPlateB(){ | |
340693af | 54 | //main ctor |
6dc9348d | 55 | fCh = 0; |
d4ad0d6b | 56 | fGeom= 0x0; |
57 | fNStripB = 0; | |
58 | fNpadZ = 0; | |
59 | fNpadX = 0; | |
60 | } | |
61 | //________________________________________________________________ | |
62 | ||
63 | AliTOFCalPlateB::AliTOFCalPlateB(AliTOFChannel *ch) : fCh(ch) | |
64 | { | |
340693af | 65 | //ctor with channel |
d4ad0d6b | 66 | fGeom= 0x0; |
67 | fNStripB = 0; | |
68 | fNpadZ = 0; | |
69 | fNpadX = 0; | |
70 | } | |
71 | //________________________________________________________________ | |
6dc9348d | 72 | |
d4ad0d6b | 73 | AliTOFCalPlateB::AliTOFCalPlateB(AliTOFGeometry *geom){ |
340693af | 74 | //ctor with geom |
d4ad0d6b | 75 | fCh = 0; |
76 | fGeom = geom; | |
77 | fNStripB = fGeom->NStripB(); | |
78 | fNpadZ = fGeom->NpadZ(); | |
79 | fNpadX = fGeom->NpadX(); | |
6dc9348d | 80 | } |
81 | //________________________________________________________________ | |
82 | ||
d4ad0d6b | 83 | AliTOFCalPlateB::AliTOFCalPlateB(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(ch) |
6dc9348d | 84 | { |
340693af | 85 | //ctor with channel and geom |
d4ad0d6b | 86 | fGeom = geom; |
87 | fNStripB = fGeom->NStripB(); | |
88 | fNpadZ = fGeom->NpadZ(); | |
89 | fNpadX = fGeom->NpadX(); | |
6dc9348d | 90 | } |
d4ad0d6b | 91 | |
6dc9348d | 92 | //________________________________________________________________ |
93 | ||
94 | AliTOFCalPlateB::~AliTOFCalPlateB() | |
95 | { | |
340693af | 96 | //dtor |
6dc9348d | 97 | delete[] fCh; |
98 | } | |
99 | ||
100 | //________________________________________________________________ | |
101 | ||
102 | AliTOFCalPlateB::AliTOFCalPlateB(const AliTOFCalPlateB& pl): | |
103 | TObject(pl) | |
104 | { | |
340693af | 105 | //copy ctor |
6dc9348d | 106 | fCh = pl.fCh; |
6dc9348d | 107 | fNStripB = pl.fNStripB; |
6dc9348d | 108 | fNpadZ = pl.fNpadZ; |
109 | fNpadX = pl.fNpadX; | |
d4ad0d6b | 110 | fGeom = pl.fGeom; |
6dc9348d | 111 | |
112 | } | |
113 | //________________________________________________________________ | |
114 | ||
7aeeaf38 | 115 | AliTOFCalPlateB& AliTOFCalPlateB::operator=(const AliTOFCalPlateB& pl) |
116 | { | |
117 | //assignment operator | |
118 | this->fCh = pl.fCh; | |
119 | this->fNStripB = pl.fNStripB; | |
120 | this->fNpadZ = pl.fNpadZ; | |
121 | this->fNpadX = pl.fNpadX; | |
122 | this->fGeom = pl.fGeom; | |
123 | return *this; | |
124 | ||
125 | } | |
126 | //________________________________________________________________ | |
127 | ||
6dc9348d | 128 | void AliTOFCalPlateB::Browse(TBrowser *b){ |
340693af | 129 | //add cal obj to list of browsables |
6dc9348d | 130 | |
d4ad0d6b | 131 | if(fGeom==0x0){ |
132 | AliTOFGeometry *geom = new AliTOFGeometryV5(); | |
133 | AliInfo("V5 TOF Geometry is taken as the default"); | |
134 | fNStripB = geom->NStripB(); | |
135 | fNpadZ = geom->NpadZ(); | |
136 | fNpadX = geom->NpadX(); | |
137 | delete geom; | |
138 | } | |
6dc9348d | 139 | char name[10]; |
140 | for(Int_t i=0; i<fNStripB; ++i) { | |
141 | snprintf(name,sizeof(name),"Strip %2.2d",i); | |
142 | b->Add(new AliTOFCalStrip(&fCh[i*fNpadZ*fNpadX]),name); | |
143 | } | |
144 | } |