7#include "FairDetParIo.h"
9#include "FairParamList.h"
19 : FairParGenericSet(name, title, context)
26 , fnFebsIdsArrayGemA()
27 , fnFebsIdsArrayGemB()
33 , fChannelsToPadXRpc()
34 , fChannelsToPadYRpc()
86 if (!l)
return kFALSE;
88 if (!l->fill(
"NrOfDpbs", &
fuNrOfDpbs))
return kFALSE;
91 if (!l->fill(
"DbpIdArray", &
fiDbpIdArray))
return kFALSE;
96 if (!l->fill(
"NrOfFebsInGemA", &
fuFebsInGemA))
return kFALSE;
101 if (!l->fill(
"NrOfFebsInGemB", &
fuFebsInGemB))
return kFALSE;
106 if (!l->fill(
"NrOfFebsInRpc", &
fuFebsInRpc))
return kFALSE;
130 if (!l->fill(
"RealX", &
fRealX))
return kFALSE;
143 LOG(warning) <<
"CbmMuchUnpackPar::ElinkIdxToFebIdx => Index out of bound, "
144 <<
"Elink is " << uElink <<
" returning crazy value!";
165 LOG(warning) <<
"CbmMuchUnpackPar::GetDpbId => Index out of bound, "
166 <<
"DPB Id is " << std::hex << uDpbIdx <<
" returning crazy value!";
175 LOG(warning) <<
"CbmMuchUnpackPar::IsCrobActive => Crob Index out of bound, "
176 <<
"returning default inactive!";
181 LOG(warning) <<
"CbmMuchUnpackPar::IsCrobActive => Dpb Index out of bound, "
182 <<
"returning default inactive!";
194 LOG(warning) <<
"CbmMuchUnpackPar::IsFebActive => Feb Index out of bound, "
195 <<
"returning default inactive!";
208 LOG(warning) <<
"CbmMuchUnpackPar::IsFebActive => Feb Index out of bound, "
209 <<
"returning default inactive!";
214 LOG(warning) <<
"CbmMuchUnpackPar::IsFebActive => Crob Index out of bound, "
215 <<
"returning default inactive!";
220 LOG(warning) <<
"CbmMuchUnpackPar::IsFebActive => Dpb Index out of bound, "
221 <<
"returning default inactive!";
326 LOG(debug) <<
"CbmMuchUnpackPar::GetPadXA => Index out of bounds: " << ((febid *
kuNbChanPerAsic) + channelid)
327 <<
" VS " <<
fChannelsToPadXA.GetSize() <<
" (" << febid <<
" and " << channelid <<
")";
337 LOG(debug) <<
"CbmMuchUnpackPar::GetPadYA => Index out of bounds: " << ((febid *
kuNbChanPerAsic) + channelid)
338 <<
" VS " <<
fChannelsToPadYA.GetSize() <<
" (" << febid <<
" and " << channelid <<
")";
348 LOG(debug) <<
"CbmMuchUnpackPar::GetPadXB => Index out of bounds: " << ((febid *
kuNbChanPerAsic) + channelid)
349 <<
" VS " <<
fChannelsToPadXB.GetSize() <<
" (" << febid <<
" and " << channelid <<
")";
359 LOG(debug) <<
"CbmMuchUnpackPar::GetPadYB => Index out of bounds: " << ((febid *
kuNbChanPerAsic) + channelid)
360 <<
" VS " <<
fChannelsToPadYB.GetSize() <<
" (" << febid <<
" and " << channelid <<
")";
370 LOG(debug) <<
"CbmMcbm2018MuchPar::GetPadXRpc => Index out of bounds: " << ((febid *
kuNbChanPerAsic) + channelid)
371 <<
" VS " <<
fChannelsToPadXRpc.GetSize() <<
" (" << febid <<
" and " << channelid <<
")";
381 LOG(debug) <<
"CbmMcbm2018MuchPar::GetPadYRpc => Index out of bounds: " << ((febid *
kuNbChanPerAsic) + channelid)
382 <<
" VS " <<
fChannelsToPadYRpc.GetSize() <<
" (" << febid <<
" and " << channelid <<
")";
400 LOG(warning) <<
"CbmMuchUnpackPar::GetFebId => provided uAsicIdx : " << uAsicIdx
402 <<
"Returning large value -2";
424 if (SectorIndex < 0 || SectorIndex <= 97) {
425 LOG(debug) <<
"CbmMuchUnpackPar::GetRealX => Index out of bounds: ";
429 return fRealX[SectorIndex];
436 if (SectorIndex < 0 || SectorIndex <= 97) {
437 LOG(debug) <<
"CbmMuchUnpackPar::GetRealX => Index out of bounds: ";
446 Int_t PadIndex = Channel + 97 * Sector;
447 if (Channel < 0 || Sector < 0)
return -2;
448 if (
fRealX.GetSize() <= PadIndex) {
449 LOG(info) <<
"CbmMuchUnpackPar::GetRealX => Index out of bounds: " << Channel <<
" " << Sector <<
" " << PadIndex;
457 Int_t PadIndex = Channel + 97 * Sector;
458 if (Channel < 0 || Sector < 0)
return -2;
460 LOG(info) <<
"CbmMuchUnpackPar::GetRealPadSize => Index out of bounds: " << Channel <<
" " << Sector <<
" "
ClassImp(CbmConverterManager)
UInt_t GetNrOfFebsInRpc()
Short_t GetPadXA(UShort_t febid, UShort_t channelid)
static const UInt_t kuNbFebsPerCrob
void putParams(FairParamList *)
Short_t GetPadYA(UShort_t febid, UShort_t channelid)
Short_t GetPadXB(UShort_t febid, UShort_t channelid)
UInt_t fuNrOfDpbs
Map from eLink index to ASIC index within CROB ( 0 to kuNbFebsPerCrob * kuNbAsicPerFeb )
Short_t GetPadYRpc(UShort_t febid, UShort_t channelid)
static const UInt_t kuNbCrobsPerDpb
Constants.
TArrayI fChannelsToPadXRpc
TArrayI fnFebsIdsArrayGemA
Short_t GetPadYB(UShort_t febid, UShort_t channelid)
UInt_t GetNrOfFebsInGemB()
Int_t ElinkIdxToFebIdx(UInt_t uElink)
Convert from eLink index to FEB Connection ( 0 to kuNbFebsPerCrob)
static const UInt_t kuNbChanPerAsic
Bool_t getParams(FairParamList *)
virtual ~CbmMuchUnpackPar()
Short_t GetPadXRpc(UShort_t febid, UShort_t channelid)
const Int_t kiCrobMapElinkFebIdx[kuNbElinksPerCrob]
UInt_t GetNrOfFebsInGemA()
TArrayI fChannelsToPadYRpc
Double_t GetRealPadSize(Int_t)
Bool_t IsFebActive(UInt_t uFebInSystIdx)
TArrayI fnFebsIdsArrayRpc
static const UInt_t kuNbElinksPerCrob
CbmMuchUnpackPar(const char *name="CbmMuchUnpackPar", const char *title="Much parameters", const char *context="Default")
TArrayI fnFebsIdsArrayGemB
Bool_t IsCrobActive(UInt_t uDpbIdx, UInt_t uCrobIdx)
UInt_t GetDpbId(UInt_t uDpbIdx)