CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

edm::LuminosityBlockPrincipal Class Reference

#include <LuminosityBlockPrincipal.h>

Inheritance diagram for edm::LuminosityBlockPrincipal:
edm::Principal edm::EDProductGetter

List of all members.

Public Types

typedef LuminosityBlockAuxiliary Auxiliary
typedef Principal Base

Public Member Functions

LuminosityBlockAuxiliary const & aux () const
Timestamp const & beginTime () const
Timestamp const & endTime () const
void fillLuminosityBlockPrincipal (boost::shared_ptr< BranchMapper > mapper=boost::shared_ptr< BranchMapper >(), DelayedReader *reader=0)
LuminosityBlockID id () const
LuminosityBlockNumber_t luminosityBlock () const
 LuminosityBlockPrincipal (boost::shared_ptr< LuminosityBlockAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, boost::shared_ptr< RunPrincipal > rp)
void mergeAuxiliary (LuminosityBlockAuxiliary const &aux)
void put (ConstBranchDescription const &bd, WrapperOwningHolder const &edp, ProductProvenance &productProvenance)
void readImmediate () const
RunNumber_t run () const
RunPrincipal const & runPrincipal () const
RunPrincipalrunPrincipal ()
void setEndTime (Timestamp const &time)
void setUnscheduledHandler (boost::shared_ptr< UnscheduledHandler >)
 ~LuminosityBlockPrincipal ()

Private Member Functions

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

Private Attributes

boost::shared_ptr
< LuminosityBlockAuxiliary
aux_
boost::shared_ptr< RunPrincipalrunPrincipal_

Detailed Description

Definition at line 28 of file LuminosityBlockPrincipal.h.


Member Typedef Documentation

Definition at line 30 of file LuminosityBlockPrincipal.h.

Definition at line 31 of file LuminosityBlockPrincipal.h.


Constructor & Destructor Documentation

edm::LuminosityBlockPrincipal::LuminosityBlockPrincipal ( boost::shared_ptr< LuminosityBlockAuxiliary aux,
boost::shared_ptr< ProductRegistry const >  reg,
ProcessConfiguration const &  pc,
boost::shared_ptr< RunPrincipal rp 
)

Definition at line 11 of file LuminosityBlockPrincipal.cc.

                                        :
        Base(reg, pc, InLumi),
        runPrincipal_(rp),
        aux_(aux) {
  }
edm::LuminosityBlockPrincipal::~LuminosityBlockPrincipal ( ) [inline]

Definition at line 38 of file LuminosityBlockPrincipal.h.

{}

Member Function Documentation

LuminosityBlockAuxiliary const& edm::LuminosityBlockPrincipal::aux ( ) const [inline]
Timestamp const& edm::LuminosityBlockPrincipal::beginTime ( ) const [inline]
Timestamp const& edm::LuminosityBlockPrincipal::endTime ( ) const [inline]
void edm::LuminosityBlockPrincipal::fillLuminosityBlockPrincipal ( boost::shared_ptr< BranchMapper mapper = boost::shared_ptr<BranchMapper>(),
DelayedReader reader = 0 
)
LuminosityBlockID edm::LuminosityBlockPrincipal::id ( void  ) const [inline]
LuminosityBlockNumber_t edm::LuminosityBlockPrincipal::luminosityBlock ( ) const [inline]
void edm::LuminosityBlockPrincipal::mergeAuxiliary ( LuminosityBlockAuxiliary const &  aux) [inline]

Definition at line 80 of file LuminosityBlockPrincipal.h.

References aux_.

                                                             {
      return aux_->mergeAuxiliary(aux);
    }
void edm::LuminosityBlockPrincipal::put ( ConstBranchDescription const &  bd,
WrapperOwningHolder const &  edp,
ProductProvenance productProvenance 
)

Definition at line 37 of file LuminosityBlockPrincipal.cc.

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

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

                                              {

    assert(bd.produced());
    if(!edp.isValid()) {
      throw edm::Exception(edm::errors::InsertFailure,"Null Pointer")
        << "put: Cannot put because auto_ptr to product is null."
        << "\n";
    }
    branchMapperPtr()->insert(productProvenance);
    Group *g = getExistingGroup(bd.branchID());
    assert(g);
    // Group assumes ownership
    putOrMerge(edp, productProvenance, g);
  }
void edm::LuminosityBlockPrincipal::readImmediate ( ) const

Definition at line 56 of file LuminosityBlockPrincipal.cc.

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

                                                {
    for(Principal::const_iterator i = begin(), iEnd = end(); i != iEnd; ++i) {
      Group const& g = **i;
      if(!g.branchDescription().produced()) {
        if(!g.productUnavailable()) {
          resolveProductImmediate(g);
        }
      }
    }
    branchMapperPtr()->setDelayedRead(false);
  }
void edm::LuminosityBlockPrincipal::resolveProductImmediate ( Group const &  g) const [private]

Definition at line 69 of file LuminosityBlockPrincipal.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().

                                                                        {
    if(g.branchDescription().produced()) return; // nothing to do.
    if(!reader()) return; // nothing to do.

    // must attempt to load from persistent store
    BranchKey const bk = BranchKey(g.branchDescription());
    WrapperOwningHolder edp(reader()->getProduct(bk, g.productData().getInterface(), this));

    // Now fix up the Group
    if(edp.isValid()) {
      putOrMerge(edp, &g);
    }
  }
RunNumber_t edm::LuminosityBlockPrincipal::run ( void  ) const [inline]

Definition at line 76 of file LuminosityBlockPrincipal.h.

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

Referenced by edm::EventProcessor::beginLumi(), and edm::EventProcessor::endLumi().

                            {
      return aux().run();
    }
RunPrincipal const& edm::LuminosityBlockPrincipal::runPrincipal ( ) const [inline]

Definition at line 44 of file LuminosityBlockPrincipal.h.

References runPrincipal_.

Referenced by edm::EventPrincipal::runPrincipal().

                                             {
      return *runPrincipal_;
    }
RunPrincipal& edm::LuminosityBlockPrincipal::runPrincipal ( ) [inline]

Definition at line 48 of file LuminosityBlockPrincipal.h.

References runPrincipal_.

                                 {
      return *runPrincipal_;
    }
void edm::LuminosityBlockPrincipal::setEndTime ( Timestamp const &  time) [inline]

Definition at line 64 of file LuminosityBlockPrincipal.h.

References aux_.

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

                                           {
      aux_->setEndTime(time);
    }
void edm::LuminosityBlockPrincipal::setUnscheduledHandler ( boost::shared_ptr< UnscheduledHandler ) [inline]

Definition at line 84 of file LuminosityBlockPrincipal.h.

{}
virtual bool edm::LuminosityBlockPrincipal::unscheduledFill ( std::string const &  ) const [inline, private, virtual]

Implements edm::Principal.

Definition at line 94 of file LuminosityBlockPrincipal.h.

{return false;}

Member Data Documentation

Definition at line 98 of file LuminosityBlockPrincipal.h.

Referenced by fillLuminosityBlockPrincipal(), and runPrincipal().