![]() |
ATLAS Offline Software
|
Builds the fixed-size input tensors of the TausRUs network. More...
#include <TausRUsDataLoader.h>
Classes | |
| struct | VariableConfig |
| struct | InputConfig |
| struct | Sequence |
| One input node, its variables resolved to their functions. More... | |
Public Member Functions | |
| TausRUsDataLoader (const std::string &name) | |
| StatusCode | initialize (const std::vector< InputConfig > &inputs) |
Resolve the variables of inputs to their functions. | |
| AthInfer::InputDataMap | loadInputs (const xAOD::TauJet &tau, const xAOD::VertexContainer &vertices) const |
| std::vector< const xAOD::TauTrack * > | selectTracks (const xAOD::TauJet &tau) const |
| The tracks and vertices the input tensors are built from, in slot order, for decoding the per-slot heads. | |
| std::vector< const xAOD::Vertex * > | selectVertices (const xAOD::VertexContainer &vertices) const |
| size_t | maxTracks () const |
| size_t | maxVertices () const |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Functions providing the same interface as AthMessaging | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level of the object. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
Private Types | |
| using | ClusterFunc_t = std::function<bool(const xAOD::TauJet&, const xAOD::CaloVertexedTopoCluster&, float&)> |
| using | TrackFunc_t = std::function<bool(const xAOD::TauJet&, const xAOD::TauTrack&, float&)> |
| using | VertexFunc_t = std::function<bool(const xAOD::TauJet&, const xAOD::Vertex&, float&)> |
| using | ScalarFunc_t = std::function<bool(const xAOD::TauJet&, float&)> |
Private Member Functions | |
| template<class Func> | |
| StatusCode | resolve (const InputConfig &input, const std::unordered_map< std::string, Func > &funcMap, Sequence< Func > &sequence) const |
| std::vector< const xAOD::CaloVertexedTopoCluster * > | selectClusters (const xAOD::TauJet &tau, std::vector< xAOD::CaloVertexedTopoCluster > &storage) const |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| Sequence< ClusterFunc_t > | m_clusters |
| Sequence< TrackFunc_t > | m_tracks |
| Sequence< VertexFunc_t > | m_vertices |
| Sequence< ScalarFunc_t > | m_scalars |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels). | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging). | |
Static Private Attributes | |
| static const std::unordered_map< std::string, ClusterFunc_t > | m_clusterFuncs |
| static const std::unordered_map< std::string, TrackFunc_t > | m_trackFuncs |
| static const std::unordered_map< std::string, VertexFunc_t > | m_vertexFuncs |
| static const std::unordered_map< std::string, ScalarFunc_t > | m_scalarFuncs |
Builds the fixed-size input tensors of the TausRUs network.
The inputs are described by the model metadata: per input node, the collection it is built from, its truncation and its variables. Each variable name selects one function from the map of its collection, so a model with other inputs needs no code change unless it uses a new variable. The constituents are sorted and truncated, the remaining slots zero-padded.
Definition at line 67 of file TausRUsDataLoader.h.
|
private |
Definition at line 99 of file TausRUsDataLoader.h.
|
private |
Definition at line 102 of file TausRUsDataLoader.h.
|
private |
Definition at line 100 of file TausRUsDataLoader.h.
|
private |
Definition at line 101 of file TausRUsDataLoader.h.
|
explicit |
Definition at line 139 of file TausRUsDataLoader.cxx.
| StatusCode TausRUsDataLoader::initialize | ( | const std::vector< InputConfig > & | inputs | ) |
Resolve the variables of inputs to their functions.
Definition at line 168 of file TausRUsDataLoader.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
| AthInfer::InputDataMap TausRUsDataLoader::loadInputs | ( | const xAOD::TauJet & | tau, |
| const xAOD::VertexContainer & | vertices ) const |
Definition at line 233 of file TausRUsDataLoader.cxx.
|
inline |
Definition at line 95 of file TausRUsDataLoader.h.
|
inline |
Definition at line 96 of file TausRUsDataLoader.h.
|
inherited |
The standard message stream.
Definition at line 49 of file AsgMessaging.cxx.
|
inherited |
The standard message stream.
| lvl | The message level to set the stream to |
Definition at line 57 of file AsgMessaging.cxx.
|
inherited |
Test the output level of the object.
| lvl | The message level to test against |
true If messages at level "lvl" will be printed Definition at line 41 of file AsgMessaging.cxx.
|
private |
Definition at line 142 of file TausRUsDataLoader.cxx.
|
private |
Definition at line 187 of file TausRUsDataLoader.cxx.
| std::vector< const xAOD::TauTrack * > TausRUsDataLoader::selectTracks | ( | const xAOD::TauJet & | tau | ) | const |
The tracks and vertices the input tensors are built from, in slot order, for decoding the per-slot heads.
Definition at line 206 of file TausRUsDataLoader.cxx.
| std::vector< const xAOD::Vertex * > TausRUsDataLoader::selectVertices | ( | const xAOD::VertexContainer & | vertices | ) | const |
Definition at line 219 of file TausRUsDataLoader.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
inlinestaticprivate |
Definition at line 128 of file TausRUsDataLoader.h.
|
private |
Definition at line 123 of file TausRUsDataLoader.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels).
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
inlinestaticprivate |
Definition at line 170 of file TausRUsDataLoader.h.
|
private |
Definition at line 126 of file TausRUsDataLoader.h.
|
inlinestaticprivate |
Definition at line 143 of file TausRUsDataLoader.h.
|
private |
Definition at line 124 of file TausRUsDataLoader.h.
|
inlinestaticprivate |
Definition at line 163 of file TausRUsDataLoader.h.
|
private |
Definition at line 125 of file TausRUsDataLoader.h.