41 : currentFile_(file), eventTree_(0), luminosityBlockTree_(0), runTree_(0),
42 eventEntry_(-1), luminosityBlockEntry_(-1), runEntry_(-1), fileVersion_(fileVersion) {
52 typedef std::map<edm::BranchID, edm::BranchDescription>
bidToDesc;
74 std::vector<edm::BranchDescription>
bDesc_;
103 if(0 != metaDataTree) {
105 bReg->SetAddress(ppReg);
111 std::vector<edm::BranchDescription>
const&
139 virtual bool updateFile(TFile* file)
override;
174 for(
auto& item : prodList) {
205 virtual bool updateFile(TFile* file)
override;
206 virtual bool updateEvent(Long_t eventEntry)
override;
208 virtual bool updateRun(Long_t runEntry)
override;
220 eventEntryInfoVector_(), pEventEntryInfoVector_(&eventEntryInfoVector_) {
254 if(0 != metaDataTree) {
273 for(
auto& item : prodList) {
307 virtual bool updateFile(TFile* file)
override;
308 virtual bool updateEvent(Long_t eventEntry)
override;
310 virtual bool updateRun(Long_t runEntry)
override;
322 :
Strategy(file, fileVersion), eventHistoryTree_(0), pHistory_(&history_) {
356 if(0 == metaDataTree) {
364 b->SetAddress(&branchIDListsPtr);
369 <<
"FindBranch of branchIDList failed";
385 for(
auto& item : prodList) {
402 if(!eventHistoryBranch) {
404 <<
"Failed to find history branch in event history tree";
408 eventHistoryBranch->SetAddress(&
pHistory_);
424 virtual bool updateFile(TFile* file)
override;
425 virtual bool updateEvent(Long_t eventEntry)
override;
427 virtual bool updateRun(Long_t runEntry)
override;
439 :
Strategy(file, fileVersion), eventsTree_(0), pBranchListIndexes_(&branchListIndexes_) {
472 if(0==metaDataTree) {
479 b->SetAddress(&branchIDListsPtr);
484 <<
"FindBranch of branchIDList failed";
500 for(
auto& item : prodList) {
517 if(!branchListIndexesBranch) {
519 <<
"Failed to find branch list indexes branch in event tree";
563 if(0==metaDataTree) {
570 bVer->SetAddress(&pV);
581 return strategy_->updateLuminosityBlock(newlumi);
594 TFile* currentFile(
strategy_->currentFile_);
595 bool isNew(file != currentFile);
602 isNew = eventTreeTemp !=
strategy_->eventTree_ ||
strategy_->fileUUID_ != currentFile->GetUUID();
606 if(fileVersion !=
strategy_->fileVersion_) {
620 std::vector<edm::BranchDescription>
const&
622 return strategy_->getBranchDescriptions();
626 std::auto_ptr<internal::BMRStrategy>
628 std::auto_ptr<internal::BMRStrategy>
s;
630 if(fileVersion >= 17) {
632 }
else if(fileVersion >= 11) {
634 }
else if(fileVersion >= 8) {
636 }
else if(fileVersion >= 7) {
virtual bool updateFile(TFile *file) 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_
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
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 & 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