Class to write out objects from an RDFAnalysis.
More...
#include <OutputWriter.h>
|
| OutputWriter (const std::shared_ptr< TDirectory > &directory) |
| Create the writer. More...
|
|
| OutputWriter (const std::string &fileName, bool overwrite=false) |
| Create the writer, opening a file to do it. More...
|
|
void | write (Node< Detail > &node) |
| Write information from the given node and all downstream. More...
|
|
void | write (Scheduler< Detail > &scheduler) |
| Write information from the regions defined by a scheduler. More...
|
|
void | write (std::map< std::string, typename Scheduler< Detail >::Region > ®ions) |
| Write information from list of named nodes. More...
|
|
void | addWriter (const std::shared_ptr< INodeWriter< Detail >> &writer) |
| Add a writer. More...
|
|
template<typename T > |
std::enable_if_t< std::is_base_of< INodeWriter< Detail >, T >{}, void > | addWriter (T &&writer) |
| Add a writer. More...
|
|
template<template< class > class T, typename... Args> |
std::enable_if_t< std::is_base_of< INodeWriter< Detail >, T< Detail > >{}, void > | addWriter (Args &&...args) |
| Add a writer. More...
|
|
std::vector< std::shared_ptr< INodeWriter< Detail > > > & | writers () |
| Get the writers. More...
|
|
const std::vector< std::shared_ptr< INodeWriter< Detail > > > & | writers () const |
| Get the writers. More...
|
|
template<typename Detail>
class RDFAnalysis::OutputWriter< Detail >
Class to write out objects from an RDFAnalysis.
Each named filter in the graph is represented by a folder in the output file. This class only takes care of creating the folder structure, it receives other INodeWriter objects that create the output from any individual node.
The node detail type we're templated on.
OutputWriter |
( |
const std::shared_ptr< TDirectory > & |
directory | ) |
|
Create the writer.
- Parameters
-
directory | The directory to write into |
OutputWriter |
( |
const std::string & |
fileName, |
|
|
bool |
overwrite = false |
|
) |
| |
Create the writer, opening a file to do it.
- Parameters
-
fileName | The file to create |
overwrite | Whether or not to overwrite the output file. |
void addWriter |
( |
const std::shared_ptr< INodeWriter< Detail >> & |
writer | ) |
|
|
inline |
std::enable_if_t<std::is_base_of<INodeWriter<Detail>, T>{}, void> addWriter |
( |
T && |
writer | ) |
|
|
inline |
std::enable_if_t<std::is_base_of<INodeWriter<Detail>, T<Detail> >{}, void> addWriter |
( |
Args &&... |
args | ) |
|
|
inline |
Add a writer.
- Template Parameters
-
T | The type of writer to add |
Args | The types of arguments for the writer constructor |
- Parameters
-
args | The arguments for the constructor. |
This version constructs the writer in place. The writer type T will be templated on the right Detail class.
void write |
( |
Node< Detail > & |
node | ) |
|
|
inline |
Write information from the given node and all downstream.
- Parameters
-
node | The node to write from |
void write |
( |
Scheduler< Detail > & |
scheduler | ) |
|
|
inline |
Write information from the regions defined by a scheduler.
- Parameters
-
scheduler | The scheduler to read from |
void write |
( |
std::map< std::string, typename Scheduler< Detail >::Region > & |
regions | ) |
|
Write information from list of named nodes.
- Parameters
-
regions | Mapping of output directory names to nodes |
std::vector<std::shared_ptr<INodeWriter<Detail> > >& writers |
( |
| ) |
|
|
inline |
const std::vector<std::shared_ptr<INodeWriter<Detail> > >& writers |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: