CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
edm::FileBlock Class Reference

#include <FileBlock.h>

Public Types

enum  WhyNotFastClonable {
  CanFastClone = 0x0, NoRootInputSource = 0x1, ParallelProcesses = (NoRootInputSource << 1), NotProcessingEvents = (ParallelProcesses << 1),
  HasSecondaryFileSequence = (NotProcessingEvents << 1), FileTooOld = (HasSecondaryFileSequence << 1), NoEventsInFile = (FileTooOld << 1), EventsToBeSorted = (NoEventsInFile << 1),
  RunOrLumiNotContiguous = (EventsToBeSorted << 1), EventsOrLumisSelectedByID = (RunOrLumiNotContiguous << 1), InitialEventsSkipped = (EventsOrLumisSelectedByID << 1), MaxEventsTooSmall = (InitialEventsSkipped << 1),
  MaxLumisTooSmall = (MaxEventsTooSmall << 1), RunNumberModified = (MaxLumisTooSmall << 1), DuplicateEventsRemoved = (RunNumberModified << 1), DisabledInConfigFile = (DuplicateEventsRemoved << 1),
  EventSelectionUsed = (DisabledInConfigFile << 1), OutputMaxEventsTooSmall = (EventSelectionUsed << 1), SplitLevelMismatch = (OutputMaxEventsTooSmall << 1), BranchMismatch = (SplitLevelMismatch << 1)
}
 

Public Member Functions

BranchChildren const & branchChildren () const
 
bool branchListIndexesUnchanged () const
 
void close ()
 
 FileBlock ()
 
 FileBlock (FileFormatVersion const &version, TTree *ev, TTree *meta, TTree *lumi, TTree *lumiMeta, TTree *run, TTree *runMeta, std::vector< TTree * > processBlockTrees, std::vector< std::string > processesWithProcessBlockTrees, int whyNotFastClonable, std::array< bool, NumBranchTypes > const &hasNewlyDroppedBranch, std::string const &fileName, bool branchListIndexesUnchanged, bool modifiedIDs, std::shared_ptr< BranchChildren const > branchChildren)
 
FileFormatVersion const & fileFormatVersion () const
 
std::string const & fileName () const
 
std::array< bool,
NumBranchTypes > const & 
hasNewlyDroppedBranch () const
 
TTree * lumiMetaTree () const
 
TTree * lumiTree () const
 
TTree * metaTree () const
 
bool modifiedIDs () const
 
TTree * processBlockTree (std::string const &processName) const
 
std::vector< TTree * > const & processBlockTrees () const
 
std::vector< std::string > const & processesWithProcessBlockTrees () const
 
TTree * runMetaTree () const
 
TTree * runTree () const
 
void setNotFastClonable (WhyNotFastClonable const &why)
 
TTree * tree () const
 
void updateTTreePointers (TTree *ev, TTree *meta, TTree *lumi, TTree *lumiMeta, TTree *run, TTree *runMeta, std::vector< TTree * > processBlockTrees, std::vector< std::string > processesWithProcessBlockTrees)
 
int whyNotFastClonable () const
 
 ~FileBlock ()
 

Private Attributes

std::shared_ptr
< BranchChildren const > 
branchChildren_
 
bool branchListIndexesUnchanged_
 
FileFormatVersion fileFormatVersion_
 
std::string fileName_
 
std::array< bool, NumBranchTypeshasNewlyDroppedBranch_
 
TTree * lumiMetaTree_
 
TTree * lumiTree_
 
TTree * metaTree_
 
bool modifiedIDs_
 
std::vector< TTree * > processBlockTrees_
 
std::vector< std::string > processesWithProcessBlockTrees_
 
TTree * runMetaTree_
 
TTree * runTree_
 
TTree * tree_
 
int whyNotFastClonable_
 

Detailed Description

Definition at line 22 of file FileBlock.h.

Member Enumeration Documentation

Enumerator
CanFastClone 
NoRootInputSource 
ParallelProcesses 
NotProcessingEvents 
HasSecondaryFileSequence 
FileTooOld 
NoEventsInFile 
EventsToBeSorted 
RunOrLumiNotContiguous 
EventsOrLumisSelectedByID 
InitialEventsSkipped 
MaxEventsTooSmall 
MaxLumisTooSmall 
RunNumberModified 
DuplicateEventsRemoved 
DisabledInConfigFile 
EventSelectionUsed 
OutputMaxEventsTooSmall 
SplitLevelMismatch 
BranchMismatch 

Definition at line 25 of file FileBlock.h.

25  {
26  CanFastClone = 0x0,
27 
28  // For entire job
29  NoRootInputSource = 0x1,
33 
34  // For a given input file
36  NoEventsInFile = (FileTooOld << 1),
45 
46  // The remainder of these are defined here for convenience,
47  // but never set in FileBlock, because they are output module specific.
48 
49  // For a given output module
52 
53  // For given input and output files
57  };

