|
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
163 {
m_logstr << MSG::ERROR <<
"LArRodBlockStructure Error: Attempt to write Energy for channel "
170 ShortLong twoValues{};
180 twoValues.s[0]=valptr[0];
183 LARBSDBG(
"Writing words: val0= " << twoValues.s[0] <<
" val1= " << twoValues.s[1]);
200 uint32_t gtQ = (
gain << 30) | (t_sign<<29) | ((abs_time & 0x1fff)<<16) | (0xffff & quality);
202 LARBSDBG(
"Writing Raw data to High E block. E=" <<
energy <<
" Q=" << quality);
215 {
m_logstr << MSG::ERROR <<
"Attempt to write Energy for channel " << rcNb <<
" channels into a FEB!" <<
endmsg;
220 m_logstr << MSG::ERROR <<
"Number of samples mismatch!\n";
247 unsigned int sizeRead=0;
249 while (sizeRead<fragment.size()) {
251 FebIter=fragment.begin()+sizeRead;
256 if (FebIter+currFebSize>fragment.end()) {
258 m_logstr << MSG::ERROR <<
"Got inconsistent ROD-Fragment!" <<
endmsg;
261 m_mFebBlocks[currFEBid].assign(FebIter,FebIter+currFebSize);
263 LARBSDBG(
"Found FEB-id " << currFEBid <<
" in existing ROD-Fragment");
295 LARBSDBG(
"Checking Low Energy Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
298 for (
unsigned i=0;
i<
n;
i++)
304 LARBSDBG(
"Checking High Energy Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
306 if (
n && !BlockOffset)
308 for(
unsigned int i=0;
i<
n;
i++)
313 LARBSDBG(
"Checking Raw Data Block");
316 LARBSDBG(
"Checking Raw Data Block. n=" <<
n <<
"BlockOffset=" << BlockOffset);
320 for(
unsigned int i=0;
i<
n;
i++)
328 <<
"Energy-index:" <<
m_EIndex << std::endl
329 <<
"Filled channels: " <<
m_ECounter << std::endl);
338 FEBMAPTYPE::const_iterator feb_it_b=
m_mFebBlocks.begin();
340 FEBMAPTYPE::const_iterator feb_it;
341 for (feb_it=feb_it_b;feb_it!=feb_it_e;++feb_it) {
342 if (feb_it!=feb_it_b)
359 feb_it->second.begin(), feb_it->second.end());
368 LARBSDBG(
"in LArRodBlockPhysicsV1::getNextRawData.");
396 samples.push_back((
short) (
x>>2 & 0xfff));
399 samples.push_back((
short) (
x>>2 & 0xfff));
400 samples.push_back((
short) (
x>>18));
406 samples.push_back((
short) (
x>>2 & 0xfff));
408 samples.push_back((
short) ((
x>>18) & 0xfff));
412 samples.push_back((
short) (
x>>2 & 0xfff));
413 samples.push_back((
short) (
x >> 18));
554 template<
class RAWDATA>
555 bool LArRodBlockPhysicsV1::operator ()
557 (
const RAWDATA* ch1,
const RAWDATA* ch2)
const
566 int cId1 = m_onlineHelper->channel(id1);
567 int cId2 = m_onlineHelper->channel(
id2);
568 return FebToRodChannel(cId1) < FebToRodChannel(cId2);
576 {
std::sort(vRC.begin(),vRC.end(),*
this);}
579 {
std::sort(vDigit.begin(),vDigit.end(),*
this);
JetConstituentVector::iterator iterator
const LArOnlineID * m_onlineHelper
std::vector< uint32_t > * m_vFragment
const uint32_t * m_FlagPtr
std::vector< uint32_t > m_LowEnergyBlock
uint32_t getNumberOfWords() const
virtual void setNextEnergy(const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
virtual void setNumberOfSamples(const uint8_t n)
virtual void initializeFragment(std::vector< uint32_t > &fragment)
const uint32_t * m_FebBlock
void setHeader16(const unsigned n, const uint16_t w)
const int16_t * m_LowEPtr
setScaleOne setStatusOne setSaturated int16_t
std::vector< uint32_t > * m_pRODblock
IMessageSvc * getMessageSvc(bool quiet=false)
std::vector< uint32_t > m_RawDataBlock
unsigned short m_iHeadBlockSize
virtual bool setPointers()
uint32_t getHeader32(const unsigned n) const
virtual void concatinateFEBs()
uint16_t getVectorHeader16(const unsigned n) const
virtual void setNumberOfGains(const uint8_t n)
Some weak symbol referencing magic...
::StatusCode StatusCode
StatusCode definition for legacy code.
const int32_t * m_HighEPtr
int getBit(const uint32_t *const p, const unsigned chan) const
virtual void initializeFEB(const uint32_t id)
virtual void resetPointers()
int FebToRodChannel(int ch) const
static const uint32_t m_DummyBitMap[4]
virtual void setRawData(const int channel, const std::vector< short > &samples, const uint32_t gain)
int32_t m_MiddleHeaderSize
def time(flags, cells_name, *args, **kw)
std::vector< uint32_t > m_HighEnergyBlock
virtual void sortDataVector(std::vector< const LArRawChannel * > &)
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)
virtual void finalizeFEB()
uint16_t getHeader16(const unsigned n) const
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
unsigned short m_NFlaggingWords
void setHeader32(const unsigned n, const uint32_t w)