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 
24  {}
25 
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 
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
const XML_Char * version
Definition: expat.h:187
FileBlock(FileFormatVersion const &version, std::string const &fileName)
Definition: FileBlock.h:22
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
FileFormatVersion const & fileFormatVersion() const
Definition: FileBlock.h:33
virtual ~FileBlock() noexcept=default
enum BeamMode string