ATLAS Offline Software
Loading...
Searching...
No Matches
VNetworkLWTNN.h
Go to the documentation of this file.
1
16#ifndef VNETWORKLWTNN_H
17#define VNETWORKLWTNN_H
18// inherits from
19#include "VNetworkBase.h"
20
21// For reading and writing
22#include "TTree.h"
23#include <sstream>
24
32public:
33 // Not sure if this is needed
35
45 VNetworkLWTNN(const VNetworkLWTNN &copy_from);
46
47 // Ensure we inherit methods of the same name with different signatures
49
58 void writeNetToTTree(TTree &tree) override;
59
60 // virtual destructor, to ensure that it is always called, even
61 // when a base class is deleted via a pointer to a derived class
62 virtual ~VNetworkLWTNN();
63
73 void deleteAllButNet() override;
74
75protected:
84 std::string m_json;
85
94 virtual void print(std::ostream &strm) const override;
95
105 void setupPersistedVariables() override;
106
107private:
117 void fillJson(std::string const &tree_name = m_defaultTreeName);
118
128 std::string readStringFromTTree(TTree &tree);
129
139 void writeStringToTTree(TTree &tree, std::string json_string);
140
144 std::string m_printable_name;
145
146 // Suppling a ClassDef for writing to file.
148};
149
150#endif
static const std::string m_defaultTreeName
Default name for the TTree to save in.
VNetworkBase()
VNetworkBase default constructor.
virtual void writeNetToTTree(TTree &tree)=0
Save the network to a TTree.
void deleteAllButNet() override
Get rid of any memory objects that arn't needed to run the net.
virtual void print(std::ostream &strm) const override
Write a short description of this net to the string stream.
virtual ~VNetworkLWTNN()
VNetworkBase()
VNetworkBase default constructor.
void writeNetToTTree(TTree &tree) override
Save the network to a TTree.
void fillJson(std::string const &tree_name=m_defaultTreeName)
Fill out m_json from a file provided to the constructor.
void writeStringToTTree(TTree &tree, std::string json_string)
Get json string from TTree.
std::string m_printable_name
Stores a printable identifyer for the net.
std::string m_json
String containing json input file.
VNetworkLWTNN(const VNetworkLWTNN &copy_from)
VNetworkLWTNN copy constructor.
std::string readStringFromTTree(TTree &tree)
Get json string from TTree.
void setupPersistedVariables() override
Perform actions that prep data to create the net.
ClassDefOverride(VNetworkLWTNN, 1)
TChain * tree