23 char* expandedFileName = gSystem->ExpandPathName(fileName);
25 is.open(expandedFileName, std::ios::binary);
29 mFEElightConfig =
reinterpret_cast<const TOFFEElightConfig*
>(mFileLoadBuff.get());
38 LOG(fatal) <<
"Incoming message with TOFFEE configuration does not match expected size: " << configBuf.size() <<
" received, " <<
sizeof(*mFEElightConfig) <<
" expected";
55 int runType = mFEElightConfig->
mRunType;
61 int nEnabled = 0,
index;
63 for (
int crateId = 0; crateId <
Geo::kNCrate; crateId++) {
64 for (
int trmId = 0; trmId <
Geo::kNTRM - 2; trmId++) {
65 for (
int chainId = 0; chainId <
Geo::kNChain; chainId++) {
66 for (
int tdcId = 0; tdcId <
Geo::kNTdc; tdcId++) {
67 for (
int channelId = 0; channelId <
Geo::kNCh; channelId++) {
68 channelConfig = mFEElightConfig->
getChannelConfig(crateId, trmId, chainId, tdcId, channelId);
70 LOG(info) <<
"Processing electronic channel with indices: crate = " << crateId <<
", trm = " << trmId <<
", chain = "
71 << chainId <<
", tdc = " << tdcId <<
", tdcChannel = " << channelId <<
" -> " << channelConfig;
84 LOG(info) <<
"Enabling channel " <<
index;
99 int nstripInPrevPlates = 0;
102 for (
int istrip = 0; istrip < istripInPlate[iplate]; istrip++) {
103 bool isActive =
mask & 1;
107 int index0 = isector * channelInSector + (nstripInPrevPlates + istrip) *
Geo::NPADS;
114 nstripInPrevPlates += istripInPlate[iplate];
122 LOG(info) <<
"Processing trigger config " << iddl <<
": " << triggerConfig;
static constexpr Int_t NSECTORS
static constexpr Int_t NSTRIPXSECTOR
static constexpr Int_t NPADS
static constexpr Int_t NSTRIPB
static constexpr Int_t NSTRIPC
static constexpr Int_t NSTRIPA
static Int_t getCHFromECH(int echan)
static constexpr Int_t NPLATES
static Int_t getECHFromIndexes(int crate, int trm, int chain, int tdc, int chan)
void loadFEElightConfig(const char *fileName)
int parseFEElightConfig(bool verbose=false)
const TOFFEEchannelConfig * getChannelConfig(int icrate, int itrm, int ichain, int itdc, int ich) const
const TOFFEEmapHVConfig * getHVConfig(int isector) const
static constexpr int NTRIGGERMAPS
const TOFFEEtriggerConfig * getTriggerConfig(int idx) const
std::array< bool, NCHANNELS > mChannelEnabled
std::array< int, NCHANNELS > mMatchingWindow
std::array< uint64_t, NTRIGGERMAPS > mTriggerMask
std::array< int, NCHANNELS > mLatencyWindow
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"