ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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 }

◆ 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:
LArCalibParams::CalibBoard::m_Delay
std::vector< unsigned > m_Delay
Definition: LArCalibParams.h:64
LArCalibParams::CalibBoard::m_DAC
std::vector< unsigned > m_DAC
Definition: LArCalibParams.h:63
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
LArCalibParams::CalibBoard::m_Pattern
std::vector< unsigned > m_Pattern
Definition: LArCalibParams.h:62
kmaxDAC
#define kmaxDAC
This class contains the LAr Calibration Board settings and a set of functions to decoded them.
Definition: LArCalibParams.h:26
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LArCalibParams::CalibBoard::m_nTrigger
unsigned m_nTrigger
Definition: LArCalibParams.h:61
Trk::Pattern
@ Pattern
Definition: ParametersCommon.h:29
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20