Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
art::Principal Class Referenceabstract

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/Principal/Principal.h"

Inheritance diagram for art::Principal:
art::EDProductGetterFinder art::EventPrincipal art::ResultsPrincipal art::RunPrincipal art::SubRunPrincipal

Public Types

using GroupCollection = std::map< ProductID, std::unique_ptr< Group >>
 
using const_iterator = GroupCollection::const_iterator
 
using ProcessNameConstIterator = ProcessHistory::const_iterator
 
using GroupQueryResultVec = std::vector< GroupQueryResult >
 
using size_type = GroupCollection::size_type
 
using ProcessName = std::string
 

Public Member Functions

virtual ~Principal () noexcept=default
 
 Principal (Principal const &)=delete
 
Principaloperator= (Principal const &)=delete
 
 Principal (ProcessConfiguration const &, ProcessHistoryID const &, cet::exempt_ptr< ProductTable const > presentProducts, std::unique_ptr< BranchMapper > &&, std::unique_ptr< DelayedReader > &&)
 
EDProductGetter const * productGetter (ProductID const pid) const
 
OutputHandle getForOutput (ProductID const, bool resolveProd) const
 
GroupQueryResult getBySelector (WrappedTypeID const &wrapped, SelectorBase const &) const
 
GroupQueryResult getByProductID (ProductID const pid) const
 
GroupQueryResult getByLabel (WrappedTypeID const &wrapped, std::string const &label, std::string const &productInstanceName, std::string const &processName) const
 
GroupQueryResultVec getMany (WrappedTypeID const &wrapped, SelectorBase const &) const
 
GroupQueryResultVec getMatchingSequence (SelectorBase const &) const
 
void removeCachedProduct (ProductID const pid) const
 
void addSecondaryPrincipal (std::unique_ptr< Principal > &&val)
 
void setProducedProducts (ProductTable const &producedProducts)
 
void readImmediate () const
 
void readProvenanceImmediate () const
 
ProcessHistory const & processHistory () const
 
ProcessConfiguration const & processConfiguration () const
 
BranchMapper const & branchMapper () const
 
size_t size () const
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator end () const
 
const_iterator cend () const
 
void addToProcessHistory ()
 
virtual BranchType branchType () const =0
 
virtual void fillGroup (BranchDescription const &)=0
 
virtual RangeSet seenRanges () const =0
 
virtual bool parentageEnabled () const =0
 
virtual bool rangesEnabled () const =0
 
EDProductGetter const * getEDProductGetter (ProductID const pid) const
 

Protected Member Functions

BranchMapperbranchMapper ()
 
DelayedReaderproductReader ()
 
void fillGroup (std::unique_ptr< Group > &&group)
 
int tryNextSecondaryFile () const
 
cet::exempt_ptr< Group const > getGroupForPtr (ProductID const pid) const
 
cet::exempt_ptr< Group const > getGroup (ProductID const pid) const
 
cet::exempt_ptr< Group const > getResolvedGroup (ProductID const pid, bool resolveProd) const
 

Private Member Functions

virtual ProcessHistoryID const & processHistoryID () const =0
 
virtual void setProcessHistoryID (ProcessHistoryID const &)=0
 
GroupQueryResultVec matchingSequenceFromInputFile (SelectorBase const &) const
 
GroupQueryResultVec findGroupsForProduct (WrappedTypeID const &wrapped, SelectorBase const &, bool stopIfProcessHasMatch) const
 
size_t findGroupsFromInputFile (WrappedTypeID const &wrapped, SelectorBase const &, GroupQueryResultVec &results, bool stopIfProcessHasMatch) const
 
size_t findGroups (ProcessLookup const &, SelectorBase const &, GroupQueryResultVec &results, bool stopIfProcessHasMatch, TypeID wanted_wrapper=TypeID{}) const
 
size_t findGroupsForProcess (std::vector< ProductID > const &vpid, SelectorBase const &selector, GroupQueryResultVec &results, TypeID wanted_wrapper) const
 
bool presentFromSource (ProductID) const
 
EDProductGetter const * deferredGetter_ (ProductID const pid) const
 
EDProductGetter const * getEDProductGetterImpl (ProductID const pid) const final override
 

Private Attributes

ProcessHistory processHistory_ {}
 
ProcessConfiguration const & processConfiguration_
 
cet::exempt_ptr< ProductTable const > presentProducts_
 
cet::exempt_ptr< ProductTable const > producedProducts_ {nullptr}
 
std::map< ProductID, std::shared_ptr< DeferredProductGetter const > > deferredGetters_ {}
 
bool processHistoryModified_ {false}
 
