]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCalStrip.cxx
Coding conventions (C.Oppedisano)
[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$
d4ad0d6b 18Revision 1.2 2006/02/13 17:22:26 arcelli
19just Fixing Log info
20
762446e0 21Revision 1.1 2006/02/13 16:10:48 arcelli
22Add classes for TOF Calibration (C.Zampolli)
23
6dc9348d 24author: Chiara Zampolli, zampolli@bo.infn.it
762446e0 25*/
6dc9348d 26
27///////////////////////////////////////////////////////////////////////////////
28// //
29// class for TOF calibration : strips //
30// //
31///////////////////////////////////////////////////////////////////////////////
32
33#include "TObject.h"
34#include "TROOT.h"
35#include "TBrowser.h"
36#include "TClass.h"
d4ad0d6b 37#include "AliLog.h"
38#include "AliTOFGeometryV5.h"
6dc9348d 39#include "AliTOFChannel.h"
40#include "AliTOFCalStrip.h"
41#include "AliTOFCalPadZ.h"
42
43ClassImp(AliTOFCalStrip)
44
45//________________________________________________________________
46
47AliTOFCalStrip::AliTOFCalStrip(){
48 fCh = 0;
d4ad0d6b 49 fGeom= 0x0;
50 fNpadZ = 0;
51 fNpadX = 0;
6dc9348d 52}
53//________________________________________________________________
54
55AliTOFCalStrip::AliTOFCalStrip(AliTOFChannel *ch):
56 fCh(ch)
57{
d4ad0d6b 58 fGeom= 0x0;
59 fNpadZ = 0;
60 fNpadX = 0;
61}
62//________________________________________________________________
63
64AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom){
65 fCh = 0;
66 fGeom = geom;
67 fNpadZ = fGeom->NpadZ();
68 fNpadX = fGeom->NpadX();
69}
70//________________________________________________________________
6dc9348d 71
d4ad0d6b 72AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom,AliTOFChannel *ch):
73 fCh(ch)
74{
75 fGeom = geom;
76 fNpadZ = fGeom->NpadZ();
77 fNpadX = fGeom->NpadX();
6dc9348d 78}
79//________________________________________________________________
80
81AliTOFCalStrip::~AliTOFCalStrip()
82{
83 delete[] fCh;
84}
85
86//________________________________________________________________
87
88AliTOFCalStrip::AliTOFCalStrip(const AliTOFCalStrip& strip):
89 TObject(strip)
90 {
91 fCh = strip.fCh;
6dc9348d 92 fNpadZ = strip.fNpadZ;
93 fNpadX = strip.fNpadX;
94
95 }
96//________________________________________________________________
97
98void AliTOFCalStrip::Browse(TBrowser *b){
99
d4ad0d6b 100 if(fGeom==0x0){
101 AliTOFGeometry *geom = new AliTOFGeometryV5();
102 AliInfo("V5 TOF Geometry is taken as the default");
103 fNpadZ = geom->NpadZ();
104 fNpadX = geom->NpadX();
105 delete geom;
106 }
6dc9348d 107 char name[10];
108 for(Int_t i=0; i<fNpadZ; ++i) {
109 snprintf(name,sizeof(name),"PadZ %2.2d",i);
110 b->Add(new AliTOFCalPadZ(&fCh[i*fNpadX]),name);
111 }
112}