Public Types | |
typedef std::map < edm::BranchID, edm::BranchDescription > | bidToDesc |
Public Member Functions | |
virtual const std::vector < edm::BranchDescription > & | getBranchDescriptions () |
TBranch * | getBranchRegistry (edm::ProductRegistry **pReg) |
virtual const edm::BranchDescription | productToBranch (const edm::ProductID &pid) |
virtual edm::BranchID | productToBranchID (const edm::ProductID &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 45 of file BranchMapReader.cc.
typedef std::map<edm::BranchID, edm::BranchDescription> fwlite::internal::Strategy::bidToDesc |
Definition at line 47 of file BranchMapReader.cc.
fwlite::internal::Strategy::Strategy | ( | TFile * | file, |
int | fileVersion | ||
) |
Definition at line 73 of file BranchMapReader.cc.
: BMRStrategy(file, fileVersion), mapperFilled_(false) { // do in derived obects // updateFile(file); }
fwlite::internal::Strategy::~Strategy | ( | ) | [virtual] |
Definition at line 79 of file BranchMapReader.cc.
{
// probably need to clean up something here...
}
const std::vector< edm::BranchDescription > & fwlite::internal::Strategy::getBranchDescriptions | ( | ) | [virtual] |
Implements fwlite::internal::BMRStrategy.
Definition at line 108 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 94 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; }
const edm::BranchDescription fwlite::internal::Strategy::productToBranch | ( | const edm::ProductID & | pid | ) | [virtual] |
Implements fwlite::internal::BMRStrategy.
Definition at line 123 of file BranchMapReader.cc.
References branchDescriptionMap_, and productToBranchID().
{ edm::BranchID bid = productToBranchID(pid); bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid); if (branchDescriptionMap_.end() == bdi) { return edm::BranchDescription(); } return bdi->second; }
edm::BranchID fwlite::internal::Strategy::productToBranchID | ( | const edm::ProductID & | pid | ) | [virtual] |
Implements fwlite::internal::BMRStrategy.
Reimplemented in fwlite::internal::BranchMapReaderStrategyV11, and fwlite::internal::BranchMapReaderStrategyV17.
Definition at line 118 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 52 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 83 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 53 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 61 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 57 of file BranchMapReader.cc.
References fwlite::internal::BMRStrategy::runEntry_.
{ runEntry_ = runEntry; return true; }
std::vector<edm::BranchDescription> fwlite::internal::Strategy::bDesc_ |
Definition at line 69 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 68 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 70 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().