Constructor & Destructor Documentation

edm::FileBlock::FileBlock ( )
inline

Definition at line 59 of file FileBlock.h.

61  tree_(nullptr),
62  metaTree_(nullptr),
63  lumiTree_(nullptr),
64  lumiMetaTree_(nullptr),
65  runTree_(nullptr),
66  runMetaTree_(nullptr),
69  fileName_(),
71  modifiedIDs_(false),
72  branchChildren_(new BranchChildren) {}
std::shared_ptr< BranchChildren const > branchChildren_
Definition: FileBlock.h:154
std::string fileName_
Definition: FileBlock.h:151
FileFormatVersion fileFormatVersion_
Definition: FileBlock.h:139
TTree * lumiTree_
Definition: FileBlock.h:143
TTree * lumiMetaTree_
Definition: FileBlock.h:144
int whyNotFastClonable_
Definition: FileBlock.h:149
TTree * runMetaTree_
Definition: FileBlock.h:146
bool modifiedIDs_
Definition: FileBlock.h:153
TTree * runTree_
Definition: FileBlock.h:145
bool branchListIndexesUnchanged_
Definition: FileBlock.h:152
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: FileBlock.h:150
TTree * tree_
Definition: FileBlock.h:141
TTree * metaTree_
Definition: FileBlock.h:142
edm::FileBlock::FileBlock ( FileFormatVersion const &  version,
TTree *  ev,
TTree *  meta,
TTree *  lumi,
TTree *  lumiMeta,
TTree *  run,
TTree *  runMeta,
std::vector< TTree * >  processBlockTrees,
std::vector< std::string >  processesWithProcessBlockTrees,
int  whyNotFastClonable,
std::array< bool, NumBranchTypes > const &  hasNewlyDroppedBranch,
std::string const &  fileName,
bool  branchListIndexesUnchanged,
bool  modifiedIDs,
std::shared_ptr< BranchChildren const >  branchChildren 
)
inline

Definition at line 74 of file FileBlock.h.

90  tree_(ev),
91  metaTree_(meta),
92  lumiTree_(lumi),
93  lumiMetaTree_(lumiMeta),
94  runTree_(run),
95  runMetaTree_(runMeta),
std::shared_ptr< BranchChildren const > branchChildren_
Definition: FileBlock.h:154
int whyNotFastClonable() const
Definition: FileBlock.h:128
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
Definition: FileBlock.h:129
std::string fileName_
Definition: FileBlock.h:151
BranchChildren const & branchChildren() const
Definition: FileBlock.h:135
FileFormatVersion fileFormatVersion_
Definition: FileBlock.h:139
TTree * lumiTree_
Definition: FileBlock.h:143
bool modifiedIDs() const
Definition: FileBlock.h:132
TTree * lumiMetaTree_
Definition: FileBlock.h:144
std::vector< TTree * > processBlockTrees_
Definition: FileBlock.h:147
int whyNotFastClonable_
Definition: FileBlock.h:149
TTree * runMetaTree_
Definition: FileBlock.h:146
bool modifiedIDs_
Definition: FileBlock.h:153
std::vector< std::string > const & processesWithProcessBlockTrees() const
Definition: FileBlock.h:126
TTree * runTree_
Definition: FileBlock.h:145
def move
Definition: eostools.py:511
list lumi
Definition: dqmdumpme.py:53
bool branchListIndexesUnchanged_
Definition: FileBlock.h:152
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: FileBlock.h:150
TTree * tree_
Definition: FileBlock.h:141
bool branchListIndexesUnchanged() const
Definition: FileBlock.h:131
TTree * metaTree_
Definition: FileBlock.h:142
std::vector< std::string > processesWithProcessBlockTrees_
Definition: FileBlock.h:148
std::string const & fileName() const
Definition: FileBlock.h:130
std::vector< TTree * > const & processBlockTrees() const
Definition: FileBlock.h:125
edm::FileBlock::~FileBlock ( )
inline

Definition at line 105 of file FileBlock.h.

105 {}

Member Function Documentation

BranchChildren const& edm::FileBlock::branchChildren ( ) const
inline

Definition at line 135 of file FileBlock.h.

References branchChildren_.

Referenced by edm::PoolOutputModule::beginInputFile().

135 { return *branchChildren_; }
std::shared_ptr< BranchChildren const > branchChildren_
Definition: FileBlock.h:154
bool edm::FileBlock::branchListIndexesUnchanged ( ) const
inline

Definition at line 131 of file FileBlock.h.

References branchListIndexesUnchanged_.

131 { return branchListIndexesUnchanged_; }
bool branchListIndexesUnchanged_
Definition: FileBlock.h:152
void edm::FileBlock::close ( void  )

