CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

edm::SubProcess Class Reference

#include <SubProcess.h>

Inheritance diagram for edm::SubProcess:
edm::OutputModule

List of all members.

Classes

struct  ESInfo

Public Member Functions

void clearCounters ()
 Clear all the counters in the trigger report.
void closeOutputFiles ()
void doBeginLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
void doBeginRun (RunPrincipal const &principal, IOVSyncValue const &ts)
void doEndLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
void doEndRun (RunPrincipal const &principal, IOVSyncValue const &ts)
void doEvent (EventPrincipal const &principal, IOVSyncValue const &ts)
void enableEndPaths (bool active)
bool endPathsEnabled () const
 Return true if end_paths are active, and false if they are inactive.
std::vector< ModuleDescription
const * > 
getAllModuleDescriptions () const
 Return a vector allowing const access to all the ModuleDescriptions for this SubProcess.
void getTriggerReport (TriggerReport &rep) const
void openNewOutputFilesIfNeeded ()
void openOutputFiles (FileBlock &fb)
void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
void preForkReleaseResources ()
void respondToCloseInputFile (FileBlock const &fb)
void respondToCloseOutputFiles (FileBlock const &fb)
void respondToOpenInputFile (FileBlock const &fb)
void respondToOpenOutputFiles (FileBlock const &fb)
bool shouldWeCloseOutput () const
 SubProcess (ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, boost::shared_ptr< ProductRegistry const > parentProductRegistry, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy)
bool const terminate () const
int totalEvents () const
int totalEventsFailed () const
int totalEventsPassed () const
 Return the number of events which have been passed by one or more trigger paths.
void writeLumi (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
void writeRun (ProcessHistoryID const &parentPhID, int runNumber)
virtual ~SubProcess ()

Private Member Functions

virtual void beginJob ()
virtual void beginLuminosityBlock (LuminosityBlockPrincipal const &lb)
virtual void beginRun (RunPrincipal const &r)
virtual void endJob ()
virtual void endLuminosityBlock (LuminosityBlockPrincipal const &lb)
virtual void endRun (RunPrincipal const &r)
void propagateProducts (BranchType type, Principal const &parentPrincipal, Principal &principal) const
virtual void write (EventPrincipal const &e)
virtual void writeLuminosityBlock (LuminosityBlockPrincipal const &)
virtual void writeRun (RunPrincipal const &)

Private Attributes

boost::shared_ptr< ActionTable
const > 
act_table_
std::auto_ptr< ESInfoesInfo_
boost::shared_ptr
< eventsetup::EventSetupProvider
esp_
boost::shared_ptr
< ProductRegistry const > 
parentPreg_
std::map< ProcessHistoryID,
ProcessHistoryID
parentToChildPhID_
boost::shared_ptr
< SignallingProductRegistry
preg_
PrincipalCache principalCache_
boost::shared_ptr
< ProcessConfiguration
processConfiguration_
std::auto_ptr< Scheduleschedule_
ServiceToken serviceToken_
std::auto_ptr< SubProcesssubProcess_

Detailed Description

Definition at line 26 of file SubProcess.h.


Constructor & Destructor Documentation

edm::SubProcess::SubProcess ( ParameterSet parameterSet,
ParameterSet const &  topLevelParameterSet,
boost::shared_ptr< ProductRegistry const >  parentProductRegistry,
eventsetup::EventSetupsController esController,
ActivityRegistry parentActReg,
ServiceToken const &  token,
serviceregistry::ServiceLegacy  iLegacy 
)

Definition at line 25 of file SubProcess.cc.

References act_table_, edm::ParameterSet::addUntrackedParameter(), edm::ActivityRegistry::connectToSubProcess(), esp_, edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameterSet(), edm::PrincipalCache::insert(), edm::eventsetup::EventSetupsController::makeProvider(), edm::OutputModule::maxEvents(), edm::ParameterSet::popParameterSet(), edm::popSubProcessParameterSet(), preg_, principalCache_, processConfiguration_, schedule_, serviceToken_, edm::IllegalParameters::setThrowAnException(), and subProcess_.

                                                               :
      OutputModule(parameterSet),
      serviceToken_(),
      parentPreg_(parentProductRegistry),
      preg_(),
      act_table_(),
      processConfiguration_(),
      principalCache_(),
      esp_(),
      schedule_(),
      parentToChildPhID_(),
      esInfo_(0),
      subProcess_() {

    std::string const maxEvents("maxEvents");
    std::string const maxLumis("maxLuminosityBlocks");

    std::auto_ptr<ParameterSet> processParameterSet = parameterSet.popParameterSet(std::string("process")); 

    // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
    if(processParameterSet->exists(maxEvents)) {
      processParameterSet->popParameterSet(maxEvents);
    }
    if(processParameterSet->exists(maxLumis)) {
      processParameterSet->popParameterSet(maxLumis);
    }

    // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
    if(topLevelParameterSet.exists(maxEvents)) {
      processParameterSet->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
    }
    if(topLevelParameterSet.exists(maxLumis)) {
      processParameterSet->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
    }

    // If this process has a subprocess, pop the subprocess parameter set out of the process parameter set

    boost::shared_ptr<ParameterSet> subProcessParameterSet(popSubProcessParameterSet(*processParameterSet).release());
  
    ScheduleItems items(*parentProductRegistry);

    ParameterSet const& optionsPset(processParameterSet->getUntrackedParameterSet("options", ParameterSet()));
    IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true));

    //initialize the services
    ServiceToken iToken;

    // get any configured services.
    std::auto_ptr<std::vector<ParameterSet> > serviceSets = processParameterSet->popVParameterSet(std::string("services")); 

    ServiceToken newToken = items.initServices(*serviceSets, *processParameterSet, token, iLegacy, false);
    parentActReg.connectToSubProcess(*items.actReg_);
    serviceToken_ = items.addCPRandTNS(*processParameterSet, newToken);


    //make the services available
    ServiceRegistry::Operate operate(serviceToken_);

    // intialize miscellaneous items
    boost::shared_ptr<CommonParams> common(items.initMisc(*processParameterSet));

    // intialize the event setup provider
    esp_ = esController.makeProvider(*processParameterSet, *common);

    // intialize the Schedule
    schedule_ = items.initSchedule(*processParameterSet);

    // set the items
    act_table_ = items.act_table_;
    preg_ = items.preg_;
    processConfiguration_ = items.processConfiguration_;

    boost::shared_ptr<EventPrincipal> ep(new EventPrincipal(preg_, *processConfiguration_));
    principalCache_.insert(ep);

    if(subProcessParameterSet) {
      subProcess_.reset(new SubProcess(*subProcessParameterSet, topLevelParameterSet, preg_, esController, *items.actReg_, newToken, iLegacy));
    }
  }
