 |
ATLAS Offline Software
|
#include <LArCelldeadOTXAlg.h>
|
virtual StatusCode | initialize () override final |
|
virtual StatusCode | execute (const EventContext &ctx) const override final |
|
| AthReentrantAlgorithm (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
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::ReadHandleKey< LArRawSCContainer > | m_SCKey {this, "keySC", "SC_ET","Key for SuperCells container"} |
|
SG::WriteHandleKey< LArDeadOTXFromSC > | m_deadOTXFromSCKey {this, "DeadOTXFromSC", "DeadOTXFromSC","DeadOTXFromSC"} |
|
SG::ReadCondHandleKey< LArBadFebCont > | m_MFKey {this, "keyMF", "LArBadFeb", "Key for missing FEBs"} |
|
SG::ReadCondHandleKey< LArBadChannelCont > | m_badSCKey {this, "BadSCKey", "LArBadChannelSC", "Key of the LArBadChannelCont SC" } |
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this, "keyCabling", "LArOnOffIdMap", "Key for the cabling"} |
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingSCKey {this, "keySCCabling", "LArOnOffIdMapSC", "Key for the cabling of the SC"} |
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"} |
|
Gaudi::Property< int > | m_scCut {this,"SCEneCut",70,"Do not use super-cells with values below this cut"} |
|
const LArOnlineID * | m_onlineID =nullptr |
|
const LArOnline_SuperCellID * | m_onlineSCID =nullptr |
|
const CaloCell_ID * | m_calo_id =nullptr |
|
ToolHandle< ICaloSuperCellIDTool > | m_scidtool {this, "CaloSuperCellIDTool", "CaloSuperCellIDTool", "Offline / SuperCell ID mapping tool"} |
|
std::once_flag m_onceFlag | ATLAS_THREAD_SAFE |
|
std::mutex | m_mtx |
|
std::vector< HWIdentifier > m_febs | ATLAS_THREAD_SAFE |
|
std::vector< std::vector< float > > m_multipliers | ATLAS_THREAD_SAFE |
|
std::vector< std::vector< uint32_t > > m_channels | ATLAS_THREAD_SAFE |
|
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 27 of file LArCelldeadOTXAlg.h.
◆ StoreGateSvc_t
◆ AthReentrantAlgorithm()
AthReentrantAlgorithm::AthReentrantAlgorithm |
Constructor with parameters:
Definition at line 90 of file AthReentrantAlgorithm.cxx.
30 std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
32 std::move (m_updateDataHandles));
◆ buildMap()
void LArCelldeadOTXAlg::buildMap |
( |
const EventContext & |
ctx, |
|
|
StatusCode & |
sc |
|
) |
| const |
|
private |
Definition at line 106 of file LArCelldeadOTXAlg.cxx.
108 sc = StatusCode::FAILURE;
111 if (!cablingHdl.isValid()) {
118 if (!cablingSCHdl.isValid()) {
119 ATH_MSG_ERROR(
"Do not have Onl-Ofl cabling map for SuperCells !!!!");
126 if (!mfHdl.isValid()) {
132 if (!caloMgrHandle.isValid()) {
140 if (!bcSCHdl.isValid()) {
146 const std::vector<std::pair<unsigned int, LArBadFeb> >& badFebs = mfHdl->
fullCont();
148 for (
const auto& idBF : badFebs) {
149 if (idBF.second.deadReadout()) {
151 m_febs.push_back(febid);
153 std::vector<float> vector_of_multipliers;
154 std::vector<uint32_t> vector_of_chans;
160 vector_of_multipliers.resize(nChans,0.0);
161 vector_of_chans.resize(nChans,0xffffffff);
162 for (
int ch = 0;
ch < nChans; ++
ch) {
169 vector_of_chans[
ch]=hashidSC.
value();
170 if (!bcSCCont->
status(scHwid).good()) {
172 <<
" is ignored b/c of it's bad-channel word. Connected to deadFEB channel " <<
m_onlineID->
channel_name(chid));
175 const unsigned nCell = (
m_scidtool->superCellToOfflineID(scID)).
size();
182 const float convFactor = 12.5 * (1.0 / nCell) * (1.0 / dde->
sinTh());
183 vector_of_multipliers[
ch]=convFactor;
185 m_multipliers.push_back(vector_of_multipliers);
186 m_channels.push_back(vector_of_chans);
190 sc = StatusCode::SUCCESS;
◆ 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 LArCelldeadOTXAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
keep this code here, but commented for future developement and testing purposes
Definition at line 33 of file LArCelldeadOTXAlg.cxx.
41 ATH_MSG_ERROR(
"Call to LArCelldeadOTXAlg::buidMap returned an error");
42 return StatusCode::FAILURE;
46 std::unique_ptr<LArDeadOTXFromSC> deadHandle = std::make_unique<LArDeadOTXFromSC>();
50 if (!scHdl.isValid()) {
52 return StatusCode::SUCCESS;
55 const unsigned int bcid = ctx.eventID().bunch_crossing_id();
59 std::vector<float> vecEnergies;
62 for (
const auto* supercell : *scells) {
68 const std::vector<unsigned short>& bcids = supercell->bcids();
69 const std::vector<int>& energies = supercell->energies();
70 const std::vector<bool>& satur = supercell->satur();
74 const size_t nBCIDs = bcids.size();
76 for (
i = 0;
i < nBCIDs && bcids[
i] !=
bcid;
i++)
85 vecEnergies[scIDHash]=scEne;
88 for(
size_t i=0;
i<m_channels.size();
i++){
89 std::vector<uint32_t>&
chans = m_channels.at(
i);
90 std::vector<float>& mults = m_multipliers.at(
i);
91 std::vector<float> cellEnergies;
92 cellEnergies.resize(128,0);
93 for(
size_t j=0; j<
chans.size(); j++) {
94 if (
chans[j] < 0xfffffffe ) cellEnergies[j] = mults[j]*vecEnergies[
chans[j]];
96 deadHandle->
addFEB(m_febs[
i],cellEnergies);
98 ATH_CHECK(deadHdl.record(std::move(deadHandle)) );
103 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 LArCelldeadOTXAlg::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ 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()
◆ ATLAS_THREAD_SAFE [1/4]
std::once_flag m_onceFlag LArCelldeadOTXAlg::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [2/4]
std::vector<HWIdentifier> m_febs LArCelldeadOTXAlg::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [3/4]
std::vector<std::vector<float> > m_multipliers LArCelldeadOTXAlg::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [4/4]
std::vector<std::vector<uint32_t> > m_channels LArCelldeadOTXAlg::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ m_badSCKey
◆ m_cablingKey
◆ m_cablingSCKey
◆ m_calo_id
◆ m_caloMgrKey
◆ m_deadOTXFromSCKey
◆ m_detStore
◆ 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_MFKey
◆ m_mtx
std::mutex LArCelldeadOTXAlg::m_mtx |
|
mutableprivate |
◆ m_onlineID
◆ m_onlineSCID
◆ m_scCut
Gaudi::Property<int> LArCelldeadOTXAlg::m_scCut {this,"SCEneCut",70,"Do not use super-cells with values below this cut"} |
|
private |
◆ m_scidtool
◆ m_SCKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const CaloCell_ID * m_calo_id
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
unsigned int value() const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Container class for LArRawSC.
SG::ReadCondHandleKey< LArBadChannelCont > m_badSCKey
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
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)
Gaudi::Property< int > m_scCut
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< SG::VarHandleKeyArray * > m_vhka
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
#define ATH_MSG_VERBOSE(x)
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
value_type get_compact() const
Get the compact id.
const LArOnline_SuperCellID * m_onlineSCID
SG::WriteHandleKey< LArDeadOTXFromSC > m_deadOTXFromSCKey
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
const BadChanVec & fullCont() const
SG::ReadCondHandleKey< LArBadFebCont > m_MFKey
const LArOnlineID * m_onlineID
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
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
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
void buildMap(const EventContext &ctx, StatusCode &sc) 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.
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
size_type channelHashMax(void) const
Define channel hash tables max size.
virtual StatusCode sysInitialize() override
Override sysInitialize.
StatusCode initialize(bool used=true)
setEventNumber setTimeStamp bcid
This class provides the client interface for accessing the detector description information common to...
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
#define ATH_MSG_WARNING(x)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingSCKey
ToolHandle< ICaloSuperCellIDTool > m_scidtool
SG::ReadHandleKey< LArRawSCContainer > m_SCKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
float sinTh() const
for algorithm working in transverse Energy
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void addFEB(HWIdentifier febid, std::vector< float > &vec)