Public Types | |
typedef std::map < edm::BranchID, edm::BranchDescription > | bidToDesc |
Public Member Functions | |
virtual std::vector < edm::BranchDescription > const & | getBranchDescriptions () |
TBranch * | getBranchRegistry (edm::ProductRegistry **pReg) |
virtual edm::BranchDescription const & | productToBranch (edm::ProductID const &pid) |
virtual edm::BranchID | productToBranchID (edm::ProductID const &pid) |
Strategy (TFile *file, int fileVersion) | |
virtual bool | updateEvent (Long_t eventEntry) |
virtual bool | updateFile (TFile *file) |
virtual bool | updateLuminosityBlock (Long_t luminosityBlockEntry) |
virtual bool | updateMap () |
virtual bool | updateRun (Long_t runEntry) |
virtual | ~Strategy () |
Public Attributes | |
std::vector < edm::BranchDescription > | bDesc_ |
bidToDesc | branchDescriptionMap_ |
bool | mapperFilled_ |
Definition at line 48 of file BranchMapReader.cc.
typedef std::map<edm::BranchID, edm::BranchDescription> fwlite::internal::Strategy::bidToDesc |
Definition at line 50 of file BranchMapReader.cc.
fwlite::internal::Strategy::Strategy | ( | TFile * | file, |
int | fileVersion | ||
) |
Definition at line 76 of file BranchMapReader.cc.
: BMRStrategy(file, fileVersion), mapperFilled_(false) { // do in derived obects // updateFile(file); }
fwlite::internal::Strategy::~Strategy | ( | ) | [virtual] |
Definition at line 82 of file BranchMapReader.cc.
{
// probably need to clean up something here...
}
std::vector< edm::BranchDescription > const & fwlite::internal::Strategy::getBranchDescriptions | ( | ) | [virtual] |
Implements fwlite::internal::BMRStrategy.
Definition at line 111 of file BranchMapReader.cc.
References bDesc_, branchDescriptionMap_, and i.
{ if(bDesc_.empty()) { for(bidToDesc::const_iterator i = branchDescriptionMap_.begin(); i != branchDescriptionMap_.end(); ++i) { bDesc_.push_back(i->second); } } return bDesc_; }
TBranch * fwlite::internal::Strategy::getBranchRegistry | ( | edm::ProductRegistry ** | pReg | ) |
Definition at line 97 of file BranchMapReader.cc.
References fwlite::internal::BMRStrategy::currentFile_, edm::poolNames::metaDataTreeName(), and edm::poolNames::productDescriptionBranchName().
Referenced by fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), fwlite::internal::BranchMapReaderStrategyV8::updateFile(), and fwlite::internal::BranchMapReaderStrategyV1::updateMap().
{ TBranch* bReg(0); TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str())); if(0 != metaDataTree) { bReg = metaDataTree->GetBranch(edm::poolNames::productDescriptionBranchName().c_str()); bReg->SetAddress(ppReg); bReg->GetEntry(0); (*ppReg)->setFrozen(false); } return bReg; }
edm::BranchDescription const & fwlite::internal::Strategy::productToBranch | ( | edm::ProductID const & | pid | ) | [virtual] |
Implements fwlite::internal::BMRStrategy.
Definition at line 126 of file BranchMapReader.cc.
References branchDescriptionMap_, fwlite::internal::kDefaultBranchDescription, and productToBranchID().
{ edm::BranchID bid = productToBranchID(pid); bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid); if(branchDescriptionMap_.end() == bdi) { return kDefaultBranchDescription; } return bdi->second; }
edm::BranchID fwlite::internal::Strategy::productToBranchID | ( | edm::ProductID const & | pid | ) | [virtual] |
Implements fwlite::internal::BMRStrategy.
Reimplemented in fwlite::internal::BranchMapReaderStrategyV11, and fwlite::internal::BranchMapReaderStrategyV17.
Definition at line 121 of file BranchMapReader.cc.
References Exception, and edm::errors::UnimplementedFeature.
Referenced by productToBranch().
{ throw edm::Exception(edm::errors::UnimplementedFeature) << "Unsupported EDM file version"; }
virtual bool fwlite::internal::Strategy::updateEvent | ( | Long_t | eventEntry | ) | [inline, virtual] |
Implements fwlite::internal::BMRStrategy.
Reimplemented in fwlite::internal::BranchMapReaderStrategyV8, fwlite::internal::BranchMapReaderStrategyV11, and fwlite::internal::BranchMapReaderStrategyV17.
Definition at line 55 of file BranchMapReader.cc.
References fwlite::internal::BMRStrategy::eventEntry_.
{ eventEntry_ = eventEntry; return true; }
bool fwlite::internal::Strategy::updateFile | ( | TFile * | file | ) | [virtual] |
Implements fwlite::internal::BMRStrategy.
Reimplemented in fwlite::internal::BranchMapReaderStrategyV1, fwlite::internal::BranchMapReaderStrategyV8, fwlite::internal::BranchMapReaderStrategyV11, and fwlite::internal::BranchMapReaderStrategyV17.
Definition at line 86 of file BranchMapReader.cc.
References bDesc_, branchDescriptionMap_, fwlite::internal::BMRStrategy::currentFile_, fwlite::internal::BMRStrategy::eventTree_, edm::poolNames::eventTreeName(), mergeVDriftHistosByStation::file, fwlite::internal::BMRStrategy::fileUUID_, fwlite::internal::BMRStrategy::luminosityBlockTree_, edm::poolNames::luminosityBlockTreeName(), fwlite::internal::BMRStrategy::runTree_, and edm::poolNames::runTreeName().
Referenced by fwlite::internal::BranchMapReaderStrategyV1::updateFile().
{ currentFile_ = file; eventTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventTreeName().c_str())); luminosityBlockTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::luminosityBlockTreeName().c_str())); runTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::runTreeName().c_str())); fileUUID_ = currentFile_->GetUUID(); branchDescriptionMap_.clear(); bDesc_.clear(); return 0 != eventTree_; }
virtual bool fwlite::internal::Strategy::updateLuminosityBlock | ( | Long_t | luminosityBlockEntry | ) | [inline, virtual] |
Implements fwlite::internal::BMRStrategy.
Reimplemented in fwlite::internal::BranchMapReaderStrategyV8, fwlite::internal::BranchMapReaderStrategyV11, and fwlite::internal::BranchMapReaderStrategyV17.
Definition at line 56 of file BranchMapReader.cc.
References fwlite::internal::BMRStrategy::luminosityBlockEntry_.
{ luminosityBlockEntry_ = luminosityBlockEntry; return true; }
virtual bool fwlite::internal::Strategy::updateMap | ( | ) | [inline, virtual] |
Implements fwlite::internal::BMRStrategy.
Reimplemented in fwlite::internal::BranchMapReaderStrategyV1, fwlite::internal::BranchMapReaderStrategyV8, fwlite::internal::BranchMapReaderStrategyV11, and fwlite::internal::BranchMapReaderStrategyV17.
Definition at line 64 of file BranchMapReader.cc.
{ return true; }
virtual bool fwlite::internal::Strategy::updateRun | ( | Long_t | runEntry | ) | [inline, virtual] |
Implements fwlite::internal::BMRStrategy.
Reimplemented in fwlite::internal::BranchMapReaderStrategyV8, fwlite::internal::BranchMapReaderStrategyV11, and fwlite::internal::BranchMapReaderStrategyV17.
Definition at line 60 of file BranchMapReader.cc.
References fwlite::internal::BMRStrategy::runEntry_.
{ runEntry_ = runEntry; return true; }
std::vector<edm::BranchDescription> fwlite::internal::Strategy::bDesc_ |
Definition at line 72 of file BranchMapReader.cc.
Referenced by getBranchDescriptions(), updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), fwlite::internal::BranchMapReaderStrategyV8::updateFile(), and fwlite::internal::BranchMapReaderStrategyV1::updateMap().
Definition at line 71 of file BranchMapReader.cc.
Referenced by getBranchDescriptions(), productToBranch(), updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), fwlite::internal::BranchMapReaderStrategyV8::updateFile(), and fwlite::internal::BranchMapReaderStrategyV1::updateMap().
Definition at line 73 of file BranchMapReader.cc.
Referenced by fwlite::internal::BranchMapReaderStrategyV11::updateEvent(), fwlite::internal::BranchMapReaderStrategyV17::updateEvent(), fwlite::internal::BranchMapReaderStrategyV8::updateEvent(), fwlite::internal::BranchMapReaderStrategyV1::updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), fwlite::internal::BranchMapReaderStrategyV8::updateFile(), fwlite::internal::BranchMapReaderStrategyV8::updateLuminosityBlock(), fwlite::internal::BranchMapReaderStrategyV11::updateLuminosityBlock(), fwlite::internal::BranchMapReaderStrategyV17::updateLuminosityBlock(), fwlite::internal::BranchMapReaderStrategyV11::updateMap(), fwlite::internal::BranchMapReaderStrategyV8::updateMap(), fwlite::internal::BranchMapReaderStrategyV17::updateMap(), fwlite::internal::BranchMapReaderStrategyV1::updateMap(), fwlite::internal::BranchMapReaderStrategyV17::updateRun(), fwlite::internal::BranchMapReaderStrategyV11::updateRun(), and fwlite::internal::BranchMapReaderStrategyV8::updateRun().