CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
fwlite::internal::Strategy Class Reference
Inheritance diagram for fwlite::internal::Strategy:
fwlite::internal::BMRStrategy fwlite::internal::BranchMapReaderStrategyV1 fwlite::internal::BranchMapReaderStrategyV11 fwlite::internal::BranchMapReaderStrategyV17 fwlite::internal::BranchMapReaderStrategyV8 fwlite::internal::BranchMapReaderStrategyV7

Public Types

typedef std::map< edm::BranchID, edm::BranchDescriptionbidToDesc
 

Public Member Functions

edm::BranchDescription const & branchIDToBranch (edm::BranchID const &bid) const override
 
std::vector< edm::BranchDescription > const & getBranchDescriptions () override
 
TBranch * getBranchRegistry (edm::ProductRegistry **pReg)
 
edm::BranchDescription const & productToBranch (edm::ProductID const &pid) override
 
edm::BranchID productToBranchID (edm::ProductID const &pid) override
 
 Strategy (TFile *file, int fileVersion)
 
edm::ThinnedAssociationsHelper const & thinnedAssociationsHelper () const override
 
bool updateEvent (Long_t eventEntry) override
 
bool updateFile (TFile *file) override
 
bool updateLuminosityBlock (Long_t luminosityBlockEntry) override
 
bool updateMap () override
 
bool updateRun (Long_t runEntry) override
 
 ~Strategy () override
 
- Public Member Functions inherited from fwlite::internal::BMRStrategy
 BMRStrategy (TFile *file, int fileVersion)
 
virtual const edm::BranchListIndexesbranchListIndexes () const =0
 
virtual ~BMRStrategy ()
 

Public Attributes

std::vector< edm::BranchDescriptionbDesc_
 
bidToDesc branchDescriptionMap_
 
bool mapperFilled_
 
edm::propagate_const< std::unique_ptr< edm::ThinnedAssociationsHelper > > thinnedAssociationsHelper_
 
- Public Attributes inherited from fwlite::internal::BMRStrategy
edm::propagate_const< TFile * > currentFile_
 
Long_t eventEntry_
 
edm::propagate_const< TTree * > eventTree_
 
TUUID fileUUID_
 
int fileVersion_
 
Long_t luminosityBlockEntry_
 
edm::propagate_const< TTree * > luminosityBlockTree_
 
Long_t runEntry_
 
edm::propagate_const< TTree * > runTree_
 

Detailed Description

Definition at line 57 of file BranchMapReader.cc.

Member Typedef Documentation

◆ bidToDesc

Definition at line 59 of file BranchMapReader.cc.

Constructor & Destructor Documentation

◆ Strategy()

fwlite::internal::Strategy::Strategy ( TFile *  file,
int  fileVersion 
)

Definition at line 93 of file BranchMapReader.cc.

94  : BMRStrategy(file, fileVersion),
95  mapperFilled_(false),
97  // do in derived obects
98  // updateFile(file);
99  }

◆ ~Strategy()

fwlite::internal::Strategy::~Strategy ( )
override

Definition at line 101 of file BranchMapReader.cc.

101  {
102  // probably need to clean up something here...
103  }

Member Function Documentation

◆ branchIDToBranch()

edm::BranchDescription const & fwlite::internal::Strategy::branchIDToBranch ( edm::BranchID const &  bid) const
overridevirtual

Implements fwlite::internal::BMRStrategy.

Definition at line 150 of file BranchMapReader.cc.

150  {
151  bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid);
152  if (branchDescriptionMap_.end() == bdi) {
154  }
155  return bdi->second;
156  }

References branchDescriptionMap_, and fwlite::internal::kDefaultBranchDescription.

◆ getBranchDescriptions()

std::vector< edm::BranchDescription > const & fwlite::internal::Strategy::getBranchDescriptions ( )
overridevirtual

Implements fwlite::internal::BMRStrategy.

Definition at line 128 of file BranchMapReader.cc.

128  {
129  if (bDesc_.empty()) {
130  for (auto const& item : branchDescriptionMap_) {
131  bDesc_.push_back(item.second);
132  }
133  }
134  return bDesc_;
135  }

References bDesc_, branchDescriptionMap_, and B2GTnPMonitor_cfi::item.

◆ getBranchRegistry()

TBranch * fwlite::internal::Strategy::getBranchRegistry ( edm::ProductRegistry **  pReg)

Definition at line 116 of file BranchMapReader.cc.

116  {
117  TBranch* bReg(nullptr);
118 
119  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str()));
120  if (nullptr != metaDataTree) {
121  bReg = metaDataTree->GetBranch(edm::poolNames::productDescriptionBranchName().c_str());
122  bReg->SetAddress(ppReg);
123  bReg->GetEntry(0);
124  }
125  return bReg;
126  }

References fwlite::internal::BMRStrategy::currentFile_, edm::poolNames::metaDataTreeName(), and edm::poolNames::productDescriptionBranchName().

Referenced by fwlite::internal::BranchMapReaderStrategyV8::updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), and fwlite::internal::BranchMapReaderStrategyV1::updateMap().

◆ productToBranch()

edm::BranchDescription const & fwlite::internal::Strategy::productToBranch ( edm::ProductID const &  pid)
overridevirtual

Implements fwlite::internal::BMRStrategy.

Definition at line 141 of file BranchMapReader.cc.

