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

Constructor & Destructor Documentation

◆ FullProvenanceReader()

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

Definition at line 2318 of file RootFile.cc.

2320  rootTree_(rootTree),
2321  infoVector_(),
2323  daqProvenanceHelper_(daqProvenanceHelper),
2324  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2325  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}

◆ ~FullProvenanceReader()

edm::FullProvenanceReader::~FullProvenanceReader ( )
inlineoverride

Definition at line 2300 of file RootFile.cc.

2300 {}

Member Function Documentation

◆ readProvenance()

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

Implements edm::ProvenanceReaderBase.

Definition at line 2341 of file RootFile.cc.

2341  {
2342  {
2343  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2346  }
2347  std::set<ProductProvenance> retValue;
2348  if (daqProvenanceHelper_) {
2349  for (auto const& info : infoVector_) {
2350  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2351  daqProvenanceHelper_->mapParentageID(info.parentageID()));
2352  }
2353  } else {
2354  for (auto const& info : infoVector_) {
2355  retValue.emplace(info);
2356  }
2357  }
2358  return retValue;
2359  }

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

◆ readProvenanceAsync()

void edm::FullProvenanceReader::readProvenanceAsync ( WaitingTaskHolder  task,
ModuleCallingContext const *  moduleCallingContext,
unsigned int  transitionIndex,
std::atomic< const std::set< ProductProvenance > * > &  writeTo 
) const
overrideprivatevirtual

Member Data Documentation

◆ acquirer_

SharedResourcesAcquirer edm::FullProvenanceReader::acquirer_
private

Definition at line 2315 of file RootFile.cc.

Referenced by readProvenanceAsync().

◆ daqProvenanceHelper_

DaqProvenanceHelper const* edm::FullProvenanceReader::daqProvenanceHelper_
private

Definition at line 2313 of file RootFile.cc.

Referenced by readProvenance().

◆ infoVector_

ProductProvenanceVector edm::FullProvenanceReader::infoVector_
private

Definition at line 2310 of file RootFile.cc.

Referenced by readProvenance().

◆ mutex_

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

Definition at line 2314 of file RootFile.cc.

Referenced by readProvenance().

◆ pInfoVector_

ProductProvenanceVector* edm::FullProvenanceReader::pInfoVector_
mutableprivate

Definition at line 2312 of file RootFile.cc.

Referenced by readProvenance().

◆ rootTree_

RootTree* edm::FullProvenanceReader::rootTree_
private

Definition at line 2309 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().

edm::SharedResourcesAcquirer::serialQueueChain
SerialTaskQueueChain & serialQueueChain() const
Definition: SharedResourcesAcquirer.h:54
edm::FullProvenanceReader::pInfoVector_
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2312
edm::RootTree::rootDelayedReader
DelayedReader * rootDelayedReader() const
Definition: RootTree.cc:147
edm::DaqProvenanceHelper::mapParentageID
ParentageID const & mapParentageID(ParentageID const &phid) const
Definition: DaqProvenanceHelper.cc:182
edm::FullProvenanceReader::daqProvenanceHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2313
edm::FullProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2315
edm::RootTree::fillBranchEntryMeta
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
Definition: RootTree.h:153
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edm::DelayedReader::preEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
edm::first
T first(std::pair< T, U > const &p)
Definition: ParameterSet.cc:217
edm::RootTree::entryNumberForIndex
EntryNumber const & entryNumberForIndex(unsigned int index) const
Definition: RootTree.cc:113
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:253
edm::SharedResourcesRegistry::instance
static SharedResourcesRegistry * instance()
Definition: SharedResourcesRegistry.cc:25
edm::DelayedReader::postEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
edm::DaqProvenanceHelper::mapBranchID
BranchID const & mapBranchID(BranchID const &branchID) const
Definition: DaqProvenanceHelper.cc:191
edm::FullProvenanceReader::infoVector_
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2310
edm::FullProvenanceReader::rootTree_
RootTree * rootTree_
Definition: RootFile.cc:2309
edm::RootTree::branchEntryInfoBranch
TBranch * branchEntryInfoBranch() const
Definition: RootTree.h:176
edm::ProvenanceReaderBase::ProvenanceReaderBase
ProvenanceReaderBase()
Definition: ProductProvenanceRetriever.h:28
edm::FullProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2314