edm::SubProcess::~SubProcess ( ) [virtual]

Definition at line 111 of file SubProcess.cc.

{}

Member Function Documentation

void edm::SubProcess::beginJob ( void  ) [private, virtual]

Reimplemented from edm::OutputModule.

Definition at line 114 of file SubProcess.cc.

References edm::InEvent, edm::InLumi, edm::InRun, edm::OutputModule::keptProducts(), preg_, schedule_, serviceToken_, and subProcess_.

                       {
    // Mark dropped branches as dropped in the product registry.
    {
      std::set<BranchID> keptBranches;
      Selections const& keptVectorR = keptProducts()[InRun];
      for(Selections::const_iterator it = keptVectorR.begin(), itEnd = keptVectorR.end(); it != itEnd; ++it) {
        keptBranches.insert((*it)->branchID());
      }
      Selections const& keptVectorL = keptProducts()[InLumi];
      for(Selections::const_iterator it = keptVectorL.begin(), itEnd = keptVectorL.end(); it != itEnd; ++it) {
        keptBranches.insert((*it)->branchID());
      }
      Selections const& keptVectorE = keptProducts()[InEvent];
      for(Selections::const_iterator it = keptVectorE.begin(), itEnd = keptVectorE.end(); it != itEnd; ++it) {
        keptBranches.insert((*it)->branchID());
      }
      for(ProductRegistry::ProductList::const_iterator it = preg_->productList().begin(), itEnd = preg_->productList().end(); it != itEnd; ++it) {
        if(keptBranches.find(it->second.branchID()) == keptBranches.end()) {
          it->second.setDropped();
        } 
      }
    }
    ServiceRegistry::Operate operate(serviceToken_);
    schedule_->beginJob();
    if(subProcess_.get()) subProcess_->doBeginJob();
  }
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb) [private, virtual]

Reimplemented from edm::OutputModule.

Definition at line 242 of file SubProcess.cc.

