ATLAS Offline Software
HypoBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DECISIONHANDLING_HYPOBASE_H
6 #define DECISIONHANDLING_HYPOBASE_H 1
7 
12 
21  public:
23  HypoBase( const std::string& name, ISvcLocator* pSvcLocator );
25  virtual ~HypoBase();
27  virtual StatusCode sysInitialize() override;
28 
31  MsgStream& msg,
32  bool onlyValidateOneStep = true,
33  bool runTwoConversion = false);
34 
35  protected:
36 
45  MSG::Level lvl = MSG::DEBUG) const;
46 
47  private:
48 
51 
54  kRequireAll //<! Require all DecisionIDs to be present in all of my parent Decision objects
55  };
56 
59  MsgStream& msg);
60 
63  MsgStream& msg,
65 
68  MsgStream& msg);
69 
72  MsgStream& msg);
73 
76  MsgStream& msg,
77  bool runTwoConversion);
78 
81  MsgStream& msg,
82  bool onlyValidateOneStep,
83  bool runTwoConversion,
84  size_t callDepth,
85  std::set<const TrigCompositeUtils::Decision*>& fullyExploredFrom);
86 
88  static void printBangs(MsgStream& msg);
89 
92  MsgStream& msg);
93 
95 
98  MSG::Level lvl) const;
99 
101  SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_input { this, "HypoInputDecisions", "UNSPECIFIED_INPUT", "Input Decision (implicit)" };
103  SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_output { this, "HypoOutputDecisions", "UNSPECIFIED_OUTPUT", "Ouput Decision" };
105  Gaudi::Property<bool> m_runtimeValidation { this, "RuntimeValidation", false, "Enable detailed runtime validation of HypoAlg output, and upstream Decisions." };
106 
107  // for future implementation: ToolHandleArray<ITestHypoTool> m_tools { this, "HypoTools", {}, "Hypo tools" };
108 
109 
110 };
111 
112 
113 #endif // DECISIONHANDLING_HYPOBASE_H
ReadHandleKeyArray.h
TrigCompositeUtils.h
HypoBase::decisionInput
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...
Definition: HypoBase.cxx:16
HypoBase::printBangs
static void printBangs(MsgStream &msg)
Print header line.
Definition: HypoBase.cxx:388
HypoBase::kRequireAll
@ kRequireAll
Definition: HypoBase.h:54
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
HypoBase::decisionOutput
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...
Definition: HypoBase.cxx:20
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
AthAlgorithm.h
HypoBase::recursiveValidateGraph
static StatusCode recursiveValidateGraph(const ElementLink< TrigCompositeUtils::DecisionContainer > &dEL, MsgStream &msg, bool onlyValidateOneStep, bool runTwoConversion, size_t callDepth, std::set< const TrigCompositeUtils::Decision * > &fullyExploredFrom)
Execute all checks on one node in the graph, d, then recursive call self on all parent nodes up to L1...
Definition: HypoBase.cxx:69
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
HypoBase::validateDuplicatedDecisionID
static StatusCode validateDuplicatedDecisionID(const ElementLink< TrigCompositeUtils::DecisionContainer > &dEL, MsgStream &msg)
Ensure that no space is being wasted by duplicated DecisionIDs in any Decision objects.
Definition: HypoBase.cxx:227
HypoBase::hypoBaseOutputProcessing
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...
Definition: HypoBase.cxx:33
HypoBase::m_runtimeValidation
Gaudi::Property< bool > m_runtimeValidation
Enabling of detailed validation checks for use during development.
Definition: HypoBase.h:105
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HypoBase::m_input
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_input
input decisions
Definition: HypoBase.h:101
Preparation.mode
mode
Definition: Preparation.py:94
HypoBase::validateLogicalFlow
static StatusCode validateLogicalFlow(const ElementLink< TrigCompositeUtils::DecisionContainer > &dEL, MsgStream &msg, const LogicalFlowCheckMode mode)
Ensure that all DecisionIDs have propagated correctly from their parent.
Definition: HypoBase.cxx:245
HypoBase::validateDecisionIDs
static StatusCode validateDecisionIDs(const ElementLink< TrigCompositeUtils::DecisionContainer > &dEL, MsgStream &msg)
Ensure that all present IDs correspond to configured chains.
Definition: HypoBase.cxx:207
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
HypoBase
Hypothesis algorithms take the output of reco algorithms and the decision from the preceeding InputMa...
Definition: HypoBase.h:13
HypoBase::~HypoBase
virtual ~HypoBase()
destructor
Definition: HypoBase.cxx:13
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
HypoBase::printDebugInformation
StatusCode printDebugInformation(SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle, MSG::Level lvl) const
Common base function to print information on chains passed by objects considered in the hypo.
Definition: HypoBase.cxx:404
HypoBase::validateParentLinking
static StatusCode validateParentLinking(const ElementLink< TrigCompositeUtils::DecisionContainer > &dEL, MsgStream &msg, bool runTwoConversion)
Ensure that the Decision has at least one valid parent, unless it is a initial Decision from the HLTS...
Definition: HypoBase.cxx:133
DEBUG
#define DEBUG
Definition: page_access.h:11
HypoBase::HypoBase
HypoBase(const std::string &name, ISvcLocator *pSvcLocator)
constructor, to be called by sub-class constructors
Definition: HypoBase.cxx:10
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
HypoBase::m_output
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_output
output decisions
Definition: HypoBase.h:103
HypoBase::sysInitialize
virtual StatusCode sysInitialize() override
initialise this base class
Definition: HypoBase.cxx:24
HypoBase::runtimeValidation
static StatusCode runtimeValidation(SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle, MsgStream &msg, bool onlyValidateOneStep=true, bool runTwoConversion=false)
Executes all individual runtime tests.
Definition: HypoBase.cxx:45
HypoBase::validateHasLinks
static StatusCode validateHasLinks(const ElementLink< TrigCompositeUtils::DecisionContainer > &dEL, MsgStream &msg)
Ensure all Decisions have the named ElementLink graph edges which they are required to by spec.
Definition: HypoBase.cxx:336
HypoBase::LogicalFlowCheckMode
LogicalFlowCheckMode
Definition: HypoBase.h:52
HypoBase::printErrorHeader
static void printErrorHeader(const ElementLink< TrigCompositeUtils::DecisionContainer > &dEL, MsgStream &msg)
A problem was found, print common output data.
Definition: HypoBase.cxx:393
HypoBase::kRequireOne
@ kRequireOne
Require all DecisionIDs to be present in at least one of my parent Decision objects.
Definition: HypoBase.h:53