ATLAS Offline Software
Loading...
Searching...
No Matches
NodeFeatureList.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_GRAPHFEATURELIST_H
5#define MUONINFERENCEINTERACES_GRAPHFEATURELIST_H
6
9
10class MsgStream;
11
12namespace MuonML {
13 struct GraphRawData;
15 public:
16
17 using Feature_t = std::shared_ptr<const NodeFeature>;
18 using Connector_t = std::shared_ptr<const NodeConnector>;
19
22 NodeFeatureList() = default;
25 bool operator==(const NodeFeatureList& other) const;
29 bool isValid() const;
31 size_t numFeatures() const;
33 std::vector<std::string> featureNames() const;
35 void fillInData(const Bucket_t& bucket,
36 GraphRawData& graphData) const;
41 bool addFeature(const std::string& featName, MsgStream& msg);
45 bool addFeature(const Feature_t& featPtr, MsgStream& msg);
46
50 bool setConnector(const std::string& conName, MsgStream& msg);
52 void setConnector(const std::string& conName, NodeConnector::Evaluator_t evalFunc);
53
54
55 private:
56 std::vector<Feature_t> m_features{};
58
59 };
60}
61
62
63#endif
std::function< bool(const Bucket_t &, size_t, size_t)> Evaluator_t
Function type to connect two space points in a bucket.
bool operator==(const NodeFeatureList &other) const
Returns true if the features have pairwise the same name.
std::shared_ptr< const NodeFeature > Feature_t
size_t numFeatures() const
Returns the number of features in the list.
bool setConnector(const std::string &conName, MsgStream &msg)
Tries to set the graph connector based on the connector name.
std::vector< Feature_t > m_features
NodeFeature::Bucket_t Bucket_t
bool isValid() const
Returns whether the NodeFeatureList is complete, i.e.
std::vector< std::string > featureNames() const
Returns the name of the features in the list.
std::shared_ptr< const NodeConnector > Connector_t
NodeFeatureList()=default
Empty standard constructor.
void fillInData(const Bucket_t &bucket, GraphRawData &graphData) const
bool addFeature(const std::string &featName, MsgStream &msg)
Tries to add a new feature to the list using the predefined list of features in the GraphFeatureFacto...
LayerSpBucket Bucket_t
Abreviation of the Space point bucket type.
Definition NodeFeature.h:19
Helper struct to ship the Graph from the space point buckets to ONNX.
Definition GraphData.h:25
MsgStream & msg
Definition testRead.cxx:32