LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
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,
25  cet::exempt_ptr<TTree const> ev,
26  bool const fastCopy)
27  : FileBlock{version, fileName, std::move(resp)}
28  , tree_{ev}
29  , fastCopyable_{fastCopy}
30  {}
31 
32  cet::exempt_ptr<TTree const>
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
cet::exempt_ptr< TTree const > tree_
Definition: RootFileBlock.h:44
HLT enums.