- Inherits from AliMUONRawStream
[u/mrichter/AliRoot.git] / MUON / AliMUONRawStreamTrigger.h
CommitLineData
972432c1 1#ifndef ALIMUONRAWSTREAMTRIGGER_H
2#define ALIMUONRAWSTREAMTRIGGER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/*$Id$*/
7
be68bd50 8/// \ingroup raw
972432c1 9/// \class AliMUONRawStreamTrigger
10/// \brief Class for reading MUON raw digits
11///
c4ee792d 12// Author: Christian Finck
972432c1 13
14#include <TObject.h>
313a427d 15#include "AliMUONPayloadTrigger.h"
972432c1 16
17class AliRawReader;
18class AliMUONDDLTrigger;
313a427d 19
972432c1 20
21class AliMUONRawStreamTrigger: public TObject {
22 public :
23 AliMUONRawStreamTrigger();
24 AliMUONRawStreamTrigger(AliRawReader* rawReader);
972432c1 25 virtual ~AliMUONRawStreamTrigger();
26
27 virtual Bool_t Next();
28 virtual Bool_t NextDDL();
972432c1 29
07a5b6b7 30 /// Return maximum number of DDLs
36f90a1a 31 Int_t GetMaxDDL() const {return fgkMaxDDL;}
71a2d3aa 32 /// Return maximum number of regional cards in DATE file
313a427d 33 Int_t GetMaxReg() const {return fPayload->GetMaxReg();}
71a2d3aa 34 /// Return maximum number of local cards in DATE file
313a427d 35 Int_t GetMaxLoc() const {return fPayload->GetMaxLoc();}
972432c1 36
972432c1 37 void SetMaxReg(Int_t reg);
38 void SetMaxLoc(Int_t loc);
39
71a2d3aa 40 /// Set object for reading the raw data
972432c1 41 void SetReader(AliRawReader* rawReader) {fRawReader = rawReader;}
42
71a2d3aa 43 /// Return pointer for DDL structure
313a427d 44 AliMUONDDLTrigger* GetDDLTrigger() const {return fPayload->GetDDLTrigger();}
68d86413 45
46 /// Return pointer for payload
47 AliMUONPayloadTrigger* GetPayLoad() const {return fPayload;}
48
71a2d3aa 49 /// Return number of DDL
313a427d 50 Int_t GetDDL() const {return fDDL - 1;}
972432c1 51
ea59383d 52 /// add error message into error logger
53 void AddErrorMessage();
54
3c7f5307 55 /// Enable error info logger
56 void EnabbleErrorLogger() {fEnableErrorLogger = kTRUE;}
57
ea59383d 58 /// error numbers
59 enum rawStreamTriggerError {
60 kDarcEoWErr = 6, ///< end of Darc word error
61 kGlobalEoWErr = 7, ///< end of Global word error
62 kRegEoWErr = 8, ///< end of Regional word error
63 kLocalEoWErr = 9 ///< end of local word error
64
65 };
66
9f5dcca3 67 private :
71a2d3aa 68 /// Not implemented
69 AliMUONRawStreamTrigger(const AliMUONRawStreamTrigger& stream);
70 /// Not implemented
71 AliMUONRawStreamTrigger& operator = (const AliMUONRawStreamTrigger& stream);
972432c1 72
313a427d 73 AliRawReader* fRawReader; ///< object for reading the raw data
74 AliMUONPayloadTrigger* fPayload; ///< pointer to payload decoder
75
829425a5 76 Int_t fDDL; ///< number of DDL
77 Int_t fSubEntries; ///< entries of buspatch structure
78 Bool_t fNextDDL; ///< flag for next DDL to be read
3c7f5307 79 Bool_t fEnableErrorLogger; //!< flag to enable the error info logger
972432c1 80
36f90a1a 81 static const Int_t fgkMaxDDL; ///< maximum number of DDLs
07a5b6b7 82
83 ClassDef(AliMUONRawStreamTrigger, 4) // base class for reading MUON trigger rawdata
972432c1 84};
85
86#endif