CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edm::RunPrincipal Class Reference

#include <RunPrincipal.h>

Inheritance diagram for edm::RunPrincipal:
edm::Principal edm::EDProductGetter

Public Types

typedef RunAuxiliary Auxiliary
 
typedef Principal Base
 
- Public Types inherited from edm::Principal
typedef std::vector< BasicHandleBasicHandleVec
 
typedef boost::filter_iterator
< FilledGroupPtr,
GroupCollection::const_iterator > 
const_iterator
 
typedef Group const * ConstGroupPtr
 
typedef std::vector
< boost::shared_ptr< Group > > 
GroupCollection
 
typedef std::string ProcessName
 
typedef
ProcessHistory::const_iterator 
ProcessNameConstIterator
 
typedef boost::shared_ptr< GroupSharedGroupPtr
 
typedef GroupCollection::size_type size_type
 

Public Member Functions

RunAuxiliary const & aux () const
 
Timestamp const & beginTime () const
 
Timestamp const & endTime () const
 
void fillRunPrincipal (DelayedReader *reader=0)
 
RunID const & id () const
 
void mergeAuxiliary (RunAuxiliary const &aux)
 
void put (ConstBranchDescription const &bd, WrapperOwningHolder const &edp)
 
void readImmediate () const
 
RunNumber_t run () const
 
 RunPrincipal (boost::shared_ptr< RunAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender=0)
 
void setEndTime (Timestamp const &time)
 
void setUnscheduledHandler (boost::shared_ptr< UnscheduledHandler >)
 
 ~RunPrincipal ()
 
- Public Member Functions inherited from edm::Principal
void addGroupInput (boost::shared_ptr< ConstBranchDescription > bd)
 
void addGroupScheduled (boost::shared_ptr< ConstBranchDescription > bd)
 
void addGroupSource (boost::shared_ptr< ConstBranchDescription > bd)
 
void addOnDemandGroup (boost::shared_ptr< ConstBranchDescription > bd)
 
void adjustIndexesAfterProductRegistryAddition ()
 
bool adjustToNewProductRegistry (ProductRegistry const &reg)
 
const_iterator begin () const
 
BranchType const & branchType () const
 
void clearPrincipal ()
 
void deleteProduct (BranchID const &id)
 
const_iterator end () const
 
void fillPrincipal (ProcessHistoryID const &hist, DelayedReader *reader)
 
ProductData const * findGroupByTag (TypeID const &typeID, InputTag const &tag) const
 
void getAllProvenance (std::vector< Provenance const * > &provenances) const
 
BasicHandle getByLabel (TypeID const &tid, std::string const &label, std::string const &productInstanceName, std::string const &processName, size_t &cachedOffset, int &fillCount) const
 
BasicHandle getBySelector (TypeID const &tid, SelectorBase const &s) const
 
BasicHandle getByType (TypeID const &tid) const
 
OutputHandle getForOutput (BranchID const &bid, bool getProd) const
 
ConstGroupPtr getGroup (BranchID const &oid, bool resolveProd, bool fillOnDemand) const
 
void getMany (TypeID const &tid, SelectorBase const &, BasicHandleVec &results) const
 
void getManyByType (TypeID const &tid, BasicHandleVec &results) const
 
size_t getMatchingSequence (TypeID const &typeID, SelectorBase const &selector, BasicHandle &result) const
 
Provenance getProvenance (BranchID const &bid) const
 
void maybeFlushCache (TypeID const &tid, InputTag const &tag) const
 
 Principal (boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, BranchType bt, HistoryAppender *historyAppender)
 
ProcessConfiguration const & processConfiguration () const
 
ProcessHistory const & processHistory () const
 
ProcessHistoryID const & processHistoryID () const
 
EDProductGetter const * prodGetter () const
 
ProductRegistry const & productRegistry () const
 
DelayedReaderreader () const
 
void recombine (Principal &other, std::vector< BranchID > const &bids)
 
size_t size () const
 
virtual ~Principal ()
 
- Public Member Functions inherited from edm::EDProductGetter
 EDProductGetter ()
 
virtual ~EDProductGetter ()
 

Private Member Functions

void resolveProductImmediate (Group const &g) const
 
virtual bool unscheduledFill (std::string const &) const
 

Private Attributes

boost::shared_ptr< RunAuxiliaryaux_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProductGetter
static void assignEDProductGetter (EDProductGetter const *&)
 
static EDProductGetter const * switchProductGetter (EDProductGetter const *)
 These can only be used internally by the framework. More...
 
- Protected Member Functions inherited from edm::Principal
void addGroup_ (std::auto_ptr< Group > g)
 
void addGroupOrThrow (std::auto_ptr< Group > g)
 
