const UInt_t AliMUONDarcHeader::fgkEndOfDarc = 0xDEADFACE;
const UInt_t AliMUONDarcHeader::fgkEndOfGlobal = 0xDEADBEEF;
+ const UInt_t AliMUONDarcHeader::fgkDarcVadorhType = 4;
+ const UInt_t AliMUONDarcHeader::fgkDarcDefaultType = 6;
//___________________________________________
AliMUONDarcHeader::AliMUONDarcHeader()
/// Return end of global info word
UInt_t GetEndOfGlobal() const {return fgkEndOfGlobal;}
+ /// Return default type for DARC def.
+ UInt_t GetDarcDefaultType() const {return fgkDarcDefaultType;}
+ /// Return default type for DARC def.
+ UInt_t GetDarcVadohrType() const {return fgkDarcVadorhType;}
+
// set random numbers to fill variable
void SetScalersNumbers();
static const UInt_t fgkEndOfDarc; ///< end of darc info word
static const UInt_t fgkEndOfGlobal; ///< end of global info word
+ static const UInt_t fgkDarcDefaultType; ///< default type for DARC def.
+ static const UInt_t fgkDarcVadorhType; ///< default type for DARC vadorh
+
+
TClonesArray* fRegHeaderArray; ///< container for regional header
ClassDef(AliMUONDarcHeader,1) // MUON DDL Trigger
AliMUONDarcHeader* darcHeader = fDDLTrigger->GetDarcHeader();
- static Int_t kGlobalHeaderSize = darcHeader->GetGlobalHeaderLength();
- static Int_t kDarcHeaderSize = darcHeader->GetDarcHeaderLength();
- static Int_t kRegHeaderSize = fRegHeader->GetHeaderLength();
-
+ static Int_t kGlobalHeaderSize = darcHeader->GetGlobalHeaderLength();
+ static Int_t kDarcHeaderSize = darcHeader->GetDarcHeaderLength();
+ static Int_t kRegHeaderSize = fRegHeader->GetHeaderLength();
+ static Int_t kRegEmptySize = fRegHeader->GetHeaderLength()+1 + 16*(fLocalStruct->GetLength()+1);
+ static Int_t kRegEmptyScalerSize = fRegHeader->GetHeaderLength() + fRegHeader->GetScalerLength() + 1 +
+ 16*(fLocalStruct->GetLength() + fLocalStruct->GetScalerLength() + 1);
+
Int_t index = 0;
memcpy(darcHeader->GetHeader(), &buffer[index], (kDarcHeaderSize)*4);
index += kDarcHeaderSize;
- // darc type vardorh
- if (darcHeader->GetDarcType() == 4)
+ // darc type vadorh
+ if (darcHeader->GetDarcType() == darcHeader->GetDarcVadohrType())
fMaxReg = 1;
// darc type def.
- if (darcHeader->GetDarcType() == 6)
+ if (darcHeader->GetDarcType() == darcHeader->GetDarcDefaultType())
fMaxReg = 8;
if(darcHeader->GetEventType() == scalerEvent)
// 8 regional boards
for (Int_t iReg = 0; iReg < fMaxReg; iReg++) { //loop over regeonal card
+ // skip empty regaional board (not connected or with error reading)
+ if (buffer[index] == fRegHeader->GetErrorWord()) {
+ if (scalerEvent)
+ index += kRegEmptyScalerSize;
+ else
+ index += kRegEmptySize;
+ continue;
+ }
memcpy(fRegHeader->GetHeader(), &buffer[index], kRegHeaderSize*4);
index += kRegHeaderSize;
const Int_t AliMUONRegHeader::fgkHeaderLength = 5;
const Int_t AliMUONRegHeader::fgkScalerLength = 10;
const UInt_t AliMUONRegHeader::fgkEndOfReg = 0xBEEFFACE;
+ const UInt_t AliMUONRegHeader::fgkErrorWord = 0xCAFEDEAD;
//___________________________________________
AliMUONRegHeader::AliMUONRegHeader()
Int_t GetHeaderLength() const {return fgkHeaderLength;}
/// Return end of regional info word
UInt_t GetEndOfReg() const {return fgkEndOfReg;}
-
+ /// Return error word
+ UInt_t GetErrorWord() const {return fgkErrorWord;}
/// Return header
UInt_t* GetHeader() {return &fDarcWord;}
static const Int_t fgkScalerLength; ///< length of regional scaler in word
static const Int_t fgkHeaderLength; ///< header length in word
static const UInt_t fgkEndOfReg; ///< end of regional info word
-
+ static const UInt_t fgkErrorWord; ///< error word when a regional board is missing
+
TClonesArray* fLocalArray; ///< array of local structure
- ClassDef(AliMUONRegHeader,3) //MUON regional header for trigger
+ ClassDef(AliMUONRegHeader,4) //MUON regional header for trigger
};
#endif