ATLAS Offline Software
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 
31 class VNetworkLWTNN : public VNetworkBase {
32 public:
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 
75 protected:
84  std::string m_json;
85 
94  virtual void print(std::ostream &strm) const override;
95 
105  void setupPersistedVariables() override;
106 
107 private:
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
VNetworkBase.h
VNetworkBase::VNetworkBase
VNetworkBase()
VNetworkBase default constructor.
Definition: VNetworkBase.cxx:16
VNetworkLWTNN::ClassDefOverride
ClassDefOverride(VNetworkLWTNN, 1)
VNetworkLWTNN::fillJson
void fillJson(std::string const &tree_name=m_defaultTreeName)
Fill out m_json from a file provided to the constructor.
Definition: VNetworkLWTNN.cxx:52
tree
TChain * tree
Definition: tile_monitor.h:30
VNetworkBase::m_defaultTreeName
static const std::string m_defaultTreeName
Default name for the TTree to save in.
Definition: VNetworkBase.h:173
VNetworkLWTNN::m_json
std::string m_json
String containing json input file.
Definition: VNetworkLWTNN.h:84
VNetworkLWTNN::writeStringToTTree
void writeStringToTTree(TTree &tree, std::string json_string)
Get json string from TTree.
Definition: VNetworkLWTNN.cxx:81
VNetworkLWTNN::deleteAllButNet
void deleteAllButNet() override
Get rid of any memory objects that arn't needed to run the net.
Definition: VNetworkLWTNN.cxx:87
VNetworkLWTNN::readStringFromTTree
std::string readStringFromTTree(TTree &tree)
Get json string from TTree.
Definition: VNetworkLWTNN.cxx:73
VNetworkLWTNN::~VNetworkLWTNN
virtual ~VNetworkLWTNN()
Definition: VNetworkLWTNN.cxx:26
VNetworkBase
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: VNetworkBase.h:38
VNetworkLWTNN::m_printable_name
std::string m_printable_name
Stores a printable identifyer for the net.
Definition: VNetworkLWTNN.h:144
VNetworkLWTNN
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: VNetworkLWTNN.h:31
VNetworkLWTNN::writeNetToTTree
void writeNetToTTree(TTree &tree) override
Save the network to a TTree.
Definition: VNetworkLWTNN.cxx:48
VNetworkLWTNN::VNetworkLWTNN
VNetworkLWTNN(const VNetworkLWTNN &copy_from)
VNetworkLWTNN copy constructor.
Definition: VNetworkLWTNN.cxx:14
VNetworkBase::writeNetToTTree
virtual void writeNetToTTree(TTree &tree)=0
Save the network to a TTree.
VNetworkLWTNN::setupPersistedVariables
void setupPersistedVariables() override
Perform actions that prep data to create the net.
Definition: VNetworkLWTNN.cxx:30
VNetworkLWTNN::print
virtual void print(std::ostream &strm) const override
Write a short description of this net to the string stream.
Definition: VNetworkLWTNN.cxx:44