ATLAS Offline Software
Loading...
Searching...
No Matches
LArCalibParams::CalibBoard Class Reference

#include <LArCalibParams.h>

Collaboration diagram for LArCalibParams::CalibBoard:

Public Member Functions

unsigned Delay (const unsigned event) const
unsigned DAC (const unsigned event) const
bool isPulsed (const unsigned event, const unsigned short calibLine) const

Public Attributes

unsigned m_nTrigger
std::vector< unsigned > m_Pattern
std::vector< unsigned > m_DAC
std::vector< unsigned > m_Delay

Detailed Description

Definition at line 59 of file LArCalibParams.h.

Member Function Documentation

◆ DAC()

unsigned LArCalibParams::CalibBoard::DAC ( const unsigned event) const

Definition at line 94 of file LArCalibParams.cxx.

95{ //The DAC is changed after nTrigger*nDelay*nPattern events
96 const unsigned DACStepSize=m_nTrigger*m_Delay.size()*m_Pattern.size()/4; //1 pattern = 4 words
97 const unsigned iDAC=event/DACStepSize;
98 if (iDAC<m_DAC.size()) {
99 //std::cout << "CalibBoard Returning DAC=" << m_DAC[iDAC] << " Index=" << iDAC << " Stepsize=" << DACStepSize << std::endl;
100 return m_DAC[iDAC];
101 }
102 else {
103 MsgStream log(Athena::getMessageSvc(), "LArCalibParams::DAC");
104 log << MSG::ERROR << "Event #" << event << ": DAC index out of range! ("
105 << iDAC << "max=" << m_DAC.size() << "). Return kmaxDAC" << endmsg;
106 return kmaxDAC;
107 }
108}
#define endmsg
#define kmaxDAC
This class contains the LAr Calibration Board settings and a set of functions to decoded them.
std::vector< unsigned > m_DAC
std::vector< unsigned > m_Delay
std::vector< unsigned > m_Pattern
IMessageSvc * getMessageSvc(bool quiet=false)

◆ Delay()

unsigned LArCalibParams::CalibBoard::Delay ( const unsigned event) const

Definition at line 86 of file LArCalibParams.cxx.

87{ //The delay value is changed after nTrigger*nPattern events
88 const unsigned DelayStepSize=m_nTrigger*m_Pattern.size()/4; //1 pattern = 4 words
89 const unsigned iDelay=(event/DelayStepSize)%m_Delay.size();
90 return m_Delay[iDelay];
91}

◆ isPulsed()

bool LArCalibParams::CalibBoard::isPulsed ( const unsigned event,
const unsigned short calibLine ) const

Definition at line 74 of file LArCalibParams.cxx.

75{ //The pattern is changed after nTrigger events.
76 const unsigned PatternStepSize=m_nTrigger;
77 unsigned iPattern=(event/PatternStepSize)%(m_Pattern.size()/4);
78 iPattern*=4; //A pattern consists of 4 words (4*32bit= 128 bit)
79 const unsigned nWord=lineNumber>>5; //lineNumber/32;
80 const unsigned Pattern=m_Pattern[iPattern+nWord];
81 const unsigned nBit=lineNumber&0x1f; //lineNumber%32;
82 return Pattern>>nBit & 0x1;
83}

Member Data Documentation

◆ m_DAC

std::vector<unsigned> LArCalibParams::CalibBoard::m_DAC

Definition at line 63 of file LArCalibParams.h.

◆ m_Delay

std::vector<unsigned> LArCalibParams::CalibBoard::m_Delay

Definition at line 64 of file LArCalibParams.h.

◆ m_nTrigger

unsigned LArCalibParams::CalibBoard::m_nTrigger

Definition at line 61 of file LArCalibParams.h.

◆ m_Pattern

std::vector<unsigned> LArCalibParams::CalibBoard::m_Pattern

Definition at line 62 of file LArCalibParams.h.


The documentation for this class was generated from the following files: