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

Constructor & Destructor Documentation

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

Definition at line 2080 of file RootFile.cc.

2084  rootTree_(rootTree),
2085  infoVector_(),
2087  entryDescriptionMap_(theMap),
2088  daqProvenanceHelper_(daqProvenanceHelper),
2089  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2090  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2074
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2076
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2077
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2071
U second(std::pair< T, U > const &p)
static SharedResourcesRegistry * instance()
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2073
T first(std::pair< T, U > const &p)
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2072
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2075
edm::OldProvenanceReader::~OldProvenanceReader ( )
inlineoverride

Member Function Documentation

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

Implements edm::ProvenanceReaderBase.

Definition at line 2106 of file RootFile.cc.

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

Referenced by edm::DummyProvenanceReader::~DummyProvenanceReader().

2106  {
2107  {
2108  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2109  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2110  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2111  }
2112  std::set<ProductProvenance> retValue;
2113  for (auto const& info : infoVector_) {
2114  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2115  assert(iter != entryDescriptionMap_.end());
2116  Parentage parentage(iter->second.parents());
2117  if (daqProvenanceHelper_) {
2118  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2119  daqProvenanceHelper_->mapParentageID(parentage.id()));
2120  } else {
2121  retValue.emplace(info.branchID(), parentage.id());
2122  }
2123  }
2124  return retValue;
2125  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:495
static const TGPicture * info(bool iBackgroundIsBlack)
BranchID const & mapBranchID(BranchID const &branchID) const
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2074
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2076
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2071
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2073
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2072
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2075
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 2092 of file RootFile.cc.

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

Referenced by edm::DummyProvenanceReader::~DummyProvenanceReader().

2095  {
2096  readProvenanceAsyncImpl(this,
2098  task,
2099  transitionIndex,
2100  writeTo,
2101  moduleCallingContext,
2102  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2103  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2104  }
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2077
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2071
SerialTaskQueueChain & serialQueueChain() const

Member Data Documentation

SharedResourcesAcquirer edm::OldProvenanceReader::acquirer_
private

Definition at line 2077 of file RootFile.cc.

Referenced by readProvenanceAsync().

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 2075 of file RootFile.cc.

Referenced by readProvenance().

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 2074 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2072 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2076 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2073 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2071 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().