9#ifndef EVENT_LOOP__OUTPUT_STREAM_DATA_H
10#define EVENT_LOOP__OUTPUT_STREAM_DATA_H
17#include <unordered_map>
46 explicit OutputStreamData (
const std::string& val_fileName,
const std::string& mode);
82 TFile *
file ()
const noexcept;
124 void addOutput (std::unique_ptr<TObject> outputObject);
135 void addClone (
const TObject& prototypeObject);
157 TObject *
getOutputHist (
const std::string& name)
const noexcept;
166 TTree *
getOutputTree (
const std::string& name)
const noexcept;
std::unordered_map< std::string, TObject * > m_outputHistMap
the output histogram map
TFile * file() const noexcept
the file we are writing to
TDirectory * makeDirectoryFor(std::string &name)
make the directory for the object of the given name
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
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
OutputStreamData(const std::string &val_fileName, const std::string &mode)
open the given file and create an output stream for it
void saveOutput()
write the list of output objects to disk and clear it
void addOutput(std::unique_ptr< TObject > outputObject)
add the given output object to this stream
std::vector< std::unique_ptr< TObject > > m_output
the list of objects to write out at the end of job
std::string m_mainStreamName
the name of the main stream
std::unique_ptr< SH::DiskWriter > m_writer
the writer we use
std::string finalFileName() const
the final path of the file created
const std::string & mainStreamName() const noexcept
the name of the main stream
void setMainStreamName(const std::string &val_mainStreamName)
std::unordered_map< std::string, TTree * > m_outputTreeMap
the output tree map
void addClone(const TObject &prototypeObject)
add a clone of the given object to the output
void close()
close this file
void testInvariant() const
test the invariant of this object
This module defines the arguments passed from the BATCH driver to the BATCH worker.