References printConversionInfo::aux, edm::LuminosityBlockPrincipal::aux(), edm::Principal::branchMapperPtr(), esInfo_, edm::InLumi, edm::PrincipalCache::insert(), edm::PrincipalCache::lumiPrincipalPtr(), parentToChildPhID_, preg_, principalCache_, processConfiguration_, edm::Principal::processHistoryID(), edm::LuminosityBlockAuxiliary::processHistoryID(), propagateProducts(), edm::PrincipalCache::runPrincipalPtr(), schedule_, edm::Principal::store(), and subProcess_.

                                                                            {
    boost::shared_ptr<LuminosityBlockAuxiliary> aux(new LuminosityBlockAuxiliary(principal.aux()));
    aux->setProcessHistoryID(principal.processHistoryID());
    boost::shared_ptr<LuminosityBlockPrincipal> lbpp(new LuminosityBlockPrincipal(aux, preg_, *processConfiguration_, principalCache_.runPrincipalPtr()));
    lbpp->fillLuminosityBlockPrincipal(principal.branchMapperPtr(), principal.store());
    principalCache_.insert(lbpp);
    parentToChildPhID_.insert(std::make_pair(principal.aux().processHistoryID(), principal.processHistoryID()));
    parentToChildPhID_.insert(std::make_pair(principal.processHistoryID(), lbpp->processHistoryID()));
    LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
    propagateProducts(InLumi, principal, lbp);
    typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionBegin> Traits;
    schedule_->processOneOccurrence<Traits>(lbp, esInfo_->es_);
    if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, esInfo_->ts_);
  }
void edm::SubProcess::beginRun ( RunPrincipal const &  r) [private, virtual]

Reimplemented from edm::OutputModule.

Definition at line 190 of file SubProcess.cc.

References edm::RunPrincipal::aux(), printConversionInfo::aux, edm::Principal::branchMapperPtr(), esInfo_, edm::InRun, edm::PrincipalCache::insert(), parentToChildPhID_, preg_, principalCache_, processConfiguration_, edm::RunAuxiliary::processHistoryID(), edm::Principal::processHistoryID(), propagateProducts(), edm::PrincipalCache::runPrincipalPtr(), schedule_, edm::Principal::store(), and subProcess_.

                                                    {
    boost::shared_ptr<RunAuxiliary> aux(new RunAuxiliary(principal.aux()));
    aux->setProcessHistoryID(principal.processHistoryID());
    boost::shared_ptr<RunPrincipal> rpp(new RunPrincipal(aux, preg_, *processConfiguration_));
    rpp->fillRunPrincipal(principal.branchMapperPtr(), principal.store());
    principalCache_.insert(rpp);
    parentToChildPhID_.insert(std::make_pair(principal.aux().processHistoryID(), principal.processHistoryID()));
    parentToChildPhID_.insert(std::make_pair(principal.processHistoryID(), rpp->processHistoryID()));
    RunPrincipal& rp = *principalCache_.runPrincipalPtr();
    propagateProducts(InRun, principal, rp);
    typedef OccurrenceTraits<RunPrincipal, BranchActionBegin> Traits;
    schedule_->processOneOccurrence<Traits>(rp, esInfo_->es_);
    if(subProcess_.get()) subProcess_->doBeginRun(rp, esInfo_->ts_);
  }
void edm::SubProcess::clearCounters ( ) [inline]

Clear all the counters in the trigger report.

Definition at line 185 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                         {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->clearCounters();
      if(subProcess_.get()) subProcess_->clearCounters();
    }
void edm::SubProcess::closeOutputFiles ( ) [inline]

Definition at line 63 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                            {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->closeOutputFiles();
      if(subProcess_.get()) subProcess_->closeOutputFiles();
    }
void edm::SubProcess::doBeginLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 233 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

                                                                                                      {
    ServiceRegistry::Operate operate(serviceToken_);
    esInfo_.reset(new ESInfo(ts, *esp_));
    CurrentProcessingContext cpc;
    doBeginLuminosityBlock(principal, esInfo_->es_, &cpc);
    esInfo_.reset();
  }
void edm::SubProcess::doBeginRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 181 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

                                                                              {
    ServiceRegistry::Operate operate(serviceToken_);
    esInfo_.reset(new ESInfo(ts, *esp_));
    CurrentProcessingContext cpc;
    doBeginRun(principal, esInfo_->es_, &cpc);
    esInfo_.reset();
  }
