test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::OldProvenanceReader Class Reference
Inheritance diagram for edm::OldProvenanceReader:
edm::ProvenanceReaderBase

Public Member Functions

 OldProvenanceReader (RootTree *rootTree, EntryDescriptionMap const &theMap, DaqProvenanceHelper const *daqProvenanceHelper)
 
virtual ~OldProvenanceReader ()
 
- Public Member Functions inherited from edm::ProvenanceReaderBase
 ProvenanceReaderBase ()
 
virtual ~ProvenanceReaderBase ()
 

Private Member Functions

virtual std::set
< ProductProvenance
readProvenance (unsigned int transitionIndex) const override
 

Private Attributes

DaqProvenanceHelper const * daqProvenanceHelper_
 
EntryDescriptionMap const & entryDescriptionMap_
 
std::vector< EventEntryInfoinfoVector_
 
std::vector< EventEntryInfo > * pInfoVector_
 
SharedResourcesAcquirer resourceAcquirer_
 
edm::propagate_const< RootTree * > rootTree_
 

Detailed Description

Definition at line 1911 of file RootFile.cc.

Constructor & Destructor Documentation

edm::OldProvenanceReader::OldProvenanceReader ( RootTree rootTree,
EntryDescriptionMap const &  theMap,
DaqProvenanceHelper const *  daqProvenanceHelper 
)
explicit

Definition at line 1925 of file RootFile.cc.

1925  :
1927  rootTree_(rootTree),
1928  infoVector_(),
1930  entryDescriptionMap_(theMap),
1931  daqProvenanceHelper_(daqProvenanceHelper),
1932  resourceAcquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader()) {
1933  }
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:1920
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1917
static SharedResourcesRegistry * instance()
SharedResourcesAcquirer resourceAcquirer_
Definition: RootFile.cc:1922
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1919
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1918
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1921
virtual edm::OldProvenanceReader::~OldProvenanceReader ( )
inlinevirtual

Definition at line 1914 of file RootFile.cc.

1914 {}

Member Function Documentation

std::set< ProductProvenance > edm::OldProvenanceReader::readProvenance ( unsigned int  transitionIndex) const
overrideprivatevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 1936 of file RootFile.cc.

References assert(), daqProvenanceHelper_, entryDescriptionMap_, edm::roottree::getEntry(), info(), infoVector_, edm::DaqProvenanceHelper::mapBranchID(), edm::DaqProvenanceHelper::mapParentageID(), pInfoVector_, resourceAcquirer_, rootTree_, and edm::setRefCoreStreamer().

1936  {
1937  {
1938  std::lock_guard<SharedResourcesAcquirer> guard(resourceAcquirer_);
1939  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
1940  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
1941  setRefCoreStreamer(true);
1942  }
1943  std::set<ProductProvenance> retValue;
1944  for(auto const& info : infoVector_) {
1945  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
1946  assert(iter != entryDescriptionMap_.end());
1947  Parentage parentage(iter->second.parents());
1948  if(daqProvenanceHelper_) {
1949  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
1950  daqProvenanceHelper_->mapParentageID(parentage.id()));
1951  } else {
1952  retValue.emplace(info.branchID(), parentage.id());
1953  }
1954  }
1955  return retValue;
1956  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:480
static const TGPicture * info(bool iBackgroundIsBlack)
BranchID const & mapBranchID(BranchID const &branchID) const
assert(m_qm.get())
void setRefCoreStreamer(bool resetAll=false)
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:1920
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1917
SharedResourcesAcquirer resourceAcquirer_
Definition: RootFile.cc:1922
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1919
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1918
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1921

Member Data Documentation

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 1921 of file RootFile.cc.

Referenced by readProvenance().

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 1920 of file RootFile.cc.

Referenced by readProvenance().

std::vector<EventEntryInfo> edm::OldProvenanceReader::infoVector_
private

Definition at line 1918 of file RootFile.cc.

Referenced by readProvenance().

std::vector<EventEntryInfo>* edm::OldProvenanceReader::pInfoVector_
mutableprivate

Definition at line 1919 of file RootFile.cc.

Referenced by readProvenance().

SharedResourcesAcquirer edm::OldProvenanceReader::resourceAcquirer_
mutableprivate

Definition at line 1922 of file RootFile.cc.

Referenced by readProvenance().

edm::propagate_const<RootTree*> edm::OldProvenanceReader::rootTree_
private

Definition at line 1917 of file RootFile.cc.

Referenced by readProvenance().