Definition at line 33 of file FileBlock.cc.

References PVValHelper::fill(), lumiMetaTree_, lumiTree_, metaTree_, processBlockTrees_, runMetaTree_, runTree_, and tree_.

Referenced by edm::InputSource::closeFile(), esMonitoring.AsyncLineReaderMixin::handle_close(), and esMonitoring.FDJsonServer::handle_close().

33  {
35  std::fill(processBlockTrees_.begin(), processBlockTrees_.end(), nullptr);
36  }
TTree * lumiTree_
Definition: FileBlock.h:143
TTree * lumiMetaTree_
Definition: FileBlock.h:144
std::vector< TTree * > processBlockTrees_
Definition: FileBlock.h:147
TTree * runMetaTree_
Definition: FileBlock.h:146
TTree * runTree_
Definition: FileBlock.h:145
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
TTree * tree_
Definition: FileBlock.h:141
TTree * metaTree_
Definition: FileBlock.h:142
FileFormatVersion const& edm::FileBlock::fileFormatVersion ( ) const
inline

Definition at line 116 of file FileBlock.h.

References fileFormatVersion_.

116 { return fileFormatVersion_; }
FileFormatVersion fileFormatVersion_
Definition: FileBlock.h:139
std::string const& edm::FileBlock::fileName ( ) const
inline

Definition at line 130 of file FileBlock.h.

References fileName_.

Referenced by edm::RootOutputFile::beginInputFile().

130 { return fileName_; }
std::string fileName_
Definition: FileBlock.h:151
std::array<bool, NumBranchTypes> const& edm::FileBlock::hasNewlyDroppedBranch ( ) const
inline

Definition at line 129 of file FileBlock.h.

References hasNewlyDroppedBranch_.

129 { return hasNewlyDroppedBranch_; }
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: FileBlock.h:150
TTree* edm::FileBlock::lumiMetaTree ( ) const
inline

Definition at line 120 of file FileBlock.h.

References lumiMetaTree_.

120 { return lumiMetaTree_; }
TTree * lumiMetaTree_
Definition: FileBlock.h:144
TTree* edm::FileBlock::lumiTree ( ) const
inline

Definition at line 119 of file FileBlock.h.

References lumiTree_.

Referenced by edm::PoolOutputModule::respondToOpenInputFile().

119 { return lumiTree_; }
TTree * lumiTree_
Definition: FileBlock.h:143
TTree* edm::FileBlock::metaTree ( ) const
inline

Definition at line 118 of file FileBlock.h.

References metaTree_.

118 { return metaTree_; }
TTree * metaTree_
Definition: FileBlock.h:142
bool edm::FileBlock::modifiedIDs ( ) const
inline

Definition at line 132 of file FileBlock.h.

References modifiedIDs_.

132 { return modifiedIDs_; }
bool modifiedIDs_
Definition: FileBlock.h:153
TTree * edm::FileBlock::processBlockTree ( std::string const &  processName) const

Definition at line 24 of file FileBlock.cc.

References HLT_FULL_cff::distance, spr::find(), processBlockTrees_, processesWithProcessBlockTrees_, and FSQHLTOfflineSource_cfi::processName.

Referenced by edm::PoolOutputModule::respondToOpenInputFile().

