]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtestBeam.h
Fixing local structure disabled word, which had an incorrect value.
[u/mrichter/AliRoot.git] / TRD / AliTRDtestBeam.h
CommitLineData
c893147d 1#ifndef ALITRDTESTBEAM_H
2#define ALITRDTESTBEAM_H
0eedb47d 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
00d52803 8////////////////////////////////////////////////////////////////////////////
9// //
10// Class to handle the test beam data of 2007 //
11// //
12// Authors: //
13// Sylwester Radomski (radomski@physi.uni-heidelberg.de) //
14// Anton Andronic (A.Andronic@gsi.de) //
15// //
16////////////////////////////////////////////////////////////////////////////
0eedb47d 17
6511d650 18//#define MAX_SI 2000
0eedb47d 19
20#include "TObject.h"
21
22class AliTRDrawStreamV2;
987ba9a3 23class AliTRDrawStream;
00d52803 24
0eedb47d 25using namespace std;
26
27class AliTRDtestBeam: public TObject {
28
29public:
6511d650 30
0eedb47d 31 AliTRDtestBeam(); // ctor
32 AliTRDtestBeam(const char *filename); // constructor
01abcaa3 33 AliTRDtestBeam(const AliTRDtestBeam &tb);
056c75e1 34 AliTRDtestBeam& operator = (const AliTRDtestBeam& /*tb*/) { return *this; };
6511d650 35 virtual ~AliTRDtestBeam(); // dtor
0eedb47d 36
37 Int_t NextEvent();
38
987ba9a3 39 AliTRDrawStream *GetTRDrawStream(); // needs RawStreamTB
0eedb47d 40
41 // silicon
6511d650 42 Short_t GetNSi1() const {return fNSi1;}
43 Short_t GetNSi2() const {return fNSi2;}
0eedb47d 44
6511d650 45 Int_t GetSi1Address(Int_t i) const {return (i<fNSi1)? fSi1Address[i] : -1;};
46 Int_t GetSi2Address(Int_t i) const {return (i<fNSi2)? fSi2Address[i] : -1;};
0eedb47d 47
6511d650 48 Int_t GetSi1Charge(Int_t i) const {return (i<fNSi1)? fSi1Charge[i] : -1;};
056c75e1 49 Int_t GetSi2Charge(Int_t i) const {return (i<fNSi2)? fSi2Charge[i] : -1;};
0eedb47d 50
6511d650 51 Double_t GetX(Int_t n) const {return (n<2)? fX[n] : -1;}
52 Double_t GetY(Int_t n) const {return (n<2)? fY[n] : -1;}
53 Double_t GetQx(Int_t n) const {return (n<2)? fQx[n] : -1;}
54 Double_t GetQy(Int_t n) const {return (n<2)? fQy[n] : -1;}
0eedb47d 55
56 // calo
6511d650 57 Double_t GetCher() const {return fCher;}
58 Double_t GetPb() const {return fPb;}
0eedb47d 59
60protected:
61
6511d650 62 ifstream *fDataStream; // input data stream
0eedb47d 63
6511d650 64 Bool_t fHeaderIsRead; // do we read Header ?
65 Int_t fEventCount; // number of events
66 Int_t fLimit; // = 4
67 Int_t fCurrent; // ...
68
69 Int_t fDdlOff; // offset to DDL data
70 Int_t fSiOff; // offset to Silicon data
71 Int_t fQdcOff; // offset to Cherenkov and LeadGlass data
72 Int_t fDdlSize; // size of DDL data
73
74 Char_t *fFileHeader; // file header data
75 Char_t *fEventHeader; // event header data
76 Char_t *fEventData; // actual event data
0eedb47d 77
78 // silicon data
79
6511d650 80 Short_t fNSi1; // number of fired silicon pads from Si1
81 Short_t fNSi2; // fired pads in Si2
0eedb47d 82
6511d650 83 Int_t fSi1Address[1270]; // addresses of fires silicon pads Si1
84 Int_t fSi2Address[1270]; // addresses if fires silicon pads Si2
0eedb47d 85
6511d650 86 Int_t fSi1Charge[1270]; // charge collected on Si1
87 Int_t fSi2Charge[1270]; // charge collected on Si2
0eedb47d 88
89 // reconstructed Silicon data
90
6511d650 91 Double_t fX[2]; // x position for Si1 and Si2
92 Double_t fY[2]; // y position
93 Double_t fQx[2]; // charge on X
94 Double_t fQy[2]; // charge on y
0eedb47d 95
96 // cherenkov glass
6511d650 97 Double_t fCher; // cherenkov signal
98 Double_t fPb; // lead glass signal
0eedb47d 99
100
101 // data reading
102
c893147d 103 Int_t Int(Int_t i, const Char_t * const start) const;
0eedb47d 104 Int_t DecodeSi();
105
106 //
6511d650 107 static const Long_t fgkFileHeadSize; //= 544; // ?
108 static const Long_t fgkEventHeadSize; // = 68; //?
109 static const Long_t fgkLdcHeadSize; // = 68; //?
110 static const Long_t fgkEquipHeadSize; // = 28; //
111 static const Int_t fgkVmeIn; //=1; //VME event in
112 static const Int_t fgkSimIn; //=1; //Si-strips in
0eedb47d 113
114 //typedef char byte;
115
116 //offsets in bytes
6511d650 117 static const Int_t fgkPosRun; // = 20; //run nr. (in file and event header)
118 static const Int_t fgkPosLength; // = 0; //event/equip. length
119 static const Int_t fgkEqId; // = 8; //equipment id.
120 static const Int_t fgkPosSiOff; // = 12; //Si data size offset (3 extra words!!!)
0eedb47d 121
122 ClassDef(AliTRDtestBeam,1) // description
6511d650 123
0eedb47d 124};
125
6511d650 126#endif
0eedb47d 127