26 return StatusCode::FAILURE;
28 return StatusCode::SUCCESS;
40 if( outputHandle->size() == 0) {
41 ATH_MSG_DEBUG(
"Have no decisions in output handle "<< outputHandle.
key() <<
". Handle is valid but container is empty. "
42 <<
"This can happen if a ROI-based HLT chain leg was activated in a chain whose L1 item which does not explicitly require the ROI.");
44 ATH_MSG_DEBUG(
"Have output " << outputHandle.
key() <<
" with " << outputHandle->size() <<
" elements" );
51 ATH_MSG_DEBUG(
"No concrete output ROI collection required from this InputMaker.");
52 return StatusCode::SUCCESS;
56 std::unique_ptr<TrigRoiDescriptorCollection> outputRoIColl = std::make_unique<TrigRoiDescriptorCollection>();
57 outputRoIColl->reserve(outputHandle->size());
59 std::vector <ElementLink<TrigRoiDescriptorCollection> > RoIsFromDecision;
60 RoIsFromDecision.reserve(outputHandle->size());
63 for (
const Decision* outputDecision : *outputHandle) {
66 ATH_MSG_ERROR(
"No '" <<
roiString() <<
"'link was attached by the ROITool. Decision object dump:" << *outputDecision);
67 return StatusCode::FAILURE;
73 if (
find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL) == RoIsFromDecision.end() ) {
74 RoIsFromDecision.push_back(roiEL);
79 outputRoIColl->push_back(newroi);
85 ATH_MSG_DEBUG(
"Produced "<<outputRoIColl->size() <<
" output RoIs");
87 ATH_CHECK( roi_outputHandle.record(std::move(outputRoIColl)) );
90 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
const std::string & roiString()
Athena::TPCnvVers::Current TrigRoiDescriptor
ElementLink implementation for ROOT usage.
bool isValid() const
Test to see if the link can be dereferenced.
virtual bool isFullscan() const override final
is this a full scan RoI?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
std::string find(const std::string &s)
return a remapped string
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
xAOD::TrigComposite Decision
const std::string & roiString()
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
xAOD::TrigCompositeContainer DecisionContainer