LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
FileBlock.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_FileBlock_h
2 #define art_Framework_Core_FileBlock_h
3 
4 // =======================================================================
5 // FileBlock: Properties of an input file.
6 // =======================================================================
7 
10 #include "cetlib/exempt_ptr.h"
11 
12 #include <memory>
13 #include <string>
14 
15 namespace art {
16 
17  class FileBlock {
18  public:
19  FileBlock() = default;
20  virtual ~FileBlock() noexcept = default;
21 
22  FileBlock(FileFormatVersion const& version, std::string const& fileName)
24  {}
25 
26  FileBlock(FileFormatVersion const& version,
27  std::string const& fileName,
28  std::unique_ptr<ResultsPrincipal>&& resp)
29  : fileFormatVersion_{version}, fileName_{fileName}, resp_{std::move(resp)}
30  {}
31 
32  FileFormatVersion const&
34  {
35  return fileFormatVersion_;
36  }
37  std::string const&
38  fileName() const
39  {
40  return fileName_;
41  }
42 
43  private:
44  // Friends only.
45  friend class OutputModule;
46  ResultsPrincipal const* resultsPrincipal() const;
47 
49  std::string fileName_{};
50  std::unique_ptr<ResultsPrincipal> resp_{};
51  };
52 }
53 
54 inline art::ResultsPrincipal const*
56 {
57  return resp_.get();
58 }
59 
60 #endif /* art_Framework_Core_FileBlock_h */
61 
62 // Local Variables:
63 // mode: c++
64 // End:
FileFormatVersion fileFormatVersion_
Definition: FileBlock.h:48
std::string const & fileName() const
Definition: FileBlock.h:38
FileBlock(FileFormatVersion const &version, std::string const &fileName, std::unique_ptr< ResultsPrincipal > &&resp)
Definition: FileBlock.h:26
std::unique_ptr< ResultsPrincipal > resp_
Definition: FileBlock.h:50
ResultsPrincipal const * resultsPrincipal() const
Definition: FileBlock.h:55
std::string fileName_
Definition: FileBlock.h:49
FileBlock()=default
FileBlock(FileFormatVersion const &version, std::string const &fileName)
Definition: FileBlock.h:22
HLT enums.
FileFormatVersion const & fileFormatVersion() const
Definition: FileBlock.h:33
virtual ~FileBlock() noexcept=default