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

Constructor & Destructor Documentation

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

Definition at line 2055 of file RootFile.cc.

2055  :
2057  rootTree_(rootTree),
2058  infoVector_(),
2060  entryDescriptionMap_(theMap),
2061  daqProvenanceHelper_(daqProvenanceHelper),
2062  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2063  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first)
2064 {
2065  }
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2049
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2051
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2052
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2046
U second(std::pair< T, U > const &p)
static SharedResourcesRegistry * instance()
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2048
T first(std::pair< T, U > const &p)
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2047
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2050
edm::OldProvenanceReader::~OldProvenanceReader ( )
inlineoverride

Member Function Documentation

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

Implements edm::ProvenanceReaderBase.

Definition at line 2084 of file RootFile.cc.

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

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

2084  {
2085  {
2086  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2087  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2088  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2089  setRefCoreStreamer(true);
2090  }
2091  std::set<ProductProvenance> retValue;
2092  for(auto const& info : infoVector_) {
2093  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2094  assert(iter != entryDescriptionMap_.end());
2095  Parentage parentage(iter->second.parents());
2096  if(daqProvenanceHelper_) {
2097  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2098  daqProvenanceHelper_->mapParentageID(parentage.id()));
2099  } else {
2100  retValue.emplace(info.branchID(), parentage.id());
2101  }
2102  }
2103  return retValue;
2104  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:497
static const TGPicture * info(bool iBackgroundIsBlack)
BranchID const & mapBranchID(BranchID const &branchID) const
void setRefCoreStreamer(bool resetAll=false)
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2049
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2051
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2046
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2048
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2047
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2050
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 2068 of file RootFile.cc.

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

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

2072  {
2073  readProvenanceAsyncImpl(this,
2075  task,
2076  transitionIndex,
2077  writeTo,
2078  moduleCallingContext,
2079  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2080  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2081  }
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2052
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2046
SerialTaskQueueChain & serialQueueChain() const

Member Data Documentation

SharedResourcesAcquirer edm::OldProvenanceReader::acquirer_
private

Definition at line 2052 of file RootFile.cc.

Referenced by readProvenanceAsync().

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 2050 of file RootFile.cc.

Referenced by readProvenance().

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 2049 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2047 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2051 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2048 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 2046 of file RootFile.cc.

Referenced by readProvenance(), and readProvenanceAsync().