![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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)
43 ISvcLocator* svcLoc = Gaudi::svcLocator( );
46 m_logstr << MSG::ERROR <<
"Unable to locate DetectorStore" <<
endmsg;
49 sc =
detStore->retrieve(online_id,
"LArOnlineID");
158 #ifdef LARBSDBGOUTPUT
159 m_logstr <<
MYLEVEL <<
"***********************************************************************"<<
endmsg;
161 m_logstr <<
MYLEVEL <<
"************************************************************************"<<
endmsg;
168 m_logstr <<
MYLEVEL <<
"************************************************************************"<<
endmsg;
170 m_logstr <<
MYLEVEL <<
"********************* SumBlck ************************************"<<
endmsg;
171 for(
int toto=0;toto<4;toto++)
173 m_logstr <<
MYLEVEL <<
"************************************************************************"<<
endmsg;
175 m_logstr <<
MYLEVEL <<
"********************* CounterBlck ************************************"<<
endmsg;
177 m_logstr <<
MYLEVEL <<
"************************************************************************"<<
endmsg;
179 m_logstr <<
MYLEVEL <<
"********************* FebInfoBlck ************************************"<<
endmsg;
181 m_logstr <<
MYLEVEL <<
"************************************************************************"<<
endmsg;
184 m_logstr <<
MYLEVEL <<
"********************* Energies ************************************"<<
endmsg;
185 for(
int toto=0;toto<128;toto++)
187 m_logstr <<
MYLEVEL <<
"************************************************************************"<<
endmsg;
189 m_logstr <<
MYLEVEL <<
"********************* Time & Quality ************************************"<<
endmsg;
190 for(
int toto=0;toto<10;toto++)
192 m_logstr <<
MYLEVEL <<
"************************************************************************"<<
endmsg;
226 m_logstr <<
MYLEVEL <<
"setNextEnergy-------------------->>>>>********************** new format V3 ***********" <<
endmsg;
232 m_logstr << MSG::ERROR <<
"LArRODBlockStructure ERROR: Internal error. Channels not ordered correctly. rcNb=" << rcNb
266 thequality = (
int16_t) quality;
273 if ((abse>8192)&&(abse<65536))
275 EncodedE=((abse>>3)|0x2000);
277 else if ((abse>65535)&&(abse<524288))
279 EncodedE=((abse>>6)|0x4000);
281 else if ((abse>524288))
283 EncodedE=((abse>>9)|0x6000);
288 if (
sign<0) EncodedE |= 0x8000;
312 {
m_logstr << MSG::ERROR <<
"LArRodBlockStructure ERROR: Attempt to write Energy for channel "
326 ShortLong twoValues{};
337 twoValues.s[0]=valptr[0];
343 LARBSDBG(
"Writing words: val0= " << twoValues.s[0] <<
" val1= " << twoValues.s[1]);
353 if (mylocalBitwiseIndex==0)
357 SB = (quality==-32767?0x00000000:0x00000001);
365 SB=(SB<<1)|(quality==-32767?0x00000000:0x00000001);
372 if (mylocalBitwiseIndex==0)
380 encodedgains=(encodedgains<<2)|(
gain&0x00000003);
397 ShortLong twoValues{};
398 if (mylocalBitwiseIndex==0)
402 twoValues.s[0]=(
int16_t)(
time)|((quality>>10)&0x003F);
409 twoValues.s[0]=valptr[0];
410 twoValues.s[1]=(
int16_t)(
time)|((quality>>12)&0x003F);
422 {
m_logstr << MSG::ERROR <<
"Attempt to write Energy for channel " << rcNb <<
" channels into a FEB!" <<
endmsg;
427 m_logstr << MSG::ERROR <<
"Number of samples mismatch!\n";
454 unsigned int sizeRead=0;
456 while (sizeRead<fragment.size()) {
458 FebIter=fragment.begin()+sizeRead;
463 if (FebIter+currFebSize>fragment.end()) {
465 m_logstr << MSG::ERROR <<
"Got inconsistent ROD-Fragment!" <<
endmsg;
468 m_mFebBlocks[currFEBid].assign(FebIter,FebIter+currFebSize);
470 LARBSDBG(
"Found FEB-id " << currFEBid <<
" in existing ROD-Fragment");
511 LARBSDBG(
"Checking for Summary Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
512 if (
n && !BlockOffset)
516 m_logstr <<
MSG::DEBUG <<
"In finalizeFEB-------------------->>>>> " <<
"Checking for Summary Block : length= " <<
n <<
" BlockOffset=" << BlockOffset <<
endmsg;
517 for (
unsigned i=0;
i<
n;
i++)
524 ShortLong twoValues{};
568 LARBSDBG(
"Checking for Counter Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
569 if (
n && !BlockOffset)
573 m_logstr << MSG::INFO <<
"In finalyseFEB-------------------->>>>> " <<
"Checking for Counter Block : length= " <<
n <<
" BlockOffset=" << BlockOffset <<
endmsg;
574 for (
unsigned i=0;
i<
n;
i++)
581 LARBSDBG(
"Checking Energy Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
583 if (
n && !BlockOffset)
587 m_logstr <<
MSG::DEBUG <<
"In finalyseFEB-------------------->>>>> " <<
"Checking for Energy Block : length= " <<
n <<
" BlockOffset=" << BlockOffset <<
endmsg;
589 for(
unsigned int i=0;
i<
n;
i++)
596 LARBSDBG(
"Checking Gain Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
598 if (
n && !BlockOffset)
603 for(
unsigned int i=0;
i<
n;
i++)
614 LARBSDBG(
"Checking FebInfo Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
616 if (
n && !BlockOffset)
621 for(
unsigned int i=0;
i<
n;
i++)
628 LARBSDBG(
"Checking Time and Quality Block n=" <<
n <<
"BlockOffset=" << BlockOffset);
630 if (
n && !BlockOffset)
634 m_logstr <<
MSG::DEBUG <<
"In finalyseFEB-------------------->>>>> " <<
"Checking for Time and Quality Block : length= " <<
n <<
" BlockOffset=" << BlockOffset <<
endmsg;
635 for(
unsigned int i=0;
i<
n;
i++)
640 LARBSDBG(
"Checking Raw Data Block");
643 LARBSDBG(
"Checking Raw Data Block. n=" <<
n <<
"BlockOffset=" << BlockOffset);
648 for(
unsigned int i=0;
i<
n;
i++)
664 m_logstr <<
MYLEVEL <<
"***********************************************************************"<<
endmsg;
667 m_logstr <<
MYLEVEL <<
"***********************************************************************"<<
endmsg;
670 m_logstr <<
MYLEVEL <<
"***********************************************************************"<<
endmsg;
681 FEBMAPTYPE::const_iterator feb_it_b=
m_mFebBlocks.begin();
683 FEBMAPTYPE::const_iterator feb_it;
684 for (feb_it=feb_it_b;feb_it!=feb_it_e;++feb_it) {
685 if (feb_it!=feb_it_b)
702 feb_it->second.begin(), feb_it->second.end());
711 LARBSDBG(
"in LArRodBlockPhysicsV3::getNextRawData.");
741 gain=3-((
m_GainPtr[channelNumber/16] >> (channelNumber%16)*2) & 0x3);
749 samples.push_back((
short) (
x & 0xfff));
768 template<
class RAWDATA>
769 bool LArRodBlockPhysicsV3::operator ()
771 (
const RAWDATA* ch1,
const RAWDATA* ch2)
const
780 int cId1 = m_onlineHelper->channel(id1);
781 int cId2 = m_onlineHelper->channel(
id2);
782 return FebToRodChannel(cId1) < FebToRodChannel(cId2);
789 {
std::sort(vRC.begin(),vRC.end(),*
this);}
792 {
std::sort(vDigit.begin(),vDigit.end(),*
this);
JetConstituentVector::iterator iterator
const LArOnlineID * m_onlineHelper
std::vector< uint32_t > * m_vFragment
const uint32_t * m_RawDataFlagsPtr
virtual void setEThreshold(uint16_t thres)
static const uint32_t m_DummyBitMap[4]
virtual void setEy(double Ey)
uint32_t getNumberOfWords() const
virtual void sortDataVector(std::vector< const LArRawChannel * > &)
virtual void setOffTimeCut(uint16_t TimeCut)
uint16_t LE_getVectorHeader16(const unsigned n) const
virtual void setNumberOfGains(const uint8_t n)
int FebToRodChannel(int ch) const
std::vector< uint32_t > m_TimeQualityBlock
const uint32_t * m_FebBlock
std::vector< uint32_t > m_RawDataBlock
virtual uint32_t getRadd(uint32_t adc, uint32_t sample) const
virtual void initializeFragment(std::vector< uint32_t > &fragment)
setScaleOne setStatusOne setSaturated int16_t
std::vector< uint32_t > * m_pRODblock
IMessageSvc * getMessageSvc(bool quiet=false)
virtual uint32_t getNumberOfSamples() const
virtual void setNumberOfSamples(const uint8_t n)
virtual void concatinateFEBs()
virtual uint16_t getCtrl2(uint32_t adc) const
virtual void finalizeFEB()
unsigned short m_iHeadBlockSize
unsigned int m_rearrangeFirstSample
uint32_t getHeader32(const unsigned n) const
virtual void initializeFEB(const uint32_t id)
const uint16_t * m_CounterPtr
The Athena Transient Store API.
virtual void setEx(double Ex)
uint16_t m_numberHotCellOffTime
const int16_t * m_TimeQualityPtr
const uint32_t * m_GainPtr
virtual void setNextEnergy(const int channel, const int32_t energy, const int32_t time, const int32_t quality, const uint32_t gain)
Some weak symbol referencing magic...
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual uint32_t getStatus() const
std::vector< uint32_t > m_EnergyBlock
virtual uint16_t getCtrl3(uint32_t adc) const
std::vector< uint32_t > m_SumBlkBlock
std::vector< uint32_t > m_FebInfoBlock
virtual uint32_t getNumberOfGains() const
int getBit(const uint32_t *const p, const unsigned chan) const
void LE_setHeader16(const unsigned n, const uint16_t w)
virtual void resetPointers()
std::vector< uint32_t > m_GainBlock
std::vector< uint32_t > m_CounterBlkBlock
virtual void setEz(double Ez)
const uint32_t * m_SumBlkPtr
uint16_t m_EnergyThreshold
uint16_t LE_getHeader16(const unsigned n) const
int32_t m_MiddleHeaderSize
virtual bool setPointers()
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 setRawData(const int channel, const std::vector< short > &samples, const uint32_t gain)
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
virtual uint16_t getCtrl1(uint32_t adc) const
uint16_t m_HottestCellIndex
void setBit(uint32_t *const p, const unsigned chan)
uint32_t m_HottestCellEnergy
const int16_t * m_FebInfoDataPtr
const uint16_t * m_EnergyPtr
const int16_t * m_RawDataPtr
void setHeader32(const unsigned n, const uint32_t w)