GroupCollection groups_ {}
 
std::unique_ptr< BranchMapperbranchMapperPtr_
 
std::unique_ptr< DelayedReaderstore_
 
std::vector< std::unique_ptr< Principal > > secondaryPrincipals_ {}
 
int nextSecondaryFileIdx_ {}
 

Static Private Attributes

static ProcessHistory previousProcessHistory_
 
static ProcessHistory pendingProcessHistory_
 
static int pendingProcessHistorySet_
 

Detailed Description

Definition at line 48 of file Principal.h.

Member Typedef Documentation

using art::Principal::const_iterator = GroupCollection::const_iterator

Definition at line 52 of file Principal.h.

using art::Principal::GroupCollection = std::map<ProductID, std::unique_ptr<Group>>

Definition at line 51 of file Principal.h.

Definition at line 54 of file Principal.h.

Definition at line 56 of file Principal.h.

Definition at line 53 of file Principal.h.

using art::Principal::size_type = GroupCollection::size_type

Definition at line 55 of file Principal.h.

Constructor & Destructor Documentation

virtual art::Principal::~Principal ( )
virtualdefaultnoexcept
art::Principal::Principal ( Principal const &  )
delete
art::Principal::Principal ( ProcessConfiguration const &  ,
ProcessHistoryID const &  ,
cet::exempt_ptr< ProductTable const >  presentProducts,
std::unique_ptr< BranchMapper > &&  ,
std::unique_ptr< DelayedReader > &&   
)

Member Function Documentation

void art::Principal::addSecondaryPrincipal ( std::unique_ptr< Principal > &&  val)
inline

Definition at line 100 of file Principal.h.

References secondaryPrincipals_.

101  {
102  secondaryPrincipals_.emplace_back(std::move(val));
103  }
std::vector< std::unique_ptr< Principal > > secondaryPrincipals_
Definition: Principal.h:300
void art::Principal::addToProcessHistory ( )
const_iterator art::Principal::begin ( ) const
inline

Definition at line 156 of file Principal.h.

References groups_.

157  {
158  return groups_.begin();
159  }
GroupCollection groups_
Definition: Principal.h:287
BranchMapper const& art::Principal::branchMapper ( ) const
inline

Definition at line 144 of file Principal.h.

References branchMapperPtr_.

Referenced by fillGroup().

145  {
146  return *branchMapperPtr_;
147  }
std::unique_ptr< BranchMapper > branchMapperPtr_
Definition: Principal.h:291
BranchMapper& art::Principal::branchMapper ( )
inlineprotected

Definition at line 196 of file Principal.h.

References branchMapperPtr_.

197  {
198  return *branchMapperPtr_;
199  }
std::unique_ptr< BranchMapper > branchMapperPtr_
Definition: Principal.h:291
virtual BranchType art::Principal::branchType ( ) const
pure virtual
const_iterator art::Principal::cbegin ( ) const
inline

Definition at line 162 of file Principal.h.

References groups_.

163  {
164  return groups_.cbegin();
165  }
GroupCollection groups_
Definition: Principal.h:287
const_iterator art::Principal::cend ( ) const
inline

Definition at line 174 of file Principal.h.

References addToProcessHistory(), branchType(), fillGroup(), groups_, parentageEnabled(), rangesEnabled(), and seenRanges().

175  {
176  return groups_.cend();
177  }
GroupCollection groups_
Definition: Principal.h:287
EDProductGetter const* art::Principal::deferredGetter_ ( ProductID const  pid) const
private

Referenced by fillGroup().

const_iterator art::Principal::end ( ) const
inline

Definition at line 168 of file Principal.h.

References groups_.

169  {
170  return groups_.end();
171  }
GroupCollection groups_
Definition: Principal.h:287
virtual void art::Principal::fillGroup ( BranchDescription const &  )
pure virtual
void art::Principal::fillGroup ( std::unique_ptr< Group > &&  group)
inlineprotected

Definition at line 209 of file Principal.h.

References ana::assert(), branchMapper(), deferredGetter_(), findGroups(), findGroupsForProcess(), findGroupsForProduct(), findGroupsFromInputFile(), art::BranchDescription::friendlyClassName(), getGroup(), getGroupForPtr(), getResolvedGroup(), hadd_reco_validation::group, groups_, matchingSequenceFromInputFile(), art::BranchDescription::moduleLabel(), BlessedPlots::pid, presentFromSource(), processHistoryID(), art::BranchDescription::processName(), art::BranchDescription::producedClassName(), art::BranchDescription::productID(), makeDatasetsPage::results, setProcessHistoryID(), store_, and tryNextSecondaryFile().

