ATLAS Offline Software
LinkInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGCOMPOSITEUTILS_LINKINFO_H
6 #define TRIGCOMPOSITEUTILS_LINKINFO_H
7 
9 #include "AthLinks/ElementLink.h"
11 
12 #include <set>
13 
14 namespace TrigCompositeUtils {
18  enum ActiveState {
21  INACTIVE
22  };
23 
27  template<typename T>
28  struct LinkInfo {
29  LinkInfo() = default;
32  : source{s}, link{l}, state{as} {
33  if (s)
34  {
35  decisions.insert(s->decisions().begin(), s->decisions().end());
36  }
37  }
38 
41  : source{s}, link{l}, state{as}, decisions(decisions) {}
42 
43  bool isValid() const {
44  return source && link.isValid();
45  }
49  operator StatusCode () {
50  return (isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
51  }
52 
59  const Decision* source{nullptr};
66  };
67 } //> end namespace TrigCompositeUtils
68 
69 #endif //> !TRIGCOMPOSITEUTILS_LINKINFO_H
TrigCompositeUtils::ActiveState
ActiveState
Additional information returned by the TrigerDecisionTool's feature retrieval, contained within the L...
Definition: LinkInfo.h:18
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigCompositeUtils::LinkInfo::source
const Decision * source
The node in the NavGraph for this feature.
Definition: LinkInfo.h:59
TrigCompositeUtils::LinkInfo::link
ElementLink< T > link
Link to the feature.
Definition: LinkInfo.h:61
TrigCompositeUtils::UNSET
@ UNSET
Default property of state.
Definition: LinkInfo.h:19
TrigCompositeUtils::LinkInfo::decisions
DecisionIDContainer decisions
All decision IDs active for this feature.
Definition: LinkInfo.h:65
TrigCompositeUtils::LinkInfo::isValid
bool isValid() const
Definition: LinkInfo.h:43
TrigCompositeUtils::LinkInfo::LinkInfo
LinkInfo()=default
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrigCompositeUtils::INACTIVE
@ INACTIVE
The link was inactive for all of the HLT Chains requested in the TDT.
Definition: LinkInfo.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigCompositeUtils::LinkInfo::state
ActiveState state
Was the linked feature active for any requested chains.
Definition: LinkInfo.h:63
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
StatusCode.h
TrigCompositeUtils::LinkInfo::LinkInfo
LinkInfo(const Decision *s, const ElementLink< T > &l, ActiveState as, const DecisionIDContainer &decisions)
Definition: LinkInfo.h:39
TrigCompositeUtils::LinkInfo::LinkInfo
LinkInfo(const Decision *s, const ElementLink< T > &l, ActiveState as=ActiveState::UNSET)
Definition: LinkInfo.h:30
TrigCompositeUtils::LinkInfo
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition: LinkInfo.h:28
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
TrigCompositeUtils::ACTIVE
@ ACTIVE
The link was still active for one-or-more of the HLT Chains requested in the TDT.
Definition: LinkInfo.h:20
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
TrigComposite.h