]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCalPlateA.cxx
calib+alignment classes moved/added to base libs
[u/mrichter/AliRoot.git] / TOF / AliTOFCalPlateA.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 : PlateA //
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 "AliTOFCalStrip.h"
40#include "AliTOFCalPlateA.h"
41#include "AliTOFChannel.h"
42
43ClassImp(AliTOFCalPlateA)
44
45//________________________________________________________________
46
47AliTOFCalPlateA::AliTOFCalPlateA(){
48 fCh = 0;
d4ad0d6b 49 fGeom= 0x0;
50 fNStripA = 0;
51 fNpadZ = 0;
52 fNpadX = 0;
6dc9348d 53}
54//________________________________________________________________
55
d4ad0d6b 56AliTOFCalPlateA::AliTOFCalPlateA(AliTOFChannel *ch) : fCh(ch)
6dc9348d 57{
d4ad0d6b 58 fGeom= 0x0;
59 fNStripA = 0;
60 fNpadZ = 0;
61 fNpadX = 0;
62}
63//________________________________________________________________
64
65AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom){
66 fCh = 0;
67 fGeom = geom;
68 fNStripA = fGeom->NStripA();
69 fNpadZ = fGeom->NpadZ();
70 fNpadX = fGeom->NpadX();
71}
72//________________________________________________________________
73
74AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(ch)
75{
76 fGeom = geom;
77 fNStripA = fGeom->NStripA();
78 fNpadZ = fGeom->NpadZ();
79 fNpadX = fGeom->NpadX();
6dc9348d 80}
81//________________________________________________________________
82
83AliTOFCalPlateA::~AliTOFCalPlateA()
84{
85 delete[] fCh;
86}
87
88//________________________________________________________________
89
90AliTOFCalPlateA::AliTOFCalPlateA(const AliTOFCalPlateA& pl):
91 TObject(pl)
92 {
93 fCh = pl.fCh;
6dc9348d 94 fNStripA = pl.fNStripA;
6dc9348d 95 fNpadZ = pl.fNpadZ;
96 fNpadX = pl.fNpadX;
d4ad0d6b 97 fGeom = pl.fGeom;
6dc9348d 98
99 }
100//________________________________________________________________
101
102void AliTOFCalPlateA::Browse(TBrowser *b){
103
d4ad0d6b 104 if(fGeom==0x0){
105 AliTOFGeometry *geom = new AliTOFGeometryV5();
106 AliInfo("V5 TOF Geometry is taken as the default");
107 fNStripA = geom->NStripA();
108 fNpadZ = geom->NpadZ();
109 fNpadX = geom->NpadX();
110 delete geom;
111 }
6dc9348d 112 char name[10];
113 for(Int_t i=0; i<fNStripA; ++i) {
114 snprintf(name,sizeof(name),"Strip %2.2d",i);
115 b->Add(new AliTOFCalStrip(&fCh[i*fNpadZ*fNpadX]),name);
116 }
117}