16 ISvcLocator* pSvcLocator ) :
26 if (not tool.empty()) {
31 return StatusCode::SUCCESS;
46 if( not h_prevDecisions.isValid() || h_prevDecisions->size() ==0) {
48 return StatusCode::SUCCESS;
51 if(h_prevDecisions->size() != 1){
53 <<
" (L1 RoIs not used), found " << h_prevDecisions->size());
54 return StatusCode::FAILURE;
58 const Decision* previousDecision = prevDecisions->
at(0);
78 CHECK(
decide(jets, previousDecision, outputDecisions, context));
83 return StatusCode::SUCCESS;
90 const EventContext& context)
const{
95 std::vector<std::pair<const xAOD::Jet*,Decision*>> jetHypoInputs;
96 jetHypoInputs.reserve(jets->size());
119 jetHypoInputs.push_back( std::make_pair(
jet, newDecision) );
149 newDecision->
setDetail<int32_t>(
"noCombo", 1);
152 jetHypoInputs.push_back( std::make_pair(
jet, newDecision) );
165 msg() <<
"IDs of active legs:" <<
endmsg;
166 for(
auto decisionID: previousDecisionIDs) {
172 std::transform(previousDecisionIDs.begin(), previousDecisionIDs.end(),
173 std::inserter(leglessPreviousDecisionIDs,leglessPreviousDecisionIDs.begin()),
175 {return TrigCompositeUtils::getIDFromLeg(HLT::Identifier(id)).numeric();}
178 msg() <<
"IDs of active chains:" <<
endmsg;
179 for(
auto decisionID: leglessPreviousDecisionIDs) {
188 previousDecisionIDs.insert(leglessPreviousDecisionIDs.begin(), leglessPreviousDecisionIDs.end());
194 ATH_MSG_DEBUG(
"Now computing decision for " << tool->name());
195 CHECK(tool->decide(jets, previousDecisionIDs, jetHypoInputs));
198 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define CHECK(...)
Evaluate an expression and check for errors.
bool msgLvl(const MSG::Level lvl) const
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.
Gaudi::Property< bool > m_doPresel
TrigJetHypoAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
StatusCode decide(const xAOD::JetContainer *jets, const TrigCompositeUtils::Decision *previousDecision, TrigCompositeUtils::DecisionContainer *outputDecisions, const EventContext &context) const
Populate outputDecisions and run all HypoTools over the jet collection.
SG::ReadHandleKey< xAOD::JetContainer > m_jetsKey
virtual StatusCode execute(const EventContext &context) const override
ToolHandleArray< TrigJetHypoTool > m_hypoTools
bool setObjectLink(const std::string &name, const ElementLink< CONTAINER > &link)
Set the link to an object.
bool hasObjectLink(const std::string &name, const CLID clid=CLID_NULL) const
Check if a link to an object with a given name and type exists. CLID_NULL to not check type.
bool setDetail(const std::string &name, const TYPE &value)
Set an TYPE detail on the object.
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()
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()
LinkInfo< T > findLink(const Decision *start, const std::string &linkName, const bool suppressMultipleLinksWarning=false)
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision obj...
const std::string & initialRoIString()
xAOD::TrigCompositeContainer DecisionContainer
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".