CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::FullProvenanceReader Class Reference
Inheritance diagram for edm::FullProvenanceReader:
edm::ProvenanceReaderBase

Public Member Functions

 FullProvenanceReader (RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
 
virtual std::set< ProductProvenancereadProvenance (unsigned int transitionIndex) const override
 
virtual ~FullProvenanceReader ()
 
- Public Member Functions inherited from edm::ProvenanceReaderBase
 ProvenanceReaderBase ()
 
virtual ~ProvenanceReaderBase ()
 

Private Member Functions

virtual void readProvenanceAsync (WaitingTask *task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
 

Private Attributes

SharedResourcesAcquirer acquirer_
 
DaqProvenanceHelper const * daqProvenanceHelper_
 
ProductProvenanceVector infoVector_
 
std::shared_ptr< std::recursive_mutex > mutex_
 
ProductProvenanceVectorpInfoVector_
 
RootTreerootTree_
 

Detailed Description

Definition at line 1966 of file RootFile.cc.

Constructor & Destructor Documentation

edm::FullProvenanceReader::FullProvenanceReader ( RootTree rootTree,
DaqProvenanceHelper const *  daqProvenanceHelper 
)
explicit

Definition at line 1986 of file RootFile.cc.

1986  :
1988  rootTree_(rootTree),
1989  infoVector_(),
1991  daqProvenanceHelper_(daqProvenanceHelper),
1992  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
1993  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first)
1994 {
1995  }
ProductProvenanceVector infoVector_
Definition: RootFile.cc:1979
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1981
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:1980
U second(std::pair< T, U > const &p)
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:1982
static SharedResourcesRegistry * instance()
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:1983
T first(std::pair< T, U > const &p)
virtual edm::FullProvenanceReader::~FullProvenanceReader ( )
inlinevirtual

Member Function Documentation

std::set< ProductProvenance > edm::FullProvenanceReader::readProvenance ( unsigned int  transitionIndex) const
overridevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 2014 of file RootFile.cc.

References edm::RootTree::branchEntryInfoBranch(), daqProvenanceHelper_, edm::RootTree::entryNumberForIndex(), edm::RootTree::fillBranchEntryMeta(), info(), infoVector_, edm::DaqProvenanceHelper::mapBranchID(), edm::DaqProvenanceHelper::mapParentageID(), mutex_, pInfoVector_, rootTree_, and edm::setRefCoreStreamer().

Referenced by edm::OldProvenanceReader::~OldProvenanceReader().

2014  {
2015  {
2016  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2018  setRefCoreStreamer(true);
2019  }
2020  std::set<ProductProvenance> retValue;
2021  if(daqProvenanceHelper_) {
2022  for(auto const& info : infoVector_) {
2023  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2024  daqProvenanceHelper_->mapParentageID(info.parentageID()));
2025  }
2026  } else {
2027  for(auto const& info : infoVector_) {
2028  retValue.emplace(info);
2029  }
2030  }
2031  return retValue;
2032  }
static const TGPicture * info(bool iBackgroundIsBlack)
ProductProvenanceVector infoVector_
Definition: RootFile.cc:1979
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1981
BranchID const & mapBranchID(BranchID const &branchID) const
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:1980
void setRefCoreStreamer(bool resetAll=false)
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
Definition: RootTree.h:116
TBranch * branchEntryInfoBranch() const
Definition: RootTree.h:155
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:1982
EntryNumber const & entryNumberForIndex(unsigned int index) const
Definition: RootTree.cc:93
ParentageID const & mapParentageID(ParentageID const &phid) const
void edm::FullProvenanceReader::readProvenanceAsync ( WaitingTask task,
ModuleCallingContext const *  moduleCallingContext,
unsigned int  transitionIndex,
std::atomic< const std::set< ProductProvenance > * > &  writeTo 
) const
overrideprivatevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 1998 of file RootFile.cc.

References acquirer_, edm::DelayedReader::postEventReadFromSourceSignal(), edm::DelayedReader::preEventReadFromSourceSignal(), edm::RootTree::rootDelayedReader(), rootTree_, and edm::SharedResourcesAcquirer::serialQueueChain().

Referenced by edm::OldProvenanceReader::~OldProvenanceReader().

2002  {
2003  readProvenanceAsyncImpl(this,
2005  task,
2006  transitionIndex,
2007  writeTo,
2008  moduleCallingContext,
2011  }
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
SerialTaskQueueChain & serialQueueChain() const
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:1983
DelayedReader * rootDelayedReader() const
Definition: RootTree.cc:123

Member Data Documentation

SharedResourcesAcquirer edm::FullProvenanceReader::acquirer_
private

Definition at line 1983 of file RootFile.cc.

Referenced by readProvenanceAsync().

DaqProvenanceHelper const* edm::FullProvenanceReader::daqProvenanceHelper_
private

Definition at line 1981 of file RootFile.cc.

Referenced by readProvenance().

ProductProvenanceVector edm::FullProvenanceReader::infoVector_
private

Definition at line 1979 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1982 of file RootFile.cc.

Referenced by readProvenance().

ProductProvenanceVector* edm::FullProvenanceReader::pInfoVector_
mutableprivate

Definition at line 1980 of file RootFile.cc.

Referenced by readProvenance().

RootTree* edm::FullProvenanceReader::rootTree_
private

Definition at line 1978 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().