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::shared_ptr
< std::recursive_mutex > 
mutex_
 
std::vector< EventEntryInfo > * pInfoVector_
 
edm::propagate_const< RootTree * > rootTree_
 

Detailed Description

Definition at line 1918 of file RootFile.cc.

Constructor & Destructor Documentation

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

Definition at line 1932 of file RootFile.cc.

1932  :
1934  rootTree_(rootTree),
1935  infoVector_(),
1937  entryDescriptionMap_(theMap),
1938  daqProvenanceHelper_(daqProvenanceHelper),
1939  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second) {
1940  }
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:1927
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:1929
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1924
U second(std::pair< T, U > const &p)
static SharedResourcesRegistry * instance()
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1926
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1925
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1928
virtual edm::OldProvenanceReader::~OldProvenanceReader ( )
inlinevirtual

Definition at line 1921 of file RootFile.cc.

1921 {}

Member Function Documentation

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

Implements edm::ProvenanceReaderBase.

Definition at line 1943 of file RootFile.cc.

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

1943  {
1944  {
1945  std::lock_guard<std::recursive_mutex> guard(*mutex_);
1946  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
1947  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
1948  setRefCoreStreamer(true);
1949  }
1950  std::set<ProductProvenance> retValue;
1951  for(auto const& info : infoVector_) {
1952  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
1953  assert(iter != entryDescriptionMap_.end());
1954  Parentage parentage(iter->second.parents());
1955  if(daqProvenanceHelper_) {
1956  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
1957  daqProvenanceHelper_->mapParentageID(parentage.id()));
1958  } else {
1959  retValue.emplace(info.branchID(), parentage.id());
1960  }
1961  }
1962  return retValue;
1963  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:490
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:1927
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:1929
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1924
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1926
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1925
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1928

Member Data Documentation

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 1928 of file RootFile.cc.

Referenced by readProvenance().

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 1927 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1925 of file RootFile.cc.

Referenced by readProvenance().

std::shared_ptr<std::recursive_mutex> edm::OldProvenanceReader::mutex_
private

Definition at line 1929 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1926 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1924 of file RootFile.cc.

Referenced by readProvenance().