 |
ATLAS Offline Software
|
#include <LArRawDataReadingAlg.h>
|
| LArRawDataReadingAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
StatusCode | initialize () override |
|
StatusCode | execute (const EventContext &ctx) const override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
SG::WriteHandleKey< LArRawChannelContainer > | m_rawChannelKey |
|
SG::WriteHandleKey< LArDigitContainer > | m_digitKey {this,"LArDigitKey","FREE"} |
|
SG::WriteHandleKey< LArFebHeaderContainer > | m_febHeaderKey {this,"LArFebHeaderKey","LArFebHeader"} |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey {this, "eventInfoKey", "EventInfo", "Key for EventInfo object"} |
|
ServiceHandle< IROBDataProviderSvc > | m_robDataProviderSvc {this,"ROBDataProviderSvc","ROBDataProviderSvc"} |
|
BooleanProperty | m_verifyChecksum {this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"} |
|
BooleanProperty | m_failOnCorruption {this,"FailOnCorruption",false,"Return FAILURE if data corruption is found"} |
|
const LArOnlineID * | m_onlineId =nullptr |
|
bool | m_doRawChannels =true |
|
bool | m_doDigits =true |
|
bool | m_doFebHeaders =true |
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 25 of file LArRawDataReadingAlg.h.
◆ StoreGateSvc_t
◆ LArRawDataReadingAlg()
LArRawDataReadingAlg::LArRawDataReadingAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode LArRawDataReadingAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
override |
Definition at line 43 of file LArRawDataReadingAlg.cxx.
50 ATH_CHECK(rawChannelsHdl.record(std::make_unique<LArRawChannelContainer>()));
51 rawChannels=rawChannelsHdl.ptr();
52 rawChannels->reserve(182468);
57 ATH_CHECK(digitsHdl.record(std::make_unique<LArDigitContainer>()));
58 digits=digitsHdl.ptr();
64 ATH_CHECK(febHeadersHdl.record(std::make_unique<LArFebHeaderContainer>()));
65 febHeaders=febHeadersHdl.ptr();
71 std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> > rawEventTOC;
72 eformat::helper::build_toc(*fullEvent, rawEventTOC);
74 if (larRobs==rawEventTOC.end()) {
75 ATH_MSG_DEBUG(
"No LAr data found in this event. Recording empty LArRawChannelContainer");
76 return StatusCode::SUCCESS;
80 std::unique_ptr<LArRodBlockStructure> rodBlock;
85 for (
const uint32_t* robPtr : larRobs->second) {
87 ATH_MSG_VERBOSE(
"Decoding ROB fragment 0x" << std::hex << rob.rob_source_id () <<
" with " << std::dec << rob.rod_fragment_size_word() <<
" ROB words");
89 if (rob.rod_fragment_size_word() <3) {
91 ATH_MSG_ERROR(
"Encountered corrupt ROD fragment, less than 3 words!");
92 return StatusCode::FAILURE;
96 }
else if(rob.rob_source_id()& 0x1000 ){
100 }
else if(!(rob.rod_source_id()>>12& 0x0F)
101 && !((rob.rod_source_id()>>20) == 4) ){
103 ATH_MSG_WARNING(
"Found not LAr fragment " <<
" event: "<<ctx.eventID().event_number());
105 ATH_MSG_WARNING(
"Rob source id.: 0x"<< std::hex << rob.rob_source_id () <<std::dec <<
" ROD Source id: 0x"<<std::hex<<rob.rod_source_id()<<std::dec<<
" Lvl1ID: "<<eventInfo->extendedLevel1ID());
110 eformat::helper::Version
ver(rob.rod_version());
112 if (rodBlock==
nullptr || rodMinorVersion !=
ver.minor_version() || rodBlockType!=(rob.rod_detev_type()&0xff)) {
113 rodMinorVersion=
ver.minor_version();
114 rodBlockType=rob.rod_detev_type()&0xff;
115 ATH_MSG_VERBOSE(
"Found version " << rodMinorVersion <<
" of Rod Block Type " << rodBlockType);
116 if (rodBlockType==4) {
117 switch(rodMinorVersion) {
127 ATH_MSG_ERROR(
"Found unsupported ROD Block version " << rodMinorVersion
128 <<
" of ROD block type " << rodBlockType <<
". ROD Source id: 0x" <<std::hex<<rob.rod_source_id());
129 return StatusCode::FAILURE;
132 ATH_MSG_WARNING(
"Found unsupported ROD Block version " << rodMinorVersion
133 <<
" of ROD block type " << rodBlockType <<
". ROD Source id: 0x" <<std::hex<<rob.rod_source_id());
138 else if (rodBlockType==2) {
139 switch(rodMinorVersion) {
147 ATH_MSG_WARNING(
"Found unsupported ROD Block version " << rodMinorVersion
148 <<
" of ROD block type " << rodBlockType);
154 const uint32_t* pData=rob.rod_data();
155 const uint32_t nData=rob.rod_ndata();
158 ATH_MSG_ERROR(
"ROD 0x"<<std::hex<<rob.rod_source_id() << std::dec <<
" reports data block size 0");
159 return StatusCode::FAILURE;
162 ATH_MSG_WARNING(
"ROD 0x"<<std::hex<<rob.rod_source_id() << std::dec <<
" reports data block size 0");
169 ATH_MSG_ERROR(
"Failed to assign fragment pointer to LArRodBlockStructure");
170 return StatusCode::FAILURE;
173 ATH_MSG_WARNING(
"Failed to assign fragment pointer to LArRodBlockStructure");
185 ATH_MSG_ERROR(
"offline checksum = 0x" << MSG::hex << offsum << MSG::dec);
186 return StatusCode::FAILURE;
198 ATH_MSG_ERROR(
"Invalid FEB identifer 0x" << std::hex << fId.get_identifier32().get_compact());
199 return StatusCode::FAILURE;
201 ATH_MSG_WARNING(
"Invalid FEB identifer 0x" << std::hex << fId.get_identifier32().get_compact());
215 if (fcNb>=NthisFebChannel)
223 iquality = (quality & 0xFFFF);
233 std::vector<short> samples;
235 if (fcNb>=NthisFebChannel)
237 if (samples.size()==0)
continue;
246 std::unique_ptr<LArFebHeader> larFebHeader(
new LArFebHeader(fId));
248 febHeaders->
push_back(std::move(larFebHeader));
253 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ initialize()
StatusCode LArRawDataReadingAlg::initialize |
( |
| ) |
|
|
override |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_digitKey
◆ m_doDigits
bool LArRawDataReadingAlg::m_doDigits =true |
|
private |
◆ m_doFebHeaders
bool LArRawDataReadingAlg::m_doFebHeaders =true |
|
private |
◆ m_doRawChannels
bool LArRawDataReadingAlg::m_doRawChannels =true |
|
private |
◆ m_eventInfoKey
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_failOnCorruption
BooleanProperty LArRawDataReadingAlg::m_failOnCorruption {this,"FailOnCorruption",false,"Return FAILURE if data corruption is found"} |
|
private |
◆ m_febHeaderKey
◆ m_onlineId
◆ m_rawChannelKey
Initial value:{this,"LArRawChannelKey","LArRawChannels",
"SG key of the LArRawChannelContainer"}
Definition at line 34 of file LArRawDataReadingAlg.h.
◆ m_robDataProviderSvc
◆ m_varHandleArraysDeclared
◆ m_verifyChecksum
BooleanProperty LArRawDataReadingAlg::m_verifyChecksum {this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"} |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
def retrieve(aClass, aKey=None)
value_type emplace_back(value_type pElem)
Add an element to the end of the collection.
SG::WriteHandleKey< LArRawChannelContainer > m_rawChannelKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
virtual int getNextEnergy(int &channelNumber, int32_t &energy, int32_t &time, int32_t &quality, uint32_t &gain)
SG::WriteHandleKey< LArFebHeaderContainer > m_febHeaderKey
SG::WriteHandleKey< LArDigitContainer > m_digitKey
virtual uint32_t offlineCheckSum() const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
BooleanProperty m_verifyChecksum
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Liquid Argon digit base class.
int channelInSlotMax(const HWIdentifier Id) const
Return the Maximum channel number of a given feb slot.
::StatusCode StatusCode
StatusCode definition for legacy code.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
uint32_t getFEBID() const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
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.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
This class provides decoding/encoding from/to ROD format.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual StatusCode sysInitialize() override
Override sysInitialize.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
const LArOnlineID * m_onlineId
bool setFragment(const uint32_t *p, uint32_t n)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Container class for LArDigit.
virtual uint32_t onlineCheckSum() const
BooleanProperty m_failOnCorruption
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Container for LArRawChannel (IDC using LArRawChannelCollection)