7#include "Gaudi/Property.h"
12 ISvcLocator* pSvcLocator) :
19 return StatusCode::SUCCESS;
28 ATH_MSG_DEBUG(
"Retrieving HI event shape container using key: " << esHandle.key());
34 ATH_MSG_DEBUG(
"Running with " << prevDecisionsHandle->size() <<
" implicit ReadHandles for previous decisions");
42 ATH_CHECK(
decide(eventShapeContainer, newDecisions, prevDecisions, context));
47 return StatusCode::SUCCESS;
54 const EventContext& context)
const {
57 if (oldDecisions->
size() != 1) {
58 ATH_MSG_ERROR(
"TrigHIEventShapeHypoAlg requires there to be exactly one previous Decision object, but found " << oldDecisions->
size());
59 return StatusCode::FAILURE;
63 if (eventShapeContainer->
size()==0) {
64 ATH_MSG_ERROR(
"There are no HIEventShape objects in the container");
65 return StatusCode::FAILURE;
82 auto decisionId = tool->getId();
87 ATH_CHECK(tool->decide(eventShapeContainer, pass));
102 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
ElementLink implementation for ROOT usage.
const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > & decisionInput() const
methods for derived classes to access handles of the base class input other read/write handles may be...
const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & decisionOutput() const
methods for derived classes to access handles of the base class output other read/write handles may b...
StatusCode hypoBaseOutputProcessing(SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle, MSG::Level lvl=MSG::DEBUG) const
Base class function to be called once slice specific code has finished. Handles debug printing and va...
HypoBase(const std::string &name, ISvcLocator *pSvcLocator)
constructor, to be called by sub-class constructors
pointer_type ptr()
Dereference the pointer.
virtual StatusCode initialize() override
ToolHandleArray< ITrigHIEventShapeHypoTool > m_hypoTools
TrigHIEventShapeHypoAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_esKey
virtual StatusCode execute(const EventContext &context) const override
StatusCode decide(const xAOD::HIEventShapeContainer *eventShapeContainer, TrigCompositeUtils::DecisionContainer *newDecisions, const TrigCompositeUtils::DecisionContainer *oldDecisions, const EventContext &context) const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
xAOD::TrigComposite Decision
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
const std::string & featureString()
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
std::set< DecisionID > DecisionIDContainer
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 & hypoAlgNodeName()
xAOD::TrigCompositeContainer DecisionContainer
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.