]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RAW/AliAltroRawStreamFast.h
Bugfix. Now NextBunch method should correctly in case of more than one bunches in...
[u/mrichter/AliRoot.git] / RAW / AliAltroRawStreamFast.h
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                               */
5
6 ///////////////////////////////////////////////////////////////////////////////
7 ///
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.
11 ///
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include <TObject.h>
15 #include <Riostream.h>
16
17 #include "AliRawReader.h"
18 #include "AliAltroDecoder.h"
19 #include "AliAltroData.h"
20 #include "AliAltroBunch.h"
21
22 class AliAltroRawStreamFast: public TObject {
23   public :
24     AliAltroRawStreamFast(AliRawReader* rawReader);
25     virtual ~AliAltroRawStreamFast();
26
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
29
30     virtual Bool_t NextDDL();
31     virtual Bool_t NextChannel();
32     virtual Bool_t NextBunch();
33
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
39
40   private :
41
42     AliAltroRawStreamFast& operator = (const AliAltroRawStreamFast& stream);
43     AliAltroRawStreamFast(const AliAltroRawStreamFast& stream);
44
45     AliAltroDecoder  fDecoder;      // decoder for altro payload
46     AliAltroData     fData;         // container for altro payload
47     AliAltroBunch    fBunch;        // container for altro bunches
48
49     AliRawReader*    fRawReader;    // object for reading the raw data
50
51     ClassDef(AliAltroRawStreamFast, 0)  // base class for fast reading of Altro raw data
52 };
53
54 #endif