]> git.uio.no Git - u/mrichter/AliRoot.git/blame - VZERO/AliVZERORawStream.h
effc++ warnings
[u/mrichter/AliRoot.git] / VZERO / AliVZERORawStream.h
CommitLineData
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
16class AliRawReader;
17
18class 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]; }
59
60 enum EVZERORawDataParams {
bfe07a27 61 kNChannels = 64, // number of electronic channels in V0
62 kNEvOfInt = 21, // number of events of interest
63 kNScalers = 16, // number of scalers
64 kNBunches = 10 // number of bunches used in Minimum Bias information
726d762c 65 };
2eb38194 66
67 enum EVZERORawStreamError {
68 kRawDataSizeErr = 1
69 };
70
71 private:
72
73 AliVZERORawStream(const AliVZERORawStream& stream);
74 AliVZERORawStream& operator = (const AliVZERORawStream& stream);
75
726d762c 76 UInt_t GetNextWord();
77 UShort_t GetNextShort();
78
bfe07a27 79 ULong64_t fBBScalers[kNChannels]; // 'Beam-Beam' scalers for all channels
80 ULong64_t fBGScalers[kNChannels]; // 'Beam-Gas' scalers for all channels
81 UInt_t fScalers[kNScalers]; // Trigger scalers
82 UInt_t fBunchNumbers[kNBunches]; // Bunch numbers for the previous 10 MB events
83 UShort_t fChargeMB[kNChannels][kNBunches]; // ADC counts for all channels for the previous 10 MB events
84 Bool_t fIsIntMB[kNChannels][kNBunches]; // 'Integrator' flag for all channels for the previous 10 MB events
85 Bool_t fIsBBMB[kNChannels][kNBunches]; // 'Beam-Beam' flag for all channels for the previous 10 MB events
86 Bool_t fIsBGMB[kNChannels][kNBunches]; // 'Beam-Gas' for all channels for the previous 10 MB events
726d762c 87
bfe07a27 88 UShort_t fADC[kNChannels][kNEvOfInt]; // ADC counts for all channels and all events of interest
89 Bool_t fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels
90 Bool_t fIsBB[kNChannels][kNEvOfInt]; // 'Beam-Beam' flag for all channels
91 Bool_t fIsBG[kNChannels][kNEvOfInt]; // 'Beam-Gas' flag for all channels
92 Int_t fTime[kNChannels]; // leading time for all channels - from HPTDC
93 Int_t fWidth[kNChannels]; // signal width for all channels - from HPTDC
2eb38194 94
bfe07a27 95 UShort_t fTrigger; // VZERO trigger inputs
96 UShort_t fTriggerMask; // VZERO trigger inputs mask
2eb38194 97
bfe07a27 98 Int_t fPosition; // current position in the raw-data payload
2eb38194 99
bfe07a27 100 AliRawReader* fRawReader; // object for reading the raw data
2eb38194 101
bfe07a27 102 UChar_t* fData; // pointer to raw data payload
2eb38194 103
104 ClassDef(AliVZERORawStream, 0) // class for reading VZERO DDL raw data
105};
106
107#endif