]>
Commit | Line | Data |
---|---|---|
2eb38194 | 1 | #ifndef ALIVZERORAWSTREAM_H |
2 | #define ALIVZERORAWSTREAM_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /////////////////////////////////////////////////////////////////////////////// | |
7 | /// | |
8 | /// This is a class for reading the VZERO DDL raw data | |
9 | /// The format of the raw data corresponds to the one | |
10 | /// implemented in AliVZEROBuffer class. | |
11 | /// | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | class AliRawReader; | |
17 | ||
18 | class AliVZERORawStream: public TObject { | |
19 | public : | |
20 | AliVZERORawStream(AliRawReader* rawReader); | |
21 | virtual ~AliVZERORawStream(); | |
22 | ||
bfe07a27 | 23 | virtual void Reset(); |
24 | virtual Bool_t Next(); | |
25 | ||
26 | // Getters of various scalers and Minimum Bias flags : | |
27 | ||
28 | ULong64_t GetBBScalers(Int_t channel) const | |
29 | { return fBBScalers[channel]; } | |
30 | ULong64_t GetBGScalers(Int_t channel) const | |
31 | { return fBGScalers[channel]; } | |
32 | UInt_t GetTriggerScalers(Int_t num_scaler) const | |
33 | { return fScalers[num_scaler]; } | |
34 | UInt_t GetBunchNumbersMB(Int_t num_bunch) const | |
35 | { return fBunchNumbers[num_bunch]; } | |
36 | UShort_t GetChargeMB(Int_t channel, Int_t num_bunch) const | |
37 | { return fChargeMB[channel][num_bunch]; } | |
38 | Bool_t GetIntMBFlag(Int_t channel, Int_t num_bunch) const | |
39 | { return fIsIntMB[channel][num_bunch]; } | |
40 | Bool_t GetBBMBFlag(Int_t channel, Int_t num_bunch) const | |
41 | { return fIsBBMB[channel][num_bunch]; } | |
42 | Bool_t GetBGMBFlag(Int_t channel, Int_t num_bunch) const | |
43 | { return fIsBGMB[channel][num_bunch]; } | |
44 | ||
45 | // Getters of ADC signals, ADC pedestals, time information and corresponding flags : | |
46 | ||
47 | UShort_t GetADC(Int_t channel) const | |
726d762c | 48 | { return fADC[channel][kNEvOfInt/2]; } |
bfe07a27 | 49 | UShort_t GetPedestal(Int_t channel, Int_t event) const |
8094d3d3 | 50 | { return fADC[channel][event]; } |
bfe07a27 | 51 | Bool_t GetIntegratorFlag(Int_t channel, Int_t event) const |
52 | { return fIsInt[channel][event]; } | |
53 | Bool_t GetBBFlag(Int_t channel, Int_t event) const | |
54 | { return fIsBB[channel][event]; } | |
55 | Bool_t GetBGFlag(Int_t channel, Int_t event) const | |
56 | { return fIsBG[channel][event]; } | |
57 | UInt_t GetTime(Int_t channel) const | |
726d762c | 58 | { return fTime[channel]; } |
a83ba31a | 59 | UInt_t GetWidth(Int_t channel) const |
60 | { return fWidth[channel]; } | |
726d762c | 61 | |
62 | enum EVZERORawDataParams { | |
bfe07a27 | 63 | kNChannels = 64, // number of electronic channels in V0 |
64 | kNEvOfInt = 21, // number of events of interest | |
65 | kNScalers = 16, // number of scalers | |
66 | kNBunches = 10 // number of bunches used in Minimum Bias information | |
726d762c | 67 | }; |
2eb38194 | 68 | |
69 | enum EVZERORawStreamError { | |
70 | kRawDataSizeErr = 1 | |
71 | }; | |
72 | ||
73 | private: | |
74 | ||
75 | AliVZERORawStream(const AliVZERORawStream& stream); | |
76 | AliVZERORawStream& operator = (const AliVZERORawStream& stream); | |
77 | ||
726d762c | 78 | UInt_t GetNextWord(); |
79 | UShort_t GetNextShort(); | |
80 | ||
bfe07a27 | 81 | ULong64_t fBBScalers[kNChannels]; // 'Beam-Beam' scalers for all channels |
82 | ULong64_t fBGScalers[kNChannels]; // 'Beam-Gas' scalers for all channels | |
83 | UInt_t fScalers[kNScalers]; // Trigger scalers | |
84 | UInt_t fBunchNumbers[kNBunches]; // Bunch numbers for the previous 10 MB events | |
85 | UShort_t fChargeMB[kNChannels][kNBunches]; // ADC counts for all channels for the previous 10 MB events | |
86 | Bool_t fIsIntMB[kNChannels][kNBunches]; // 'Integrator' flag for all channels for the previous 10 MB events | |
87 | Bool_t fIsBBMB[kNChannels][kNBunches]; // 'Beam-Beam' flag for all channels for the previous 10 MB events | |
88 | Bool_t fIsBGMB[kNChannels][kNBunches]; // 'Beam-Gas' for all channels for the previous 10 MB events | |
726d762c | 89 | |
bfe07a27 | 90 | UShort_t fADC[kNChannels][kNEvOfInt]; // ADC counts for all channels and all events of interest |
91 | Bool_t fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels | |
92 | Bool_t fIsBB[kNChannels][kNEvOfInt]; // 'Beam-Beam' flag for all channels | |
93 | Bool_t fIsBG[kNChannels][kNEvOfInt]; // 'Beam-Gas' flag for all channels | |
94 | Int_t fTime[kNChannels]; // leading time for all channels - from HPTDC | |
a83ba31a | 95 | Int_t fWidth[kNChannels]; // pulse width for all channels - from HPTDC |
2eb38194 | 96 | |
bfe07a27 | 97 | UShort_t fTrigger; // VZERO trigger inputs |
98 | UShort_t fTriggerMask; // VZERO trigger inputs mask | |
2eb38194 | 99 | |
bfe07a27 | 100 | Int_t fPosition; // current position in the raw-data payload |
2eb38194 | 101 | |
bfe07a27 | 102 | AliRawReader* fRawReader; // object for reading the raw data |
2eb38194 | 103 | |
bfe07a27 | 104 | UChar_t* fData; // pointer to raw data payload |
2eb38194 | 105 | |
106 | ClassDef(AliVZERORawStream, 0) // class for reading VZERO DDL raw data | |
107 | }; | |
108 | ||
109 | #endif |