|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/MsgStream.h"
17 #define LARBSDBGOUTPUT
19 #define LARBSDBG(text) logstr<<MSG::DEBUG<<text<<endmsg
21 #define LARBSDBG(text)
71 LARBSDBG(
"Maximum number of channels reached");
77 LARBSDBG(
"No Raw Data Block in this FEB");
92 if(ngains==0 ||
nsamples==0)
return 0;
94 unsigned int this_gain=0;
98 offset=block + 8 + ((channelNumber&0x3F)>>3) + ((channelNumber & 0x7)<<3);
99 for(this_gain=0;this_gain<ngains;this_gain++) {
102 if(channelNumber>=64)
103 x = (
x & 0x3000) >> 12;
105 x = (
x & 0x30000000) >> 28;
110 if (this_gain<ngains) {
111 int s_size = 8 + 64 * ngains;
112 offset = block + 8 + ((channelNumber&0x3F)>>3) + ((channelNumber & 0x7)<<3) + 64*this_gain;
115 if(channelNumber>=64) {
117 febgain = (
x & 0x3000) >> 12;
123 samples.push_back((
short) (
x & 0x0fff));
127 febgain = (
x & 0x30000000) >> 28;
132 samples.push_back((
short) (
x & 0x0fff));
141 short movedSample=samples[0];
143 samples[
i-1]=samples[
i];
151 #ifdef LARBSDBGOUTPUT
155 LARBSDBG(
"GetAccumulatedCalibDigits for FEB 0x" << MSG::hex <<
161 LARBSDBG(
"Maximum number of channels reached");
166 LARBSDBG(
"No Accumulated Calib Digit Block in this FEB");
184 unsigned int nStepTriggers = 1;
192 if(ngains==0 ||
nsamples==0)
return 0;
196 samplesSum.resize(nStepTriggers);
197 samples2Sum.resize(nStepTriggers);
206 LARBSDBG(
"free gain - dont know what to do Accumulated Calib Digit - return 0");
215 LARBSDBG(
"two gains - dont know what to do yet in Accumulated Calib Digit - return 0");
220 LARBSDBG(
"three gains - dont know what to do yet in Accumulated Calib Digit - return 0");
257 samplesSum[iStepTriggers].push_back(
x);
258 samples2Sum[iStepTriggers].push_back(
x2);
313 if(
index<=0)
return 0;
390 #ifdef LARBSDBGOUTPUT
391 #undef LARBSDBGOUTPUT
virtual uint8_t getTDCPhase() const
uint16_t getNTrigger() const
virtual int getNextAccumulatedCalibDigit(int &channelNumber, std::vector< std::vector< uint32_t > > &samplesSum, std::vector< std::vector< uint32_t > > &samples2Sum, uint32_t &iStepTrigger, uint32_t &gain)
singleton-like access to IMessageSvc via open function and helper
LArRodBlockCalibrationV2()
virtual void resetPointers()
uint32_t getFebConfig() const
const uint32_t * m_FebBlock
virtual uint32_t getNumberOfGains() const
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
IMessageSvc * getMessageSvc(bool quiet=false)
uint16_t getDelay() const
unsigned short m_iHeadBlockSize
unsigned int m_rearrangeFirstSample
uint32_t getHeader32(const unsigned n) const
virtual uint16_t getCtrl3(uint32_t adc) const
uint32_t RawToOfflineGain(const uint32_t gain) const
std::vector< uint32_t > m_RawDataBlock
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
virtual uint32_t getStatus() const
virtual uint16_t getCtrl2(uint32_t adc) const
virtual uint32_t getNumberOfSamples() const
virtual uint16_t getCtrl1(uint32_t adc) const
uint16_t getHeader16(const unsigned n) const