42 : currentFile_(file), eventTree_(0), luminosityBlockTree_(0), runTree_(0),
43 eventEntry_(-1), luminosityBlockEntry_(-1), runEntry_(-1), fileVersion_(fileVersion) {
53 typedef std::map<edm::BranchID, edm::BranchDescription>
bidToDesc;
77 std::vector<edm::BranchDescription>
bDesc_;
83 :
BMRStrategy(file, fileVersion), mapperFilled_(
false), thinnedAssociationsHelper_(new edm::ThinnedAssociationsHelper) {
107 if(0 != metaDataTree) {
109 bReg->SetAddress(ppReg);
115 std::vector<edm::BranchDescription>
const&
152 virtual bool updateFile(TFile* file)
override;
187 for(
auto& item : prodList) {
218 virtual bool updateFile(TFile* file)
override;
219 virtual bool updateEvent(Long_t eventEntry)
override;
221 virtual bool updateRun(Long_t runEntry)
override;
233 eventEntryInfoVector_(), pEventEntryInfoVector_(&eventEntryInfoVector_) {
267 if(0 != metaDataTree) {
286 for(
auto& item : prodList) {
320 virtual bool updateFile(TFile* file)
override;
321 virtual bool updateEvent(Long_t eventEntry)
override;
323 virtual bool updateRun(Long_t runEntry)
override;
335 :
Strategy(file, fileVersion), eventHistoryTree_(0), pHistory_(&history_) {
369 if(0 == metaDataTree) {
377 b->SetAddress(&branchIDListsPtr);
382 <<
"FindBranch of branchIDList failed";
398 for(
auto& item : prodList) {
415 if(!eventHistoryBranch) {
417 <<
"Failed to find history branch in event history tree";
421 eventHistoryBranch->SetAddress(&
pHistory_);
437 virtual bool updateFile(TFile* file)
override;
438 virtual bool updateEvent(Long_t eventEntry)
override;
440 virtual bool updateRun(Long_t runEntry)
override;
452 :
Strategy(file, fileVersion), eventsTree_(0), pBranchListIndexes_(&branchListIndexes_) {
485 if(0==metaDataTree) {
493 b->SetAddress(&thinnedAssociationsHelperPtr);
501 b->SetAddress(&branchIDListsPtr);
506 <<
"FindBranch of branchIDList failed";
522 for(
auto& item : prodList) {
539 if(!branchListIndexesBranch) {
541 <<
"Failed to find branch list indexes branch in event tree";
585 if(0==metaDataTree) {
592 bVer->SetAddress(&pV);
603 return strategy_->updateLuminosityBlock(newlumi);
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 std::vector<edm::BranchDescription>
const&
644 return strategy_->getBranchDescriptions();
648 std::auto_ptr<internal::BMRStrategy>
650 std::auto_ptr<internal::BMRStrategy>
s;
652 if(fileVersion >= 17) {
654 }
else if(fileVersion >= 11) {
656 }
else if(fileVersion >= 8) {
658 }
else if(fileVersion >= 7) {
virtual bool updateFile(TFile *file) override
virtual edm::BranchDescription const & branchIDToBranch(edm::BranchID const &bid) const override
std::auto_ptr< internal::BMRStrategy > newStrategy(TFile *file, int fileVersion)
BranchType const & branchType() const
virtual bool updateFile(TFile *file) override
std::vector< BranchIDList > BranchIDLists
std::auto_ptr< internal::BMRStrategy > strategy_
std::unique_ptr< edm::ThinnedAssociationsHelper > thinnedAssociationsHelper_
edm::BranchListIndexes * pBranchListIndexes_
std::auto_ptr< edm::BranchIDLists > branchIDLists_
BMRStrategy(TFile *file, int fileVersion)
bool updateEvent(Long_t eventEntry)
std::map< BranchKey, BranchDescription > ProductList
bool updateFile(TFile *file)
virtual bool updateFile(TFile *file) override
virtual bool updateRun(Long_t runEntry) override
std::string const & fileFormatVersionBranchName()
BranchMapReaderStrategyV7(TFile *file, int fileVersion)
std::vector< EventEntryInfo > EventEntryInfoVector
virtual edm::BranchListIndexes const & branchListIndexes() const override
virtual std::vector< edm::BranchDescription > const & getBranchDescriptions() override
std::string const & luminosityBlockTreeName()
bidToDesc branchDescriptionMap_
edm::BranchListIndexes dummyBranchListIndexes_
TTree * luminosityBlockTree_
std::vector< edm::BranchDescription > bDesc_
bool updateLuminosityBlock(Long_t luminosityBlockEntry)
TTree * eventHistoryTree_
virtual bool updateEvent(Long_t eventEntry) override
virtual bool updateFile(TFile *file) override
edm::BranchListIndexes dummyBranchListIndexes_
std::vector< BranchListIndex > BranchListIndexes
edm::EventEntryInfoVector eventEntryInfoVector_
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::BranchListIndexes const & branchListIndexes() const override
virtual bool updateEvent(Long_t eventEntry) override
virtual edm::BranchID productToBranchID(edm::ProductID const &pid) override
virtual bool updateRun(Long_t runEntry) override
Long_t luminosityBlockEntry_
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
const edm::BranchDescription & productToBranch(const edm::ProductID &pid)
virtual 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)
virtual bool updateFile(TFile *file) override
Container::value_type value_type
virtual edm::BranchListIndexes const & branchListIndexes() const override
std::string const & runTreeName()
BranchListIndexes const & branchListIndexes() const
virtual edm::ThinnedAssociationsHelper const & thinnedAssociationsHelper() const override
BranchMapReaderStrategyV1(TFile *file, int fileVersion)
virtual edm::BranchListIndexes const & branchListIndexes() const override
virtual edm::BranchID productToBranchID(edm::ProductID const &pid) override
std::string const & eventMetaDataTreeName()
static const edm::BranchDescription kDefaultBranchDescription
virtual bool updateEvent(Long_t eventEntry) override
virtual bool updateMap() override
ProductList & productListUpdator()
std::string const & productDescriptionBranchName()
BranchMapReaderStrategyV8(TFile *file, int fileVersion)
BranchMapReaderStrategyV17(TFile *file, int fileVersion)
virtual bool updateEvent(Long_t eventEntry) override
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
edm::BranchListIndexes branchListIndexes_
virtual 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()
edm::EventEntryInfoVector * pEventEntryInfoVector_
virtual bool updateMap() override
std::map< edm::BranchID, edm::BranchDescription > bidToDesc
volatile std::atomic< bool > shutdown_flag false
virtual edm::BranchListIndexes const & branchListIndexes() const override
std::string const & eventHistoryTreeName()
virtual edm::BranchID productToBranchID(edm::ProductID const &pid) override
virtual edm::BranchDescription const & productToBranch(edm::ProductID const &pid) override
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
const std::vector< edm::BranchDescription > & getBranchDescriptions()
virtual bool updateMap() override
virtual bool updateMap() override
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry) override
virtual bool updateRun(Long_t runEntry) override
virtual bool updateRun(Long_t runEntry) override