48 luminosityBlockEntry_(-1),
50 fileVersion_(fileVersion) {
59 typedef std::map<edm::BranchID, edm::BranchDescription>
bidToDesc;
82 return *thinnedAssociationsHelper_;
88 std::vector<edm::BranchDescription>
bDesc_;
96 thinnedAssociationsHelper_(new
edm::ThinnedAssociationsHelper) {
117 TBranch* bReg(
nullptr);
120 if (
nullptr != metaDataTree) {
122 bReg->SetAddress(ppReg);
131 bDesc_.push_back(item.second);
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
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