12#ifndef O2_TRAPCONFIG_H
13#define O2_TRAPCONFIG_H
23#include <fairlogger/Logger.h>
522 unsigned int peek(
int addr,
int det,
int rob,
int mcm);
561 static const std::array<int, TrapConfig::mlastAlloc>
mgkSize;
566 if (
index < mData.size()) {
568 mValid[
index] = valid;
570 LOG(
debug) <<
"attempt to write data outside array with size : " << mData.size() <<
"and index of :" <<
index;
593 std::vector<unsigned int> mData;
594 std::vector<bool> mValid;
604 void init(
const char*
name,
int addr,
int nBits,
int resetValue);
646 std::stringstream mNamestream;
647 mNamestream <<
"DMEM 0x" << std::hex <<
mAddr;
648 mName = mNamestream.str();
669 std::array<TrapDmemWord, mgkDmemWords>
mDmem{};
ClassDefNV(TrapDmemWord, 1)
address
TrapDmemWord & operator=(const TrapDmemWord &rhs)
TrapDmemWord(const TrapDmemWord &rhs)
unsigned int getValue(int det, int rob, int mcm)
void setAddress(unsigned short addr)
bool setValue(unsigned int value, int det)
bool setValue(unsigned int value, int det, int rob, int mcm)
unsigned short getAddress()
unsigned short getNbits()
unsigned int mResetValue
Number of bits, from 1 to 32.
void initfromrun2(const char *name, int addr, int nBits, int resetValue)
bool setValue(int value, int det, int rob, int mcm)
int getValue(int det, int rob, int mcm)
ClassDefNV(TrapRegister, 1)
reset value
void init(const char *name, int addr, int nBits, int resetValue)
TrapRegister(const TrapRegister &rhs)
unsigned int getResetValue()
bool setValue(int value, int det)
TrapRegister & operator=(const TrapRegister &rhs)
unsigned short mAddr
Name of the register.
unsigned short mNbits
Address in GIO of TRAP.
unsigned int getValidRaw(int i)
bool allocate(Alloc_t mode)
static const std::array< int, TrapConfig::mlastAlloc > mgkSize
unsigned int getDataRaw(int i)
bool setData(unsigned int value)
unsigned int getDataSize()
void setDataFromRun2(int value, int valid, unsigned int index)
int getIdx(int det, int rob, int mcm)
static const int mgkDbankStartAddress
std::array< TrapDmemWord, mgkDmemWords > mDmem
void PrintDmemValue3(TrapConfig::TrapDmemWord *trapval, std::ofstream &output)
bool printTrapAddr(int addr, int det=-1, int rob=-1, int mcm=-1)
unsigned int peek(int addr, int det, int rob, int mcm)
bool setDmem(int addr, int value, int det, int rob, int mcm)
unsigned short getRegNBits(TrapReg_t reg)
void configureOnlineGains()
void setConfigName(std::string name)
void printDatx(std::ostream &os, unsigned int addr, unsigned int data, int rob, int mcm)
unsigned short getRegAddress(TrapReg_t reg)
bool poke(int addr, unsigned int value, int det, int rob, int mcm)
bool setDmem(int addr, unsigned int value, int det)
void setConfigVersion(std::string version)
static const int mgkDmemStartAddress
std::string mTrapConfigName
unsigned int getDmemUnsigned(int addr, int det, int rob, int mcm)
std::string getRegName(TrapReg_t reg)
const std::array< int, 3 > mgkRegisterAddressBlockSize
void PrintRegisterValue3(TrapConfig::TrapRegister *trapval, std::ofstream &output)
unsigned int getRegResetValue(TrapReg_t reg)
static const int mgkImemStartAddress
bool setTrapReg(TrapReg_t reg, int value, int det)
const std::array< int, 3 > mgkRegisterAddressBlockStart
bool setDmemAlloc(int addr, Alloc_t mode)
std::array< TrapRegister, kLastReg > mRegisterValue
int getTrapReg(TrapReg_t reg, int det=-1, int rob=-1, int mcm=-1)
void printMemDatx(std::ostream &os, int addr)
std::array< TrapReg_t, 0x400+0x200+0x4 > mgRegAddressMap
static const int mgkDbankWords
void printVerify(std::ostream &os, int det, int rob, int mcm)
static const int mlastAlloc
static const int mgkImemWords
static const int mgkMcmlistSize
std::string getConfigVersion()
std::string mTrapConfigVersion
bool setTrapRegAlloc(TrapReg_t reg, Alloc_t mode)
std::string getConfigName()
TrapReg_t getRegByAddress(int address)
static const int mgkDmemWords
bool setDmem(int addr, int value)
bool printTrapReg(TrapReg_t reg, int det=-1, int rob=-1, int mcm=-1)
static bool mgRegAddressMapInitialized
void DumpTrapConfig2File(std::string filename)
GLuint GLuint64EXT address
GLuint const GLchar * name
GLsizei const GLfloat * value
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"