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

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

Inheritance diagram for art::EventPrincipal:
art::Principal art::EDProductGetterFinder

Public Types

using Auxiliary = EventAuxiliary
 
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

 EventPrincipal (EventAuxiliary const &aux, ProcessConfiguration const &pc, cet::exempt_ptr< ProductTable const > presentProducts, bool const parentageEnabled=true, bool const rangesEnabled=true, std::shared_ptr< History > history=std::make_shared< History >(), std::unique_ptr< BranchMapper > &&mapper=std::make_unique< BranchMapper >(), std::unique_ptr< DelayedReader > &&rtrv=std::make_unique< NoDelayedReader >(), bool lastInSubRun=false)
 
SubRunPrincipal const & subRunPrincipal () const
 
cet::exempt_ptr< SubRunPrincipal const > subRunPrincipalExemptPtr () const
 
void setSubRunPrincipal (cet::exempt_ptr< SubRunPrincipal const > srp)
 
EventID const & id () const
 
Timestamp const & time () const
 
bool isReal () const
 
EventAuxiliary::ExperimentType ExperimentType () const
 
EventAuxiliary const & aux () const
 
SubRunNumber_t subRun () const
 
RunNumber_t run () const
 
EventNumber_t event () const
 
EventSelectionIDVector const & eventSelectionIDs () const
 
History const & history () const
 
void put (std::unique_ptr< EDProduct > &&edp, BranchDescription const &pd, std::unique_ptr< ProductProvenance const > &&productProvenance)
 
void fillGroup (BranchDescription const &) override
 
BranchType branchType () const override
 
bool isLastInSubRun () const
 
RangeSet seenRanges () const override
 
bool parentageEnabled () const override
 
bool rangesEnabled () const override
 
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 ()
 
EDProductGetter const * getEDProductGetter (ProductID const pid) const
 

Static Public Attributes

static constexpr BranchType branch_type = Auxiliary::branch_type
 

Protected Member Functions

BranchMapperbranchMapper ()
 
void fillGroup (std::unique_ptr< Group > &&group)
 
DelayedReaderproductReader ()
 
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

void throwIfExistingGroup (BranchDescription const &pd) const
 
ProcessHistoryID const & processHistoryID () const override
 
void setProcessHistoryID (ProcessHistoryID const &phid) override
 

Private Attributes

EventAuxiliary aux_
 
cet::exempt_ptr< SubRunPrincipal const > subRunPrincipal_ {nullptr}
 
std::shared_ptr< Historyhistory_
 
bool lastInSubRun_ {false}
 
bool parentageEnabled_ {true}
 
bool rangesEnabled_ {true}
 

Detailed Description

Definition at line 30 of file EventPrincipal.h.

Member Typedef Documentation

Definition at line 32 of file EventPrincipal.h.

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

Definition at line 52 of file Principal.h.

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

Definition at line 51 of file Principal.h.

using art::Principal::GroupQueryResultVec = std::vector<GroupQueryResult>
inherited

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
inherited

Definition at line 55 of file Principal.h.

Constructor & Destructor Documentation

art::EventPrincipal::EventPrincipal ( EventAuxiliary const &  aux,
ProcessConfiguration const &  pc,
cet::exempt_ptr< ProductTable const >  presentProducts,
bool const  parentageEnabled = true,
bool const  rangesEnabled = true,
std::shared_ptr< History history = std::make_shared< History >(),
std::unique_ptr< BranchMapper > &&  mapper = std::make_unique< BranchMapper >(),
std::unique_ptr< DelayedReader > &&  rtrv = std::make_unique< NoDelayedReader >(),
bool  lastInSubRun = false 
)

Member Function Documentation

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

Definition at line 100 of file Principal.h.

References art::Principal::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 ( )
inherited
EventAuxiliary const& art::EventPrincipal::aux ( ) const
inline

Definition at line 83 of file EventPrincipal.h.

References aux_.

Referenced by ExperimentType(), id(), isReal(), and time().

