AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONDarcHeader.h
Go to the documentation of this file.
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 */
5 
6 /*$Id$*/
7 
12 // Author Christian Finck
13 
14 #include <TObject.h>
15 #include <TClonesArray.h>
16 
17 class AliMUONRegHeader;
18 
19 class AliMUONDarcHeader : public TObject {
20 
21 public:
23  AliMUONDarcHeader(TRootIOCtor* dummy);
26 
27  virtual ~AliMUONDarcHeader();
28 
29 
31  UInt_t GetWord() const {return fWord;}
33  UInt_t GetGlobalInput(Int_t n) const {return fGlobalInput[n];}
35  UChar_t GetGlobalOutput() const {return (fGlobalOutput & 0xFF);}
37  UShort_t GetGlobalConfig() const {return ((fGlobalOutput >> 16) & 0xFFFF);}
38 
39  //MBZ:1, phys trig:1, type:3, ,SerialNb:4,Version:8,VME trig:1,
40  //GlobalFlag:1, CTP trig:1, DAQ:1, Reg pattern:8;
41 
43  //Bool_t GetEventType() const {return (fWord & 0x40000000);}
44  Bool_t GetEventType() const;
46  UChar_t GetDarcType() const {return (UChar_t)(fWord >> 24) & 0x7;}
48  UChar_t GetSerialNb() const {return (UChar_t)(fWord >> 20) & 0xF;}
50  UChar_t GetVersion() const {return (UChar_t)(fWord >> 12) & 0xFF;}
52  Bool_t GetVMETrig() const {return (fWord & 0x800);}
54  Bool_t GetGlobalFlag() const {return (fWord & 0x400);}
56  Bool_t GetCTPTrig() const {return (fWord & 0x200);}
58  Bool_t GetDAQFlag() const {return (fWord & 0x100);}
60  UChar_t GetRegPattern() const {return (UChar_t)(fWord & 0xFF);}
61 
63  void SetWord(UInt_t w) {fWord = w;}
65  void SetGlobalInput(UInt_t in, Int_t n) {fGlobalInput[n] = in;}
67  void SetGlobalOutput(Int_t out) {fGlobalOutput = out;}
68 
70  Int_t GetDarcHeaderLength() const {return fgkDarcHeaderLength;}
73 
75  UInt_t* GetHeader() {return &fWord;}
77  UInt_t* GetGlobalInput() {return &fGlobalInput[0];}
78 
79  // DARC get methods
81  UInt_t GetDarcL0R() const {return fDarcL0R;}
83  UInt_t GetDarcL1P() const {return fDarcL1P;}
85  UInt_t GetDarcL1S() const {return fDarcL1S;}
87  UInt_t GetDarcL2A() const {return fDarcL2A;}
89  UInt_t GetDarcL2R() const {return fDarcL2R;}
91  UInt_t GetDarcClock() const {return fDarcClk;}
93  UInt_t GetDarcHold() const {return fDarcHold;}
94 
95  // don't use setting methods but memcpy
97  UInt_t* GetGlobalScalers() {return &fGlobalL0;}
99  UInt_t* GetDarcScalers() {return &fDarcL0R;}
100 
101  // global get methods
103  UInt_t GetGlobalL0() const {return fGlobalL0;}
105  UInt_t GetGlobalClock() const {return fGlobalClk;}
107  const UInt_t* GetGlobalScaler() const {return fGlobalScaler;}
109  UInt_t GetGlobalHold() const {return fGlobalHold;}
111  UInt_t GetGlobalSpare() const {return fGlobalSpare;}
112 
116  Int_t GetDarcScalerLength() const {return fgkDarcScalerLength;}
117 
119  UInt_t GetEndOfDarc() const {return fgkEndOfDarc;}
121  UInt_t GetEndOfGlobal() const {return fgkEndOfGlobal;}
122 
124  UInt_t GetDarcDefaultType() const {return fgkDarcDefaultType;}
126  UInt_t GetDarcVadohrType() const {return fgkDarcVadorhType;}
127 
128  // set random numbers to fill variable
129  void SetScalersNumbers();
130 
132  TClonesArray* GetRegHeaderArray() const {return fRegHeaderArray;}
133 
135  Int_t GetRegHeaderEntries() const {return fRegHeaderArray->GetEntriesFast();}
136 
139  return (AliMUONRegHeader*)fRegHeaderArray->At(i);}
140 
141  // clear
142  void Clear(Option_t* opt);
143 
144  private:
145 
146  UInt_t fWord;
147  UInt_t fGlobalInput[4];
149 
150  static const Int_t fgkDarcHeaderLength;
151  static const Int_t fgkGlobalHeaderLength;
152 
153 
154  // global card scalers
155  UInt_t fGlobalL0;
156  UInt_t fGlobalClk;
157  UInt_t fGlobalScaler[6];
158  UInt_t fGlobalHold;
159  UInt_t fGlobalSpare;
160  static const Int_t fgkGlobalScalerLength;
161 
162  // DARC Scalers
163  UInt_t fDarcL0R;
164  UInt_t fDarcL1P;
165  UInt_t fDarcL1S;
166  UInt_t fDarcL2A;
167  UInt_t fDarcL2R;
168  UInt_t fDarcClk;
169  UInt_t fDarcHold;
170  UInt_t fDarcSpare;
171 
172  static const Int_t fgkDarcScalerLength;
173 
174  static const UInt_t fgkEndOfDarc;
175  static const UInt_t fgkEndOfGlobal;
176 
177  static const UInt_t fgkDarcDefaultType;
178  static const UInt_t fgkDarcVadorhType;
179 
180 
181  TClonesArray* fRegHeaderArray;
182 
183  ClassDef(AliMUONDarcHeader,2) // MUON DDL Trigger
184 };
185 #endif
Bool_t GetCTPTrig() const
Return CPT trigger.
Int_t GetGlobalHeaderLength() const
Return global header length.
static const UInt_t fgkDarcVadorhType
default type for DARC vadorh
UChar_t GetGlobalOutput() const
Return global output.
Int_t GetRegHeaderEntries() const
get entries
UInt_t GetGlobalHold() const
Return global hold (dead time)
static const UInt_t fgkDarcDefaultType
default type for DARC def.
UInt_t GetDarcL2R() const
Return DARC L2 reject.
TClonesArray * fRegHeaderArray
container for regional header
UInt_t fGlobalL0
global L0
UInt_t GetGlobalL0() const
Return global L0.
UInt_t GetDarcL1P() const
Return DARC L1 physics.
UInt_t GetGlobalClock() const
Return global clock.
UInt_t fDarcClk
DARC clock.
UInt_t fGlobalClk
global clock
UInt_t * GetDarcScalers()
Return DARC L0 received and used.
UInt_t GetWord() const
Return first word.
Int_t GetDarcScalerLength() const
Return length of DARC scaler in word.
static const Int_t fgkGlobalScalerLength
length of global scaler in word
UInt_t fDarcHold
DARC hold (dead time)
Int_t GetGlobalScalerLength() const
Return length of global scaler in word.
UInt_t fGlobalInput[4]
global input
void Clear(Option_t *opt)
UShort_t GetGlobalConfig() const
Return global config.
MUON regional header for trigger.
static const UInt_t fgkEndOfDarc
end of darc info word
UChar_t GetSerialNb() const
Return serial number.
UInt_t GetDarcClock() const
Return DARC clock.
UChar_t GetVersion() const
Return version.
UInt_t fDarcL2R
DARC L2 reject.
UInt_t GetEndOfDarc() const
Return end of darc info word.
UInt_t GetDarcL2A() const
Return DARC L2 accept.
UInt_t fDarcL2A
DARC L2 accept.
UInt_t * GetHeader()
Return header.
UInt_t GetDarcL0R() const
Return DARC L0 received and used.
Bool_t GetDAQFlag() const
Return DAQ flag.
void SetGlobalOutput(Int_t out)
Set global output.
TClonesArray * GetRegHeaderArray() const
get TClonesArray
UChar_t GetDarcType() const
Return Darc type.
static const Int_t fgkGlobalHeaderLength
global header length
MUON Darc header for Trigger.
void SetWord(UInt_t w)
Set first word.
void SetGlobalInput(UInt_t in, Int_t n)
Set global input.
UInt_t GetDarcHold() const
Return DARC hold (dead time)
UInt_t fGlobalScaler[6]
global ouput
UInt_t GetGlobalInput(Int_t n) const
Return global input.
Int_t fGlobalOutput
global ouput
UInt_t GetDarcDefaultType() const
Return default type for DARC def.
UInt_t GetDarcVadohrType() const
Return default type for DARC def.
static const Int_t fgkDarcScalerLength
length of DARC scaler in word
Bool_t GetEventType() const
Return event type.
UInt_t * GetGlobalInput()
Return global input.
static const UInt_t fgkEndOfGlobal
end of global info word
UInt_t GetGlobalSpare() const
Return global spare.
UInt_t fDarcSpare
DARC Empty slot (for the moment)
UInt_t fWord
first word
AliMUONRegHeader * GetRegHeaderEntry(Int_t i) const
get entry
AliMUONDarcHeader & operator=(const AliMUONDarcHeader &event)
UInt_t fGlobalHold
global hold (dead time)
UChar_t GetRegPattern() const
Return reg pattern.
Bool_t GetVMETrig() const
Return VME trig.
UInt_t GetDarcL1S() const
Return DARC L1 software.
const UInt_t * GetGlobalScaler() const
Return global scaler.
UInt_t fDarcL0R
DARC L0 received and used.
UInt_t GetEndOfGlobal() const
Return end of global info word.
UInt_t fDarcL1P
DARC L1 physics.
UInt_t * GetGlobalScalers()
Return global L0.
UInt_t fGlobalSpare
global spare
UInt_t fDarcL1S
DARC L1 software.
static const Int_t fgkDarcHeaderLength
darc header length
Int_t GetDarcHeaderLength() const
Return darc header length.
Bool_t GetGlobalFlag() const
Return global flag.