void edm::SubProcess::doEndLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 258 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

                                                                                                    {
    ServiceRegistry::Operate operate(serviceToken_);
    esInfo_.reset(new ESInfo(ts, *esp_));
    CurrentProcessingContext cpc;
    doEndLuminosityBlock(principal, esInfo_->es_, &cpc);
    esInfo_.reset();
  }
void edm::SubProcess::doEndRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 206 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

                                                                            {
    ServiceRegistry::Operate operate(serviceToken_);
    esInfo_.reset(new ESInfo(ts, *esp_));
    CurrentProcessingContext cpc;
    doEndRun(principal, esInfo_->es_, &cpc);
    esInfo_.reset();
  }
void edm::SubProcess::doEvent ( EventPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 154 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

                                                                             {
    ServiceRegistry::Operate operate(serviceToken_);
    esInfo_.reset(new ESInfo(ts, *esp_));
    CurrentProcessingContext cpc;
    doEvent(principal, esInfo_->es_, &cpc);
    esInfo_.reset();
  }
void edm::SubProcess::enableEndPaths ( bool  active) [inline]

Turn end_paths "off" if "active" is false; Turn end_paths "on" if "active" is true.

Definition at line 158 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                     {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->enableEndPaths(active);
      if(subProcess_.get()) subProcess_->enableEndPaths(active);
    }
void edm::SubProcess::endJob ( void  ) [private, virtual]

Reimplemented from edm::OutputModule.

Definition at line 142 of file SubProcess.cc.

References schedule_, serviceToken_, and subProcess_.

                     {
    ServiceRegistry::Operate operate(serviceToken_);
    schedule_->endJob();
    if(subProcess_.get()) subProcess_->doEndJob();
  }
void edm::SubProcess::endLuminosityBlock ( LuminosityBlockPrincipal const &  lb) [private, virtual]

Reimplemented from edm::OutputModule.

Definition at line 267 of file SubProcess.cc.

References esInfo_, edm::InLumi, edm::PrincipalCache::lumiPrincipalPtr(), principalCache_, propagateProducts(), schedule_, and subProcess_.

                                                                          {
    LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
    propagateProducts(InLumi, principal, lbp);
    typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionEnd> Traits;
    schedule_->processOneOccurrence<Traits>(lbp, esInfo_->es_);
    if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, esInfo_->ts_);
  }
bool edm::SubProcess::endPathsEnabled ( ) const [inline]

Return true if end_paths are active, and false if they are inactive.

Definition at line 165 of file SubProcess.h.

References schedule_, and serviceToken_.

                                 {
      ServiceRegistry::Operate operate(serviceToken_);
      return schedule_->endPathsEnabled();
    }
void edm::SubProcess::endRun ( RunPrincipal const &  r) [private, virtual]

Reimplemented from edm::OutputModule.

Definition at line 215 of file SubProcess.cc.

References esInfo_, edm::InRun, principalCache_, propagateProducts(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcess_.

                                                  {
    RunPrincipal& rp = *principalCache_.runPrincipalPtr();
    propagateProducts(InRun, principal, rp);
    typedef OccurrenceTraits<RunPrincipal, BranchActionEnd> Traits;
    schedule_->processOneOccurrence<Traits>(rp, esInfo_->es_);
    if(subProcess_.get()) subProcess_->doEndRun(rp, esInfo_->ts_);
  }
std::vector<ModuleDescription const*> edm::SubProcess::getAllModuleDescriptions ( ) const

Return a vector allowing const access to all the ModuleDescriptions for this SubProcess.

*** N.B. *** Ownership of the ModuleDescriptions is *not* passed to the caller. Do not call delete on these pointers!

void edm::SubProcess::getTriggerReport ( TriggerReport rep) const [inline]

Return the trigger report information on paths, modules-in-path, modules-in-endpath, and modules.

Definition at line 172 of file SubProcess.h.

References schedule_, and serviceToken_.

                                                    {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->getTriggerReport(rep);
    }
void edm::SubProcess::openNewOutputFilesIfNeeded ( ) [inline]

Definition at line 70 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                      {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->openNewOutputFilesIfNeeded();
      if(subProcess_.get()) subProcess_->openNewOutputFilesIfNeeded();
    }
void edm::SubProcess::openOutputFiles ( FileBlock fb) [inline]

Definition at line 77 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                        {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->openOutputFiles(fb);
      if(subProcess_.get()) subProcess_->openOutputFiles(fb);
    }
void edm::SubProcess::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
) [inline, virtual]

