ATLAS Offline Software
DiskWriter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 #ifndef SAMPLE_HANDLER__DISK_WRITER_H
9 #define SAMPLE_HANDLER__DISK_WRITER_H
10 
11 
12 #include <SampleHandler/Global.h>
13 
14 class TFile;
15 #include <string>
16 
17 namespace SH
18 {
28  class DiskWriter
29  {
30  //
31  // public interface
32  //
33 
38  public:
39  void testInvariant () const;
40 
41 
48  public:
49  DiskWriter ();
50 
51 
58  public:
59  virtual ~DiskWriter ();
60 
61 
70  public:
71  std::string path () const;
72 
73 
82  public:
83  TFile *file ();
84 
85 
93  public:
94  void close ();
95 
96 
97 
98  //
99  // virtual interface
100  //
101 
105  private:
106  virtual std::string getPath () const = 0;
107 
108 
112  private:
113  virtual TFile *getFile () = 0;
114 
115 
119  private:
120  virtual void doClose () = 0;
121  };
122 }
123 
124 #endif
SH::DiskWriter::path
std::string path() const
the path where this file can be accessed or the empty string if it is not known (yet).
Definition: DiskWriter.cxx:46
SH::DiskWriter::getPath
virtual std::string getPath() const =0
the path where this file can be accessed or the empty string if it is not known (yet).
SH::DiskWriter::testInvariant
void testInvariant() const
test the invariant of this object
Definition: DiskWriter.cxx:23
SH::DiskWriter
an interface that manages writing a single output file
Definition: DiskWriter.h:29
SH::DiskWriter::DiskWriter
DiskWriter()
standard constructor
Definition: DiskWriter.cxx:30
SH::DiskWriter::file
TFile * file()
the file we are writing to
Definition: DiskWriter.cxx:55
SH::DiskWriter::getFile
virtual TFile * getFile()=0
the file we are writing to
SH::DiskWriter::~DiskWriter
virtual ~DiskWriter()
standard destructor
Definition: DiskWriter.cxx:38
SH::DiskWriter::doClose
virtual void doClose()=0
closes the file we are writing to
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
SH::DiskWriter::close
void close()
closes the file we are writing to
Definition: DiskWriter.cxx:67
Global.h