CMS 3D CMS Logo

FileBlock.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_FileBlock_h
2 #define FWCore_Framework_FileBlock_h
3 
4 /*----------------------------------------------------------------------
5 
6 FileBlock: Properties of an input file.
7 
8 ----------------------------------------------------------------------*/
9 
13 class TTree;
14 #include <memory>
15 #include <array>
16 #include <string>
17 
18 namespace edm {
19  class BranchDescription;
20  class FileBlock {
21  public:
22  // bit mask for reasons fast cloning can be disabled or not applicable
24  CanFastClone = 0x0,
25 
26  // For entire job
31 
32  // For a given input file
43 
44  // The remainder of these are defined here for convenience,
45  // but never set in FileBlock, because they are output module specific.
46 
47  // For a given output module
50 
51  // For given input and output files
55  };
56 
59  tree_(nullptr),
60  metaTree_(nullptr),
61  lumiTree_(nullptr),
62  lumiMetaTree_(nullptr),
63  runTree_(nullptr),
64  runMetaTree_(nullptr),
67  fileName_(),
71 
73  TTree const* ev,
74  TTree const* meta,
75  TTree const* lumi,
76  TTree const* lumiMeta,
77  TTree const* run,
78  TTree const* runMeta,
80  std::array<bool, NumBranchTypes> const& hasNewlyDroppedBranch,
81  std::string const& fileName,
83  bool modifiedIDs,
84  std::shared_ptr<BranchChildren const> branchChildren)
86  tree_(const_cast<TTree*>(ev)),
87  metaTree_(const_cast<TTree*>(meta)),
88  lumiTree_(const_cast<TTree*>(lumi)),
89  lumiMetaTree_(const_cast<TTree*>(lumiMeta)),
90  runTree_(const_cast<TTree*>(run)),
91  runMetaTree_(const_cast<TTree*>(runMeta)),
98 
100 
102  TTree* tree() const { return tree_; }
103  TTree* metaTree() const { return metaTree_; }
104  TTree* lumiTree() const { return lumiTree_; }
105  TTree* lumiMetaTree() const { return lumiMetaTree_; }
106  TTree* runTree() const { return runTree_; }
107  TTree* runMetaTree() const { return runMetaTree_; }
108 
109  int whyNotFastClonable() const { return whyNotFastClonable_; }
110  std::array<bool, NumBranchTypes> const& hasNewlyDroppedBranch() const { return hasNewlyDroppedBranch_; }
111  std::string const& fileName() const { return fileName_; }
113  bool modifiedIDs() const { return modifiedIDs_; }
114 
116  BranchChildren const& branchChildren() const { return *branchChildren_; }
118 
119  private:
121  // We use bare pointers because ROOT owns these.
122  TTree* tree_;
123  TTree* metaTree_;
124  TTree* lumiTree_;
126  TTree* runTree_;
127  TTree* runMetaTree_;
129  std::array<bool, NumBranchTypes> hasNewlyDroppedBranch_;
133  std::shared_ptr<BranchChildren const> branchChildren_;
134  };
135 } // namespace edm
136 #endif
edm::FileBlock::BranchMismatch
Definition: FileBlock.h:54
edm::FileBlock::OutputMaxEventsTooSmall
Definition: FileBlock.h:52
funct::false
false
Definition: Factorize.h:34
edm::FileBlock::tree
TTree * tree() const
Definition: FileBlock.h:102
BranchType.h
edm::FileBlock::tree_
TTree * tree_
Definition: FileBlock.h:122
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::FileBlock::NoRootInputSource
Definition: FileBlock.h:27
edm::FileBlock::RunNumberModified
Definition: FileBlock.h:41
edm::FileBlock::NotProcessingEvents
Definition: FileBlock.h:29
edm::FileBlock::fileFormatVersion
FileFormatVersion const & fileFormatVersion() const
Definition: FileBlock.h:101
edm::FileBlock::RunOrLumiNotContiguous
Definition: FileBlock.h:36
edm::FileBlock::~FileBlock
~FileBlock()
Definition: FileBlock.h:99
edm::FileBlock::metaTree_
TTree * metaTree_
Definition: FileBlock.h:123
edm::FileBlock::EventsToBeSorted
Definition: FileBlock.h:35
edm::FileBlock::setNotFastClonable
void setNotFastClonable(WhyNotFastClonable const &why)
Definition: FileBlock.h:115
edm::FileBlock::modifiedIDs
bool modifiedIDs() const
Definition: FileBlock.h:113
edm::FileBlock
Definition: FileBlock.h:20
edm::FileBlock::hasNewlyDroppedBranch_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: FileBlock.h:129
edm::FileBlock::CanFastClone
Definition: FileBlock.h:24
edm::FileBlock::WhyNotFastClonable
WhyNotFastClonable
Definition: FileBlock.h:23
edm::FileBlock::fileName
std::string const & fileName() const
Definition: FileBlock.h:111
edm::FileBlock::lumiTree
TTree * lumiTree() const
Definition: FileBlock.h:104
edm::FileBlock::lumiMetaTree
TTree * lumiMetaTree() const
Definition: FileBlock.h:105
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::FileBlock::fileFormatVersion_
FileFormatVersion fileFormatVersion_
Definition: FileBlock.h:120
edm::FileBlock::branchListIndexesUnchanged
bool branchListIndexesUnchanged() const
Definition: FileBlock.h:112
edm::FileBlock::branchChildren_
std::shared_ptr< BranchChildren const > branchChildren_
Definition: FileBlock.h:133
edm::FileBlock::whyNotFastClonable
int whyNotFastClonable() const
Definition: FileBlock.h:109
edm::FileFormatVersion
Definition: FileFormatVersion.h:7
FileFormatVersion.h
edm::FileBlock::FileTooOld
Definition: FileBlock.h:33
edm::FileBlock::lumiMetaTree_
TTree * lumiMetaTree_
Definition: FileBlock.h:125
edm::FileBlock::HasSecondaryFileSequence
Definition: FileBlock.h:30
edm::FileBlock::EventsOrLumisSelectedByID
Definition: FileBlock.h:37
edm::BranchChildren
Definition: BranchChildren.h:18
edm::FileBlock::close
void close()
Definition: FileBlock.h:117
edm::FileBlock::runMetaTree
TTree * runMetaTree() const
Definition: FileBlock.h:107
edm::FileBlock::NoEventsInFile
Definition: FileBlock.h:34
edm::FileBlock::runMetaTree_
TTree * runMetaTree_
Definition: FileBlock.h:127
edm::FileBlock::FileBlock
FileBlock()
Definition: FileBlock.h:57
edm::FileBlock::FileBlock
FileBlock(FileFormatVersion const &version, TTree const *ev, TTree const *meta, TTree const *lumi, TTree const *lumiMeta, TTree const *run, TTree const *runMeta, int whyNotFastClonable, std::array< bool, NumBranchTypes > const &hasNewlyDroppedBranch, std::string const &fileName, bool branchListIndexesUnchanged, bool modifiedIDs, std::shared_ptr< BranchChildren const > branchChildren)
Definition: FileBlock.h:72
edm::FileBlock::whyNotFastClonable_
int whyNotFastClonable_
Definition: FileBlock.h:128
edm::FileBlock::runTree
TTree * runTree() const
Definition: FileBlock.h:106
edm::FileBlock::runTree_
TTree * runTree_
Definition: FileBlock.h:126
edm::FileBlock::EventSelectionUsed
Definition: FileBlock.h:49
edm::FileBlock::branchChildren
BranchChildren const & branchChildren() const
Definition: FileBlock.h:116
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::FileBlock::modifiedIDs_
bool modifiedIDs_
Definition: FileBlock.h:132
edm::FileBlock::DisabledInConfigFile
Definition: FileBlock.h:48
edm::FileBlock::metaTree
TTree * metaTree() const
Definition: FileBlock.h:103
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
edm::FileBlock::ParallelProcesses
Definition: FileBlock.h:28
edm::FileBlock::lumiTree_
TTree * lumiTree_
Definition: FileBlock.h:124
edm::FileBlock::MaxEventsTooSmall
Definition: FileBlock.h:39
lumi
Definition: LumiSectionData.h:20
edm::FileBlock::hasNewlyDroppedBranch
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
Definition: FileBlock.h:110
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
edm::FileBlock::branchListIndexesUnchanged_
bool branchListIndexesUnchanged_
Definition: FileBlock.h:131
edm::FileBlock::MaxLumisTooSmall
Definition: FileBlock.h:40
edm::FileBlock::DuplicateEventsRemoved
Definition: FileBlock.h:42
edm::FileBlock::fileName_
std::string fileName_
Definition: FileBlock.h:130
edm::FileBlock::SplitLevelMismatch
Definition: FileBlock.h:53
edm::FileBlock::InitialEventsSkipped
Definition: FileBlock.h:38
BranchChildren.h