36 : currentFile_(file), eventTree_(0), luminosityBlockTree_(0), runTree_(0),
37 eventEntry_(-1), luminosityBlockEntry_(-1), runEntry_(-1), fileVersion_(fileVersion) {
47 typedef std::map<edm::BranchID, edm::BranchDescription>
bidToDesc;
69 std::vector<edm::BranchDescription>
bDesc_;
98 if (0 != metaDataTree) {
100 bReg->SetAddress(ppReg);
102 (*ppReg)->setFrozen(
false);
107 const std::vector<edm::BranchDescription>&
168 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
207 eventEntryInfoVector_(), pEventEntryInfoVector_(&eventEntryInfoVector_) {
241 if (0 != metaDataTree) {
260 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
306 :
Strategy(file, fileVersion), eventHistoryTree_(0), pHistory_(&history_) {
340 if(0 == metaDataTree) {
348 b->SetAddress(&branchIDListsPtr);
353 <<
"FindBranch of branchIDList failed";
369 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
384 if (!eventHistoryBranch) {
386 <<
"Failed to find history branch in event history tree";
390 eventHistoryBranch->SetAddress(&
pHistory_);
420 :
Strategy(file, fileVersion), eventsTree_(0), pBranchListIndexes_(&branchListIndexes_) {
453 if(0==metaDataTree) {
460 b->SetAddress(&branchIDListsPtr);
465 <<
"FindBranch of branchIDList failed";
481 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd; ++it) {
496 if (!branchListIndexesBranch) {
498 <<
"Failed to find history branch in event history tree";
542 if (0==metaDataTree) {
549 bVer->SetAddress(&pV);
560 return strategy_->updateLuminosityBlock(newlumi);
573 TFile* currentFile(
strategy_->currentFile_);
574 bool isNew(file != currentFile);
581 isNew = eventTreeTemp !=
strategy_->eventTree_ ||
strategy_->fileUUID_ != currentFile->GetUUID();
585 if (fileVersion !=
strategy_->fileVersion_) {
599 const std::vector<edm::BranchDescription>&
601 return strategy_->getBranchDescriptions();
605 std::auto_ptr<internal::BMRStrategy>
607 std::auto_ptr<internal::BMRStrategy>
s;
609 if (fileVersion >= 17) {
611 }
else if (fileVersion >= 11) {
613 }
else if (fileVersion >= 8) {
615 }
else if (fileVersion >= 7) {
std::auto_ptr< internal::BMRStrategy > newStrategy(TFile *file, int fileVersion)
std::auto_ptr< internal::BMRStrategy > strategy_
edm::BranchListIndexes * pBranchListIndexes_
virtual const std::vector< edm::BranchDescription > & getBranchDescriptions()
std::auto_ptr< edm::BranchIDLists > branchIDLists_
BMRStrategy(TFile *file, int fileVersion)
std::vector< BranchIDList > BranchIDLists
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
bool updateEvent(Long_t eventEntry)
std::map< BranchKey, BranchDescription > ProductList
bool updateFile(TFile *file)
virtual bool updateEvent(Long_t eventEntry)
std::string const & fileFormatVersionBranchName()
const edm::BranchDescription productToBranch(const edm::ProductID &pid)
virtual bool updateFile(TFile *file)
virtual bool updateEvent(Long_t eventEntry)
Container::value_type value_type
BranchMapReaderStrategyV7(TFile *file, int fileVersion)
std::vector< EventEntryInfo > EventEntryInfoVector
std::string const & luminosityBlockTreeName()
bidToDesc branchDescriptionMap_
TTree * luminosityBlockTree_
virtual bool updateFile(TFile *file)
virtual const edm::BranchDescription productToBranch(const edm::ProductID &pid)
std::vector< edm::BranchDescription > bDesc_
bool updateLuminosityBlock(Long_t luminosityBlockEntry)
TTree * eventHistoryTree_
ProductList const & productList() const
virtual edm::BranchID productToBranchID(const edm::ProductID &pid)
const std::vector< edm::BranchDescription > & getBranchDescriptions()
virtual bool updateFile(TFile *file)
std::vector< BranchListIndex > BranchListIndexes
edm::EventEntryInfoVector eventEntryInfoVector_
virtual bool updateEvent(Long_t eventEntry)
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
std::auto_ptr< edm::BranchIDLists > branchIDLists_
Strategy(TFile *file, int fileVersion)
virtual edm::BranchID productToBranchID(const edm::ProductID &pid)
TBranch * entryInfoBranch_
std::string const & eventHistoryBranchName()
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
Long_t luminosityBlockEntry_
TBranch * getBranchRegistry(edm::ProductRegistry **pReg)
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
virtual bool updateFile(TFile *file)
std::string const & metaDataTreeName()
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
std::string const & runTreeName()
BranchListIndexes const & branchListIndexes() const
virtual bool updateEvent(Long_t eventEntry)
BranchMapReaderStrategyV1(TFile *file, int fileVersion)
virtual bool updateRun(Long_t runEntry)
std::string const & eventMetaDataTreeName()
virtual bool updateLuminosityBlock(Long_t luminosityBlockEntry)
virtual bool updateFile(TFile *file)
std::string const & productDescriptionBranchName()
virtual bool updateRun(Long_t runEntry)
virtual edm::BranchID productToBranchID(const edm::ProductID &pid)
BranchMapReaderStrategyV8(TFile *file, int fileVersion)
BranchMapReaderStrategyV17(TFile *file, int fileVersion)
author Stefano ARGIRO author Bill Tanenbaum
edm::BranchListIndexes branchListIndexes_
BranchMapReaderStrategyV11(TFile *file, int fileVersion)
virtual bool updateRun(Long_t runEntry)
int getFileVersion() const
std::string const & eventTreeName()
bool updateRun(Long_t runEntry)
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
edm::EventEntryInfoVector * pEventEntryInfoVector_
std::map< edm::BranchID, edm::BranchDescription > bidToDesc
std::string const & eventHistoryTreeName()
virtual bool updateRun(Long_t runEntry)