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

Constructor & Destructor Documentation

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

Definition at line 2401 of file RootFile.cc.

2405  rootTree_(rootTree),
2406  infoVector_(),
2408  entryDescriptionMap_(theMap),
2409  daqProvenanceHelper_(daqProvenanceHelper),
2410  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2411  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2395
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2397
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2398
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2391
U second(std::pair< T, U > const &p)
static SharedResourcesRegistry * instance()
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2394
T first(std::pair< T, U > const &p)
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2392
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2396
edm::OldProvenanceReader::~OldProvenanceReader ( )
inlineoverride

Definition at line 2382 of file RootFile.cc.

2382 {}

Member Function Documentation

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

Implements edm::ProvenanceReaderBase.

Definition at line 2427 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_.

2427  {
2428  {
2429  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2430  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2431  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2432  }
2433  std::set<ProductProvenance> retValue;
2434  for (auto const& info : infoVector_) {
2435  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2436  assert(iter != entryDescriptionMap_.end());
2437  Parentage parentage(iter->second.parents());
2438  if (daqProvenanceHelper_) {
2439  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2440  daqProvenanceHelper_->mapParentageID(parentage.id()));
2441  } else {
2442  retValue.emplace(info.branchID(), parentage.id());
2443  }
2444  }
2445  return retValue;
2446  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:527
static const TGPicture * info(bool iBackgroundIsBlack)
BranchID const & mapBranchID(BranchID const &branchID) const
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2395
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2397
assert(be >=bs)
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2391
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2394
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2392
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2396
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 2413 of file RootFile.cc.

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

2416  {
2417  readProvenanceAsyncImpl(this,
2419  task,
2420  transitionIndex,
2421  writeTo,
2422  moduleCallingContext,
2423  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2424  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2425  }
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2398
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2391
SerialTaskQueueChain & serialQueueChain() const

Member Data Documentation

SharedResourcesAcquirer edm::OldProvenanceReader::acquirer_
private

Definition at line 2398 of file RootFile.cc.

Referenced by readProvenanceAsync().

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 2396 of file RootFile.cc.

Referenced by readProvenance().

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 2395 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2392 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2397 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2394 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2391 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().