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)
 
std::set< ProductProvenancereadProvenance (unsigned int transitionIndex) const override
 
 ~FullProvenanceReader () override
 
- Public Member Functions inherited from edm::ProvenanceReaderBase
 ProvenanceReaderBase ()
 
virtual ~ProvenanceReaderBase ()
 

Private Member Functions

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

Constructor & Destructor Documentation

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

Definition at line 2023 of file RootFile.cc.

2023  :
2025  rootTree_(rootTree),
2026  infoVector_(),
2028  daqProvenanceHelper_(daqProvenanceHelper),
2029  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2030  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first)
2031 {
2032  }
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2016
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2018
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2017
U second(std::pair< T, U > const &p)
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2019
static SharedResourcesRegistry * instance()
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2020
T first(std::pair< T, U > const &p)
edm::FullProvenanceReader::~FullProvenanceReader ( )
inlineoverride

Member Function Documentation

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

Implements edm::ProvenanceReaderBase.

Definition at line 2051 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_, and rootTree_.

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

2051  {
2052  {
2053  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2055  }
2056  std::set<ProductProvenance> retValue;
2057  if(daqProvenanceHelper_) {
2058  for(auto const& info : infoVector_) {
2059  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2060  daqProvenanceHelper_->mapParentageID(info.parentageID()));
2061  }
2062  } else {
2063  for(auto const& info : infoVector_) {
2064  retValue.emplace(info);
2065  }
2066  }
2067  return retValue;
2068  }
static const TGPicture * info(bool iBackgroundIsBlack)
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2016
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2018
BranchID const & mapBranchID(BranchID const &branchID) const
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2017
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
Definition: RootTree.h:145
TBranch * branchEntryInfoBranch() const
Definition: RootTree.h:184
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2019
EntryNumber const & entryNumberForIndex(unsigned int index) const
Definition: RootTree.cc:94
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 2035 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().

2039  {
2040  readProvenanceAsyncImpl(this,
2042  task,
2043  transitionIndex,
2044  writeTo,
2045  moduleCallingContext,
2048  }
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:2020
DelayedReader * rootDelayedReader() const
Definition: RootTree.cc:124

Member Data Documentation

SharedResourcesAcquirer edm::FullProvenanceReader::acquirer_
private

Definition at line 2020 of file RootFile.cc.

Referenced by readProvenanceAsync().

DaqProvenanceHelper const* edm::FullProvenanceReader::daqProvenanceHelper_
private

Definition at line 2018 of file RootFile.cc.

Referenced by readProvenance().

ProductProvenanceVector edm::FullProvenanceReader::infoVector_
private

Definition at line 2016 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2019 of file RootFile.cc.

Referenced by readProvenance().

ProductProvenanceVector* edm::FullProvenanceReader::pInfoVector_
mutableprivate

Definition at line 2017 of file RootFile.cc.

Referenced by readProvenance().

RootTree* edm::FullProvenanceReader::rootTree_
private

Definition at line 2015 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().