Reimplemented from edm::OutputModule.

Definition at line 123 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                                                                              {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
      if(subProcess_.get()) subProcess_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
    }
void edm::SubProcess::preForkReleaseResources ( ) [inline, virtual]

Reimplemented from edm::OutputModule.

Definition at line 117 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                   {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->preForkReleaseResources();
      if(subProcess_.get()) subProcess_->preForkReleaseResources();
    }
void edm::SubProcess::propagateProducts ( BranchType  type,
Principal const &  parentPrincipal,
Principal principal 
) const [private]

Definition at line 285 of file SubProcess.cc.

References edm::Principal::getGroup(), edm::OutputModule::keptProducts(), and edm::GroupData::swap().

Referenced by beginLuminosityBlock(), beginRun(), endLuminosityBlock(), endRun(), and write().

                                                                                                             {
    Selections const& keptVector = keptProducts()[type];
    for(Selections::const_iterator it = keptVector.begin(), itEnd = keptVector.end(); it != itEnd; ++it) {
      boost::shared_ptr<Group const> parentGroup = parentPrincipal.getGroup((*it)->branchID(), false, false);
      if(parentGroup) {
        // Make copy of parent group data
        GroupData parentData = parentGroup->groupData();
        boost::shared_ptr<Group const> group = principal.getGroup((*it)->branchID(), false, false);
        if(group) {
          // Swap copy with this group data
          GroupData& thisData = const_cast<GroupData&>(group->groupData());
          thisData.swap(parentData);
          // Sets unavailable flag, if known that product is not available
          group->productUnavailable();
        }
      }
    }
  }
void edm::SubProcess::respondToCloseInputFile ( FileBlock const &  fb) [inline, virtual]

Reimplemented from edm::OutputModule.

Definition at line 91 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                                      {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->respondToCloseInputFile(fb);
      if(subProcess_.get()) subProcess_->respondToCloseInputFile(fb);
    }
void edm::SubProcess::respondToCloseOutputFiles ( FileBlock const &  fb) [inline, virtual]

Reimplemented from edm::OutputModule.

Definition at line 105 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                                        {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->respondToCloseOutputFiles(fb);
      if(subProcess_.get()) subProcess_->respondToCloseOutputFiles(fb);
    }
void edm::SubProcess::respondToOpenInputFile ( FileBlock const &  fb) [inline, virtual]

Reimplemented from edm::OutputModule.

Definition at line 84 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                                     {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->respondToOpenInputFile(fb);
      if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
    }
void edm::SubProcess::respondToOpenOutputFiles ( FileBlock const &  fb) [inline, virtual]

Reimplemented from edm::OutputModule.

Definition at line 98 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                                       {
      ServiceRegistry::Operate operate(serviceToken_);
      schedule_->respondToOpenOutputFiles(fb);
      if(subProcess_.get()) subProcess_->respondToOpenOutputFiles(fb);
    }
bool edm::SubProcess::shouldWeCloseOutput ( ) const [inline]

Definition at line 112 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                     {
      ServiceRegistry::Operate operate(serviceToken_);
      return schedule_->shouldWeCloseOutput() || (subProcess_.get() ? subProcess_->shouldWeCloseOutput() : false);
    }
bool const edm::SubProcess::terminate ( void  ) const [inline]

Return whether each output module has reached its maximum count. If there is a subprocess, get this information from the subprocess.

Definition at line 179 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

                                 {
      ServiceRegistry::Operate operate(serviceToken_);
      return subProcess_.get() ? subProcess_->terminate() : schedule_->terminate();
    }
int edm::SubProcess::totalEvents ( ) const [inline]

Return the number of events this SubProcess has tried to process (inclues both successes and failures, including failures due to exceptions during processing).

Definition at line 139 of file SubProcess.h.

References schedule_.

                            {
      return schedule_->totalEvents();
    }
int edm::SubProcess::totalEventsFailed ( ) const [inline]

