![]() |
ATLAS Offline Software
|
Tool that keeps track of modules that give rise to errors in the bytestram. More...
#include <SCT_ByteStreamErrorsTool.h>
Classes | |
| struct | IDCCacheEntry |
Public Member Functions | |
| SCT_ByteStreamErrorsTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| header file for this class. | |
| virtual | ~SCT_ByteStreamErrorsTool ()=default |
| virtual StatusCode | initialize () override |
| Initialize. | |
| virtual StatusCode | finalize () override |
| Finalize. | |
| virtual bool | canReportAbout (InDetConditions::Hierarchy h) const override |
| Used by ConditionsSummayTool to decide whether to call isGood() for a particular detector element. | |
| virtual bool | isGood (const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Is the detector element good? | |
| virtual bool | isGood (const Identifier &elementId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| virtual bool | isGood (const IdentifierHash &elementIdHash) const override |
| virtual bool | isGood (const IdentifierHash &elementIdHash, const EventContext &ctx) const override |
| this is the principle method which can be accessed via the ConditionsSummaryTool to decide if a wafer is good - in this case we want to return false if the wafer has an error that would result in bad hits or no hits for that event | |
| virtual void | getDetectorElementStatus (const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override |
| virtual std::set< IdentifierHash > | getErrorSet (int errorType, const EventContext &ctx) const override |
| The accessor method that can be used by clients to retrieve a set of IdHashes of wafers with a given type of error. | |
| virtual std::set< IdentifierHash > | getErrorSet (int errorType) const override |
| virtual unsigned int | tempMaskedChips (const Identifier &moduleId, const EventContext &ctx) const override |
| virtual unsigned int | tempMaskedChips (const Identifier &moduleId) const override |
| virtual unsigned int | abcdErrorChips (const Identifier &moduleId) const override |
| virtual unsigned int | abcdErrorChips (const Identifier &moduleId, const EventContext &ctx) const override |
Private Types | |
| enum | N_ELEMENTS { N_CHIPS_PER_SIDE = 6 , N_SIDES = 2 , N_STRIPS_PER_CHIP = 128 , N_STRIPS_PER_SIDE = N_STRIPS_PER_CHIP*N_CHIPS_PER_SIDE } |
Private Member Functions | |
| const IDCInDetBSErrContainer * | getContainer (const EventContext &ctx) const |
| Obtains container form the SG, if it is missing it will complain (hard-coded 3 times per job) and return nullptr. | |
| IDCCacheEntry * | getCacheEntry (const EventContext &ctx) const |
| Return cache for the current event If, for current slot, the cache is outdated it is retrieved from the IDC collection. | |
| StatusCode | fillData (const EventContext &ctx) const |
| Updates information per module & ABCD chip. | |
| bool | isGoodChip (const Identifier &stripId, const EventContext &ctx) const |
| int | getChip (const Identifier &stripId, const EventContext &ctx) const |
| const InDetDD::SiDetectorElement * | getDetectorElement (const IdentifierHash &waferHash, const EventContext &ctx) const |
| std::pair< StatusCode, unsigned int > | getErrorCodeWithCacheUpdate (const Identifier &id, const EventContext &ctx, std::unordered_map< size_t, unsigned int > &whereExected) const |
| Method that returns BS Error code from the map passed @rag where-Expected If the information is initially missing, the cache update is triggered. | |
Private Attributes | |
| ToolHandle< ISCT_ConfigurationConditionsTool > | m_config |
| SG::ReadHandleKey< IDCInDetBSErrContainer > | m_bsIDCErrContainerName {this, "IDCByteStreamErrContainer", "SCT_ByteStreamErrs", "SCT BS error key for IDC variant"} |
| SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"} |
| const SCT_ID * | m_sct_id {nullptr} |
| IdContext | m_cntx_sct |
| uint64_t | m_badErrorMask {} |
| SG::SlotSpecificObj< std::mutex > m_cacheMutex | ATLAS_THREAD_SAFE |
| SG::SlotSpecificObj< IDCCacheEntry > m_eventCache | ATLAS_THREAD_SAFE |
| std::atomic_uint | m_nRetrievalFailure {0} |
Tool that keeps track of modules that give rise to errors in the bytestram.
The API offers two levels of access, 1) by identifier 2) for "all event" In 1st case the information from entire event is used via the cache if IDC container that keeps an information about errors for so far decoded SCT data. That access pattern is identical for HLT and offline use-case. Missing data in the cache is sign of error.
The 2nd patter is to request error information for the whole event. In case of trigger these methods can in fact return information for the fragment of the detector data. This depends on the IDC container that the tool is configured to read.
There are two levels of caching involved in data access. First the IDC stores actual BS error codes in the event-wide container called cache. Even if the IDC container may be different, this cache remains the same for the whole event. Secondly the tool itself has a cache that is essentially needed to avoid going to the event store for the IDC container for each call. Inside this local cache object derived information is stored to speed up calls like isGood.
Definition at line 64 of file SCT_ByteStreamErrorsTool.h.
|
private |
| Enumerator | |
|---|---|
| N_CHIPS_PER_SIDE | |
| N_SIDES | |
| N_STRIPS_PER_CHIP | |
| N_STRIPS_PER_SIDE | |
Definition at line 95 of file SCT_ByteStreamErrorsTool.h.
| SCT_ByteStreamErrorsTool::SCT_ByteStreamErrorsTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
header file for this class.
Athena includes Constructor
Definition at line 23 of file SCT_ByteStreamErrorsTool.cxx.
|
virtualdefault |
|
overridevirtual |
Definition at line 474 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Definition at line 457 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Used by ConditionsSummayTool to decide whether to call isGood() for a particular detector element.
In principle we could report about modules and/or strips too, and use the id helper to navigate up or down the hierarchy to the wafer, but in practice we don't want to do the time-consuming isGood() for every strip, so lets only report about wafers..
Definition at line 67 of file SCT_ByteStreamErrorsTool.cxx.
|
private |
Updates information per module & ABCD chip.
this function is used to populate the data of this tool from the InDetBSErrContainer in StoreGate
OK, so we found the StoreGate container, now lets iterate over it to populate the sets of errors owned by this Tool.
Definition at line 363 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Finalize.
Definition at line 52 of file SCT_ByteStreamErrorsTool.cxx.
|
nodiscardprivate |
Return cache for the current event If, for current slot, the cache is outdated it is retrieved from the IDC collection.
If the IDC is missing nullptr is returned.
Definition at line 94 of file SCT_ByteStreamErrorsTool.cxx.
|
private |
Definition at line 312 of file SCT_ByteStreamErrorsTool.cxx.
|
nodiscardprivate |
Obtains container form the SG, if it is missing it will complain (hard-coded 3 times per job) and return nullptr.
When running over ESD files without BSErr container stored, don't want to flood the user with error messages. Should just have a bunch of empty sets, and keep quiet.
Definition at line 71 of file SCT_ByteStreamErrorsTool.cxx.
|
private |
Definition at line 509 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Definition at line 162 of file SCT_ByteStreamErrorsTool.cxx.
|
private |
Method that returns BS Error code from the map passed @rag where-Expected If the information is initially missing, the cache update is triggered.
Definition at line 479 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Definition at line 351 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
The accessor method that can be used by clients to retrieve a set of IdHashes of wafers with a given type of error.
e.g. for monitoring plots.
Definition at line 331 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Initialize.
Definition at line 30 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Definition at line 247 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Is the detector element good?
Definition at line 262 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Definition at line 240 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
this is the principle method which can be accessed via the ConditionsSummaryTool to decide if a wafer is good - in this case we want to return false if the wafer has an error that would result in bad hits or no hits for that event
Definition at line 113 of file SCT_ByteStreamErrorsTool.cxx.
|
private |
Definition at line 268 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Definition at line 452 of file SCT_ByteStreamErrorsTool.cxx.
|
overridevirtual |
Definition at line 435 of file SCT_ByteStreamErrorsTool.cxx.
|
mutableprivate |
Definition at line 107 of file SCT_ByteStreamErrorsTool.h.
|
mutableprivate |
Definition at line 136 of file SCT_ByteStreamErrorsTool.h.
|
private |
Definition at line 105 of file SCT_ByteStreamErrorsTool.h.
|
private |
Definition at line 100 of file SCT_ByteStreamErrorsTool.h.
|
private |
Definition at line 104 of file SCT_ByteStreamErrorsTool.h.
|
private |
Definition at line 97 of file SCT_ByteStreamErrorsTool.h.
|
mutableprivate |
Definition at line 142 of file SCT_ByteStreamErrorsTool.h.
|
private |
Definition at line 103 of file SCT_ByteStreamErrorsTool.h.
|
private |
Definition at line 101 of file SCT_ByteStreamErrorsTool.h.