84  {
85  return aux_;
86  }
EventAuxiliary aux_
const_iterator art::Principal::begin ( ) const
inlineinherited

Definition at line 156 of file Principal.h.

References art::Principal::groups_.

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

Definition at line 144 of file Principal.h.

References art::Principal::branchMapperPtr_.

Referenced by art::Principal::fillGroup().

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

Definition at line 196 of file Principal.h.

References art::Principal::branchMapperPtr_.

197  {
198  return *branchMapperPtr_;
199  }
std::unique_ptr< BranchMapper > branchMapperPtr_
Definition: Principal.h:291
BranchType art::EventPrincipal::branchType ( ) const
inlineoverridevirtual

Implements art::Principal.

Definition at line 120 of file EventPrincipal.h.

References branch_type.

121  {
122  return branch_type;
123  }
static constexpr BranchType branch_type
const_iterator art::Principal::cbegin ( ) const
inlineinherited

Definition at line 162 of file Principal.h.

References art::Principal::groups_.

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

Definition at line 168 of file Principal.h.

References art::Principal::groups_.

169  {
170  return groups_.end();
171  }
GroupCollection groups_
Definition: Principal.h:287
EventNumber_t art::EventPrincipal::event ( ) const
inline

Definition at line 98 of file EventPrincipal.h.

References art::EventID::event(), eventSelectionIDs(), and id().

99  {
100  return id().event();
101  }
EventNumber_t event() const
Definition: EventID.h:116
EventID const & id() const
EventSelectionIDVector const& art::EventPrincipal::eventSelectionIDs ( ) const

Referenced by event().

EventAuxiliary::ExperimentType art::EventPrincipal::ExperimentType ( ) const
inline

Definition at line 77 of file EventPrincipal.h.

References aux(), and art::EventAuxiliary::experimentType().

78  {
79  return aux().experimentType();
80  }
EventAuxiliary const & aux() const
ExperimentType experimentType() const
void art::EventPrincipal::fillGroup ( BranchDescription const &  )
overridevirtual

Implements art::Principal.

Referenced by history().

void art::Principal::fillGroup ( std::unique_ptr< Group > &&  group)
inlineprotectedinherited

Definition at line 209 of file Principal.h.

References ana::assert(), art::Principal::branchMapper(), art::Principal::deferredGetter_(), art::Principal::findGroups(), art::Principal::findGroupsForProcess(), art::Principal::findGroupsForProduct(), art::Principal::findGroupsFromInputFile(), art::BranchDescription::friendlyClassName(), art::Principal::getGroup(), art::Principal::getGroupForPtr(), art::Principal::getResolvedGroup(), hadd_reco_validation::group, art::Principal::groups_, art::Principal::matchingSequenceFromInputFile(), art::BranchDescription::moduleLabel(), BlessedPlots::pid, art::Principal::presentFromSource(), art::Principal::processHistoryID(), art::BranchDescription::processName(), art::BranchDescription::producedClassName(), art::BranchDescription::productID(), makeDatasetsPage::results, art::Principal::setProcessHistoryID(), art::Principal::store_, and art::Principal::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)
GroupQueryResult art::Principal::getByLabel ( WrappedTypeID const &  wrapped,
std::string const &  label,
std::string const &  productInstanceName,
std::string const &  processName 
) const
inherited
GroupQueryResult art::Principal::getByProductID ( ProductID const  pid) const
inherited
GroupQueryResult art::Principal::getBySelector ( WrappedTypeID const &  wrapped,
SelectorBase const &   
) const
inherited
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
OutputHandle art::Principal::getForOutput ( ProductID  const,
bool  resolveProd 
) const
inherited
cet::exempt_ptr<Group const> art::Principal::getGroup ( ProductID const  pid) const
protectedinherited
cet::exempt_ptr<Group const> art::Principal::getGroupForPtr ( ProductID const  pid) const
protectedinherited
GroupQueryResultVec art::Principal::getMany ( WrappedTypeID const &  wrapped,
SelectorBase const &   
) const
inherited
GroupQueryResultVec art::Principal::getMatchingSequence ( SelectorBase const &  ) const
inherited
cet::exempt_ptr<Group const> art::Principal::getResolvedGroup ( ProductID const  pid,
bool  resolveProd 
) const
protectedinherited
History const& art::EventPrincipal::history ( ) const
inline

Definition at line 106 of file EventPrincipal.h.

References fillGroup(), art::Principal::getGroup(), history_, and put().

Referenced by processHistoryID(), and setProcessHistoryID().

107  {
108  return *history_;
109  }
std::shared_ptr< History > history_
EventID const& art::EventPrincipal::id ( ) const
inline

Definition at line 61 of file EventPrincipal.h.

References aux(), and art::EventAuxiliary::id().

Referenced by event(), run(), subRun(), art::Source< T >::throwIfInsane_(), and art::RootOutput::write().

62  {
63  return aux().id();
64  }
EventAuxiliary const & aux() const
EventID const & id() const
bool art::EventPrincipal::isLastInSubRun ( ) const
inline

Definition at line 126 of file EventPrincipal.h.

References lastInSubRun_.

127  {
128  return lastInSubRun_;
129  }
bool art::EventPrincipal::isReal ( ) const
inline

Definition at line 71 of file EventPrincipal.h.

References aux(), and art::EventAuxiliary::isRealData().

72  {
73  return aux().isRealData();
74  }
bool isRealData() const
EventAuxiliary const & aux() const
bool art::EventPrincipal::parentageEnabled ( ) const
inlineoverridevirtual

Implements art::Principal.

Definition at line 137 of file EventPrincipal.h.

References parentageEnabled_.

138  {
139  return parentageEnabled_;
140  }
ProcessConfiguration const& art::Principal::processConfiguration ( ) const
inlineinherited

Definition at line 138 of file Principal.h.

References art::Principal::processConfiguration_.

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

Definition at line 132 of file Principal.h.

References art::Principal::processHistory_.

133  {
134  return processHistory_;
135  }
ProcessHistory processHistory_
Definition: Principal.h:272
ProcessHistoryID const& art::EventPrincipal::processHistoryID ( ) const
inlineoverrideprivatevirtual

Implements art::Principal.

Definition at line 152 of file EventPrincipal.h.

References history(), and art::History::processHistoryID().

153  {
154  return history().processHistoryID();
155  }
ProcessHistoryID const & processHistoryID() const
Definition: History.h:42
History const & history() const
EDProductGetter const* art::Principal::productGetter ( ProductID const  pid) const
inherited
DelayedReader& art::Principal::productReader ( )
inlineprotectedinherited

Definition at line 202 of file Principal.h.

References art::Principal::store_.

203  {
204  return *store_;
205  }
std::unique_ptr< DelayedReader > store_
Definition: Principal.h:295
void art::EventPrincipal::put ( std::unique_ptr< EDProduct > &&  edp,
BranchDescription const &  pd,
std::unique_ptr< ProductProvenance const > &&  productProvenance 
)

Referenced by history().

bool art::EventPrincipal::rangesEnabled ( ) const
inlineoverridevirtual

Implements art::Principal.

Definition at line 143 of file EventPrincipal.h.

References rangesEnabled_, and throwIfExistingGroup().

144  {
145  return rangesEnabled_;
146  }
void art::Principal::readImmediate ( ) const
inlineinherited

Definition at line 112 of file Principal.h.

References art::Principal::groups_, art::Principal::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
inlineinherited

Definition at line 123 of file Principal.h.

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

Referenced by art::Principal::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
inherited
RunNumber_t art::EventPrincipal::run ( ) const
inline

Definition at line 93 of file EventPrincipal.h.

References id(), and art::EventID::run().

94  {
95  return id().run();
96  }
RunNumber_t run() const
Definition: EventID.h:98
EventID const & id() const
RangeSet art::EventPrincipal::seenRanges ( ) const
inlineoverridevirtual

