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 UInt_t GetTime(Int_t channel) const
29 { return fTime[channel]; }
31 enum EVZERORawDataParams {
33 kNEvOfInt = 21, // Number of events of interest
38 enum EVZERORawStreamError {
44 AliVZERORawStream(const AliVZERORawStream& stream);
45 AliVZERORawStream& operator = (const AliVZERORawStream& stream);
48 UShort_t GetNextShort();
50 ULong64_t fBBScalers[kNChannels]; // 'Beam-Beam' scalers for all channels
51 ULong64_t fBGScalers[kNChannels]; // 'Beam-Gas' scalers for all channels
52 UInt_t fScalers[kNScalers]; // Trigger scalers
53 UInt_t fBunchNumbers[kNBunches]; // Bunch numbers for the previous 10 MB events
54 UShort_t fChargeMB[kNChannels][kNBunches]; // ADC counts for all channels for the previous 10 MB events
55 Bool_t fIsIntMB[kNChannels][kNBunches]; // 'Interaction' flag for all channels for the previous 10 MB events
56 Bool_t fIsBBMB[kNChannels][kNBunches]; // 'Beam-Beam' flag for all channels for the previous 10 MB events
57 Bool_t fIsBGMB[kNChannels][kNBunches]; // 'Beam-Gas' for all channels for the previous 10 MB events
59 UShort_t fADC[kNChannels][kNEvOfInt]; // ADC counts for all channels and all events of interest
60 Bool_t fIsInt[kNChannels][kNEvOfInt]; // 'Interaction' flag for all channels
61 Bool_t fIsBB[kNChannels][kNEvOfInt]; // 'Beam-Beam' flag for all channels
62 Bool_t fIsBG[kNChannels][kNEvOfInt]; // 'Beam-Gas' flag for all channels
63 Int_t fTime[kNChannels]; // leading time for all channels
64 Int_t fWidth[kNChannels]; // signal width for all channels
66 UShort_t fTrigger; // VZERO trigger inputs
67 UShort_t fTriggerMask; // VZERO trigger inputs mask
69 Int_t fPosition; // current position in the raw-data payload
71 AliRawReader* fRawReader; // object for reading the raw data
73 UChar_t* fData; // pointer to raw data payload
75 ClassDef(AliVZERORawStream, 0) // class for reading VZERO DDL raw data