#include <RNNTool.h>
Definition at line 39 of file RNNTool.h.
◆ StoreGateSvc_t
◆ RNNTool()
| Prompt::RNNTool::RNNTool |
( |
const std::string & | name, |
|
|
const std::string & | type, |
|
|
const IInterface * | parent ) |
Definition at line 19 of file RNNTool.cxx.
19 :
21{
22 declareInterface<Prompt::IRNNTool>(this);
23
24 declareProperty(
"configPathRNN",
m_configPathRNN,
"Path of the local RNN json file you want o study/test, it will override the PathResolverFindCalibFile file");
27
30}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
◆ AddVariable()
| void Prompt::RNNTool::AddVariable |
( |
const std::vector< Prompt::VarHolder > & | tracks, |
|
|
unsigned | var, |
|
|
std::vector< double > & | values ) |
|
private |
Definition at line 142 of file RNNTool.cxx.
145{
146
147
148
150
151 for(
unsigned i = 0;
i < nvar; ++
i) {
153
154 if(i < tracks.size()) {
155 const Prompt::VarHolder &
track = tracks.at(i);
156
157 if(!
track.getVar(var, value)) {
159 }
160 }
161
163 }
164}
#define ATH_MSG_WARNING(x)
◆ computeRNNOutput()
| std::map< std::string, double > Prompt::RNNTool::computeRNNOutput |
( |
const std::vector< Prompt::VarHolder > & | tracks | ) |
|
|
overridevirtual |
Implements Prompt::IRNNTool.
Definition at line 97 of file RNNTool.cxx.
98{
100
101 lwt::LightweightGraph::NodeMap nodes;
102 lwt::LightweightGraph::SeqNodeMap seqs;
103
105
112
113 if(vmap.size() != 6) {
114 ATH_MSG_WARNING(
"RNNTool::computeRNNOutput - incomplete variables: return empty result");
115 return lwt::ValueMap();
116 }
117
118 unsigned nwid = 0;
119
120 for(const lwt::VectorMap::value_type &v: vmap) {
121 nwid = std::max<unsigned>(
v.first.size(), nwid);
122 }
123
124 for(const lwt::VectorMap::value_type &v: vmap) {
126
127 for(
const double d:
v.second) {
129 }
130 }
131
133
134 for(const lwt::ValueMap::value_type &v: result) {
135 ATH_MSG_DEBUG(
v.first <<
" score=" << std::setprecision(10) <<
v.second);
136 }
137
139}
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getOutputLabels()
| virtual std::set< std::string > Prompt::RNNTool::getOutputLabels |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ initialize()
| StatusCode Prompt::RNNTool::initialize |
( |
| ) |
|
|
overridevirtual |
Implements Prompt::IRNNTool.
Definition at line 33 of file RNNTool.cxx.
34{
35
36
37
38 std::string fullPathToFile;
39
43 }
44 else {
48 }
49
50 ATH_MSG_INFO(
"initialize RNNTool - ConfigPathRNN: \"" << fullPathToFile);
51
52
53
54
55 std::ifstream input_stream(fullPathToFile);
56
57 lwt::GraphConfig graph_config = lwt::parse_json_graph(input_stream);
58
59 m_graph = std::make_unique<lwt::LightweightGraph>(graph_config);
60
61 for(const auto &o: graph_config.outputs) {
62 ATH_MSG_DEBUG(
" output name: " << o.first <<
", node_index=" << o.second.node_index);
63
64 for(const auto &l: o.second.labels) {
66
69 }
70 }
71 }
72
73 ATH_MSG_DEBUG(
"Number of input sequences: " << graph_config.input_sequences.size());
74
75 for(const auto &n: graph_config.input_sequences) {
77
78 for(
const lwt::Input &v:
n.variables) {
80 }
81 }
82
83 ATH_MSG_DEBUG(
"Number of inputs: " << graph_config.inputs.size());
84
85 for(const auto &n: graph_config.inputs) {
87
88 for(
const lwt::Input &v:
n.variables) {
90 }
91 }
92
93 return StatusCode::SUCCESS;
94}
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
| const InterfaceID & Prompt::IRNNTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Definition at line 44 of file IRNNTool.h.
static const InterfaceID IID_IRNNTool("Prompt::IRNNTool", 1, 0)
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_configPathRNN
| std::string Prompt::RNNTool::m_configPathRNN |
|
private |
◆ m_configRNNJsonFile
| std::string Prompt::RNNTool::m_configRNNJsonFile |
|
private |
◆ m_configRNNVersion
| std::string Prompt::RNNTool::m_configRNNVersion |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_graph
| std::unique_ptr<lwt::LightweightGraph> Prompt::RNNTool::m_graph |
|
private |
◆ m_inputSequenceName
| std::string Prompt::RNNTool::m_inputSequenceName |
|
private |
◆ m_inputSequenceSize
| unsigned Prompt::RNNTool::m_inputSequenceSize |
|
private |
◆ m_outputLabels
| std::set<std::string> Prompt::RNNTool::m_outputLabels |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: