39 : currentFile_(file), eventTree_(0), luminosityBlockTree_(0), runTree_(0),
40 eventEntry_(-1), luminosityBlockEntry_(-1), runEntry_(-1), fileVersion_(fileVersion) {
50 typedef std::map<edm::BranchID, edm::BranchDescription>
bidToDesc;
72 std::vector<edm::BranchDescription>
bDesc_;
101 if(0 != metaDataTree) {
103 bReg->SetAddress(ppReg);
105 (*ppReg)->setFrozen(
false);
110 std::vector<edm::BranchDescription>
const&
173 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
217 eventEntryInfoVector_(), pEventEntryInfoVector_(&eventEntryInfoVector_) {
251 if(0 != metaDataTree) {
270 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
317 :
Strategy(file, fileVersion), eventHistoryTree_(0), pHistory_(&history_) {
351 if(0 == metaDataTree) {
359 b->SetAddress(&branchIDListsPtr);
364 <<
"FindBranch of branchIDList failed";
380 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
395 if(!eventHistoryBranch) {
397 <<
"Failed to find history branch in event history tree";
401 eventHistoryBranch->SetAddress(&
pHistory_);
432 :
Strategy(file, fileVersion), eventsTree_(0), pBranchListIndexes_(&branchListIndexes_) {
465 if(0==metaDataTree) {
472 b->SetAddress(&branchIDListsPtr);
477 <<
"FindBranch of branchIDList failed";
493 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
508 if(!branchListIndexesBranch) {
510 <<
"Failed to find branch list indexes branch in event tree";
554 if(0==metaDataTree) {
561 bVer->SetAddress(&pV);
572 return strategy_->updateLuminosityBlock(newlumi);
585 TFile* currentFile(
strategy_->currentFile_);
586 bool isNew(file != currentFile);
593 isNew = eventTreeTemp !=
strategy_->eventTree_ ||
strategy_->fileUUID_ != currentFile->GetUUID();
597 if(fileVersion !=
strategy_->fileVersion_) {
611 std::vector<edm::BranchDescription>
const&
613 return strategy_->getBranchDescriptions();
617 std::auto_ptr<internal::BMRStrategy>
619 std::auto_ptr<internal::BMRStrategy>
s;
621 if(fileVersion >= 17) {
623 }
else if(fileVersion >= 11) {
625 }
else if(fileVersion >= 8) {
627 }
else if(fileVersion >= 7) {
std::auto_ptr< internal::BMRStrategy > newStrategy(TFile *file, int fileVersion)
std::auto_ptr< internal::BMRStrategy > strategy_
edm::BranchListIndexes * pBranchListIndexes_
std::auto_ptr< edm::BranchIDLists > branchIDLists_
BMRStrategy(TFile *file, int fileVersion)
std::vector< BranchIDList > BranchIDLists
virtual edm::BranchListIndexes const & branchListIndexes() const
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
bool updateEvent(Long_t eventEntry)
virtual std::vector< edm::BranchDescription > const & getBranchDescriptions()
std::map< BranchKey, BranchDescription > ProductList
virtual edm::BranchListIndexes const & branchListIndexes() const
bool updateFile(TFile *file)
virtual bool updateEvent(Long_t eventEntry)
virtual edm::BranchID productToBranchID(edm::ProductID const &pid)
std::string const & fileFormatVersionBranchName()
virtual bool updateFile(TFile *file)
virtual bool updateEvent(Long_t eventEntry)
BranchMapReaderStrategyV7(TFile *file, int fileVersion)
std::vector< EventEntryInfo > EventEntryInfoVector
std::string const & luminosityBlockTreeName()
bidToDesc branchDescriptionMap_
edm::BranchListIndexes dummyBranchListIndexes_
TTree * luminosityBlockTree_
virtual bool updateFile(TFile *file)
std::vector< edm::BranchDescription > bDesc_
bool updateLuminosityBlock(Long_t luminosityBlockEntry)
TTree * eventHistoryTree_
ProductList const & productList() const
virtual bool updateFile(TFile *file)
edm::BranchListIndexes dummyBranchListIndexes_
std::vector< BranchListIndex > BranchListIndexes
edm::EventEntryInfoVector eventEntryInfoVector_
virtual bool updateEvent(Long_t eventEntry)
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
std::auto_ptr< edm::BranchIDLists > branchIDLists_
Strategy(TFile *file, int fileVersion)
TBranch * entryInfoBranch_
std::string const & eventHistoryBranchName()
virtual edm::BranchID productToBranchID(edm::ProductID const &pid)
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
Long_t luminosityBlockEntry_
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
const edm::BranchDescription & productToBranch(const edm::ProductID &pid)
virtual edm::BranchListIndexes const & branchListIndexes() const
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
virtual bool updateFile(TFile *file)
edm::BranchListIndexes dummyBranchListIndexes_
std::string const & metaDataTreeName()
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
Container::value_type value_type
std::string const & runTreeName()
BranchListIndexes const & branchListIndexes() const
virtual bool updateEvent(Long_t eventEntry)
BranchMapReaderStrategyV1(TFile *file, int fileVersion)
virtual edm::BranchID productToBranchID(edm::ProductID const &pid)
virtual bool updateRun(Long_t runEntry)
std::string const & eventMetaDataTreeName()
static const edm::BranchDescription kDefaultBranchDescription
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
virtual bool updateFile(TFile *file)
std::string const & productDescriptionBranchName()
virtual bool updateRun(Long_t runEntry)
virtual edm::BranchDescription const & productToBranch(edm::ProductID const &pid)
BranchMapReaderStrategyV8(TFile *file, int fileVersion)
BranchMapReaderStrategyV17(TFile *file, int fileVersion)
author Stefano ARGIRO author Bill Tanenbaum
edm::BranchListIndexes branchListIndexes_
virtual edm::BranchListIndexes const & branchListIndexes() const
BranchMapReaderStrategyV11(TFile *file, int fileVersion)
virtual bool updateRun(Long_t runEntry)
int getFileVersion() const
virtual edm::BranchListIndexes const & branchListIndexes() const
std::string const & eventTreeName()
bool updateRun(Long_t runEntry)
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
edm::EventEntryInfoVector * pEventEntryInfoVector_
std::map< edm::BranchID, edm::BranchDescription > bidToDesc
std::string const & eventHistoryTreeName()
const std::vector< edm::BranchDescription > & getBranchDescriptions()
virtual bool updateRun(Long_t runEntry)