Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
NodeConnector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONINFERENCEINTERACES_NODECONNECTOR_H
5 #define MUONINFERENCEINTERACES_NODECONNECTOR_H
6 
7 #include <string>
8 #include <functional>
9 
11 namespace MuonML{
19  class NodeConnector {
20  public:
25  using Evaluator_t = std::function<bool(const Bucket_t&, size_t, size_t)>;
30  NodeConnector(const std::string& cName, const Evaluator_t conFunc):
31  m_name{cName}, m_func{conFunc} {}
33  const std::string& name() const {
34  return m_name;
35  }
40  bool connect(const Bucket_t& bucket, size_t i, size_t j) const {
41  return m_func(bucket, i, j);
42  }
43 
44  private:
45  std::string m_name{};
46  Evaluator_t m_func{[](const Bucket_t, size_t, size_t) { return false; }};
47 
48  };
49 }
50 #endif
MuonML::NodeConnector::m_func
Evaluator_t m_func
Definition: NodeConnector.h:46
MuonML::NodeFeature::Bucket_t
LayerSpBucket Bucket_t
Abreviation of the Space point bucket type.
Definition: NodeFeature.h:19
MuonML::NodeConnector::Bucket_t
NodeFeature::Bucket_t Bucket_t
Definition: NodeConnector.h:21
MuonML::NodeConnector::NodeConnector
NodeConnector(const std::string &cName, const Evaluator_t conFunc)
Standard constructor taking the name of the node connector & a connector function definition.
Definition: NodeConnector.h:30
MuonML
Definition: GraphBucketFilterTool.cxx:9
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonML::NodeConnector
The NodeConnector is indicating whether two space points inside a bucket, the graph nodes,...
Definition: NodeConnector.h:19
NodeFeature.h
MuonML::LayerSpBucket
The LayerSpBucket is a space pointbucket where the points are internally sorted by their layer number...
Definition: LayerBucket.h:14
MuonML::NodeConnector::connect
bool connect(const Bucket_t &bucket, size_t i, size_t j) const
returns the decision of the connector function
Definition: NodeConnector.h:40
MuonML::NodeConnector::Evaluator_t
std::function< bool(const Bucket_t &, size_t, size_t)> Evaluator_t
Function type to connect two space points in a bucket.
Definition: NodeConnector.h:25
MuonML::NodeConnector::m_name
std::string m_name
Definition: NodeConnector.h:45
MuonML::NodeConnector::name
const std::string & name() const
Returns the name of the node connector.
Definition: NodeConnector.h:33
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60