test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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)
 
virtual ~OldProvenanceReader ()
 
- Public Member Functions inherited from edm::ProvenanceReaderBase
 ProvenanceReaderBase ()
 
virtual ~ProvenanceReaderBase ()
 

Private Member Functions

virtual void readProvenance (ProductProvenanceRetriever const &provRetriever, unsigned int transitionIndex) const override
 

Private Attributes

DaqProvenanceHelper const * daqProvenanceHelper_
 
EntryDescriptionMap const & entryDescriptionMap_
 
std::vector< EventEntryInfoinfoVector_
 
std::vector< EventEntryInfo > * pInfoVector_
 
SharedResourcesAcquirer resourceAcquirer_
 
RootTreerootTree_
 

Detailed Description

Definition at line 1856 of file RootFile.cc.

Constructor & Destructor Documentation

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

Definition at line 1870 of file RootFile.cc.

1870  :
1872  rootTree_(rootTree),
1873  infoVector_(),
1875  entryDescriptionMap_(theMap),
1876  daqProvenanceHelper_(daqProvenanceHelper),
1877  resourceAcquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader()) {
1878  }
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:1865
static SharedResourcesRegistry * instance()
SharedResourcesAcquirer resourceAcquirer_
Definition: RootFile.cc:1867
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1864
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1863
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1866
virtual edm::OldProvenanceReader::~OldProvenanceReader ( )
inlinevirtual

Definition at line 1859 of file RootFile.cc.

1859 {}

Member Function Documentation

void edm::OldProvenanceReader::readProvenance ( ProductProvenanceRetriever const &  provRetriever,
unsigned int  transitionIndex 
) const
overrideprivatevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 1881 of file RootFile.cc.

References edm::RootTree::branchEntryInfoBranch(), daqProvenanceHelper_, entryDescriptionMap_, edm::RootTree::entryNumberForIndex(), edm::roottree::getEntry(), info(), infoVector_, edm::ProductProvenanceRetriever::insertIntoSet(), getDQMSummary::iter, edm::DaqProvenanceHelper::mapBranchID(), edm::DaqProvenanceHelper::mapParentageID(), pInfoVector_, resourceAcquirer_, rootTree_, and edm::setRefCoreStreamer().

1881  {
1882  {
1883  std::lock_guard<SharedResourcesAcquirer> guard(resourceAcquirer_);
1884  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
1886  setRefCoreStreamer(true);
1887  }
1888  for(auto const& info : infoVector_) {
1889  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
1890  assert(iter != entryDescriptionMap_.end());
1891  Parentage parentage(iter->second.parents());
1892  if(daqProvenanceHelper_) {
1893  ProductProvenance entry(daqProvenanceHelper_->mapBranchID(info.branchID()),
1894  daqProvenanceHelper_->mapParentageID(parentage.id()));
1895  provRetriever.insertIntoSet(entry);
1896  } else {
1897  ProductProvenance entry(info.branchID(), parentage.id());
1898  provRetriever.insertIntoSet(entry);
1899  }
1900 
1901  }
1902  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:461
static const TGPicture * info(bool iBackgroundIsBlack)
BranchID const & mapBranchID(BranchID const &branchID) const
void setRefCoreStreamer(bool resetAll=false)
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:1865
TBranch * branchEntryInfoBranch() const
Definition: RootTree.h:143
EntryNumber const & entryNumberForIndex(unsigned int index) const
Definition: RootTree.cc:92
SharedResourcesAcquirer resourceAcquirer_
Definition: RootFile.cc:1867
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:1864
ParentageID const & mapParentageID(ParentageID const &phid) const
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:1863
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1866

Member Data Documentation

DaqProvenanceHelper const* edm::OldProvenanceReader::daqProvenanceHelper_
private

Definition at line 1866 of file RootFile.cc.

Referenced by readProvenance().

EntryDescriptionMap const& edm::OldProvenanceReader::entryDescriptionMap_
private

Definition at line 1865 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1863 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1864 of file RootFile.cc.

Referenced by readProvenance().

SharedResourcesAcquirer edm::OldProvenanceReader::resourceAcquirer_
mutableprivate

Definition at line 1867 of file RootFile.cc.

Referenced by readProvenance().

RootTree* edm::OldProvenanceReader::rootTree_
private

Definition at line 1862 of file RootFile.cc.

Referenced by readProvenance().