|
ATLAS Offline Software
|
Go to the documentation of this file.
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>();
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);
87 ATH_CHECK( roi_outputHandle.record(std::move(outputRoIColl)) );
90 return StatusCode::SUCCESS;
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
xAOD::TrigCompositeContainer DecisionContainer
std::string find(const std::string &s)
return a remapped string
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
bool empty() const
Test if the key is blank.
bool isValid() const
Test to see if the link can be dereferenced.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
Default, invalid implementation of ClassID_traits.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
xAOD::TrigComposite Decision
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
virtual bool isFullscan() const override final
is this a full scan RoI?
const std::string & roiString()
Athena::TPCnvVers::Current TrigRoiDescriptor
size_type size() const noexcept
Returns the number of elements in the collection.