1 #ifndef ALIALTRORAWSTREAMFAST_H
2 #define ALIALTRORAWSTREAMFAST_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 base class for reading raw data in Altro format.
9 /// It makes use of the fast altro decoder written by Per Thomas.
10 /// More information can be found in AliAltroDecoder class.
12 ///////////////////////////////////////////////////////////////////////////////
15 #include <Riostream.h>
17 #include "AliRawReader.h"
18 #include "AliAltroDecoder.h"
19 #include "AliAltroData.h"
20 #include "AliAltroBunch.h"
22 class AliAltroRawStreamFast: public TObject {
24 AliAltroRawStreamFast(AliRawReader* rawReader);
25 virtual ~AliAltroRawStreamFast();
27 void SelectRawData(Int_t detId); // Select raw data for specific detector id
28 void SelectRawData(const char *detName); // Select raw data for specific detector name
30 virtual Bool_t NextDDL();
31 virtual Bool_t NextChannel();
32 virtual Bool_t NextBunch();
34 Int_t GetDDLNumber() const { return fRawReader->GetDDLID(); } // Provide current DDL number
35 Int_t GetHWAddress() const { return fData.GetHadd(); } // Provide current hardware address
36 UInt_t GetStartTimeBin() const { return fBunch.GetStartTimeBin(); } // Provide the index if the first time-bin in current bunch
37 UInt_t GetEndTimeBin() const { return fBunch.GetEndTimeBin(); } // Provide the index if the last time-bin in current bunch
38 const UInt_t* GetSignals() const { return fBunch.GetData(); } // Provide access to altro data itself
42 AliAltroRawStreamFast& operator = (const AliAltroRawStreamFast& stream);
43 AliAltroRawStreamFast(const AliAltroRawStreamFast& stream);
45 AliAltroDecoder fDecoder; // decoder for altro payload
46 AliAltroData fData; // container for altro payload
47 AliAltroBunch fBunch; // container for altro bunches
49 AliRawReader* fRawReader; // object for reading the raw data
51 ClassDef(AliAltroRawStreamFast, 0) // base class for fast reading of Altro raw data