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