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

Constructor & Destructor Documentation

◆ OldProvenanceReader()

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

Definition at line 2426 of file RootFile.cc.

2430  rootTree_(rootTree),
2431  infoVector_(),
2433  entryDescriptionMap_(theMap),
2434  daqProvenanceHelper_(daqProvenanceHelper),
2435  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2436  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2420
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2422
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2423
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2416
U second(std::pair< T, U > const &p)
static SharedResourcesRegistry * instance()
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2419
T first(std::pair< T, U > const &p)
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2417
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2421

◆ ~OldProvenanceReader()

edm::OldProvenanceReader::~OldProvenanceReader ( )
inlineoverride

Definition at line 2407 of file RootFile.cc.

2407 {}

Member Function Documentation

◆ readProvenance()

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

Implements edm::ProvenanceReaderBase.

Definition at line 2452 of file RootFile.cc.

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

2452  {
2453  {
2454  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2455  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2456  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2457  }
2458  std::set<ProductProvenance> retValue;
2459  for (auto const& info : infoVector_) {
2460  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2461  assert(iter != entryDescriptionMap_.end());
2462  Parentage parentage(iter->second.parents());
2463  if (daqProvenanceHelper_) {
2464  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2465  daqProvenanceHelper_->mapParentageID(parentage.id()));
2466  } else {
2467  retValue.emplace(info.branchID(), parentage.id());
2468  }
2469  }
2470  return retValue;
2471  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:527
static const TGPicture * info(bool iBackgroundIsBlack)
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2420
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2422
assert(be >=bs)
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2416
BranchID const & mapBranchID(BranchID const &branchID) const
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2419
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2417
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2421

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

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

2441  {
2442  readProvenanceAsyncImpl(this,
2444  task,
2445  transitionIndex,
2446  writeTo,
2447  moduleCallingContext,
2448  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2449  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2450  }
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2423
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2416
SerialTaskQueueChain & serialQueueChain() const

Member Data Documentation

◆ acquirer_

SharedResourcesAcquirer edm::OldProvenanceReader::acquirer_
private

Definition at line 2423 of file RootFile.cc.

Referenced by readProvenanceAsync().

◆ daqProvenanceHelper_

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 2421 of file RootFile.cc.

Referenced by readProvenance().

◆ entryDescriptionMap_

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 2420 of file RootFile.cc.

Referenced by readProvenance().

◆ infoVector_

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

Definition at line 2417 of file RootFile.cc.

Referenced by readProvenance().

◆ mutex_

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

Definition at line 2422 of file RootFile.cc.

Referenced by readProvenance().

◆ pInfoVector_

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

Definition at line 2419 of file RootFile.cc.

Referenced by readProvenance().

◆ rootTree_

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

Definition at line 2416 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().