22 ISvcLocator* pSvcLocator)
32 ATH_MSG_ERROR(
"OutputNamesMap property must contain at least one entry.");
33 return StatusCode::FAILURE;
51 return StatusCode::SUCCESS;
61 return StatusCode::FAILURE;
69 std::vector<std::pair<int, SG::WriteDecorHandle<xAOD::JetContainer, float>>>
73 outHandles.emplace_back(
index,
81 <<
"' not found for the specified jet collection.");
82 return StatusCode::FAILURE;
85 const auto& inVec = vectorReader(*
jet);
87 if (inVec.size() <
static_cast<size_t>(
m_maxIndex + 1)) {
89 <<
" is smaller than the maximum index used in "
91 return StatusCode::FAILURE;
94 for (
auto& [
index, handle] : outHandles) {
99 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
VectorExploderAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::map< int, std::string > > m_outputNamesMap
Mapping from vector index to output scalar decoration name.
SG::ReadHandleKey< xAOD::JetContainer > m_collectionKey
Input jet collection.
virtual StatusCode initialize() override
SG::ReadDecorHandleKey< xAOD::JetContainer > m_inputVectorKey
Name of the input vector<float> decoration to explode.
int m_maxIndex
Maximum index used in OutputNamesMap (for bounds check).
std::vector< std::pair< int, SG::WriteDecorHandleKey< xAOD::JetContainer > > > m_outputKeys
Initialized output keys (index, WriteDecorHandleKey) pairs.
virtual StatusCode execute(const EventContext &ctx) const override
Handle class for reading a decoration on an object.
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
Jet_v1 Jet
Definition of the current "jet version".