44 eventEntry_(-1), luminosityBlockEntry_(-1), runEntry_(-1), fileVersion_(fileVersion) {
54 typedef std::map<edm::BranchID, edm::BranchDescription>
bidToDesc;
78 std::vector<edm::BranchDescription>
bDesc_;
84 :
BMRStrategy(file, fileVersion), mapperFilled_(
false), thinnedAssociationsHelper_(new
edm::ThinnedAssociationsHelper) {
105 TBranch* bReg(
nullptr);
108 if(
nullptr != metaDataTree) {
110 bReg->SetAddress(ppReg);
116 std::vector<edm::BranchDescription>
const&
120 bDesc_.push_back(item.second);
188 for(
auto& item : prodList) {
199 return nullptr !=
br;
222 bool updateRun(Long_t runEntry)
override;
234 eventEntryInfoVector_(), pEventEntryInfoVector_(&eventEntryInfoVector_) {
268 if(
nullptr != metaDataTree) {
287 for(
auto& item : prodList) {
297 return nullptr !=
br;
322 bool updateRun(Long_t runEntry)
override;
334 :
Strategy(file, fileVersion), eventHistoryTree_(
nullptr), pHistory_(&history_) {
368 if(
nullptr == metaDataTree) {
376 b->SetAddress(&branchIDListsPtr);
381 <<
"FindBranch of branchIDList failed";
397 for(
auto& item : prodList) {
408 return nullptr !=
br;
414 if(!eventHistoryBranch) {
416 <<
"Failed to find history branch in event history tree";
420 eventHistoryBranch->SetAddress(&
pHistory_);
439 bool updateRun(Long_t runEntry)
override;
451 :
Strategy(file, fileVersion), eventsTree_(
nullptr), pBranchListIndexes_(&branchListIndexes_) {
484 if(
nullptr == metaDataTree) {
492 b->SetAddress(&thinnedAssociationsHelperPtr);
500 b->SetAddress(&branchIDListsPtr);
505 <<
"FindBranch of branchIDList failed";
521 for(
auto& item : prodList) {
532 return nullptr !=
br;
538 if(!branchListIndexesBranch) {
540 <<
"Failed to find branch list indexes branch in event tree";
572 if(
nullptr == file) {
584 if(
nullptr == metaDataTree) {
591 bVer->SetAddress(&pV);
602 return strategy_->updateLuminosityBlock(newlumi);
615 TFile* currentFile(
strategy_->currentFile_);
616 bool isNew(file != currentFile);
623 isNew = eventTreeTemp !=
strategy_->eventTree_ ||
strategy_->fileUUID_ != currentFile->GetUUID();
627 if(fileVersion !=
strategy_->fileVersion_) {
641 std::vector<edm::BranchDescription>
const&
643 return strategy_->getBranchDescriptions();
647 std::unique_ptr<internal::BMRStrategy>
649 std::unique_ptr<internal::BMRStrategy>
s;
651 if(fileVersion >= 17) {
652 s = std::make_unique<internal::BranchMapReaderStrategyV17>(
file, fileVersion);
653 }
else if(fileVersion >= 11) {
654 s = std::make_unique<internal::BranchMapReaderStrategyV11>(
file, fileVersion);
655 }
else if(fileVersion >= 8) {
656 s = std::make_unique<internal::BranchMapReaderStrategyV8>(
file, fileVersion);
657 }
else if(fileVersion >= 7) {
658 s = std::make_unique<internal::BranchMapReaderStrategyV7>(
file, fileVersion);
660 s = std::make_unique<internal::BranchMapReaderStrategyV1>(
file, fileVersion);
bool updateFile(TFile *file) override
virtual bool updateFile(TFile *file)=0
BranchType const & branchType() const
bool updateFile(TFile *file) override
std::vector< BranchIDList > BranchIDLists
bool updateEvent(Long_t eventEntry) override
std::unique_ptr< internal::BMRStrategy > newStrategy(TFile *file, int fileVersion)
virtual const std::vector< edm::BranchDescription > & getBranchDescriptions()=0
edm::propagate_const< TFile * > currentFile_
BMRStrategy(TFile *file, int fileVersion)
std::unique_ptr< internal::BMRStrategy > strategy_
bool updateEvent(Long_t eventEntry)
std::map< BranchKey, BranchDescription > ProductList
edm::EventEntryInfoVector const * pEventEntryInfoVector_
bool updateFile(TFile *file)
bool updateFile(TFile *file) override
bool updateRun(Long_t runEntry) override
std::string const & fileFormatVersionBranchName()
BranchMapReaderStrategyV7(TFile *file, int fileVersion)
std::vector< EventEntryInfo > EventEntryInfoVector
edm::propagate_const< std::unique_ptr< edm::BranchIDLists > > branchIDLists_
edm::History const * pHistory_
std::vector< edm::BranchDescription > const & getBranchDescriptions() override
std::string const & luminosityBlockTreeName()
virtual const edm::BranchDescription & branchIDToBranch(const edm::BranchID &bid) const =0
bidToDesc branchDescriptionMap_
edm::BranchListIndexes dummyBranchListIndexes_
edm::BranchListIndexes const & branchListIndexes() const override
std::vector< edm::BranchDescription > bDesc_
bool updateLuminosityBlock(Long_t luminosityBlockEntry)
edm::propagate_const< TTree * > eventTree_
bool updateFile(TFile *file) override
edm::BranchListIndexes dummyBranchListIndexes_
std::vector< BranchListIndex > BranchListIndexes
edm::EventEntryInfoVector eventEntryInfoVector_
Container::value_type value_type
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
Strategy(TFile *file, int fileVersion)
std::string const & eventHistoryBranchName()
edm::propagate_const< edm::BranchListIndexes * > pBranchListIndexes_
edm::propagate_const< TTree * > eventHistoryTree_
bool updateEvent(Long_t eventEntry) override
edm::BranchID productToBranchID(edm::ProductID const &pid) override
edm::BranchListIndexes const & branchListIndexes() const override
bool updateRun(Long_t runEntry) override
Long_t luminosityBlockEntry_
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
const edm::BranchDescription & productToBranch(const edm::ProductID &pid)
edm::propagate_const< TTree * > luminosityBlockTree_
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
BranchID const & branchID() const
edm::BranchListIndexes dummyBranchListIndexes_
std::string const & metaDataTreeName()
void setFrozen(bool initializeLookupInfo=true)
bool updateFile(TFile *file) override
std::string const & runTreeName()
BranchListIndexes const & branchListIndexes() const
element_type const * get() const
edm::BranchListIndexes const & branchListIndexes() const override
virtual const edm::BranchDescription & productToBranch(const edm::ProductID &pid)=0
BranchMapReaderStrategyV1(TFile *file, int fileVersion)
virtual edm::BranchID productToBranchID(const edm::ProductID &pid)=0
edm::BranchID productToBranchID(edm::ProductID const &pid) override
std::string const & eventMetaDataTreeName()
static const edm::BranchDescription kDefaultBranchDescription
bool updateEvent(Long_t eventEntry) override
bool updateMap() override
edm::BranchListIndexes const & branchListIndexes() const override
ProductList & productListUpdator()
edm::propagate_const< TTree * > runTree_
edm::propagate_const< std::unique_ptr< edm::BranchIDLists > > branchIDLists_
std::string const & productDescriptionBranchName()
edm::propagate_const< std::unique_ptr< edm::ThinnedAssociationsHelper > > thinnedAssociationsHelper_
BranchMapReaderStrategyV8(TFile *file, int fileVersion)
BranchMapReaderStrategyV17(TFile *file, int fileVersion)
edm::propagate_const< TTree * > eventsTree_
bool updateEvent(Long_t eventEntry) override
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
edm::BranchListIndexes branchListIndexes_
bool updateMap() override
BranchMapReaderStrategyV11(TFile *file, int fileVersion)
int getFileVersion() const
std::string const & thinnedAssociationsHelperBranchName()
std::string const & eventTreeName()
bool updateRun(Long_t runEntry)
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
std::map< edm::BranchID, edm::BranchDescription > bidToDesc
bool updateRun(Long_t runEntry) override
edm::propagate_const< TBranch * > entryInfoBranch_
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
std::string const & eventHistoryTreeName()
edm::BranchID productToBranchID(edm::ProductID const &pid) override
edm::BranchDescription const & branchIDToBranch(edm::BranchID const &bid) const override
edm::BranchListIndexes const & branchListIndexes() const override
edm::BranchDescription const & productToBranch(edm::ProductID const &pid) override
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
const std::vector< edm::BranchDescription > & getBranchDescriptions()
bool updateMap() override
bool updateMap() override
bool updateMap() override
edm::ThinnedAssociationsHelper const & thinnedAssociationsHelper() const override
bool updateRun(Long_t runEntry) override