Return the number of events that have not passed any trigger. (N.B. totalEventsFailed() + totalEventsPassed() == totalEvents()

Definition at line 151 of file SubProcess.h.

References schedule_, and serviceToken_.

                                  {
      ServiceRegistry::Operate operate(serviceToken_);
      return schedule_->totalEventsFailed();
    }
int edm::SubProcess::totalEventsPassed ( ) const [inline]

Return the number of events which have been passed by one or more trigger paths.

Definition at line 144 of file SubProcess.h.

References schedule_, and serviceToken_.

                                  {
      ServiceRegistry::Operate operate(serviceToken_);
      return schedule_->totalEventsPassed();
    }
void edm::SubProcess::write ( EventPrincipal const &  e) [private, virtual]

Implements edm::OutputModule.

Definition at line 163 of file SubProcess.cc.

References edm::EventPrincipal::aux(), printConversionInfo::aux, edm::Principal::branchMapperPtr(), esInfo_, edm::PrincipalCache::eventPrincipal(), edm::EventPrincipal::fillEventPrincipal(), edm::InEvent, edm::PrincipalCache::lumiPrincipalPtr(), principalCache_, edm::Principal::processHistoryID(), propagateProducts(), schedule_, edm::Principal::store(), and subProcess_.

                                                   {
    std::auto_ptr<EventAuxiliary> aux(new EventAuxiliary(principal.aux()));
    aux->setProcessHistoryID(principal.processHistoryID());
    EventPrincipal& ep = principalCache_.eventPrincipal();
    ep.fillEventPrincipal(aux,
                          principalCache_.lumiPrincipalPtr(),
                          boost::shared_ptr<EventSelectionIDVector>(new EventSelectionIDVector), // UGH use subprocess specific parameter
                          boost::shared_ptr<BranchListIndexes>(new BranchListIndexes), // UGH figure this out
                          principal.branchMapperPtr(),
                          principal.store());
    propagateProducts(InEvent, principal, ep);
    typedef OccurrenceTraits<EventPrincipal, BranchActionBegin> Traits;
    schedule_->processOneOccurrence<Traits>(ep, esInfo_->es_);
    if(subProcess_.get()) subProcess_->doEvent(ep, esInfo_->ts_);
    ep.clearEventPrincipal();
  }
void edm::SubProcess::writeLumi ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 276 of file SubProcess.cc.

References edm::PrincipalCache::lumiPrincipal(), parentToChildPhID_, principalCache_, schedule_, serviceToken_, and subProcess_.

                                                                                         {
    ServiceRegistry::Operate operate(serviceToken_);
    std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
    assert(it != parentToChildPhID_.end());
    schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber));
    if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
  }
virtual void edm::SubProcess::writeLuminosityBlock ( LuminosityBlockPrincipal const &  ) [inline, private, virtual]

Implements edm::OutputModule.

Definition at line 206 of file SubProcess.h.

{ throw 0; }
void edm::SubProcess::writeRun ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 224 of file SubProcess.cc.

References parentToChildPhID_, principalCache_, edm::PrincipalCache::runPrincipal(), schedule_, serviceToken_, and subProcess_.

                                                                        {
    ServiceRegistry::Operate operate(serviceToken_);
    std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
    assert(it != parentToChildPhID_.end());
    schedule_->writeRun(principalCache_.runPrincipal(it->second, runNumber));
    if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
  }
virtual void edm::SubProcess::writeRun ( RunPrincipal const &  ) [inline, private, virtual]

Implements edm::OutputModule.

Definition at line 205 of file SubProcess.h.

{ throw 0; }

Member Data Documentation

boost::shared_ptr<ActionTable const> edm::SubProcess::act_table_ [private]

Definition at line 213 of file SubProcess.h.

Referenced by SubProcess().

std::auto_ptr<ESInfo> edm::SubProcess::esInfo_ [private]
boost::shared_ptr<ProductRegistry const> edm::SubProcess::parentPreg_ [private]

Definition at line 211 of file SubProcess.h.

Definition at line 218 of file SubProcess.h.

Referenced by beginLuminosityBlock(), beginRun(), writeLumi(), and writeRun().

boost::shared_ptr<SignallingProductRegistry> edm::SubProcess::preg_ [private]

Definition at line 212 of file SubProcess.h.

Referenced by beginJob(), beginLuminosityBlock(), beginRun(), and SubProcess().

Definition at line 214 of file SubProcess.h.

Referenced by beginLuminosityBlock(), beginRun(), and SubProcess().

std::auto_ptr<Schedule> edm::SubProcess::schedule_ [private]
std::auto_ptr<SubProcess> edm::SubProcess::subProcess_ [private]