CMS 3D CMS Logo

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

◆ WhyNotFastClonable

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

◆ FileBlock() [1/2]

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

◆ FileBlock() [2/2]

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::vector< TTree * > const & processBlockTrees() const
Definition: FileBlock.h:125
BranchChildren const & branchChildren() const
Definition: FileBlock.h:135
std::shared_ptr< BranchChildren const > branchChildren_
Definition: FileBlock.h:154
std::string const & fileName() const
Definition: FileBlock.h:130
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
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
TTree * runTree_
Definition: FileBlock.h:145
bool modifiedIDs() const
Definition: FileBlock.h:132
bool branchListIndexesUnchanged_
Definition: FileBlock.h:152
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: FileBlock.h:150
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
Definition: FileBlock.h:129
bool branchListIndexesUnchanged() const
Definition: FileBlock.h:131
TTree * tree_
Definition: FileBlock.h:141
std::vector< std::string > const & processesWithProcessBlockTrees() const
Definition: FileBlock.h:126
int whyNotFastClonable() const
Definition: FileBlock.h:128
TTree * metaTree_
Definition: FileBlock.h:142
std::vector< std::string > processesWithProcessBlockTrees_
Definition: FileBlock.h:148
def move(src, dest)
Definition: eostools.py:511

◆ ~FileBlock()

edm::FileBlock::~FileBlock ( )
inline

Definition at line 105 of file FileBlock.h.

105 {}

Member Function Documentation

◆ branchChildren()

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

◆ branchListIndexesUnchanged()

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

◆ close()

void edm::FileBlock::close ( void  )

◆ fileFormatVersion()

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

◆ fileName()

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

◆ hasNewlyDroppedBranch()

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

◆ lumiMetaTree()

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

◆ lumiTree()

TTree* edm::FileBlock::lumiTree ( ) const
inline

Definition at line 119 of file FileBlock.h.

References lumiTree_.

Referenced by edm::PoolOutputModule::respondToOpenInputFile(), and edm::TestOneOutput::testFileBlock().

119 { return lumiTree_; }
TTree * lumiTree_
Definition: FileBlock.h:143

◆ metaTree()

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

◆ modifiedIDs()

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

◆ processBlockTree()

TTree * edm::FileBlock::processBlockTree ( std::string const &  processName) const

Definition at line 24 of file FileBlock.cc.

References HLT_2024v14_cff::distance, spr::find(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, processBlockTrees_, processesWithProcessBlockTrees_, and SimL1EmulatorRepack_CalouGT_cff::processName.

Referenced by edm::PoolOutputModule::respondToOpenInputFile(), and edm::TestOneOutput::testFileBlock().

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

◆ processBlockTrees()

std::vector<TTree*> const& edm::FileBlock::processBlockTrees ( ) const
inline

Definition at line 125 of file FileBlock.h.

References processBlockTrees_.

Referenced by edm::TestOneOutput::testFileBlock(), and updateTTreePointers().

125 { return processBlockTrees_; }
std::vector< TTree * > processBlockTrees_
Definition: FileBlock.h:147

◆ processesWithProcessBlockTrees()

std::vector<std::string> const& edm::FileBlock::processesWithProcessBlockTrees ( ) const
inline

Definition at line 126 of file FileBlock.h.

References processesWithProcessBlockTrees_.

Referenced by edm::TestOneOutput::testFileBlock(), and updateTTreePointers().

std::vector< std::string > processesWithProcessBlockTrees_
Definition: FileBlock.h:148

◆ runMetaTree()

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

◆ runTree()

TTree* edm::FileBlock::runTree ( ) const
inline

Definition at line 121 of file FileBlock.h.

References runTree_.

Referenced by edm::PoolOutputModule::respondToOpenInputFile(), and edm::TestOneOutput::testFileBlock().

121 { return runTree_; }
TTree * runTree_
Definition: FileBlock.h:145

◆ setNotFastClonable()

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

◆ tree()

TTree* edm::FileBlock::tree ( ) const
inline

◆ updateTTreePointers()

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, BXlumiParameters_cfi::lumi, lumiMetaTree_, lumiTree_, metaTree_, eostools::move(), processBlockTrees(), processBlockTrees_, processesWithProcessBlockTrees(), processesWithProcessBlockTrees_, writedatasetfile::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  }
std::vector< TTree * > const & processBlockTrees() const
Definition: FileBlock.h:125
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
TTree * tree_
Definition: FileBlock.h:141
std::vector< std::string > const & processesWithProcessBlockTrees() const
Definition: FileBlock.h:126
TTree * metaTree_
Definition: FileBlock.h:142
std::vector< std::string > processesWithProcessBlockTrees_
Definition: FileBlock.h:148
def move(src, dest)
Definition: eostools.py:511

◆ whyNotFastClonable()

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

◆ branchChildren_

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

Definition at line 154 of file FileBlock.h.

Referenced by branchChildren().

◆ branchListIndexesUnchanged_

bool edm::FileBlock::branchListIndexesUnchanged_
private

Definition at line 152 of file FileBlock.h.

Referenced by branchListIndexesUnchanged().

◆ fileFormatVersion_

FileFormatVersion edm::FileBlock::fileFormatVersion_
private

Definition at line 139 of file FileBlock.h.

Referenced by fileFormatVersion().

◆ fileName_

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

Definition at line 151 of file FileBlock.h.

Referenced by fileName().

◆ hasNewlyDroppedBranch_

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

Definition at line 150 of file FileBlock.h.

Referenced by hasNewlyDroppedBranch().

◆ lumiMetaTree_

TTree* edm::FileBlock::lumiMetaTree_
private

Definition at line 144 of file FileBlock.h.

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

◆ lumiTree_

TTree* edm::FileBlock::lumiTree_
private

Definition at line 143 of file FileBlock.h.

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

◆ metaTree_

TTree* edm::FileBlock::metaTree_
private

Definition at line 142 of file FileBlock.h.

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

◆ modifiedIDs_

bool edm::FileBlock::modifiedIDs_
private

Definition at line 153 of file FileBlock.h.

Referenced by modifiedIDs().

◆ processBlockTrees_

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

Definition at line 147 of file FileBlock.h.

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

◆ processesWithProcessBlockTrees_

std::vector<std::string> edm::FileBlock::processesWithProcessBlockTrees_
private

◆ runMetaTree_

TTree* edm::FileBlock::runMetaTree_
private

Definition at line 146 of file FileBlock.h.

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

◆ runTree_

TTree* edm::FileBlock::runTree_
private

Definition at line 145 of file FileBlock.h.

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

◆ tree_

TTree* edm::FileBlock::tree_
private

Definition at line 141 of file FileBlock.h.

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

◆ whyNotFastClonable_

int edm::FileBlock::whyNotFastClonable_
private

Definition at line 149 of file FileBlock.h.

Referenced by setNotFastClonable(), and whyNotFastClonable().