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::ProductProvenanceRetriever Class Reference

#include <ProductProvenanceRetriever.h>

Inheritance diagram for edm::ProductProvenanceRetriever:
edm::ProductProvenanceLookup

Public Member Functions

void deepCopy (ProductProvenanceRetriever const &)
 
void mergeParentProcessRetriever (ProductProvenanceRetriever const &provRetriever)
 
void mergeProvenanceRetrievers (std::shared_ptr< ProductProvenanceRetriever > other)
 
ProductProvenanceRetrieveroperator= (ProductProvenanceRetriever const &)=delete
 
 ProductProvenanceRetriever (unsigned int iTransitionIndex)
 
 ProductProvenanceRetriever (unsigned int iTransitionIndex, edm::ProductRegistry const &)
 
 ProductProvenanceRetriever (std::unique_ptr< ProvenanceReaderBase > reader)
 
void readProvenanceAsync (WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext) const
 
void reset ()
 
- Public Member Functions inherited from edm::ProductProvenanceLookup
ProductProvenance const * branchIDToProvenance (BranchID const &bid) const
 
ProductProvenance const * branchIDToProvenanceForProducedOnly (BranchID const &bid) const
 
void insertIntoSet (ProductProvenance provenanceProduct) const
 
ProductProvenanceLookupoperator= (ProductProvenanceLookup const &)=delete
 
 ProductProvenanceLookup ()
 
 ProductProvenanceLookup (edm::ProductRegistry const &)
 
void update (edm::ProductRegistry const &)
 
virtual ~ProductProvenanceLookup ()
 

Private Member Functions

const ProductProvenanceLookupnextRetriever () const final
 
std::unique_ptr< const
std::set< ProductProvenance > > 
readProvenance () const final
 
void setTransitionIndex (unsigned int transitionIndex)
 

Private Attributes

edm::propagate_const
< std::shared_ptr
< ProductProvenanceRetriever > > 
nextRetriever_
 
std::shared_ptr< const
ProvenanceReaderBase
provenanceReader_
 
unsigned int transitionIndex_
 

Additional Inherited Members

- Protected Attributes inherited from edm::ProductProvenanceLookup
std::vector
< ProducedProvenanceInfo
entryInfoSet_
 
edm::propagate_const
< ProductProvenanceLookup
const * > 
parentProcessRetriever_
 
std::atomic< const std::set
< ProductProvenance > * > 
readEntryInfoSet_
 

Detailed Description

Definition at line 37 of file ProductProvenanceRetriever.h.

Constructor & Destructor Documentation

edm::ProductProvenanceRetriever::ProductProvenanceRetriever ( unsigned int  iTransitionIndex)
explicit

Definition at line 13 of file ProductProvenanceRetriever.cc.

std::shared_ptr< const ProvenanceReaderBase > provenanceReader_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_
edm::ProductProvenanceRetriever::ProductProvenanceRetriever ( unsigned int  iTransitionIndex,
edm::ProductRegistry const &  iReg 
)

Definition at line 16 of file ProductProvenanceRetriever.cc.

std::shared_ptr< const ProvenanceReaderBase > provenanceReader_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_
edm::ProductProvenanceRetriever::ProductProvenanceRetriever ( std::unique_ptr< ProvenanceReaderBase reader)
explicit

Definition at line 20 of file ProductProvenanceRetriever.cc.

References cms::cuda::assert(), and provenanceReader_.

23  provenanceReader_(reader.release()),
26  }
assert(be >=bs)
tuple reader
Definition: DQM.py:105
std::shared_ptr< const ProvenanceReaderBase > provenanceReader_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_

Member Function Documentation

void edm::ProductProvenanceRetriever::deepCopy ( ProductProvenanceRetriever const &  iFrom)

Definition at line 46 of file ProductProvenanceRetriever.cc.

References cms::cuda::assert(), edm::ProductProvenanceLookup::entryInfoSet_, nextRetriever_, provenanceReader_, edm::ProductProvenanceLookup::readEntryInfoSet_, and transitionIndex_.

46  {
47  if (iFrom.readEntryInfoSet_) {
48  if (readEntryInfoSet_) {
49  delete readEntryInfoSet_.exchange(nullptr);
50  }
51  readEntryInfoSet_ = new std::set<ProductProvenance>(*iFrom.readEntryInfoSet_);
52  } else {
53  if (readEntryInfoSet_) {
54  delete readEntryInfoSet_.load();
55  readEntryInfoSet_ = nullptr;
56  }
57  }
58  assert(iFrom.entryInfoSet_.empty());
59  provenanceReader_ = iFrom.provenanceReader_;
60 
61  if (iFrom.nextRetriever_) {
62  if (not nextRetriever_) {
63  nextRetriever_ = std::make_shared<ProductProvenanceRetriever>(transitionIndex_);
64  }
65  nextRetriever_->deepCopy(*(iFrom.nextRetriever_));
66  }
67  }
assert(be >=bs)
std::shared_ptr< const ProvenanceReaderBase > provenanceReader_
std::atomic< const std::set< ProductProvenance > * > readEntryInfoSet_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_
void edm::ProductProvenanceRetriever::mergeParentProcessRetriever ( ProductProvenanceRetriever const &  provRetriever)