24  {
26  if (it != processesWithProcessBlockTrees_.end()) {
28  return processBlockTrees_[index];
29  }
30  return nullptr;
31  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< TTree * > processBlockTrees_
Definition: FileBlock.h:147
std::vector< std::string > processesWithProcessBlockTrees_
Definition: FileBlock.h:148
std::vector<TTree*> const& edm::FileBlock::processBlockTrees ( ) const
inline

Definition at line 125 of file FileBlock.h.

References processBlockTrees_.

125 { return processBlockTrees_; }
std::vector< TTree * > processBlockTrees_
Definition: FileBlock.h:147
std::vector<std::string> const& edm::FileBlock::processesWithProcessBlockTrees ( ) const
inline

Definition at line 126 of file FileBlock.h.

References processesWithProcessBlockTrees_.

std::vector< std::string > processesWithProcessBlockTrees_
Definition: FileBlock.h:148
TTree* edm::FileBlock::runMetaTree ( ) const
inline

Definition at line 122 of file FileBlock.h.

References runMetaTree_.

122 { return runMetaTree_; }
TTree * runMetaTree_
Definition: FileBlock.h:146
TTree* edm::FileBlock::runTree ( ) const
inline

Definition at line 121 of file FileBlock.h.

References runTree_.

Referenced by edm::PoolOutputModule::respondToOpenInputFile().

121 { return runTree_; }
TTree * runTree_
Definition: FileBlock.h:145
void edm::FileBlock::setNotFastClonable ( WhyNotFastClonable const &  why)
inline

Definition at line 134 of file FileBlock.h.

References whyNotFastClonable_.

134 { whyNotFastClonable_ |= why; }
int whyNotFastClonable_
Definition: FileBlock.h:149
TTree* edm::FileBlock::tree ( ) const
inline
void edm::FileBlock::updateTTreePointers ( TTree *  ev,
TTree *  meta,
TTree *  lumi,
TTree *  lumiMeta,
TTree *  run,
TTree *  runMeta,
std::vector< TTree * >  processBlockTrees,
std::vector< std::string >  processesWithProcessBlockTrees 
)

Definition at line 6 of file FileBlock.cc.

References makeMEIFBenchmarkPlots::ev, dqmdumpme::lumi, lumiMetaTree_, lumiTree_, metaTree_, eostools::move(), processBlockTrees_, processesWithProcessBlockTrees_, submitPVValidationJobs::run, runMetaTree_, runTree_, and tree_.

Referenced by edm::RootFile::updateFileBlock().

13  {
14  tree_ = ev;
15  metaTree_ = meta;
16  lumiTree_ = lumi;
17  lumiMetaTree_ = lumiMeta;
18  runTree_ = run;
19  runMetaTree_ = runMeta;
22  }
TTree * lumiTree_
Definition: FileBlock.h:143
TTree * lumiMetaTree_
Definition: FileBlock.h:144
std::vector< TTree * > processBlockTrees_
Definition: FileBlock.h:147
TTree * runMetaTree_
Definition: FileBlock.h:146
std::vector< std::string > const & processesWithProcessBlockTrees() const
Definition: FileBlock.h:126
TTree * runTree_
Definition: FileBlock.h:145
def move
Definition: eostools.py:511
list lumi
Definition: dqmdumpme.py:53
TTree * tree_
Definition: FileBlock.h:141
TTree * metaTree_
Definition: FileBlock.h:142
std::vector< std::string > processesWithProcessBlockTrees_
Definition: FileBlock.h:148
std::vector< TTree * > const & processBlockTrees() const
Definition: FileBlock.h:125
int edm::FileBlock::whyNotFastClonable ( ) const
inline

Definition at line 128 of file FileBlock.h.

References whyNotFastClonable_.

Referenced by edm::RootOutputFile::beginInputFile().

128 { return whyNotFastClonable_; }
int whyNotFastClonable_
Definition: FileBlock.h:149

Member Data Documentation

std::shared_ptr<BranchChildren const> edm::FileBlock::branchChildren_
private

Definition at line 154 of file FileBlock.h.

Referenced by branchChildren().

bool edm::FileBlock::branchListIndexesUnchanged_
private

Definition at line 152 of file FileBlock.h.

Referenced by branchListIndexesUnchanged().

FileFormatVersion edm::FileBlock::fileFormatVersion_
private

Definition at line 139 of file FileBlock.h.

Referenced by fileFormatVersion().

std::string edm::FileBlock::fileName_
private

Definition at line 151 of file FileBlock.h.

Referenced by fileName().

std::array<bool, NumBranchTypes> edm::FileBlock::hasNewlyDroppedBranch_
private

Definition at line 150 of file FileBlock.h.

Referenced by hasNewlyDroppedBranch().

TTree* edm::FileBlock::lumiMetaTree_
private

Definition at line 144 of file FileBlock.h.

Referenced by close(), lumiMetaTree(), and updateTTreePointers().

TTree* edm::FileBlock::lumiTree_
private

Definition at line 143 of file FileBlock.h.

Referenced by close(), lumiTree(), and updateTTreePointers().

TTree* edm::FileBlock::metaTree_
private

Definition at line 142 of file FileBlock.h.

Referenced by close(), metaTree(), and updateTTreePointers().

bool edm::FileBlock::modifiedIDs_
private

Definition at line 153 of file FileBlock.h.

Referenced by modifiedIDs().

std::vector<TTree*> edm::FileBlock::processBlockTrees_
private

Definition at line 147 of file FileBlock.h.

Referenced by close(), processBlockTree(), processBlockTrees(), and updateTTreePointers().

std::vector<std::string> edm::FileBlock::processesWithProcessBlockTrees_
private
TTree* edm::FileBlock::runMetaTree_
private

Definition at line 146 of file FileBlock.h.

Referenced by close(), runMetaTree(), and updateTTreePointers().

TTree* edm::FileBlock::runTree_
private

Definition at line 145 of file FileBlock.h.

Referenced by close(), runTree(), and updateTTreePointers().

TTree* edm::FileBlock::tree_
private

Definition at line 141 of file FileBlock.h.

Referenced by close(), tree(), and updateTTreePointers().

int edm::FileBlock::whyNotFastClonable_
private

Definition at line 149 of file FileBlock.h.

Referenced by setNotFastClonable(), and whyNotFastClonable().