210  {
211  BranchDescription const& pd = group->productDescription();
212  assert(!pd.producedClassName().empty());
213  assert(!pd.friendlyClassName().empty());
214  assert(!pd.moduleLabel().empty());
215  assert(!pd.processName().empty());
216  group->setResolvers(branchMapper(), *store_);
217  groups_[pd.productID()] = std::move(group);
218  }
GroupCollection groups_
Definition: Principal.h:287
std::unique_ptr< DelayedReader > store_
Definition: Principal.h:295
BranchMapper const & branchMapper() const
Definition: Principal.h:144
assert(nhit_max >=nhit_nbins)
size_t art::Principal::findGroups ( ProcessLookup const &  ,
SelectorBase const &  ,
GroupQueryResultVec results,
bool  stopIfProcessHasMatch,
TypeID  wanted_wrapper = TypeID{} 
) const
private

Referenced by fillGroup().

size_t art::Principal::findGroupsForProcess ( std::vector< ProductID > const &  vpid,
SelectorBase const &  selector,
GroupQueryResultVec results,
TypeID  wanted_wrapper 
) const
private

Referenced by fillGroup().

GroupQueryResultVec art::Principal::findGroupsForProduct ( WrappedTypeID const &  wrapped,
SelectorBase const &  ,
bool  stopIfProcessHasMatch 
) const
private

Referenced by fillGroup().

size_t art::Principal::findGroupsFromInputFile ( WrappedTypeID const &  wrapped,
SelectorBase const &  ,
GroupQueryResultVec results,
bool  stopIfProcessHasMatch 
) const
private

Referenced by fillGroup().

GroupQueryResult art::Principal::getByLabel ( WrappedTypeID const &  wrapped,
std::string const &  label,
std::string const &  productInstanceName,
std::string const &  processName 
) const
GroupQueryResult art::Principal::getByProductID ( ProductID const  pid) const

Referenced by getEDProductGetterImpl().

GroupQueryResult art::Principal::getBySelector ( WrappedTypeID const &  wrapped,
SelectorBase const &   
) const
EDProductGetter const* art::EDProductGetterFinder::getEDProductGetter ( ProductID const  pid) const
inlineinherited

Definition at line 25 of file EDProductGetterFinder.h.

References art::EDProductGetterFinder::getEDProductGetterImpl().

26  {
28  }
virtual EDProductGetter const * getEDProductGetterImpl(ProductID) const =0
EDProductGetter const* art::Principal::getEDProductGetterImpl ( ProductID const  pid) const
inlinefinaloverrideprivatevirtual

Implements art::EDProductGetterFinder.

Definition at line 267 of file Principal.h.

References getByProductID(), and art::GroupQueryResult::result().

268  {
269  return getByProductID(pid).result().get();
270  }
cet::exempt_ptr< Group const > result() const
GroupQueryResult getByProductID(ProductID const pid) const
OutputHandle art::Principal::getForOutput ( ProductID  const,
bool  resolveProd 
) const
cet::exempt_ptr<Group const> art::Principal::getGroup ( ProductID const  pid) const
protected
cet::exempt_ptr<Group const> art::Principal::getGroupForPtr ( ProductID const  pid) const
protected

Referenced by fillGroup().

GroupQueryResultVec art::Principal::getMany ( WrappedTypeID const &  wrapped,
SelectorBase const &   
) const
GroupQueryResultVec art::Principal::getMatchingSequence ( SelectorBase const &  ) const
cet::exempt_ptr<Group const> art::Principal::getResolvedGroup ( ProductID const  pid,
bool  resolveProd 
) const
protected

Referenced by fillGroup().

GroupQueryResultVec art::Principal::matchingSequenceFromInputFile ( SelectorBase const &  ) const
private

Referenced by fillGroup().

Principal& art::Principal::operator= ( Principal const &  )
delete
virtual bool art::Principal::parentageEnabled ( ) const
pure virtual
bool art::Principal::presentFromSource ( ProductID  ) const
private

Referenced by fillGroup().

ProcessConfiguration const& art::Principal::processConfiguration ( ) const
inline

Definition at line 138 of file Principal.h.

References processConfiguration_.

139  {
140  return processConfiguration_;
141  }
ProcessConfiguration const & processConfiguration_
Definition: Principal.h:277
ProcessHistory const& art::Principal::processHistory ( ) const
inline

Definition at line 132 of file Principal.h.

References processHistory_.

133  {
134  return processHistory_;
135  }
ProcessHistory processHistory_
Definition: Principal.h:272
virtual ProcessHistoryID const& art::Principal::processHistoryID ( ) const
privatepure virtual
EDProductGetter const* art::Principal::productGetter ( ProductID const  pid) const
DelayedReader& art::Principal::productReader ( )
inlineprotected