Implements art::Principal.

Definition at line 131 of file EventPrincipal.h.

References art::RangeSet::invalid().

132  {
133  return RangeSet::invalid();
134  }
static RangeSet invalid()
void art::EventPrincipal::setProcessHistoryID ( ProcessHistoryID const &  phid)
inlineoverrideprivatevirtual

Implements art::Principal.

Definition at line 158 of file EventPrincipal.h.

References history(), and art::History::setProcessHistoryID().

159  {
160  return history().setProcessHistoryID(phid);
161  }
History const & history() const
void setProcessHistoryID(ProcessHistoryID const &phid) const
Definition: History.h:48
void art::Principal::setProducedProducts ( ProductTable const &  producedProducts)
inlineinherited

Definition at line 106 of file Principal.h.

References cet::make_exempt_ptr(), and art::Principal::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
void art::EventPrincipal::setSubRunPrincipal ( cet::exempt_ptr< SubRunPrincipal const >  srp)
inline

Definition at line 55 of file EventPrincipal.h.

References subRunPrincipal_.

56  {
57  subRunPrincipal_ = srp;
58  }
cet::exempt_ptr< SubRunPrincipal const > subRunPrincipal_
size_t art::Principal::size ( void  ) const
inlineinherited

Definition at line 150 of file Principal.h.

References art::Principal::groups_.

151  {
152  return groups_.size();
153  }
GroupCollection groups_
Definition: Principal.h:287
SubRunNumber_t art::EventPrincipal::subRun ( ) const
inline

Definition at line 88 of file EventPrincipal.h.

References id(), and art::EventID::subRun().

89  {
90  return id().subRun();
91  }
SubRunNumber_t subRun() const
Definition: EventID.h:110
EventID const & id() const
SubRunPrincipal const& art::EventPrincipal::subRunPrincipal ( ) const
cet::exempt_ptr<SubRunPrincipal const> art::EventPrincipal::subRunPrincipalExemptPtr ( ) const
inline

Definition at line 50 of file EventPrincipal.h.

References subRunPrincipal_.

Referenced by art::Source< T >::throwIfInsane_().

51  {
52  return subRunPrincipal_;
53  }
cet::exempt_ptr< SubRunPrincipal const > subRunPrincipal_
void art::EventPrincipal::throwIfExistingGroup ( BranchDescription const &  pd) const
private

Referenced by rangesEnabled().

Timestamp const& art::EventPrincipal::time ( ) const
inline

Definition at line 66 of file EventPrincipal.h.

References aux(), and art::EventAuxiliary::time().

67  {
68  return aux().time();
69  }
Timestamp const & time() const
EventAuxiliary const & aux() const
int art::Principal::tryNextSecondaryFile ( ) const
protectedinherited

Member Data Documentation

EventAuxiliary art::EventPrincipal::aux_
private

Definition at line 164 of file EventPrincipal.h.

Referenced by aux().

constexpr BranchType art::EventPrincipal::branch_type = Auxiliary::branch_type
static

Definition at line 33 of file EventPrincipal.h.

Referenced by branchType().

std::shared_ptr<History> art::EventPrincipal::history_
private

Definition at line 166 of file EventPrincipal.h.

Referenced by history().

bool art::EventPrincipal::lastInSubRun_ {false}
private

Definition at line 167 of file EventPrincipal.h.

Referenced by isLastInSubRun().

bool art::EventPrincipal::parentageEnabled_ {true}
private

Definition at line 168 of file EventPrincipal.h.

Referenced by parentageEnabled().

bool art::EventPrincipal::rangesEnabled_ {true}
private

Definition at line 169 of file EventPrincipal.h.

Referenced by rangesEnabled().

cet::exempt_ptr<SubRunPrincipal const> art::EventPrincipal::subRunPrincipal_ {nullptr}
private

Definition at line 165 of file EventPrincipal.h.

Referenced by setSubRunPrincipal(), and subRunPrincipalExemptPtr().


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