void checkUniquenessAndType (WrapperOwningHolder const &prod, Group const *group) const
 
GroupgetExistingGroup (BranchID const &branchID)
 
GroupgetExistingGroup (Group const &g)
 
ConstGroupPtr getGroupByIndex (ProductTransientIndex const &oid, bool resolveProd, bool fillOnDemand) const
 
void putOrMerge (WrapperOwningHolder const &prod, Group const *group) const
 
void putOrMerge (WrapperOwningHolder const &prod, ProductProvenance &prov, Group *group)
 
void resolveProduct (Group const &g, bool fillOnDemand) const
 

Detailed Description

Definition at line 28 of file RunPrincipal.h.

Member Typedef Documentation

Definition at line 30 of file RunPrincipal.h.

Definition at line 31 of file RunPrincipal.h.

Constructor & Destructor Documentation

edm::RunPrincipal::RunPrincipal ( boost::shared_ptr< RunAuxiliary aux,
boost::shared_ptr< ProductRegistry const >  reg,
ProcessConfiguration const &  pc,
HistoryAppender historyAppender = 0 
)

Definition at line 11 of file RunPrincipal.cc.

15  :
16  Base(reg, pc, InRun, historyAppender),
17  aux_(aux) {
18  }
boost::shared_ptr< RunAuxiliary > aux_
Definition: RunPrincipal.h:85
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:42
edm::RunPrincipal::~RunPrincipal ( )
inline

Definition at line 38 of file RunPrincipal.h.

38 {}

Member Function Documentation

RunAuxiliary const& edm::RunPrincipal::aux ( ) const
inline

Definition at line 42 of file RunPrincipal.h.

References aux_.

Referenced by edm::SubProcess::beginRun(), beginTime(), endTime(), id(), run(), and edm::RootOutputFile::writeRun().

42  {
43  return *aux_;
44  }
boost::shared_ptr< RunAuxiliary > aux_
Definition: RunPrincipal.h:85
Timestamp const& edm::RunPrincipal::beginTime ( ) const
inline

Definition at line 54 of file RunPrincipal.h.

References aux(), and edm::RunAuxiliary::beginTime().

Referenced by edm::EventProcessor::beginRun(), edm::OccurrenceTraits< RunPrincipal, BranchActionBegin >::preScheduleSignal(), and DQMRootOutputModule::writeRun().

54  {
55  return aux().beginTime();
56  }
Timestamp const & beginTime() const
Definition: RunAuxiliary.h:39
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:42
Timestamp const& edm::RunPrincipal::endTime ( ) const
inline

Definition at line 58 of file RunPrincipal.h.

References aux(), and edm::RunAuxiliary::endTime().

Referenced by edm::EventProcessor::endRun(), edm::OccurrenceTraits< RunPrincipal, BranchActionEnd >::preScheduleSignal(), and DQMRootOutputModule::writeRun().

58  {
59  return aux().endTime();
60  }
Timestamp const & endTime() const
Definition: RunAuxiliary.h:40
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:42
void edm::RunPrincipal::fillRunPrincipal ( DelayedReader reader = 0)

Definition at line 21 of file RunPrincipal.cc.

References aux_, edm::Principal::begin(), edm::Principal::end(), edm::Principal::fillPrincipal(), i, edm::Principal::processHistoryID(), and edm::Principal::reader().

21  {
22 
23  fillPrincipal(aux_->processHistoryID(), reader);
24 
25  for (const_iterator i = this->begin(), iEnd = this->end(); i != iEnd; ++i) {
26  (*i)->setProcessHistoryID(processHistoryID());
27  }
28  }
int i
Definition: DBlmapReader.cc:9
const_iterator end() const
Definition: Principal.h:141
boost::shared_ptr< RunAuxiliary > aux_
Definition: RunPrincipal.h:85
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:126
DelayedReader * reader() const
Definition: Principal.h:149
const_iterator begin() const
Definition: Principal.h:140
boost::filter_iterator< FilledGroupPtr, GroupCollection::const_iterator > const_iterator
Definition: Principal.h:55
void fillPrincipal(ProcessHistoryID const &hist, DelayedReader *reader)
Definition: Principal.cc:229
RunID const& edm::RunPrincipal::id ( void  ) const
inline
void edm::RunPrincipal::mergeAuxiliary ( RunAuxiliary const &  aux)
inline

Definition at line 66 of file RunPrincipal.h.

References aux_.

66  {
67  return aux_->mergeAuxiliary(aux);
68  }
boost::shared_ptr< RunAuxiliary > aux_
Definition: RunPrincipal.h:85
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:42
void edm::RunPrincipal::put ( ConstBranchDescription const &  bd,
WrapperOwningHolder const &  edp 
)

