|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GaudiKernel/Bootstrap.h"
15 #include "GaudiKernel/ISvcLocator.h"
16 #include "GaudiKernel/IToolSvc.h"
23 #define LARBSDBG(text) m_logstr<<MSG::DEBUG<<text<<endmsg
25 #define LARBSDBG(text)
42 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
44 m_logstr << MSG::ERROR <<
"Unable to locate DetectorStore" <<
endmsg;
109 #ifdef LARBSDBGOUTPUT
110 std::cout <<
"Fragment offsets: (m_NFlaggingWords=" <<
m_NFlaggingWords <<
")" << std::endl;
115 std::cout <<
"Flags: not present" << std::endl;
120 std::cout <<
"Low Energy: not present" << std::endl;
126 std::cout <<
"High Energy: not present" << std::endl;
148 m_logstr << MSG::ERROR <<
"LArRODBlockStructure Error: Internal error. Channels not ordered correctly. rcNb=" << rcNb
164 {
m_logstr << MSG::ERROR <<
"LArRodBlockStructure Error: Attempt to write Energy for channel "
171 ShortLong twoValues{};
181 twoValues.s[0]=valptr[0];
184 LARBSDBG(
"Writing words: val0= " << twoValues.s[0] <<
" val1= " << twoValues.s[1]);
201 uint32_t gtQ = (
gain << 30) | (t_sign<<29) | ((abs_time & 0x1fff)<<16) | (0xffff & quality);
203 LARBSDBG(
"Writing Raw data to High E block. E=" <<
energy <<
" Q=" << quality);
216 {
m_logstr << MSG::ERROR <<
"Attempt to write Energy for channel " << rcNb <<
" channels into a FEB!" <<
endmsg;
221 m_logstr << MSG::ERROR <<
"Number of samples mismatch!\n";
248 unsigned int sizeRead=0;
250 while (sizeRead<fragment.size()) {
252 FebIter=fragment.begin()+sizeRead;
257 if (FebIter+currFebSize>fragment.end()) {
259 m_logstr << MSG::ERROR <<
"Got inconsistent ROD-Fragment!" <<
endmsg;
262 m_mFebBlocks[currFEBid].assign(FebIter,FebIter+currFebSize);
264 LARBSDBG(
"Found FEB-id " << currFEBid <<
" in existing ROD-Fragment");
296 LARBSDBG(
"Checking Low Energy Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
299 for (
unsigned i=0;
i<
n;
i++)
305 LARBSDBG(
"Checking High Energy Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
307 if (
n && !BlockOffset)
309 for(
unsigned int i=0;
i<
n;
i++)
314 LARBSDBG(
"Checking Raw Data Block");
317 LARBSDBG(
"Checking Raw Data Block. n=" <<
n <<
"BlockOffset=" << BlockOffset);
321 for(
unsigned int i=0;
i<
n;
i++)
329 <<
"Energy-index:" <<
m_EIndex << std::endl
330 <<
"Filled channels: " <<
m_ECounter << std::endl);
339 FEBMAPTYPE::const_iterator feb_it_b=
m_mFebBlocks.begin();
341 FEBMAPTYPE::const_iterator feb_it;
342 for (feb_it=feb_it_b;feb_it!=feb_it_e;++feb_it) {
343 if (feb_it!=feb_it_b)
361 feb_it->second.begin(), feb_it->second.end());
370 LARBSDBG(
"in LArRodBlockPhysicsV0::getNextRawData.");
398 samples.push_back((
short) (
x>>2 & 0xfff));
401 samples.push_back((
short) (
x>>2 & 0xfff));
402 samples.push_back((
short) (
x>>18));
408 samples.push_back((
short) (
x>>2 & 0xfff));
410 samples.push_back((
short) ((
x>>18) & 0xfff));
414 samples.push_back((
short) (
x>>2 & 0xfff));
415 samples.push_back((
short) (
x >> 18));
556 template<
class RAWDATA>
557 bool LArRodBlockPhysicsV0::operator ()
559 (
const RAWDATA* ch1,
const RAWDATA* ch2)
const
568 int cId1 = m_onlineHelper->channel(id1);
569 int cId2 = m_onlineHelper->channel(
id2);
570 return FebToRodChannel(cId1) < FebToRodChannel(cId2);
578 {
std::sort(vRC.begin(),vRC.end(),*
this);}
581 {
std::sort(vDigit.begin(),vDigit.end(),*
this);
JetConstituentVector::iterator iterator
std::vector< uint32_t > * m_vFragment
const LArOnlineID * m_onlineHelper
virtual void setRawData(const int channel, const std::vector< short > &samples, const uint32_t gain)
uint32_t getNumberOfWords() const
uint16_t LE_getVectorHeader16(const unsigned n) const
const int16_t * m_LowEPtr
virtual void initializeFragment(std::vector< uint32_t > &fragment)
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
const uint32_t * m_FebBlock
virtual void setNextEnergy(const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
virtual bool setPointers()
setScaleOne setStatusOne setSaturated int16_t
std::vector< uint32_t > * m_pRODblock
virtual void concatinateFEBs()
IMessageSvc * getMessageSvc(bool quiet=false)
std::vector< uint32_t > m_HighEnergyBlock
virtual void finalizeFEB()
unsigned short m_iHeadBlockSize
uint32_t getHeader32(const unsigned n) const
Some weak symbol referencing magic...
int FebToRodChannel(int ch) const
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual void setNumberOfSamples(const uint8_t n)
static const uint32_t m_DummyBitMap[4]
std::vector< uint32_t > m_LowEnergyBlock
virtual void initializeFEB(const uint32_t id)
int getBit(const uint32_t *const p, const unsigned chan) const
void LE_setHeader16(const unsigned n, const uint16_t w)
virtual void resetPointers()
virtual void setNumberOfGains(const uint8_t n)
const int32_t * m_HighEPtr
uint16_t LE_getHeader16(const unsigned n) const
int32_t m_MiddleHeaderSize
unsigned short m_NFlaggingWords
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.
void setBit(uint32_t *const p, const unsigned chan)
const uint32_t * m_FlagPtr
std::vector< uint32_t > m_RawDataBlock
virtual void sortDataVector(std::vector< const LArRawChannel * > &)
void setHeader32(const unsigned n, const uint32_t w)