2#include "Framework/NtupleManager.h"
17 if (
trees_.count(name) != 0)
18 EXCEPTION_RAISE(
"NtupleManager",
19 "A tree with name " + name +
" has already been created.");
22 trees_[name] =
new TTree{name.c_str(), name.c_str()};
25void NtupleManager::fill() {
27 for (
const auto& [name, tree] :
trees_) tree->Fill();
void clear()
Reset the objects carried by the passengers.
void everybodyOff()
Kicks all of the passengers off the bus and therefore destroys any objects they are carrying.
Singleton class used to manage the creation and pooling of ntuples.
NtupleManager()
Private constructor to prevent instantiation.
void create(const std::string &tname)
Create a ROOT tree to hold the ntuple variables (ROOT leaves).
framework::Bus bus_
Container for buffering variables.
void clear()
Reset all of the variables to their limits.
static NtupleManager & getInstance()
void reset()
Reset NtupleManager to blank state.
std::unordered_map< std::string, TTree * > trees_
Container for output ROOT trees.
All classes in the ldmx-sw project use this namespace.