ATLAS Offline Software
|
all data needed to manage a given output stream More...
#include <OutputStreamData.h>
Public Member Functions | |
void | testInvariant () const |
test the invariant of this object More... | |
OutputStreamData (const std::string &val_fileName, const std::string &mode) | |
open the given file and create an output stream for it More... | |
OutputStreamData (std::unique_ptr< TFile > val_file) | |
create this output stream for a pre-opened file More... | |
OutputStreamData (std::unique_ptr< SH::DiskWriter > val_writer) | |
create this output stream for a custom writer More... | |
TFile * | file () const noexcept |
the file we are writing to More... | |
void | saveOutput () |
write the list of output objects to disk and clear it More... | |
void | close () |
close this file More... | |
std::string | finalFileName () const |
the final path of the file created More... | |
void | addOutput (std::unique_ptr< TObject > outputObject) |
add the given output object to this stream More... | |
void | addClone (const TObject &prototypeObject) |
add a clone of the given object to the output More... | |
TDirectory * | makeDirectoryFor (std::string &name) |
make the directory for the object of the given name More... | |
TObject * | getOutputHist (const std::string &name) const noexcept |
get the output histogram with the given name, or nullptr if there is no histogam with such a name More... | |
TTree * | getOutputTree (const std::string &name) const noexcept |
get the output tree with the given name, or nullptr if there is no tree with such a name More... | |
Private Attributes | |
std::unique_ptr< SH::DiskWriter > | m_writer |
the writer we use More... | |
std::vector< std::unique_ptr< TObject > > | m_output |
the list of objects to write out at the end of job More... | |
std::unordered_map< std::string, TObject * > | m_outputHistMap |
the output histogram map More... | |
std::unordered_map< std::string, TTree * > | m_outputTreeMap |
the output tree map More... | |
all data needed to manage a given output stream
Definition at line 29 of file OutputStreamData.h.
|
explicit |
open the given file and create an output stream for it
Definition at line 114 of file OutputStreamData.cxx.
|
explicit |
create this output stream for a pre-opened file
Definition at line 123 of file OutputStreamData.cxx.
|
explicit |
create this output stream for a custom writer
Definition at line 132 of file OutputStreamData.cxx.
void EL::Detail::OutputStreamData::addClone | ( | const TObject & | prototypeObject | ) |
add a clone of the given object to the output
Definition at line 240 of file OutputStreamData.cxx.
void EL::Detail::OutputStreamData::addOutput | ( | std::unique_ptr< TObject > | outputObject | ) |
add the given output object to this stream
While the caller transfers ownership to this object, he may retain a reference to the object until saveOutput or close is called.
Definition at line 203 of file OutputStreamData.cxx.
void EL::Detail::OutputStreamData::close | ( | ) |
close this file
Definition at line 152 of file OutputStreamData.cxx.
|
noexcept |
the file we are writing to
Definition at line 141 of file OutputStreamData.cxx.
std::string EL::Detail::OutputStreamData::finalFileName | ( | ) | const |
the final path of the file created
Definition at line 162 of file OutputStreamData.cxx.
|
noexcept |
get the output histogram with the given name, or nullptr if there is no histogam with such a name
Definition at line 292 of file OutputStreamData.cxx.
|
noexcept |
get the output tree with the given name, or nullptr if there is no tree with such a name
Definition at line 303 of file OutputStreamData.cxx.
TDirectory * EL::Detail::OutputStreamData::makeDirectoryFor | ( | std::string & | name | ) |
make the directory for the object of the given name
This will make sure that we pick the proper sub-directory if needed.
Definition at line 263 of file OutputStreamData.cxx.
void EL::Detail::OutputStreamData::saveOutput | ( | ) |
write the list of output objects to disk and clear it
Definition at line 171 of file OutputStreamData.cxx.
void EL::Detail::OutputStreamData::testInvariant | ( | ) | const |
test the invariant of this object
Definition at line 105 of file OutputStreamData.cxx.
|
private |
the list of objects to write out at the end of job
Definition at line 170 of file OutputStreamData.h.
|
private |
the output histogram map
Definition at line 174 of file OutputStreamData.h.
|
private |
the output tree map
Definition at line 178 of file OutputStreamData.h.
|
private |
the writer we use
Definition at line 166 of file OutputStreamData.h.