141  {
142  edm::BranchID bid = productToBranchID(pid);
143  bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid);
144  if (branchDescriptionMap_.end() == bdi) {
146  }
147  return bdi->second;
148  }

References branchDescriptionMap_, fwlite::internal::kDefaultBranchDescription, and productToBranchID().

◆ productToBranchID()

edm::BranchID fwlite::internal::Strategy::productToBranchID ( edm::ProductID const &  pid)
overridevirtual

Implements fwlite::internal::BMRStrategy.

Reimplemented in fwlite::internal::BranchMapReaderStrategyV17, and fwlite::internal::BranchMapReaderStrategyV11.

Definition at line 137 of file BranchMapReader.cc.

137  {
138  throw edm::Exception(edm::errors::UnimplementedFeature) << "Unsupported EDM file version";
139  }

References Exception, and edm::errors::UnimplementedFeature.

Referenced by productToBranch().

◆ thinnedAssociationsHelper()

edm::ThinnedAssociationsHelper const& fwlite::internal::Strategy::thinnedAssociationsHelper ( ) const
inlineoverridevirtual

Implements fwlite::internal::BMRStrategy.

Definition at line 81 of file BranchMapReader.cc.

81  {
83  }

References thinnedAssociationsHelper_.

◆ updateEvent()

bool fwlite::internal::Strategy::updateEvent ( Long_t  eventEntry)
inlineoverridevirtual

◆ updateFile()

bool fwlite::internal::Strategy::updateFile ( TFile *  file)
overridevirtual

◆ updateLuminosityBlock()

bool fwlite::internal::Strategy::updateLuminosityBlock ( Long_t  luminosityBlockEntry)
inlineoverridevirtual

◆ updateMap()

bool fwlite::internal::Strategy::updateMap ( )
inlineoverridevirtual

◆ updateRun()

bool fwlite::internal::Strategy::updateRun ( Long_t  runEntry)
inlineoverridevirtual

Member Data Documentation

◆ bDesc_

std::vector<edm::BranchDescription> fwlite::internal::Strategy::bDesc_

◆ branchDescriptionMap_

bidToDesc fwlite::internal::Strategy::branchDescriptionMap_

◆ mapperFilled_

bool fwlite::internal::Strategy::mapperFilled_

◆ thinnedAssociationsHelper_

edm::propagate_const<std::unique_ptr<edm::ThinnedAssociationsHelper> > fwlite::internal::Strategy::thinnedAssociationsHelper_
edm::poolNames::runTreeName
std::string const & runTreeName()
Definition: BranchType.cc:214
edm::poolNames::eventTreeName
std::string const & eventTreeName()
Definition: BranchType.cc:208
fwlite::internal::Strategy::branchDescriptionMap_
bidToDesc branchDescriptionMap_
Definition: BranchMapReader.cc:87
fwlite::internal::Strategy::mapperFilled_
bool mapperFilled_
Definition: BranchMapReader.cc:89
fwlite::internal::Strategy::bDesc_
std::vector< edm::BranchDescription > bDesc_
Definition: BranchMapReader.cc:88
fwlite::internal::BMRStrategy::fileUUID_
TUUID fileUUID_
Definition: BranchMapReader.h:62
edm::poolNames::luminosityBlockTreeName
std::string const & luminosityBlockTreeName()
Definition: BranchType.cc:213
fwlite::internal::BMRStrategy::eventEntry_
Long_t eventEntry_
Definition: BranchMapReader.h:63
fwlite::internal::BMRStrategy::eventTree_
edm::propagate_const< TTree * > eventTree_
Definition: BranchMapReader.h:59
fwlite::internal::kDefaultBranchDescription
static const edm::BranchDescription kDefaultBranchDescription
Definition: BranchMapReader.cc:40
edm::BranchID
Definition: BranchID.h:14
fwlite::internal::BMRStrategy::luminosityBlockEntry_
Long_t luminosityBlockEntry_
Definition: BranchMapReader.h:64
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
fwlite::internal::BMRStrategy::currentFile_
edm::propagate_const< TFile * > currentFile_
Definition: BranchMapReader.h:58
edm::poolNames::productDescriptionBranchName
std::string const & productDescriptionBranchName()
Definition: BranchType.cc:155
fwlite::internal::Strategy::thinnedAssociationsHelper_
edm::propagate_const< std::unique_ptr< edm::ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: BranchMapReader.cc:90
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
fwlite::internal::BMRStrategy::luminosityBlockTree_
edm::propagate_const< TTree * > luminosityBlockTree_
Definition: BranchMapReader.h:60
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::poolNames::metaDataTreeName
std::string const & metaDataTreeName()
Definition: BranchType.cc:152
fwlite::internal::BMRStrategy::BMRStrategy
BMRStrategy(TFile *file, int fileVersion)
Definition: BranchMapReader.cc:42
Exception
Definition: hltDiff.cc:245
fwlite::internal::BMRStrategy::runEntry_
Long_t runEntry_
Definition: BranchMapReader.h:65
fwlite::internal::Strategy::productToBranchID
edm::BranchID productToBranchID(edm::ProductID const &pid) override
Definition: BranchMapReader.cc:137
fwlite::internal::BMRStrategy::runTree_
edm::propagate_const< TTree * > runTree_
Definition: BranchMapReader.h:61
edm::errors::UnimplementedFeature
Definition: EDMException.h:38