Definition at line 85 of file ProductProvenanceRetriever.cc.

References edm::ProductProvenanceLookup::parentProcessRetriever_.

85  {
86  parentProcessRetriever_ = &provRetriever;
87  }
edm::propagate_const< ProductProvenanceLookup const * > parentProcessRetriever_
void edm::ProductProvenanceRetriever::mergeProvenanceRetrievers ( std::shared_ptr< ProductProvenanceRetriever other)

Definition at line 81 of file ProductProvenanceRetriever.cc.

References nextRetriever_.

81  {
82  nextRetriever_ = other;
83  }
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_
const ProductProvenanceLookup* edm::ProductProvenanceRetriever::nextRetriever ( ) const
inlinefinalprivatevirtual

Implements edm::ProductProvenanceLookup.

Definition at line 57 of file ProductProvenanceRetriever.h.

References nextRetriever_.

57 { return nextRetriever_.get(); }
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_
ProductProvenanceRetriever& edm::ProductProvenanceRetriever::operator= ( ProductProvenanceRetriever const &  )
delete
std::unique_ptr< const std::set< ProductProvenance > > edm::ProductProvenanceRetriever::readProvenance ( ) const
finalprivatevirtual

Implements edm::ProductProvenanceLookup.

Definition at line 28 of file ProductProvenanceRetriever.cc.

References provenanceReader_, groupFilesInBlocks::temp, and transitionIndex_.

28  {
29  std::unique_ptr<const std::set<ProductProvenance>> temp;
30  if (provenanceReader_) {
31  temp = std::make_unique<std::set<ProductProvenance> const>(provenanceReader_->readProvenance(transitionIndex_));
32  }
33  return temp;
34  }
std::shared_ptr< const ProvenanceReaderBase > provenanceReader_
void edm::ProductProvenanceRetriever::readProvenanceAsync ( WaitingTaskHolder  task,
ModuleCallingContext const *  moduleCallingContext 
) const

Definition at line 36 of file ProductProvenanceRetriever.cc.

References nextRetriever_, provenanceReader_, edm::ProductProvenanceLookup::readEntryInfoSet_, and transitionIndex_.

37  {
38  if (provenanceReader_ and nullptr == readEntryInfoSet_.load()) {
39  provenanceReader_->readProvenanceAsync(task, moduleCallingContext, transitionIndex_, readEntryInfoSet_);
40  }
41  if (nextRetriever_) {
42  nextRetriever_->readProvenanceAsync(task, moduleCallingContext);
43  }
44  }
std::shared_ptr< const ProvenanceReaderBase > provenanceReader_
std::atomic< const std::set< ProductProvenance > * > readEntryInfoSet_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_
void edm::ProductProvenanceRetriever::reset ( void  )

Definition at line 69 of file ProductProvenanceRetriever.cc.

References alignCSCRings::e, edm::ProductProvenanceLookup::entryInfoSet_, nextRetriever_, edm::ProductProvenanceLookup::parentProcessRetriever_, and edm::ProductProvenanceLookup::readEntryInfoSet_.

69  {
70  delete readEntryInfoSet_.load();
71  readEntryInfoSet_ = nullptr;
72  for (auto& e : entryInfoSet_) {
73  e.resetParentage();
74  }
75  if (nextRetriever_) {
76  nextRetriever_->reset();
77  }
78  parentProcessRetriever_ = nullptr;
79  }
std::atomic< const std::set< ProductProvenance > * > readEntryInfoSet_
edm::propagate_const< ProductProvenanceLookup const * > parentProcessRetriever_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > nextRetriever_
std::vector< ProducedProvenanceInfo > entryInfoSet_
void edm::ProductProvenanceRetriever::setTransitionIndex ( unsigned int  transitionIndex)
inlineprivate

Definition at line 58 of file ProductProvenanceRetriever.h.

References transitionIndex_.

58 { transitionIndex_ = transitionIndex; }

Member Data Documentation

edm::propagate_const<std::shared_ptr<ProductProvenanceRetriever> > edm::ProductProvenanceRetriever::nextRetriever_
private
std::shared_ptr<const ProvenanceReaderBase> edm::ProductProvenanceRetriever::provenanceReader_
private
unsigned int edm::ProductProvenanceRetriever::transitionIndex_
private