|
ATLAS Offline Software
|
#include <MuonPRD_MultiTruthMaker.h>
|
| MuonPRD_MultiTruthMaker (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 |
|
|
template<class PrepDataContainer , class SIMDATACOLLECTION > |
StatusCode | buildPRD_Truth (SG::ReadHandleKey< PrepDataContainer > prepDataKey, SG::ReadHandleKey< SIMDATACOLLECTION > sdoKey, const SG::WriteHandleKey< PRD_MultiTruthCollection > &outputKey) |
|
template<class PRD_Container_Iterator , class SIMDATACOLLECTION > |
void | addPRDCollections (SG::WriteHandle< PRD_MultiTruthCollection > &prdTruth, PRD_Container_Iterator collections_begin, PRD_Container_Iterator collections_end, SG::ReadHandle< SIMDATACOLLECTION > simDataMap) |
|
template<class PRD_Collection_Iterator , class SIMDATACOLLECTION > |
void | addPRDRange (SG::WriteHandle< PRD_MultiTruthCollection > &prdTruth, PRD_Collection_Iterator range_begin, PRD_Collection_Iterator range_end, SG::ReadHandle< SIMDATACOLLECTION > simDataMap) |
|
template<class SIMDATACOLLECTION > |
void | addPrepRawDatum (SG::WriteHandle< PRD_MultiTruthCollection > &prdTruth, const Trk::PrepRawData *prd, SG::ReadHandle< SIMDATACOLLECTION > simDataMap) |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 27 of file MuonPRD_MultiTruthMaker.h.
◆ StoreGateSvc_t
◆ MuonPRD_MultiTruthMaker()
MuonPRD_MultiTruthMaker::MuonPRD_MultiTruthMaker |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ addPRDCollections()
template<class PRD_Container_Iterator , class SIMDATACOLLECTION >
Definition at line 126 of file MuonPRD_MultiTruthMaker.cxx.
129 for (PRD_Container_Iterator colNext = collections_begin; colNext != collections_end; ++colNext) {
130 addPRDRange(prdTruth, (*colNext)->begin(), (*colNext)->end(), simDataMap);
◆ addPRDRange()
template<class PRD_Collection_Iterator , class SIMDATACOLLECTION >
Definition at line 137 of file MuonPRD_MultiTruthMaker.cxx.
139 for (PRD_Collection_Iterator nextDatum = range_begin; nextDatum != range_end; nextDatum++) {
◆ addPrepRawDatum()
template<class SIMDATACOLLECTION >
Definition at line 146 of file MuonPRD_MultiTruthMaker.cxx.
151 bool gotValidParticle =
false;
154 for (
const auto& nextRDO : prd->
rdoList()) {
155 typename SIMDATACOLLECTION::const_iterator iter(simDataMap->find(nextRDO));
157 if (iter != simDataMap->end()) {
160 typedef typename SIMDATACOLLECTION::mapped_type SIMDATA;
161 const SIMDATA& sdo = iter->second;
162 const std::vector<typename SIMDATA::Deposit>& deposits = sdo.getdeposits();
163 if (deposits.empty()) {
continue; }
164 for (
const auto& [particleLink, mcData] : deposits) {
165 ATH_MSG_VERBOSE(
"addPrepRawDatum(): particleLink.isValid() " << particleLink.isValid());
166 ATH_MSG_VERBOSE(
"addPrepRawDatum(): Barcode " << particleLink.barcode() <<
" evt " << particleLink.eventIndex());
167 if (particleLink.isValid()) {
168 gotValidParticle =
true;
173 std::pair<truthiter, truthiter>
r = prdTruth->equal_range(prd->
identify());
174 const auto& pl = particleLink;
175 if (
r.second == std::find_if(
r.first,
r.second, [pl](
const PRD_MultiTruthCollection::value_type& prd_to_truth) {
176 return prd_to_truth.second == pl;
178 prdTruth->insert(std::make_pair(prd->
identify(), particleLink));
185 if (gotSDO && !gotValidParticle) {
188 ATH_MSG_DEBUG(
"addPrepRawDatum(): got SDO but no particles");
◆ buildPRD_Truth()
template<class PrepDataContainer , class SIMDATACOLLECTION >
Definition at line 95 of file MuonPRD_MultiTruthMaker.cxx.
99 if (!simDataMap.isPresent()) {
100 ATH_MSG_DEBUG(
"SimDataCollection for key=" << sdoKey.
key() <<
" not in storegate, not adding it ");
101 return StatusCode::SUCCESS;
104 if (!simDataMap.isValid()) {
106 return StatusCode::FAILURE;
110 if (!prdContainer.isValid()) {
112 return StatusCode::FAILURE;
118 ATH_CHECK(
output.record(std::make_unique<PRD_MultiTruthCollection>()));
121 return StatusCode::SUCCESS;
◆ 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 MuonPRD_MultiTruthMaker::execute |
( |
| ) |
|
|
virtual |
Definition at line 65 of file MuonPRD_MultiTruthMaker.cxx.
68 std::vector<StatusCode> retvals;
86 for (std::vector<StatusCode>::const_iterator
i = retvals.begin();
i != retvals.end(); ++
i) {
87 if (
i->isFailure()) ok =
false;
89 if (ok)
return StatusCode::SUCCESS;
90 return StatusCode::FAILURE;
◆ 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 & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ initialize()
StatusCode MuonPRD_MultiTruthMaker::initialize |
( |
| ) |
|
|
virtual |
◆ 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.
◆ 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()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_CSC_ContainerName
◆ m_CSC_PRD_TruthName
◆ m_CSC_SimDataMapName
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_idHelperSvc
◆ m_MDT_ContainerName
◆ m_MDT_PRD_TruthName
◆ m_MDT_SimDataMapName
◆ m_MM_ContainerName
◆ m_MM_PRD_TruthName
◆ m_MM_SimDataMapName
◆ m_RPC_ContainerName
◆ m_RPC_PRD_TruthName
◆ m_RPC_SimDataMapName
◆ m_STGC_ContainerName
◆ m_STGC_PRD_TruthName
◆ m_STGC_SimDataMapName
◆ m_TGC_ContainerName
◆ m_TGC_PRD_TruthName
◆ m_TGC_SimDataMapName
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
SG::ReadHandleKey< MuonSimDataCollection > m_MDT_SimDataMapName
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_MM_ContainerName
SG::ReadHandleKey< MuonSimDataCollection > m_MM_SimDataMapName
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
SG::WriteHandleKey< PRD_MultiTruthCollection > m_CSC_PRD_TruthName
SG::WriteHandleKey< PRD_MultiTruthCollection > m_MM_PRD_TruthName
void addPRDRange(SG::WriteHandle< PRD_MultiTruthCollection > &prdTruth, PRD_Collection_Iterator range_begin, PRD_Collection_Iterator range_end, SG::ReadHandle< SIMDATACOLLECTION > simDataMap)
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< MuonSimDataCollection > m_TGC_SimDataMapName
SG::WriteHandleKey< PRD_MultiTruthCollection > m_STGC_PRD_TruthName
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_TGC_ContainerName
virtual void setOwner(IDataHandleHolder *o)=0
void addPRDCollections(SG::WriteHandle< PRD_MultiTruthCollection > &prdTruth, PRD_Container_Iterator collections_begin, PRD_Container_Iterator collections_end, SG::ReadHandle< SIMDATACOLLECTION > simDataMap)
SG::WriteHandleKey< PRD_MultiTruthCollection > m_TGC_PRD_TruthName
virtual StatusCode sysInitialize() override
Override sysInitialize.
SG::ReadHandleKey< MuonSimDataCollection > m_STGC_SimDataMapName
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_STGC_ContainerName
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.
virtual void renounce()=0
SG::ReadHandleKey< CscSimDataCollection > m_CSC_SimDataMapName
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Identifier identify() const
return the identifier
SG::ReadHandleKey< MuonSimDataCollection > m_RPC_SimDataMapName
SG::WriteHandleKey< PRD_MultiTruthCollection > m_MDT_PRD_TruthName
SG::WriteHandleKey< PRD_MultiTruthCollection > m_RPC_PRD_TruthName
DataObjIDColl m_extendedExtraObjects
void addPrepRawDatum(SG::WriteHandle< PRD_MultiTruthCollection > &prdTruth, const Trk::PrepRawData *prd, SG::ReadHandle< SIMDATACOLLECTION > simDataMap)
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_MDT_ContainerName
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_CSC_ContainerName
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_RPC_ContainerName
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>