CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes
fwlite::internal::Strategy Class Reference
Inheritance diagram for fwlite::internal::Strategy:
fwlite::internal::BMRStrategy fwlite::internal::BranchMapReaderStrategyV1 fwlite::internal::BranchMapReaderStrategyV11 fwlite::internal::BranchMapReaderStrategyV17 fwlite::internal::BranchMapReaderStrategyV8 fwlite::internal::BranchMapReaderStrategyV7

Public Types

typedef std::map
< edm::BranchID,
edm::BranchDescription
bidToDesc
 

Public Member Functions

virtual std::vector
< edm::BranchDescription >
const & 
getBranchDescriptions ()
 
TBranch * getBranchRegistry (edm::ProductRegistry **pReg)
 
virtual edm::BranchDescription
const & 
productToBranch (edm::ProductID const &pid)
 
virtual edm::BranchID productToBranchID (edm::ProductID const &pid)
 
 Strategy (TFile *file, int fileVersion)
 
virtual bool updateEvent (Long_t eventEntry)
 
virtual bool updateFile (TFile *file)
 
virtual bool updateLuminosityBlock (Long_t luminosityBlockEntry)
 
virtual bool updateMap ()
 
virtual bool updateRun (Long_t runEntry)
 
virtual ~Strategy ()
 
- Public Member Functions inherited from fwlite::internal::BMRStrategy
 BMRStrategy (TFile *file, int fileVersion)
 
virtual const
edm::BranchListIndexes
branchListIndexes () const =0
 
virtual ~BMRStrategy ()
 

Public Attributes

std::vector
< edm::BranchDescription
bDesc_
 
bidToDesc branchDescriptionMap_
 
bool mapperFilled_
 
- Public Attributes inherited from fwlite::internal::BMRStrategy
TFile * currentFile_
 
Long_t eventEntry_
 
TTree * eventTree_
 
TUUID fileUUID_
 
int fileVersion_
 
Long_t luminosityBlockEntry_
 
TTree * luminosityBlockTree_
 
Long_t runEntry_
 
TTree * runTree_
 

Detailed Description

Definition at line 48 of file BranchMapReader.cc.

Member Typedef Documentation

Definition at line 50 of file BranchMapReader.cc.

Constructor & Destructor Documentation

fwlite::internal::Strategy::Strategy ( TFile *  file,
int  fileVersion 
)

Definition at line 76 of file BranchMapReader.cc.

77  : BMRStrategy(file, fileVersion), mapperFilled_(false) {
78  // do in derived obects
79  // updateFile(file);
80  }
BMRStrategy(TFile *file, int fileVersion)
fwlite::internal::Strategy::~Strategy ( )
virtual

Definition at line 82 of file BranchMapReader.cc.

82  {
83  // probably need to clean up something here...
84  }

Member Function Documentation

std::vector< edm::BranchDescription > const & fwlite::internal::Strategy::getBranchDescriptions ( )
virtual

Implements fwlite::internal::BMRStrategy.

Definition at line 111 of file BranchMapReader.cc.

References bDesc_, branchDescriptionMap_, and i.

111  {
112  if(bDesc_.empty()) {
113  for(bidToDesc::const_iterator i = branchDescriptionMap_.begin(); i != branchDescriptionMap_.end(); ++i) {
114  bDesc_.push_back(i->second);
115  }
116  }
117  return bDesc_;
118  }
int i
Definition: DBlmapReader.cc:9
std::vector< edm::BranchDescription > bDesc_
TBranch * fwlite::internal::Strategy::getBranchRegistry ( edm::ProductRegistry **  pReg)

Definition at line 97 of file BranchMapReader.cc.

References fwlite::internal::BMRStrategy::currentFile_, edm::poolNames::metaDataTreeName(), and edm::poolNames::productDescriptionBranchName().

Referenced by fwlite::internal::BranchMapReaderStrategyV8::updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), and fwlite::internal::BranchMapReaderStrategyV1::updateMap().