Definition at line 31 of file RunPrincipal.cc.

References edm::ConstBranchDescription::branchID(), edm::hlt::Exception, g, edm::Principal::getExistingGroup(), edm::errors::InsertFailure, edm::WrapperHolder::isValid(), edm::ConstBranchDescription::produced(), and edm::Principal::putOrMerge().

Referenced by edm::Run::commit_().

33  {
34 
35  assert(bd.produced());
36  if(!edp.isValid()) {
37  throw edm::Exception(edm::errors::InsertFailure,"Null Pointer")
38  << "put: Cannot put because auto_ptr to product is null."
39  << "\n";
40  }
41  Group *g = getExistingGroup(bd.branchID());
42  assert(g);
43  // Group assumes ownership
44  putOrMerge(edp, g);
45  }
Group * getExistingGroup(BranchID const &branchID)
Definition: Principal.cc:267
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
void putOrMerge(WrapperOwningHolder const &prod, Group const *group) const
Definition: Principal.cc:759
void edm::RunPrincipal::readImmediate ( ) const

Definition at line 48 of file RunPrincipal.cc.

References edm::Principal::begin(), edm::Group::branchDescription(), edm::Principal::end(), g, i, edm::ConstBranchDescription::produced(), edm::Group::productUnavailable(), and resolveProductImmediate().

48  {
49  for (Principal::const_iterator i = begin(), iEnd = end(); i != iEnd; ++i) {
50  Group const& g = **i;
51  if(!g.branchDescription().produced()) {
52  if(!g.productUnavailable()) {
54  }
55  }
56  }
57  }
int i
Definition: DBlmapReader.cc:9
const_iterator end() const
Definition: Principal.h:141
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const_iterator begin() const
Definition: Principal.h:140
boost::filter_iterator< FilledGroupPtr, GroupCollection::const_iterator > const_iterator
Definition: Principal.h:55
void resolveProductImmediate(Group const &g) const
Definition: RunPrincipal.cc:60
void edm::RunPrincipal::resolveProductImmediate ( Group const &  g) const
private

Definition at line 60 of file RunPrincipal.cc.

References edm::Group::branchDescription(), edm::ProductData::getInterface(), edm::getProduct(), edm::ConstBranchDescription::produced(), edm::Group::productData(), edm::Principal::putOrMerge(), and edm::Principal::reader().

Referenced by readImmediate().

60  {
61  if(g.branchDescription().produced()) return; // nothing to do.
62  if(!reader()) return; // nothing to do.
63 
64  // must attempt to load from persistent store
65  BranchKey const bk = BranchKey(g.branchDescription());
66  WrapperOwningHolder edp(reader()->getProduct(bk, g.productData().getInterface(), this));
67 
68  // Now fix up the Group
69  if(edp.isValid()) {
70  putOrMerge(edp, &g);
71  }
72  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
T const * getProduct(RefCore const &ref)
Definition: RefCoreGet.h:33
DelayedReader * reader() const
Definition: Principal.h:149
void putOrMerge(WrapperOwningHolder const &prod, Group const *group) const
Definition: Principal.cc:759
RunNumber_t edm::RunPrincipal::run ( void  ) const
inline

Definition at line 46 of file RunPrincipal.h.

References aux(), and edm::RunAuxiliary::run().

Referenced by edm::EventProcessor::beginRun(), Types.LuminosityBlockID::cppID(), edm::EventProcessor::endRun(), edm::InputSource::markRun(), and edm::PoolOutputModule::writeRun().

46  {
47  return aux().run();
48  }
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:42
RunNumber_t run() const
Definition: RunAuxiliary.h:41
void edm::RunPrincipal::setEndTime ( Timestamp const &  time)
inline

Definition at line 62 of file RunPrincipal.h.

References aux_.

Referenced by edm::InputSource::doEndRun().

62  {
63  aux_->setEndTime(time);
64  }
boost::shared_ptr< RunAuxiliary > aux_
Definition: RunPrincipal.h:85
void edm::RunPrincipal::setUnscheduledHandler ( boost::shared_ptr< UnscheduledHandler )
inline

Definition at line 70 of file RunPrincipal.h.

70 {}
virtual bool edm::RunPrincipal::unscheduledFill ( std::string const &  ) const
inlineprivatevirtual

Implements edm::Principal.

Definition at line 80 of file RunPrincipal.h.

80 {return false;}

Member Data Documentation

boost::shared_ptr<RunAuxiliary> edm::RunPrincipal::aux_
private

Definition at line 85 of file RunPrincipal.h.

Referenced by aux(), fillRunPrincipal(), mergeAuxiliary(), and setEndTime().