CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::OldProvenanceReader Class Reference
Inheritance diagram for edm::OldProvenanceReader:
edm::ProvenanceReaderBase

Public Member Functions

 OldProvenanceReader (RootTree *rootTree, EntryDescriptionMap const &theMap, DaqProvenanceHelper const *daqProvenanceHelper)
 
std::set< ProductProvenancereadProvenance (unsigned int transitionIndex) const override
 
 ~OldProvenanceReader () 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_
 
EntryDescriptionMap const & entryDescriptionMap_
 
std::vector< EventEntryInfoinfoVector_
 
std::shared_ptr< std::recursive_mutex > mutex_
 
std::vector< EventEntryInfo > * pInfoVector_
 
edm::propagate_const< RootTree * > rootTree_
 

Detailed Description

Definition at line 2088 of file RootFile.cc.

Constructor & Destructor Documentation

◆ OldProvenanceReader()

edm::OldProvenanceReader::OldProvenanceReader ( RootTree rootTree,
EntryDescriptionMap const &  theMap,
DaqProvenanceHelper const *  daqProvenanceHelper 
)
explicit

Definition at line 2112 of file RootFile.cc.

2116  rootTree_(rootTree),
2117  infoVector_(),
2119  entryDescriptionMap_(theMap),
2120  daqProvenanceHelper_(daqProvenanceHelper),
2121  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2122  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}

◆ ~OldProvenanceReader()

edm::OldProvenanceReader::~OldProvenanceReader ( )
inlineoverride

Definition at line 2093 of file RootFile.cc.

2093 {}

Member Function Documentation

◆ readProvenance()

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

Implements edm::ProvenanceReaderBase.

Definition at line 2138 of file RootFile.cc.

2138  {
2139  {
2140  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2141  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2142  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2143  }
2144  std::set<ProductProvenance> retValue;
2145  for (auto const& info : infoVector_) {
2146  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2147  assert(iter != entryDescriptionMap_.end());
2148  Parentage parentage(iter->second.parents());
2149  if (daqProvenanceHelper_) {
2150  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2151  daqProvenanceHelper_->mapParentageID(parentage.id()));
2152  } else {
2153  retValue.emplace(info.branchID(), parentage.id());
2154  }
2155  }
2156  return retValue;
2157  }

References cms::cuda::assert(), daqProvenanceHelper_, entryDescriptionMap_, edm::roottree::getEntry(), info(), infoVector_, edm::DaqProvenanceHelper::mapBranchID(), edm::DaqProvenanceHelper::mapParentageID(), mutex_, pInfoVector_, and rootTree_.

◆ readProvenanceAsync()

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

Implements edm::ProvenanceReaderBase.

Definition at line 2124 of file RootFile.cc.

2127  {
2128  readProvenanceAsyncImpl(this,
2130  task,
2131  transitionIndex,
2132  writeTo,
2133  moduleCallingContext,
2134  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2135  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2136  }

References acquirer_, rootTree_, edm::SharedResourcesAcquirer::serialQueueChain(), and TrackValidation_cff::task.

Member Data Documentation

◆ acquirer_

SharedResourcesAcquirer edm::OldProvenanceReader::acquirer_
private

Definition at line 2109 of file RootFile.cc.

Referenced by readProvenanceAsync().

◆ daqProvenanceHelper_

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 2107 of file RootFile.cc.

Referenced by readProvenance().

◆ entryDescriptionMap_

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 2106 of file RootFile.cc.

Referenced by readProvenance().

◆ infoVector_

std::vector<EventEntryInfo> edm::OldProvenanceReader::infoVector_
private

Definition at line 2103 of file RootFile.cc.

Referenced by readProvenance().

◆ mutex_

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

Definition at line 2108 of file RootFile.cc.

Referenced by readProvenance().

◆ pInfoVector_

std::vector<EventEntryInfo>* edm::OldProvenanceReader::pInfoVector_
mutableprivate

Definition at line 2105 of file RootFile.cc.

Referenced by readProvenance().

◆ rootTree_

edm::propagate_const<RootTree*> edm::OldProvenanceReader::rootTree_
private

Definition at line 2102 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().

edm::SharedResourcesAcquirer::serialQueueChain
SerialTaskQueueChain & serialQueueChain() const
Definition: SharedResourcesAcquirer.h:54
edm::DaqProvenanceHelper::mapParentageID
ParentageID const & mapParentageID(ParentageID const &phid) const
Definition: DaqProvenanceHelper.cc:182
edm::OldProvenanceReader::infoVector_
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2103
cms::cuda::assert
assert(be >=bs)
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::first
T first(std::pair< T, U > const &p)
Definition: ParameterSet.cc:217
edm::OldProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2109
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::OldProvenanceReader::entryDescriptionMap_
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2106
edm::SharedResourcesRegistry::instance
static SharedResourcesRegistry * instance()
Definition: SharedResourcesRegistry.cc:25
edm::DaqProvenanceHelper::mapBranchID
BranchID const & mapBranchID(BranchID const &branchID) const
Definition: DaqProvenanceHelper.cc:191
edm::OldProvenanceReader::rootTree_
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2102
edm::OldProvenanceReader::pInfoVector_
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2105
edm::roottree::getEntry
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:496
edm::ProvenanceReaderBase::ProvenanceReaderBase
ProvenanceReaderBase()
Definition: ProductProvenanceRetriever.h:47
edm::OldProvenanceReader::daqProvenanceHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2107
edm::OldProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2108