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 (WaitingTask *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 2081 of file RootFile.cc.

Constructor & Destructor Documentation

◆ OldProvenanceReader()

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

Definition at line 2105 of file RootFile.cc.

2109  rootTree_(rootTree),
2110  infoVector_(),
2112  entryDescriptionMap_(theMap),
2113  daqProvenanceHelper_(daqProvenanceHelper),
2114  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2115  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}

◆ ~OldProvenanceReader()

edm::OldProvenanceReader::~OldProvenanceReader ( )
inlineoverride

Definition at line 2086 of file RootFile.cc.

2086 {}

Member Function Documentation

◆ readProvenance()

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

Implements edm::ProvenanceReaderBase.

Definition at line 2131 of file RootFile.cc.

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

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 ( WaitingTask task,
ModuleCallingContext const *  moduleCallingContext,
unsigned int  transitionIndex,
std::atomic< const std::set< ProductProvenance > * > &  writeTo 
) const
overrideprivatevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 2117 of file RootFile.cc.

2120  {
2121  readProvenanceAsyncImpl(this,
2123  task,
2124  transitionIndex,
2125  writeTo,
2126  moduleCallingContext,
2127  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2128  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2129  }

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

Member Data Documentation

◆ acquirer_

SharedResourcesAcquirer edm::OldProvenanceReader::acquirer_
private

Definition at line 2102 of file RootFile.cc.

Referenced by readProvenanceAsync().

◆ daqProvenanceHelper_

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 2100 of file RootFile.cc.

Referenced by readProvenance().

◆ entryDescriptionMap_

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 2099 of file RootFile.cc.

Referenced by readProvenance().

◆ infoVector_

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

Definition at line 2096 of file RootFile.cc.

Referenced by readProvenance().

◆ mutex_

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

Definition at line 2101 of file RootFile.cc.

Referenced by readProvenance().

◆ pInfoVector_

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

Definition at line 2098 of file RootFile.cc.

Referenced by readProvenance().

◆ rootTree_

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

Definition at line 2095 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:2096
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:2102
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::OldProvenanceReader::entryDescriptionMap_
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2099
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:2095
edm::OldProvenanceReader::pInfoVector_
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2098
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:2100
edm::OldProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2101