RootFileBlock.h
Go to the documentation of this file.
1 #ifndef art_Framework_IO_Root_RootFileBlock_h
2 #define art_Framework_IO_Root_RootFileBlock_h
3 
4 // =======================================================================
5 // RootFileBlock: Properties of a ROOT input file.
6 // =======================================================================
7 
9 #include "cetlib/exempt_ptr.h"
10 
11 #include <memory>
12 #include <string>
13 
14 class TTree;
15 
16 namespace art {
17 
18  class RootFileBlock : public FileBlock {
19  public:
20  RootFileBlock() = default;
21 
23  std::string const& fileName,
24  std::unique_ptr<ResultsPrincipal>&& resp,
26  bool const fastCopy)
27  : FileBlock{version, fileName, std::move(resp)}
28  , tree_{ev}
29  , fastCopyable_{fastCopy}
30  {}
31 
33  tree() const
34  {
35  return tree_;
36  }
37  bool
38  fastClonable() const
39  {
40  return fastCopyable_;
41  }
42 
43  private:
44  cet::exempt_ptr<TTree const> tree_{nullptr}; // ROOT owns the tree
45  bool fastCopyable_{false};
46  };
47 }
48 
49 #endif /* art_Framework_IO_Root_RootFileBlock_h */
50 
51 // Local Variables:
52 // mode: c++
53 // End:
cet::exempt_ptr< TTree const > tree() const
Definition: RootFileBlock.h:33
std::string const & fileName() const
Definition: FileBlock.h:38
RootFileBlock()=default
bool fastClonable() const
Definition: RootFileBlock.h:38
RootFileBlock(FileFormatVersion const &version, std::string const &fileName, std::unique_ptr< ResultsPrincipal > &&resp, cet::exempt_ptr< TTree const > ev, bool const fastCopy)
Definition: RootFileBlock.h:22
const XML_Char * version
Definition: expat.h:187
cet::exempt_ptr< TTree const > tree_
Definition: RootFileBlock.h:44
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
enum BeamMode string