|
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;
187 LARBSDBG(
"This FEB has " << ngains <<
" gains");
188 LARBSDBG(
"This FEB has " << ntriggers <<
" ntriggers");
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 int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
singleton-like access to IMessageSvc via open function and helper
LArRodBlockCalibrationV1()
virtual uint16_t getCtrl3(uint32_t adc) 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)
const uint32_t * m_FebBlock
std::vector< uint32_t > m_RawDataBlock
IMessageSvc * getMessageSvc(bool quiet=false)
uint16_t getNTrigger() const
unsigned short m_iHeadBlockSize
virtual uint16_t getCtrl1(uint32_t adc) const
unsigned int m_rearrangeFirstSample
uint32_t getHeader32(const unsigned n) const
uint32_t RawToOfflineGain(const uint32_t gain) const
virtual void resetPointers()
double delay(std::size_t d)
virtual uint32_t getNumberOfGains() const
virtual uint16_t getCtrl2(uint32_t adc) const
virtual uint8_t getTDCPhase() const
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
uint32_t getFebConfig() const
virtual uint32_t getNumberOfSamples() const
uint16_t getDelay() const
virtual uint32_t getStatus() const
uint16_t getHeader16(const unsigned n) const