Definition at line 202 of file Principal.h.

References store_.

203  {
204  return *store_;
205  }
std::unique_ptr< DelayedReader > store_
Definition: Principal.h:295
virtual bool art::Principal::rangesEnabled ( ) const
pure virtual
void art::Principal::readImmediate ( ) const
inline

Definition at line 112 of file Principal.h.

References groups_, readProvenanceImmediate(), and febshutoff_auto::val.

113  {
115  for (auto const& val : groups_) {
116  if (!val.second->productUnavailable()) {
117  val.second->resolveProduct(val.second->producedWrapperType());
118  }
119  }
120  }
GroupCollection groups_
Definition: Principal.h:287
void readProvenanceImmediate() const
Definition: Principal.h:123
void art::Principal::readProvenanceImmediate ( ) const
inline

Definition at line 123 of file Principal.h.

References branchMapperPtr_, groups_, febshutoff_auto::val, and void().

Referenced by readImmediate().

124  {
125  for (auto const& val : groups_) {
126  (void)val.second->productProvenancePtr();
127  }
128  branchMapperPtr_->setDelayedRead(false);
129  }
std::unique_ptr< BranchMapper > branchMapperPtr_
Definition: Principal.h:291
GroupCollection groups_
Definition: Principal.h:287
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
void art::Principal::removeCachedProduct ( ProductID const  pid) const
virtual RangeSet art::Principal::seenRanges ( ) const
pure virtual
virtual void art::Principal::setProcessHistoryID ( ProcessHistoryID const &  )
privatepure virtual
void art::Principal::setProducedProducts ( ProductTable const &  producedProducts)
inline

Definition at line 106 of file Principal.h.

References cet::make_exempt_ptr(), and producedProducts_.

107  {
108  producedProducts_ = cet::make_exempt_ptr(&producedProducts);
109  }
cet::exempt_ptr< ProductTable const > producedProducts_
Definition: Principal.h:279
exempt_ptr< E > make_exempt_ptr(E *) noexcept
size_t art::Principal::size ( void  ) const
inline

Definition at line 150 of file Principal.h.

References groups_.

151  {
152  return groups_.size();
153  }
GroupCollection groups_
Definition: Principal.h:287
int art::Principal::tryNextSecondaryFile ( ) const
protected

Referenced by fillGroup().

Member Data Documentation

std::unique_ptr<BranchMapper> art::Principal::branchMapperPtr_
private

Definition at line 291 of file Principal.h.

Referenced by branchMapper(), and readProvenanceImmediate().

std::map<ProductID, std::shared_ptr<DeferredProductGetter const> > art::Principal::deferredGetters_ {}
mutableprivate

Definition at line 282 of file Principal.h.

GroupCollection art::Principal::groups_ {}
private

Definition at line 287 of file Principal.h.

Referenced by begin(), cbegin(), cend(), end(), fillGroup(), readImmediate(), readProvenanceImmediate(), and size().

int art::Principal::nextSecondaryFileIdx_ {}
mutableprivate

Definition at line 304 of file Principal.h.

ProcessHistory art::Principal::pendingProcessHistory_
staticprivate

Definition at line 274 of file Principal.h.

int art::Principal::pendingProcessHistorySet_
staticprivate

Definition at line 275 of file Principal.h.

cet::exempt_ptr<ProductTable const> art::Principal::presentProducts_
private

Definition at line 278 of file Principal.h.

ProcessHistory art::Principal::previousProcessHistory_
staticprivate

Definition at line 273 of file Principal.h.

ProcessConfiguration const& art::Principal::processConfiguration_
private

Definition at line 277 of file Principal.h.

Referenced by processConfiguration().

ProcessHistory art::Principal::processHistory_ {}
private

Definition at line 272 of file Principal.h.

Referenced by processHistory().

bool art::Principal::processHistoryModified_ {false}
mutableprivate

Definition at line 284 of file Principal.h.

cet::exempt_ptr<ProductTable const> art::Principal::producedProducts_ {nullptr}
private

Definition at line 279 of file Principal.h.

Referenced by setProducedProducts().

std::vector<std::unique_ptr<Principal> > art::Principal::secondaryPrincipals_ {}
private

Definition at line 300 of file Principal.h.

Referenced by addSecondaryPrincipal().

std::unique_ptr<DelayedReader> art::Principal::store_
private

Definition at line 295 of file Principal.h.

Referenced by fillGroup(), and productReader().


The documentation for this class was generated from the following file: