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

Constructor & Destructor Documentation

◆ OldProvenanceReader()

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

Definition at line 2085 of file RootFile.cc.

2089  rootTree_(rootTree),
2090  infoVector_(),
2092  entryDescriptionMap_(theMap),
2093  daqProvenanceHelper_(daqProvenanceHelper),
2094  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2095  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}

◆ ~OldProvenanceReader()

edm::OldProvenanceReader::~OldProvenanceReader ( )
inlineoverride

Definition at line 2066 of file RootFile.cc.

2066 {}

Member Function Documentation

◆ readProvenance()

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

Implements edm::ProvenanceReaderBase.

Definition at line 2111 of file RootFile.cc.

2111  {
2112  {
2113  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2114  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2115  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2116  }
2117  std::set<ProductProvenance> retValue;
2118  for (auto const& info : infoVector_) {
2119  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2120  assert(iter != entryDescriptionMap_.end());
2121  Parentage parentage(iter->second.parents());
2122  if (daqProvenanceHelper_) {
2123  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2124  daqProvenanceHelper_->mapParentageID(parentage.id()));
2125  } else {
2126  retValue.emplace(info.branchID(), parentage.id());
2127  }
2128  }
2129  return retValue;
2130  }

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

2100  {
2101  readProvenanceAsyncImpl(this,
2103  task,
2104  transitionIndex,
2105  writeTo,
2106  moduleCallingContext,
2107  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2108  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2109  }

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

Member Data Documentation

◆ acquirer_

SharedResourcesAcquirer edm::OldProvenanceReader::acquirer_
private

Definition at line 2082 of file RootFile.cc.

Referenced by readProvenanceAsync().

◆ daqProvenanceHelper_

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 2080 of file RootFile.cc.

Referenced by readProvenance().

◆ entryDescriptionMap_

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 2079 of file RootFile.cc.

Referenced by readProvenance().

◆ infoVector_

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

Definition at line 2076 of file RootFile.cc.

Referenced by readProvenance().

◆ mutex_

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

Definition at line 2081 of file RootFile.cc.

Referenced by readProvenance().

◆ pInfoVector_

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

Definition at line 2078 of file RootFile.cc.

Referenced by readProvenance().

◆ rootTree_

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

Definition at line 2075 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:2076
cms::cuda::assert
assert(be >=bs)
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
edm::first
T first(std::pair< T, U > const &p)
Definition: ParameterSet.cc:210
edm::OldProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2082
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::OldProvenanceReader::entryDescriptionMap_
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2079
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:2075
edm::OldProvenanceReader::pInfoVector_
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2078
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:2080
edm::OldProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2081