RDFAnalysis  0.1.1
Physics analysis with ROOT::RDataFrame
TObjectWriter.h
Go to the documentation of this file.
1 #ifndef RDFAnalysis_TObjectWriter_H
2 #define RDFAnalysis_TObjectWriter_H
3 
4 // package includes
6 #include "RDFAnalysis/Helpers.h"
7 #include <string>
8 
9 // ROOT includes
10 #include "TObject.h"
11 #include <TDirectory.h>
12 
18 namespace RDFAnalysis {
22  template <typename Detail>
23  class TObjectWriter : public INodeWriter<Detail> {
24  public:
25  ~TObjectWriter() override {}
26 
33  TObjectWriter(const std::string& subDirName="plots");
34 
40  void write(
41  Node<Detail>& node,
42  TDirectory* directory,
43  std::size_t /* depth */) override;
44 
50  void write(
51  typename Scheduler<Detail>::Region& region,
52  TDirectory* directory,
53  std::size_t /* depth */) override;
54 
55  private:
57  std::string m_subDirName;
58  }; //> end class TObjectWriter
59 } //> end namespace
60 #include "RDFAnalysis/TObjectWriter.icc"
61 #endif //> !RDFAnalysis_TObjectWriter_H
TObjectWriter(const std::string &subDirName="plots")
Create the writer.
Helper struct to define a region.
Definition: Scheduler.h:49
Abstract base class for node writers.
Base class for writing specific information from Nodes to file.
Definition: INodeWriter.h:28
Definition: CutflowDetail.h:11
Class to represent a single step in the analysis process.
Definition: Node.h:32
void write(Node< Detail > &node, TDirectory *directory, std::size_t) override
Write the contents of node to directory.
Class to write out the TObjects from a Node.
Definition: TObjectWriter.h:23
~TObjectWriter() override
Definition: TObjectWriter.h:25