1 #ifndef ALIMUONDARCHEADER_H
2 #define ALIMUONDARCHEADER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 /// \class AliMUONDarcHeader
10 /// \brief MUON Darc header for Trigger
12 /// \author Christian Finck
15 #include <TClonesArray.h>
17 class AliMUONRegHeader;
19 class AliMUONDarcHeader : public TObject {
23 AliMUONDarcHeader(const AliMUONDarcHeader& event);
24 AliMUONDarcHeader& operator=(const AliMUONDarcHeader& event);
26 virtual ~AliMUONDarcHeader();
29 UInt_t GetWord() const {return fWord;}
30 Int_t GetGlobalInput(Int_t n) const {return fGlobalInput[n];}
31 Int_t GetGlobalOutput() const {return fGlobalOutput;}
33 //DarcId:4,SerialNb:4,Version:8,EventType:4,GlobalFlag:4,MBZ:8;
34 Char_t GetDarcId() const {return (Char_t)(fWord >> 28) & 0xF;}
35 Char_t GetSerialNb() const {return (Char_t)(fWord >> 24) & 0xF;}
36 Char_t GetVersion() const {return (Char_t)(fWord >> 16) & 0xFF;}
37 Char_t GetEventType() const {return (Char_t)(fWord >> 12) & 0xF;}
38 Char_t GetGlobalFlag() const {return (Char_t)(fWord >> 8) & 0xF;}
40 void SetWord(UInt_t w) {fWord = w;}
41 void SetGlobalInput(Int_t in, Int_t n) {fGlobalInput[n] = in;}
42 void SetGlobalOutput(Int_t out) {fGlobalOutput = out;}
44 Int_t GetHeaderLength() const {return fgkHeaderLength;}
46 UInt_t* GetHeader() {return &fWord;}
47 Int_t* GetGlobalInput() {return &fGlobalInput[0];}
50 UInt_t GetDarcL0R() const {return fDarcL0R;}
51 UInt_t GetDarcL0U() const {return fDarcL0U;}
52 UInt_t GetDarcL0P() const {return fDarcL0P;}
53 UInt_t GetDarcL0S() const {return fDarcL0S;}
54 UInt_t GetDarcClock() const {return fDarcClk;}
55 UInt_t GetDarcHold() const {return fDarcHold;}
57 // don't use setting methods but memcpy
58 UInt_t* GetGlobalScalers() {return &fGlobalL0;}
59 UInt_t* GetDarcScalers() {return &fDarcL0R;}
62 UInt_t GetGlobalL0() const {return fGlobalL0;}
63 UInt_t GetGlobalClock() const {return fGlobalClk;}
64 const UInt_t* GetGlobalScaler() const {return fGlobalScaler;}
65 UInt_t GetGlobalHold() const {return fGlobalHold;}
66 UInt_t GetGlobalSpare() const {return fGlobalSpare;}
68 Int_t GetGlobalScalerLength() const {return fgkGlobalScalerLength;}
69 Int_t GetDarcScalerLength() const {return fgkDarcScalerLength;}
71 UInt_t GetEndOfDarc() const {return fgkEndOfDarc;}
72 UInt_t GetEndOfGlobal() const {return fgkEndOfGlobal;}
74 // set random numbers to fill variable
75 void SetScalersNumbers();
78 TClonesArray* GetRegHeaderArray() const {return fRegHeaderArray;}
81 Int_t GetRegHeaderEntries() const {return fRegHeaderArray->GetEntriesFast();}
84 AliMUONRegHeader* GetRegHeaderEntry(Int_t i) const {
85 return (AliMUONRegHeader*)fRegHeaderArray->At(i);}
88 void Clear(Option_t* opt);
92 UInt_t fWord; // first word
93 Int_t fGlobalInput[4]; // global input
94 Int_t fGlobalOutput; // global ouput
96 static const Int_t fgkHeaderLength; // header length
99 // global card scalers
100 UInt_t fGlobalL0; // global L0
101 UInt_t fGlobalClk; // global clock
102 UInt_t fGlobalScaler[6]; // global ouput
103 UInt_t fGlobalHold; // global hold (dead time)
104 UInt_t fGlobalSpare; // global spare
105 static const Int_t fgkGlobalScalerLength; // length of global scaler in word
108 UInt_t fDarcL0R; // DARC L0 received
109 UInt_t fDarcL0U; // DARC L0 used
110 UInt_t fDarcL0P; // DARC Physical L0
111 UInt_t fDarcL0S; // DARC Software (checking) L0
112 UInt_t fDarcClk; // DARC clock
113 UInt_t fDarcHold; // DARC hold (dead time)
114 static const Int_t fgkDarcScalerLength; // length of DARC scaler in word
116 static const UInt_t fgkEndOfDarc; // end of darc info word
117 static const UInt_t fgkEndOfGlobal; // end of global info word
119 TClonesArray* fRegHeaderArray; //container for regional header
121 ClassDef(AliMUONDarcHeader,1) // MUON DDL Trigger