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 1922 of file RootFile.cc.

Constructor & Destructor Documentation

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

Definition at line 1936 of file RootFile.cc.

1936  :
1938  rootTree_(rootTree),
1939  infoVector_(),
1941  entryDescriptionMap_(theMap),
1942  daqProvenanceHelper_(daqProvenanceHelper),
1943  resourceAcquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader()) {
1944  }
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:1931
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1928
static SharedResourcesRegistry * instance()
SharedResourcesAcquirer resourceAcquirer_
Definition: RootFile.cc:1933
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1930
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1929
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1932
virtual edm::OldProvenanceReader::~OldProvenanceReader ( )
inlinevirtual

Definition at line 1925 of file RootFile.cc.

1925 {}

Member Function Documentation

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

Implements edm::ProvenanceReaderBase.

Definition at line 1947 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().

1947  {
1948  {
1949  std::lock_guard<SharedResourcesAcquirer> guard(resourceAcquirer_);
1950  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
1951  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
1952  setRefCoreStreamer(true);
1953  }
1954  std::set<ProductProvenance> retValue;
1955  for(auto const& info : infoVector_) {
1956  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
1957  assert(iter != entryDescriptionMap_.end());
1958  Parentage parentage(iter->second.parents());
1959  if(daqProvenanceHelper_) {
1960  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
1961  daqProvenanceHelper_->mapParentageID(parentage.id()));
1962  } else {
1963  retValue.emplace(info.branchID(), parentage.id());
1964  }
1965  }
1966  return retValue;
1967  }
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:1931
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1928
SharedResourcesAcquirer resourceAcquirer_
Definition: RootFile.cc:1933
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1930
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1929
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1932

Member Data Documentation

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 1932 of file RootFile.cc.

Referenced by readProvenance().

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 1931 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1929 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1930 of file RootFile.cc.

Referenced by readProvenance().

SharedResourcesAcquirer edm::OldProvenanceReader::resourceAcquirer_
mutableprivate

Definition at line 1933 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1928 of file RootFile.cc.

Referenced by readProvenance().