Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Dec 11, 2023
1 parent 272e8eb commit ec1439f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions DataFormats/Detectors/TRD/include/DataFormatsTRD/TrapConfigEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ class TrapConfigEvent
uint32_t getDmemUnsigned(uint32_t address, int detector, int rob, int mcm);
uint32_t getTrapReg(const uint32_t index, const int detector, const int rob, const int mcm);

// bool isHCIDPresent(const int hcid) const { return mHCIDPresent.test(hcid); }
// void HCIDIsPresent(const int hcid) { mHCIDPresent.set(hcid); }
// uint32_t countHCIDPresent() { return mHCIDPresent.count(); }
// bool isHCIDPresent(const int hcid) const { return mHCIDPresent.test(hcid); }
// void HCIDIsPresent(const int hcid) { mHCIDPresent.set(hcid); }
// uint32_t countHCIDPresent() { return mHCIDPresent.count(); }
uint32_t countHCIDPresent() { return constants::MAXHALFCHAMBER - std::count(mHCIDPresentCount.begin(), mHCIDPresentCount.end(), -1); } // count those indices not set and subtract from the total number of mcm
// const std::bitset<constants::MAXHALFCHAMBER>& getHCIDPresent() const { return mHCIDPresent; }
// const std::bitset<constants::MAXHALFCHAMBER>& getHCIDPresent() const { return mHCIDPresent; }
bool isMCMPresent(const int mcmid) const { return (mConfigDataIndex[mcmid] != -1) ? true : false; }
// const std::bitset<constants::MAXMCMCOUNT>& getMCMPresent() const { return mMCMPresent; }
uint32_t countMCMPresent() { return constants::MAXMCMCOUNT - std::count(mConfigDataIndex.begin(), mConfigDataIndex.end(), -1); } // count those indices not set and subtract from the total number of mcm
Expand Down Expand Up @@ -121,17 +121,17 @@ class TrapConfigEvent

private:
TrapRegisters mTrapRegisters;
MCMEvent mDefaultRegisters; // default values for registers
std::array<uint16_t,constants::MAXHALFCHAMBER> mHCIDPresentCount{0}; // did the link actually receive data.
std::array<uint16_t,constants::MAXMCMCOUNT> mMCMPresentCount{0}; // how many times did this mcm receive a config event to build this config event. Ideally all present ones would have the same number, this is not the case and the reason for this array.
std::vector<MCMEvent> mConfigData; // vector of register data blocks
std::array<int32_t, constants::MAXMCMCOUNT> mConfigDataIndex{-1}; // one block of data per mcm, array as one wants to query if an mcm is present with having to walk the whole index.
// std::map<uint16_t, uint16_t> mTrapRegistersAddressIndexMap; moved to parser //!< map of address into mTrapRegisters, populated at the end of initialiseRegisters
std::bitset<kTrapRegistersSize> mWordNumberIgnore; // whether to ignore a register or not. Here to speed lookups up.
//alternate storage:
//std::array<std::vector<uint32_t>,o2::trd::TrapRegisters::kLastReg> mConfigDataint; // vector of vectors of register data, 1 value for a constant register, 69k for individual
// now we dont know if we actually have data for a specific mcm, so keep a record of which ones have been actually read and known to be current
//std::bitset<o2::trd::constants::MAXMCMCOUNT> mMCMsPresent; // which mcms were actually seen to build this series of configuration events
MCMEvent mDefaultRegisters; // default values for registers
std::array<uint16_t, constants::MAXHALFCHAMBER> mHCIDPresentCount{0}; // did the link actually receive data.
std::array<uint16_t, constants::MAXMCMCOUNT> mMCMPresentCount{0}; // how many times did this mcm receive a config event to build this config event. Ideally all present ones would have the same number, this is not the case and the reason for this array.
std::vector<MCMEvent> mConfigData; // vector of register data blocks
std::array<int32_t, constants::MAXMCMCOUNT> mConfigDataIndex{-1}; // one block of data per mcm, array as one wants to query if an mcm is present with having to walk the whole index.
// std::map<uint16_t, uint16_t> mTrapRegistersAddressIndexMap; moved to parser //!< map of address into mTrapRegisters, populated at the end of initialiseRegisters
std::bitset<kTrapRegistersSize> mWordNumberIgnore; // whether to ignore a register or not. Here to speed lookups up.
// alternate storage:
// std::array<std::vector<uint32_t>,o2::trd::TrapRegisters::kLastReg> mConfigDataint; // vector of vectors of register data, 1 value for a constant register, 69k for individual
// now we dont know if we actually have data for a specific mcm, so keep a record of which ones have been actually read and known to be current
// std::bitset<o2::trd::constants::MAXMCMCOUNT> mMCMsPresent; // which mcms were actually seen to build this series of configuration events

ClassDefNV(TrapConfigEvent, 4);
};
Expand Down

0 comments on commit ec1439f

Please sign in to comment.