AliTRDtrapConfig::~AliTRDtrapConfig()
{
+ // destructor
+
for(Int_t iAddr = 0; iAddr < fgkDmemWords; iAddr++) {
if(iAddr == fgkDmemAddrDeflCorr - fgkDmemStartAddress)
delete [] fDmem[iAddr];
void AliTRDtrapConfig::ResetDmem()
{
+ // reset the data memory
+
for(Int_t iAddr = 0; iAddr < fgkDmemWords; iAddr++) {
if(fDmemDepth[iAddr] == 0)
continue;
UInt_t AliTRDtrapConfig::GetDmemUnsigned(Int_t addr) const
{
+ // get the content of the data memory at the given address
+ // (only if the value is the same for all MCMs)
+
addr = addr - fgkDmemStartAddress;
if(addr < 0 || addr >= fgkDmemWords) {
AliError(Form("No DMEM address: 0x%08x", addr+fgkDmemStartAddress));
UInt_t AliTRDtrapConfig::GetDmemUnsigned(Int_t addr, Int_t det, Int_t rob, Int_t mcm) const
{
+ // get the content of the data memory at the given address
+ // for a given MCM
+
addr = addr - fgkDmemStartAddress;
Int_t roc = det%30;
Int_t loc;
void AliTRDtrapConfig::PrintMemDatx(ostream &os, Int_t addr) const
{
+ // print the content of the data memory as datx
+
PrintMemDatx(os, addr, 0, 0, 127);
}
void AliTRDtrapConfig::PrintMemDatx(ostream &os, Int_t addr, Int_t det, Int_t rob, Int_t mcm) const
{
+ // print the content of the data memory as datx
+
if(addr < fgkDmemStartAddress || addr >= fgkDmemStartAddress+fgkDmemWords) {
AliError(Form("Invalid DMEM address 0x%08x!", addr));
return;
void AliTRDtrapConfig::PrintMemDatx(ostream &os, TrapReg_t reg) const
{
+ // print the content of the data memory as datx
+
PrintMemDatx(os, reg, 0, 0, 127);
}
void AliTRDtrapConfig::PrintMemDatx(ostream &os, TrapReg_t reg, Int_t det, Int_t rob, Int_t mcm) const
{
+ // print the content of the data memory as datx
+
if(reg>= kLastReg) {
AliError(Form("Invalid register %i!", reg));
return;
void AliTRDtrapConfig::PrintDatx(ostream &os, UInt_t addr, UInt_t data, Int_t rob, Int_t mcm) const
{
+ // print the value at the given address as datx
+
os << std::setw(5) << 10
<< std::setw(8) << addr
<< std::setw(12) << data;