97  {
98  TBranch* bReg(0);
99 
100  TTree* metaDataTree = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str()));
101  if(0 != metaDataTree) {
102  bReg = metaDataTree->GetBranch(edm::poolNames::productDescriptionBranchName().c_str());
103  bReg->SetAddress(ppReg);
104  bReg->GetEntry(0);
105  (*ppReg)->setFrozen(false);
106  }
107  return bReg;
108  }
std::string const & metaDataTreeName()
Definition: BranchType.cc:167
std::string const & productDescriptionBranchName()
Definition: BranchType.cc:172
edm::BranchDescription const & fwlite::internal::Strategy::productToBranch ( edm::ProductID const &  pid)
virtual

Implements fwlite::internal::BMRStrategy.

Definition at line 126 of file BranchMapReader.cc.

References branchDescriptionMap_, fwlite::internal::kDefaultBranchDescription, and productToBranchID().

126  {
128  bidToDesc::const_iterator bdi = branchDescriptionMap_.find(bid);
129  if(branchDescriptionMap_.end() == bdi) {
131  }
132  return bdi->second;
133  }
virtual edm::BranchID productToBranchID(edm::ProductID const &pid)
static const edm::BranchDescription kDefaultBranchDescription
edm::BranchID fwlite::internal::Strategy::productToBranchID ( edm::ProductID const &  pid)
virtual
virtual bool fwlite::internal::Strategy::updateEvent ( Long_t  eventEntry)
inlinevirtual
bool fwlite::internal::Strategy::updateFile ( TFile *  file)
virtual

Implements fwlite::internal::BMRStrategy.

Reimplemented in fwlite::internal::BranchMapReaderStrategyV17, fwlite::internal::BranchMapReaderStrategyV11, fwlite::internal::BranchMapReaderStrategyV8, and fwlite::internal::BranchMapReaderStrategyV1.

Definition at line 86 of file BranchMapReader.cc.

References bDesc_, branchDescriptionMap_, fwlite::internal::BMRStrategy::currentFile_, fwlite::internal::BMRStrategy::eventTree_, edm::poolNames::eventTreeName(), mergeVDriftHistosByStation::file, fwlite::internal::BMRStrategy::fileUUID_, fwlite::internal::BMRStrategy::luminosityBlockTree_, edm::poolNames::luminosityBlockTreeName(), fwlite::internal::BMRStrategy::runTree_, and edm::poolNames::runTreeName().

Referenced by fwlite::internal::BranchMapReaderStrategyV1::updateFile(), fwlite::internal::BranchMapReaderStrategyV8::updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), and fwlite::internal::BranchMapReaderStrategyV17::updateFile().

86  {
88  eventTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::eventTreeName().c_str()));
89  luminosityBlockTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::luminosityBlockTreeName().c_str()));
90  runTree_ = dynamic_cast<TTree*>(currentFile_->Get(edm::poolNames::runTreeName().c_str()));
91  fileUUID_ = currentFile_->GetUUID();
92  branchDescriptionMap_.clear();
93  bDesc_.clear();
94  return 0 != eventTree_;
95  }
std::string const & luminosityBlockTreeName()
Definition: BranchType.cc:265
std::vector< edm::BranchDescription > bDesc_
std::string const & runTreeName()
Definition: BranchType.cc:268
std::string const & eventTreeName()
Definition: BranchType.cc:254
virtual bool fwlite::internal::Strategy::updateLuminosityBlock ( Long_t  luminosityBlockEntry)
inlinevirtual
virtual bool fwlite::internal::Strategy::updateMap ( )
inlinevirtual
virtual bool fwlite::internal::Strategy::updateRun ( Long_t  runEntry)
inlinevirtual

Member Data Documentation

std::vector<edm::BranchDescription> fwlite::internal::Strategy::bDesc_
bidToDesc fwlite::internal::Strategy::branchDescriptionMap_
bool fwlite::internal::Strategy::mapperFilled_