|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef LARBYTESTREAM_LARRODBLOCKPHYSICSV5_H
8 #define LARBYTESTREAM_LARRODBLOCKPHYSICSV5_H
20 #include "GaudiKernel/ISvcLocator.h"
25 #define MYLEVEL (MSG::FATAL)
26 #define LARBSDBG(text) logstr<<MYLEVEL<<text<<endmsg
28 #define LARBSDBG(text)
62 std::string
BlockType() {
return std::string(
"RodBlockPhysicsV5");}
94 virtual inline int32_t
getEx()
const;
95 virtual inline int32_t
getEy()
const;
96 virtual inline int32_t
getEz()
const;
100 virtual inline int32_t
getVROBEz()
const;
102 virtual inline int setGain(
const int ) {
return 1; };
112 virtual inline void setEx(
double);
113 virtual inline void setEy(
double);
114 virtual inline void setEz(
double);
119 template<
class RAWDATA>
120 bool operator () (
const RAWDATA* ch1,
const RAWDATA* ch2)
const;
123 {std::sort(vDigit.begin(),vDigit.end(),*
this); }
194 #ifdef LARBSDBGOUTPUT
198 LARBSDBG(
"in LArRodBlockPhysicsV5::getNextEnergy.");
206 channelNumber=((rodChannelNumber&0xe)<<2) + ((rodChannelNumber&0x1)<<6) + (rodChannelNumber>>4);
257 LARBSDBG(
"-------->>>> in LArRodBlockPhysicsV5::getNextEnergy : decode energy.....");
262 aux = (int32_t) (encodedEnergy&0x1fff);
263 range = (encodedEnergy & 0xc000) >> 14;
264 if(aux==0 &&
range>0) aux=0x2000;
265 sign = encodedEnergy & 0x2000;
274 }
else gain=0xffffffff;
289 #ifdef LARBSDBGOUTPUT
290 logstr <<
MYLEVEL <<
"This cell has time and Quality information "<<
endmsg;
300 #ifdef LARBSDBGOUTPUT
303 logstr <<
MYLEVEL <<
" Encoded Energy ="<< MSG::hex << encodedEnergy << MSG::dec <<
" E=" <<
energy
307 <<
" channel Number=" << channelNumber
346 if(
p)
return (
p[1]>>9);
353 if(
p)
return (
p[2]>>9);
360 if(
p)
return (
p[3]>>9);
366 return ( (
ch&0x7) << 4) | ( (
ch&0x38) >>2 ) | ((
ch&0x40)>>6);
376 conv.i =
static_cast<int32_t
>(
E);
404 #ifdef LARBSDBGOUTPUT
405 #undef LARBSDBGOUTPUT
virtual uint32_t hasRawDataBlock() const
virtual uint32_t hasCalibBlock() const
virtual uint16_t getRawDataSize() const
virtual int32_t getVROBEz() const
virtual uint16_t getNbSweetCells2() const
std::vector< uint32_t > m_SumBlkBlockE2
void setRawData(const int, const std::vector< short > &, const uint32_t)
uint16_t getFebConfig() const
virtual uint32_t getNumberOfSamples() const
const LArOnlineID * m_onlineHelper
const uint32_t * m_GainPointer
const uint16_t * m_DigitsPointer
uint16_t m_EnergyThreshold2
virtual uint16_t getCtrl2(uint32_t adc) const
virtual uint32_t hasPhysicsBlock() const
bool operator()(const RAWDATA *ch1, const RAWDATA *ch2) const
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
virtual uint32_t getNumberOfGains() const
virtual bool canSetCalibration()
#define LARBSDBG(text)
This class provides decoding/encoding from/to ROD format.
setScaleOne setStatusOne setSaturated int16_t
IMessageSvc * getMessageSvc(bool quiet=false)
void setNextEnergy(const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
std::vector< uint16_t > m_DigitsEncode
const uint16_t * m_TimeQualityPointer
void initializeFragment(std::vector< uint32_t > &fragment)
virtual int32_t getVROBEx() const
virtual void setEx(double)
std::vector< uint32_t > m_FebInfoBlock
const int32_t * m_SumPointer
virtual uint16_t getResults1Size() const
uint32_t RawToOfflineGain(const uint32_t gain) const
std::vector< uint32_t > m_GainBlock
virtual void resetPointers()
int getNextDigits(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
const uint16_t * m_EnergyPointer
unsigned short m_requiredNSamples
const uint32_t * m_virtualROBPointerLocal
virtual int32_t getVROBEy() const
const uint32_t * m_MaskDigitsPointer
const uint32_t * m_MaskTimeQualityPointer
uint16_t m_numberHotCellOffTime
std::vector< uint16_t > m_TimeQualityBlock
uint16_t getNbSweetCells2FromMask() const
virtual void setEz(double)
virtual int setGain(const int)
const uint32_t * m_virtualROBPointer
const uint16_t * m_RawDataPointer
uint16_t getFirstSampleIndex() const
virtual int getNextEnergy(int &channelNumber, int32_t &energy, int32_t &time, int32_t &quality, uint32_t &gain)
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
virtual uint32_t getStatus() const
virtual uint16_t getCtrl1(uint32_t adc) const
virtual void sortDataVector(std::vector< const LArRawChannel * > &)
virtual uint16_t getCtrl3(uint32_t adc) const
void setRequiredNSamples(unsigned short ns)
virtual void setEy(double)
def time(flags, cells_name, *args, **kw)
void setE(unsigned index, double E)
std::vector< uint32_t > m_RawDataBlock
virtual int32_t getEx() const
const uint16_t * m_RaddPointer
std::vector< uint16_t > m_EnergyBlockEncode
void initializeFEB(const uint32_t id)
uint16_t m_EnergyThreshold1
virtual uint32_t getVROBFebId()
virtual uint32_t hasControlWords() const
virtual uint16_t getNbSweetCells1() const
std::vector< uint32_t > m_SumBlkBlockE1
uint16_t getNbSweetCells1FromMask() const
virtual int FebToRodChannel(int ch) const
virtual int32_t getEz() const
virtual int32_t getEy() const
uint16_t getHeader16(const unsigned n) const
uint32_t m_virtualROBJump
void sortDataVector(std::vector< const LArDigit * > &vDigit)
virtual bool setPointers()
virtual uint16_t getResults2Size() const