|
ATLAS Offline Software
|
Go to the documentation of this file.
16 m_json (copy_from.m_json),
17 m_printable_name (copy_from.m_printable_name)
19 if (
m_json.length() == 0) {
20 throw std::invalid_argument(
21 "Trying to copy a VNetworkLWTNN with length 0 m_json, probably "
22 "deleteAllButNet was called on the object being coppied from.");
32 ATH_MSG_DEBUG(
"Making an LWTNN network using a file on disk, "
37 ATH_MSG_DEBUG(
"Making an LWTNN network using a json in memory, length "
57 TTree *
tree = (TTree *)
tfile.Get(tree_name.c_str());
65 std::ostringstream sstr;
66 sstr <<
input.rdbuf();
74 std::string
found = std::string();
75 std::string *to_found = &
found;
76 tree.SetBranchAddress(
"lwtnn_json", &to_found);
82 tree.Branch(
"lwtnn_json", &json_string);
95 <<
m_json.capacity() <<
". m_inputFile now has capacity "
97 <<
". m_printable_name now has capacity "
void fillJson(std::string const &tree_name=m_defaultTreeName)
Fill out m_json from a file provided to the constructor.
std::string m_json
String containing json input file.
bool isFile() const
Check if the argument inputFile is the path of a file on disk.
#define ATH_MSG_VERBOSE(x)
void writeStringToTTree(TTree &tree, std::string json_string)
Get json string from TTree.
void deleteAllButNet() override
Get rid of any memory objects that arn't needed to run the net.
std::string readStringFromTTree(TTree &tree)
Get json string from TTree.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
std::string m_printable_name
Stores a printable identifyer for the net.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
void writeNetToTTree(TTree &tree) override
Save the network to a TTree.
VNetworkLWTNN(const VNetworkLWTNN ©_from)
VNetworkLWTNN copy constructor.
bool isRootFile(std::string const &filename="") const
Check if a string is possibly a root file path.
void setupPersistedVariables() override
Perform actions that prep data to create the net.
std::string m_inputFile
Path to the file describing the network, including filename.
virtual void print(std::ostream &strm) const override
Write a short description of this net to the string stream.