CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 (WaitingTaskHolder 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 2312 of file RootFile.cc.

Constructor & Destructor Documentation

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

Definition at line 2333 of file RootFile.cc.

2335  rootTree_(rootTree),
2336  infoVector_(),
2338  daqProvenanceHelper_(daqProvenanceHelper),
2339  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2340  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2325
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2328
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2327
U second(std::pair< T, U > const &p)
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2329
static SharedResourcesRegistry * instance()
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2330
T first(std::pair< T, U > const &p)
edm::FullProvenanceReader::~FullProvenanceReader ( )
inlineoverride

Definition at line 2315 of file RootFile.cc.

2315 {}

Member Function Documentation

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

Implements edm::ProvenanceReaderBase.

Definition at line 2356 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_.

2356  {
2357  {
2358  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2361  }
2362  std::set<ProductProvenance> retValue;
2363  if (daqProvenanceHelper_) {
2364  for (auto const& info : infoVector_) {
2365  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2366  daqProvenanceHelper_->mapParentageID(info.parentageID()));
2367  }
2368  } else {
2369  for (auto const& info : infoVector_) {
2370  retValue.emplace(info);
2371  }
2372  }
2373  return retValue;
2374  }
static const TGPicture * info(bool iBackgroundIsBlack)
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2325
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
Definition: RootTree.h:153
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2328
BranchID const & mapBranchID(BranchID const &branchID) const
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2327
TBranch * branchEntryInfoBranch() const
Definition: RootTree.h:176
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2329
EntryNumber const & entryNumberForIndex(unsigned int index) const
Definition: RootTree.cc:113
ParentageID const & mapParentageID(ParentageID const &phid) const
void edm::FullProvenanceReader::readProvenanceAsync ( WaitingTaskHolder  task,
ModuleCallingContext const *  moduleCallingContext,
unsigned int  transitionIndex,
std::atomic< const std::set< ProductProvenance > * > &  writeTo 
) const
overrideprivatevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 2342 of file RootFile.cc.

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

2345  {
2346  readProvenanceAsyncImpl(this,
2348  task,
2349  transitionIndex,
2350  writeTo,
2351  moduleCallingContext,
2354  }
SerialTaskQueueChain & serialQueueChain() const
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2330
DelayedReader * rootDelayedReader() const
Definition: RootTree.cc:147
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0

Member Data Documentation

SharedResourcesAcquirer edm::FullProvenanceReader::acquirer_
private

Definition at line 2330 of file RootFile.cc.

Referenced by readProvenanceAsync().

DaqProvenanceHelper const* edm::FullProvenanceReader::daqProvenanceHelper_
private

Definition at line 2328 of file RootFile.cc.

Referenced by readProvenance().

ProductProvenanceVector edm::FullProvenanceReader::infoVector_
private

Definition at line 2325 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2329 of file RootFile.cc.

Referenced by readProvenance().

ProductProvenanceVector* edm::FullProvenanceReader::pInfoVector_
mutableprivate

Definition at line 2327 of file RootFile.cc.

Referenced by readProvenance().

RootTree* edm::FullProvenanceReader::rootTree_
private

Definition at line 2324 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().