|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "eformat/Version.h"
14 #include "eformat/index.h"
69 ATH_MSG_FATAL(
"Needs ether Digits or CalibDigits or AccDigits or AccCalibDigit Key");
70 return StatusCode::FAILURE;
74 ATH_MSG_FATAL(
"Could not have both CalibDigits, AccCalibDigits Key");
75 return StatusCode::FAILURE;
80 return StatusCode::FAILURE;
91 std::set<unsigned> fts;
93 fts.insert({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31});
96 fts.insert({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24});
109 ATH_MSG_INFO(
"Adding feedthrough Barrel/Endcap=" << iBE <<
" pos/neg=" << iPN <<
" FT=" << iFT
119 std::set<HWIdentifier> subcaloFTs;
144 return StatusCode::FAILURE;
146 std::cout <<
"set sizes:" << subcaloFTs.size() <<
", " <<
m_vFinalPreselection.size() << std::endl;
150 if (subcaloFTs.find(*
it)==subcaloFTs.end())
156 ATH_MSG_WARNING(
"Apparently inconistent configuration of FT preselections. No preselection left after intersecting 'SubCaloPreselection' with 'PosNeg/BE/FT' preselection");
168 return StatusCode::SUCCESS;
181 digits=digitsHdl.
ptr();
187 ATH_CHECK(cdigitsHdl.
record(std::make_unique<LArCalibDigitContainer>()));
188 cdigits=cdigitsHdl.
ptr();
194 ATH_CHECK(accdigitsHdl.
record(std::make_unique<LArAccumulatedDigitContainer>()));
195 accdigits=accdigitsHdl.
ptr();
201 ATH_CHECK(caccdigitsHdl.
record(std::make_unique<LArAccumulatedCalibDigitContainer>()));
202 caccdigits=caccdigitsHdl.
ptr();
208 ATH_CHECK(febHeadersHdl.
record(std::make_unique<LArFebHeaderContainer>()));
209 febHeaders=febHeadersHdl.
ptr();
215 std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> > rawEventTOC;
216 eformat::helper::build_toc(*fullEvent, rawEventTOC);
218 if (larRobs==rawEventTOC.end()) {
220 return StatusCode::SUCCESS;
224 std::unique_ptr<LArRodBlockStructure> rodBlock;
234 return StatusCode::FAILURE;
238 for (
const uint32_t* robPtr : larRobs->second) {
240 ATH_MSG_VERBOSE(
"Decoding ROB fragment 0x" << std::hex << rob.rob_source_id () <<
" with " << std::dec << rob.rod_fragment_size_word() <<
"ROB words");
242 if (rob.rod_fragment_size_word() <3) {
243 ATH_MSG_ERROR(
"Encountered corrupt ROD fragment, less than 3 words!");
245 return StatusCode::FAILURE;
250 eformat::helper::Version
ver(rob.rod_version());
252 if (rodBlock==
nullptr || rodMinorVersion !=
ver.minor_version() || rodBlockType!=(rob.rod_detev_type()&0xff)) {
253 rodMinorVersion=
ver.minor_version();
254 rodBlockType=rob.rod_detev_type()&0xff;
255 ATH_MSG_VERBOSE(
"Found version " << rodMinorVersion <<
" of Rod Block Type " << rodBlockType);
256 if (rodBlockType==10) {
259 else if (rodBlockType==7 || rodBlockType==2) {
260 if(rodMinorVersion>=6) {
263 ATH_MSG_ERROR(
"Found unsupported ROD Block version " << rodMinorVersion
264 <<
" of ROD block type " << rodBlockType);
268 ATH_MSG_ERROR(
"Found unsupported Rod block type " << rodBlockType);
270 return StatusCode::FAILURE;
276 const uint32_t* pData=rob.rod_data();
277 const uint32_t nData=rob.rod_ndata();
279 ATH_MSG_ERROR(
"Failed to assign fragment pointer to LArRodBlockStructure");
280 return StatusCode::FAILURE;
289 ATH_MSG_ERROR(
"offline checksum = 0x" << MSG::hex << offsum << MSG::dec);
291 return StatusCode::FAILURE;
303 return StatusCode::FAILURE;
311 ATH_MSG_DEBUG(
"Feedthrough with id 0x" << MSG::hex << ftId << MSG::dec <<
" not in preselection. Ignored.");
325 if (fcNb>=NthisFebChannel)
327 if (
samples.size()==0)
continue;
343 if (fcNb>=NthisFebChannel)
345 if (
samples.size()==0)
continue;
359 std::vector<uint64_t> samplesSum;
360 std::vector<uint64_t> samples2Sum;
363 if (fcNb>=NthisFebChannel)
365 if (samplesSum.size()==0 || samples2Sum.size()==0)
continue;
386 std::vector<uint64_t> samplesSum;
387 std::vector<uint64_t> samples2Sum;
390 if (fcNb>=NthisFebChannel)
392 if (samplesSum.size()==0 || samples2Sum.size()==0)
continue;
401 const std::vector<HWIdentifier>& calibChannelIDs = calibMap->
calibSlotLine(cId);
402 for(std::vector<HWIdentifier>::const_iterator csl_it=calibChannelIDs.begin(); csl_it!=calibChannelIDs.end();++csl_it){
405 ispulsed_int=( ispulsed_int | ((
uint16_t)ispulsed<<bitShift) );
415 std::unique_ptr<LArFebHeader> larFebHeader(
new LArFebHeader(fId));
417 febHeaders->
push_back(std::move(larFebHeader));
422 return StatusCode::SUCCESS;
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
def retrieve(aClass, aKey=None)
SG::WriteHandleKey< LArDigitContainer > m_DigitKey
DoubleProperty m_delayScale
Data class for calibration ADC samples preprocessed by the DSP.
std::set< HWIdentifier > m_vFinalPreselection
void setDelayScale(const double scale)
set the delay Scale
virtual uint16_t getStepIndex() const
BooleanProperty m_failOnCorruption
value_type emplace_back(value_type pElem)
Add an element to the end of the collection.
Container class for LArAccumulatedDigit.
std::string find(const std::string &s)
return a remapped string
virtual int getNextAccumulatedDigit(int &channelNumber, std::vector< uint64_t > &SamplesSum, std::vector< uint64_t > &corr2Sum, uint32_t &gain)
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
virtual uint16_t getNTrigger() const
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
virtual uint16_t getNStep() const
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
BooleanProperty m_verifyChecksum
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::WriteHandleKey< LArAccumulatedDigitContainer > m_accDigitKey
virtual uint32_t offlineCheckSum() const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
bool isFCALchannel(const HWIdentifier id) const
Container class for LArCalibDigit.
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Data class for ADC samples and autocorr preprocessed by the DSP.
Gaudi::Property< std::string > m_subCaloPreselection
bool isEMECchannel(const HWIdentifier id) const override final
id_range feb_range() const
value_type get_compact(void) const
Get the compact id.
Liquid Argon digit base class.
Gaudi::Property< std::vector< unsigned > > m_vPosNegPreselection
int channelInSlotMax(const HWIdentifier Id) const
Return the Maximum channel number of a given feb slot.
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
This class provides decoding/encoding from/to ROD format.
uint32_t getFEBID() const
double delay(std::size_t d)
StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< LArCalibDigitContainer > m_calibDigitKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode initialize() override
bool isValidId(const HWIdentifier id) const
Returns false if the identifier is not a LAr-online id or any of the sub-fields is out of range.
This class provides decoding/encoding from/to ROD format.
Base class for LArDigits taken during calibration runs.
Gaudi::Property< std::vector< unsigned > > m_vBEPreselection
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
bool isEMBchannel(const HWIdentifier id) const
SG::WriteHandleKey< LArAccumulatedCalibDigitContainer > m_accCalibDigitKey
const LArOnlineID * m_onlineId
SG::WriteHandleKey< LArFebHeaderContainer > m_febHeaderKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
bool setFragment(const uint32_t *p, uint32_t n)
virtual uint16_t getDelay() const
SG::ReadCondHandleKey< LArCalibLineMapping > m_CLKey
Container class for LArDigit.
virtual uint16_t getDAC() const
virtual int getNextAccumulatedCalibDigit(int &channelNumber, std::vector< uint64_t > &SamplesSum, std::vector< uint64_t > &Samples2Sum, uint32_t &nStepTriggers, uint32_t &gain)
virtual uint32_t onlineCheckSum() const
virtual bool getPulsed(unsigned channelNumber) const
bool isHECchannel(const HWIdentifier id) const override final
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Container class for LArAccumulatedCalibDigit.
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.
Gaudi::Property< std::vector< unsigned > > m_vFTPreselection
LArRawCalibDataReadingAlg(const std::string &name, ISvcLocator *pSvcLocator)