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

Constructor & Destructor Documentation

◆ FullProvenanceReader()

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

Definition at line 2359 of file RootFile.cc.

2361  rootTree_(rootTree),
2362  infoVector_(),
2364  daqProvenanceHelper_(daqProvenanceHelper),
2365  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2366  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2351
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2354
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2353
U second(std::pair< T, U > const &p)
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2355
static SharedResourcesRegistry * instance()
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2356
T first(std::pair< T, U > const &p)

◆ ~FullProvenanceReader()

edm::FullProvenanceReader::~FullProvenanceReader ( )
inlineoverride

Definition at line 2341 of file RootFile.cc.

2341 {}

Member Function Documentation

◆ readProvenance()

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

Implements edm::ProvenanceReaderBase.

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

2382  {
2383  {
2384  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2387  }
2388  std::set<ProductProvenance> retValue;
2389  if (daqProvenanceHelper_) {
2390  for (auto const& info : infoVector_) {
2391  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2392  daqProvenanceHelper_->mapParentageID(info.parentageID()));
2393  }
2394  } else {
2395  for (auto const& info : infoVector_) {
2396  retValue.emplace(info);
2397  }
2398  }
2399  return retValue;
2400  }
static const TGPicture * info(bool iBackgroundIsBlack)
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2351
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
Definition: RootTree.h:153
EntryNumber const & entryNumberForIndex(unsigned int index) const
Definition: RootTree.cc:113
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2354
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2353
TBranch * branchEntryInfoBranch() const
Definition: RootTree.h:176
BranchID const & mapBranchID(BranchID const &branchID) const
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2355
ParentageID const & mapParentageID(ParentageID const &phid) const

◆ readProvenanceAsync()

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

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

2371  {
2372  readProvenanceAsyncImpl(this,
2374  task,
2375  transitionIndex,
2376  writeTo,
2377  moduleCallingContext,
2380  }
DelayedReader * rootDelayedReader() const
Definition: RootTree.cc:147
SerialTaskQueueChain & serialQueueChain() const
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2356
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0

Member Data Documentation

◆ acquirer_

SharedResourcesAcquirer edm::FullProvenanceReader::acquirer_
private

Definition at line 2356 of file RootFile.cc.

Referenced by readProvenanceAsync().

◆ daqProvenanceHelper_

DaqProvenanceHelper const* edm::FullProvenanceReader::daqProvenanceHelper_
private

Definition at line 2354 of file RootFile.cc.

Referenced by readProvenance().

◆ infoVector_

ProductProvenanceVector edm::FullProvenanceReader::infoVector_
private

Definition at line 2351 of file RootFile.cc.

Referenced by readProvenance().

◆ mutex_

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

Definition at line 2355 of file RootFile.cc.

Referenced by readProvenance().

◆ pInfoVector_

ProductProvenanceVector* edm::FullProvenanceReader::pInfoVector_
mutableprivate

Definition at line 2353 of file RootFile.cc.

Referenced by readProvenance().

◆ rootTree_

RootTree* edm::FullProvenanceReader::rootTree_
private

Definition at line 2350 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().