|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GaudiKernel/Bootstrap.h"
16 #include "GaudiKernel/ISvcLocator.h"
17 #include "GaudiKernel/IToolSvc.h"
24 #define LARBSDBG(text) m_logstr<<MSG::DEBUG<<text<<endmsg
26 #define LARBSDBG(text)
43 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
45 m_logstr << MSG::ERROR <<
"Unable to locate DetectorStore" <<
endmsg;
129 #ifdef LARBSDBGOUTPUT
130 std::cout <<
"Fragment offsets: (m_NFlaggingWords=" <<
m_NFlaggingWords <<
")" << std::endl;
135 std::cout <<
"Gains: not present" << std::endl;
140 std::cout <<
"Raw Data Flags: not present" << std::endl;
145 std::cout <<
"Raw Data: not present" << std::endl;
150 std::cout <<
"Flags: not present" << std::endl;
155 std::cout <<
"Low Energy: not present" << std::endl;
160 std::cout <<
"High Energy: not present" << std::endl;
183 m_logstr << MSG::ERROR <<
"LArRODBlockStructure Error: Internal error. Channels not ordered correctly. rcNb=" << rcNb
198 {
m_logstr << MSG::ERROR <<
"LArRodBlockStructure Error: Attempt to write Energy for channel "
205 ShortLong twoValues{};
215 twoValues.s[0]=valptr[0];
218 LARBSDBG(
"Writing words: val0= " << twoValues.s[0] <<
" val1= " << twoValues.s[1]);
235 uint32_t gtQ = (
gain << 30) | (t_sign<<29) | ((abs_time & 0x1fff)<<16) | (0xffff & quality);
237 LARBSDBG(
"Writing Raw data to High E block. E=" <<
energy <<
" Q=" << quality);
250 {
m_logstr << MSG::ERROR <<
"Attempt to write Energy for channel " << rcNb <<
" channels into a FEB!" <<
endmsg;
255 m_logstr << MSG::ERROR <<
"Number of samples mismatch!\n";
282 unsigned int sizeRead=0;
284 while (sizeRead<fragment.size()) {
286 FebIter=fragment.begin()+sizeRead;
291 if (FebIter+currFebSize>fragment.end()) {
293 m_logstr << MSG::ERROR <<
"Got inconsistent ROD-Fragment!" <<
endmsg;
296 m_mFebBlocks[currFEBid].assign(FebIter,FebIter+currFebSize);
298 LARBSDBG(
"Found FEB-id " << currFEBid <<
" in existing ROD-Fragment");
330 LARBSDBG(
"Checking Low Energy Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
333 for (
unsigned i=0;
i<
n;
i++)
339 LARBSDBG(
"Checking High Energy Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
341 if (
n && !BlockOffset)
343 for(
unsigned int i=0;
i<
n;
i++)
348 LARBSDBG(
"Checking Raw Data Block");
351 LARBSDBG(
"Checking Raw Data Block. n=" <<
n <<
"BlockOffset=" << BlockOffset);
355 for(
unsigned int i=0;
i<
n;
i++)
363 <<
"Energy-index:" <<
m_EIndex << std::endl
364 <<
"Filled channels: " <<
m_ECounter << std::endl);
373 FEBMAPTYPE::const_iterator feb_it_b=
m_mFebBlocks.begin();
375 FEBMAPTYPE::const_iterator feb_it;
376 for (feb_it=feb_it_b;feb_it!=feb_it_e;++feb_it) {
377 if (feb_it!=feb_it_b)
394 feb_it->second.begin(), feb_it->second.end());
403 LARBSDBG(
"in LArRodBlockPhysicsV2::getNextRawData.");
433 gain=3-((
m_GainPtr[channelNumber/16] >> (channelNumber%16)*2) & 0x3);
441 samples.push_back((
short) (
x & 0xfff));
447 short movedSample=samples[0];
449 samples[
i-1]=samples[
i];
590 template<
class RAWDATA>
591 bool LArRodBlockPhysicsV2::operator ()
593 (
const RAWDATA* ch1,
const RAWDATA* ch2)
const
602 int cId1 = m_onlineHelper->channel(id1);
603 int cId2 = m_onlineHelper->channel(
id2);
604 return FebToRodChannel(cId1) < FebToRodChannel(cId2);
612 {
std::sort(vRC.begin(),vRC.end(),*
this);}
615 {
std::sort(vDigit.begin(),vDigit.end(),*
this);
JetConstituentVector::iterator iterator
virtual uint32_t getStatus() const
std::vector< uint32_t > * m_vFragment
const LArOnlineID * m_onlineHelper
int FebToRodChannel(int ch) const
virtual void setNumberOfSamples(const uint8_t n)
std::vector< uint32_t > m_RawDataBlock
virtual void setRawData(const int channel, const std::vector< short > &samples, const uint32_t gain)
uint32_t getNumberOfWords() const
virtual void initializeFEB(const uint32_t id)
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
virtual void setNextEnergy(const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
uint16_t LE_getVectorHeader16(const unsigned n) const
unsigned short m_NFlaggingWords
const uint32_t * m_FebBlock
virtual void sortDataVector(std::vector< const LArRawChannel * > &)
setScaleOne setStatusOne setSaturated int16_t
std::vector< uint32_t > * m_pRODblock
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
IMessageSvc * getMessageSvc(bool quiet=false)
virtual void finalizeFEB()
unsigned short m_iHeadBlockSize
unsigned int m_rearrangeFirstSample
uint32_t getHeader32(const unsigned n) const
Some weak symbol referencing magic...
const uint32_t * m_GainPtr
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual uint16_t getCtrl2(uint32_t adc) const
std::vector< uint32_t > m_LowEnergyBlock
virtual uint16_t getCtrl1(uint32_t adc) const
virtual uint32_t getNumberOfSamples() const
int getBit(const uint32_t *const p, const unsigned chan) const
void LE_setHeader16(const unsigned n, const uint16_t w)
const uint16_t * m_RawDataPtr
static const uint32_t m_DummyBitMap[4]
virtual bool setPointers()
virtual uint32_t getNumberOfGains() const
virtual void setNumberOfGains(const uint8_t n)
const int16_t * m_LowEPtr
uint16_t LE_getHeader16(const unsigned n) const
int32_t m_MiddleHeaderSize
virtual void concatinateFEBs()
virtual void resetPointers()
def time(flags, cells_name, *args, **kw)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
virtual void initializeFragment(std::vector< uint32_t > &fragment)
const uint32_t * m_FlagPtr
void setBit(uint32_t *const p, const unsigned chan)
std::vector< uint32_t > m_HighEnergyBlock
virtual uint16_t getCtrl3(uint32_t adc) const
const uint32_t * m_RawDataFlagsPtr
const int32_t * m_HighEPtr
void setHeader32(const unsigned n, const uint32_t w)