45 luminosityBlockTree_(nullptr),
48 luminosityBlockEntry_(-1),
50 fileVersion_(fileVersion) {
59 typedef std::map<edm::BranchID, edm::BranchDescription>
bidToDesc;
88 std::vector<edm::BranchDescription>
bDesc_;
96 thinnedAssociationsHelper_(new
edm::ThinnedAssociationsHelper) {
117 TBranch* bReg(
nullptr);
120 if (
nullptr != metaDataTree) {
122 bReg->SetAddress(ppReg);
196 for (
auto&
item : prodList) {
207 return nullptr !=
br;
231 bool updateRun(Long_t runEntry)
override;
243 :
Strategy(
file, fileVersion), eventEntryInfoVector_(), pEventEntryInfoVector_(&eventEntryInfoVector_) {
277 if (
nullptr != metaDataTree) {
296 for (
auto&
item : prodList) {
306 return nullptr !=
br;
331 bool updateRun(Long_t runEntry)
override;
344 :
Strategy(
file, fileVersion), eventHistoryTree_(nullptr), pHistory_(&history_) {
378 if (
nullptr == metaDataTree) {
386 b->SetAddress(&branchIDListsPtr);
406 for (
auto&
item : prodList) {
417 return nullptr !=
br;
423 if (!eventHistoryBranch) {
428 eventHistoryBranch->SetAddress(&
pHistory_);
446 bool updateRun(Long_t runEntry)
override;
459 :
Strategy(
file, fileVersion), eventsTree_(nullptr), pBranchListIndexes_(&branchListIndexes_) {
492 if (
nullptr == metaDataTree) {
501 b->SetAddress(&thinnedAssociationsHelperPtr);
509 b->SetAddress(&branchIDListsPtr);
529 for (
auto&
item : prodList) {
540 return nullptr !=
br;
545 TBranch* branchListIndexesBranch =
547 if (!branchListIndexesBranch) {
549 <<
"Failed to find branch list indexes branch in event tree";
579 if (
nullptr ==
file) {
591 if (
nullptr == metaDataTree) {
598 bVer->SetAddress(&pV);
616 TFile* currentFile(
strategy_->currentFile_);
617 bool isNew(
file != currentFile);
624 isNew = eventTreeTemp !=
strategy_->eventTree_ ||
strategy_->fileUUID_ != currentFile->GetUUID();
628 if (fileVersion !=
strategy_->fileVersion_) {
642 return strategy_->getBranchDescriptions();
646 std::unique_ptr<internal::BMRStrategy>
s;
648 if (fileVersion >= 17) {
649 s = std::make_unique<internal::BranchMapReaderStrategyV17>(
file, fileVersion);
650 }
else if (fileVersion >= 11) {
651 s = std::make_unique<internal::BranchMapReaderStrategyV11>(
file, fileVersion);
652 }
else if (fileVersion >= 8) {
653 s = std::make_unique<internal::BranchMapReaderStrategyV8>(
file, fileVersion);
654 }
else if (fileVersion >= 7) {
655 s = std::make_unique<internal::BranchMapReaderStrategyV7>(
file, fileVersion);
657 s = std::make_unique<internal::BranchMapReaderStrategyV1>(
file, fileVersion);
bool updateFile(TFile *file) override
std::string const & metaDataTreeName()
edm::BranchListIndexes const & branchListIndexes() const override
edm::BranchListIndexes const & branchListIndexes() const override
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)
edm::propagate_const< TFile * > currentFile_
BMRStrategy(TFile *file, int fileVersion)
std::unique_ptr< internal::BMRStrategy > strategy_
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
bool updateEvent(Long_t eventEntry)
std::map< BranchKey, BranchDescription > ProductList
edm::EventEntryInfoVector const * pEventEntryInfoVector_
bool updateFile(TFile *file)
bool updateFile(TFile *file) override
std::string const & runTreeName()
bool updateRun(Long_t runEntry) override
BranchMapReaderStrategyV7(TFile *file, int fileVersion)
std::vector< EventEntryInfo > EventEntryInfoVector
edm::propagate_const< std::unique_ptr< edm::BranchIDLists > > branchIDLists_
edm::History const * pHistory_
edm::ThinnedAssociationsHelper const & thinnedAssociationsHelper() const override
bidToDesc branchDescriptionMap_
edm::BranchListIndexes dummyBranchListIndexes_
std::string const & fileFormatVersionBranchName()
std::vector< edm::BranchDescription > bDesc_
std::string const & productDescriptionBranchName()
bool updateLuminosityBlock(Long_t luminosityBlockEntry)
std::string const & branchIDListBranchName()
edm::propagate_const< TTree * > eventTree_
constexpr element_type const * get() const
int getFileVersion() const
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)
edm::BranchListIndexes const & branchListIndexes() const override
Strategy(TFile *file, int fileVersion)
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
bool updateRun(Long_t runEntry) override
Long_t luminosityBlockEntry_
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
edm::propagate_const< TTree * > luminosityBlockTree_
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
edm::BranchListIndexes dummyBranchListIndexes_
void setFrozen(bool initializeLookupInfo=true)
bool updateFile(TFile *file) override
std::string const & luminosityBlockTreeName()
edm::BranchDescription const & branchIDToBranch(edm::BranchID const &bid) const override
std::string const & eventHistoryTreeName()
BranchMapReaderStrategyV1(TFile *file, int fileVersion)
std::vector< edm::BranchDescription > const & getBranchDescriptions() override
edm::BranchID productToBranchID(edm::ProductID const &pid) override
static const edm::BranchDescription kDefaultBranchDescription
bool updateEvent(Long_t eventEntry) override
const edm::BranchDescription & productToBranch(const edm::ProductID &pid)
bool updateMap() override
ProductList & productListUpdator()
edm::propagate_const< TTree * > runTree_
edm::propagate_const< std::unique_ptr< edm::BranchIDLists > > branchIDLists_
edm::propagate_const< std::unique_ptr< edm::ThinnedAssociationsHelper > > thinnedAssociationsHelper_
BranchMapReaderStrategyV8(TFile *file, int fileVersion)
BranchMapReaderStrategyV17(TFile *file, int fileVersion)
edm::propagate_const< TTree * > eventsTree_
std::string const & eventHistoryBranchName()
std::string const & eventTreeName()
bool updateEvent(Long_t eventEntry) override
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
edm::BranchListIndexes const & branchListIndexes() const override
edm::BranchListIndexes branchListIndexes_
bool updateMap() override
BranchMapReaderStrategyV11(TFile *file, int fileVersion)
edm::BranchListIndexes const & branchListIndexes() const override
bool updateRun(Long_t runEntry)
BranchListIndexes const & branchListIndexes() const
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
edm::BranchID productToBranchID(edm::ProductID const &pid) override
bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
bool updateMap() override
edm::BranchDescription const & productToBranch(edm::ProductID const &pid) override
bool updateMap() override
std::string const & eventMetaDataTreeName()
bool updateMap() override
std::string const & thinnedAssociationsHelperBranchName()
bool updateRun(Long_t runEntry) override
const std::vector< edm::BranchDescription > & getBranchDescriptions()