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