- Disentangle masks effect from trigger chamber efficiency estimation.
[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"
1788245f 16#include "AliMUONVRawStreamTrigger.h"
b921196a 17class TArrayS;
972432c1 18
19class AliRawReader;
20class AliMUONDDLTrigger;
b921196a 21class AliMUONDarcHeader;
22class AliMUONRegkHeader;
23class AliMUONLocalStruct;
313a427d 24
1788245f 25class AliMUONRawStreamTrigger: public AliMUONVRawStreamTrigger {
972432c1 26 public :
27 AliMUONRawStreamTrigger();
28 AliMUONRawStreamTrigger(AliRawReader* rawReader);
972432c1 29 virtual ~AliMUONRawStreamTrigger();
30
b921196a 31 /// Initialize iterator
32 void First();
33
34 /// Returns current DDL object during iteration
35 AliMUONDDLTrigger* CurrentDDL() const { return fCurrentDDL; }
36
37 /// Returns current DarcHeader object during iteration
38 AliMUONDarcHeader* CurrentDarcHeader() const { return fCurrentDarcHeader; }
39
40 /// Returns current RegHeader object during iteration
41 AliMUONRegHeader* CurrentRegHeader() const { return fCurrentRegHeader; }
42
43 /// Returns current LocalStruct object during iteration
44 AliMUONLocalStruct* CurrentLocalStruct() const { return fCurrentLocalStruct; }
45
46 /// Advance one step in the iteration. Returns false if finished.
47 virtual Bool_t Next(UChar_t& id, UChar_t& dec, Bool_t& trigY,
48 UChar_t& yPos, UChar_t& sXDev, UChar_t& xDev,
49 UChar_t& xPos, Bool_t& triggerY, Bool_t& triggerX,
50 TArrayS& xPattern, TArrayS& yPattern);
51
52
972432c1 53 virtual Bool_t NextDDL();
972432c1 54
07a5b6b7 55 /// Return maximum number of DDLs
36f90a1a 56 Int_t GetMaxDDL() const {return fgkMaxDDL;}
71a2d3aa 57 /// Return maximum number of regional cards in DATE file
313a427d 58 Int_t GetMaxReg() const {return fPayload->GetMaxReg();}
71a2d3aa 59 /// Return maximum number of local cards in DATE file
313a427d 60 Int_t GetMaxLoc() const {return fPayload->GetMaxLoc();}
972432c1 61
bfbfa5da 62 //void SetMaxReg(Int_t reg);
972432c1 63 void SetMaxLoc(Int_t loc);
64
71a2d3aa 65 /// Return pointer for DDL structure
313a427d 66 AliMUONDDLTrigger* GetDDLTrigger() const {return fPayload->GetDDLTrigger();}
68d86413 67
b921196a 68 /// Return number of DDL
69 Int_t GetDDL() const {return fDDL - 1;}
70
68d86413 71 /// Return pointer for payload
72 AliMUONPayloadTrigger* GetPayLoad() const {return fPayload;}
73
b921196a 74 /// Whether the iteration is finished or not
75 Bool_t IsDone() const;
972432c1 76
ea59383d 77 /// add error message into error logger
78 void AddErrorMessage();
79
b921196a 80 /// Disable Warnings
81 void DisableWarnings() {fPayload->DisableWarnings();}
82
ea59383d 83 /// error numbers
84 enum rawStreamTriggerError {
85 kDarcEoWErr = 6, ///< end of Darc word error
86 kGlobalEoWErr = 7, ///< end of Global word error
87 kRegEoWErr = 8, ///< end of Regional word error
88 kLocalEoWErr = 9 ///< end of local word error
89
90 };
91
9f5dcca3 92 private :
71a2d3aa 93 /// Not implemented
94 AliMUONRawStreamTrigger(const AliMUONRawStreamTrigger& stream);
95 /// Not implemented
96 AliMUONRawStreamTrigger& operator = (const AliMUONRawStreamTrigger& stream);
972432c1 97
b921196a 98 Bool_t GetNextDDL();
99 Bool_t GetNextRegHeader();
100 Bool_t GetNextLocalStruct();
101
102 private:
103
313a427d 104 AliMUONPayloadTrigger* fPayload; ///< pointer to payload decoder
b921196a 105 AliMUONDDLTrigger* fCurrentDDL; //!< for iterator: current ddl ptr
106 Int_t fCurrentDDLIndex; //!< for iterator: current ddl index
107 AliMUONDarcHeader* fCurrentDarcHeader; //!< for iterator: current darc ptr
108 AliMUONRegHeader* fCurrentRegHeader; //!< for iterator: current reg ptr
109 Int_t fCurrentRegHeaderIndex; //!< for iterator: current reg index
110 AliMUONLocalStruct* fCurrentLocalStruct; //!< for iterator: current local ptr
111 Int_t fCurrentLocalStructIndex; //!< for iterator: current local index
112 Bool_t fLocalStructRead; //!< flag for read out local structure
113 Int_t fDDL; //!< number of DDL
114
313a427d 115
829425a5 116 Bool_t fNextDDL; ///< flag for next DDL to be read
972432c1 117
36f90a1a 118 static const Int_t fgkMaxDDL; ///< maximum number of DDLs
07a5b6b7 119
120 ClassDef(AliMUONRawStreamTrigger, 4) // base class for reading MUON trigger rawdata
972432c1 121};
122
123#endif