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 */
6 ///////////////////////////////////////////////////////////////////////////////
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.
12 ///////////////////////////////////////////////////////////////////////////////
18 class AliVZERORawStream: public TObject {
20 AliVZERORawStream(AliRawReader* rawReader);
21 virtual ~AliVZERORawStream();
24 virtual Bool_t Next();
26 UShort_t GetADC(Int_t channel) const
27 { return fADC[channel][kNEvOfInt/2]; }
28 UShort_t GetPedestal(Int_t channel, Int_t event) const
29 { return fADC[channel][event]; }
30 UInt_t GetTime(Int_t channel) const
31 { return fTime[channel]; }
33 enum EVZERORawDataParams {
35 kNEvOfInt = 21, // Number of events of interest
40 enum EVZERORawStreamError {
46 AliVZERORawStream(const AliVZERORawStream& stream);
47 AliVZERORawStream& operator = (const AliVZERORawStream& stream);
50 UShort_t GetNextShort();
52 ULong64_t fBBScalers[kNChannels]; // 'Beam-Beam' scalers for all channels
53 ULong64_t fBGScalers[kNChannels]; // 'Beam-Gas' scalers for all channels
54 UInt_t fScalers[kNScalers]; // Trigger scalers
55 UInt_t fBunchNumbers[kNBunches]; // Bunch numbers for the previous 10 MB events
56 UShort_t fChargeMB[kNChannels][kNBunches]; // ADC counts for all channels for the previous 10 MB events
57 Bool_t fIsIntMB[kNChannels][kNBunches]; // 'Integrator' flag for all channels for the previous 10 MB events
58 Bool_t fIsBBMB[kNChannels][kNBunches]; // 'Beam-Beam' flag for all channels for the previous 10 MB events
59 Bool_t fIsBGMB[kNChannels][kNBunches]; // 'Beam-Gas' for all channels for the previous 10 MB events
61 UShort_t fADC[kNChannels][kNEvOfInt]; // ADC counts for all channels and all events of interest
62 Bool_t fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels
63 Bool_t fIsBB[kNChannels][kNEvOfInt]; // 'Beam-Beam' flag for all channels
64 Bool_t fIsBG[kNChannels][kNEvOfInt]; // 'Beam-Gas' flag for all channels
65 Int_t fTime[kNChannels]; // leading time for all channels
66 Int_t fWidth[kNChannels]; // signal width for all channels
68 UShort_t fTrigger; // VZERO trigger inputs
69 UShort_t fTriggerMask; // VZERO trigger inputs mask
71 Int_t fPosition; // current position in the raw-data payload
73 AliRawReader* fRawReader; // object for reading the raw data
75 UChar_t* fData; // pointer to raw data payload
77 ClassDef(AliVZERORawStream, 0) // class for reading VZERO DDL raw data