CMS 3D CMS Logo

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

#include <SubProcess.h>

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

Classes

struct  ESInfo
 

Public Member Functions

void clearCounters ()
 Clear all the counters in the trigger report. More...
 
void closeOutputFiles ()
 
void deleteLumiFromCache (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
 
void deleteRunFromCache (ProcessHistoryID const &parentPhID, int runNumber)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
 
void doBeginRun (RunPrincipal const &principal, IOVSyncValue const &ts)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doEndRun (RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
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. More...
 
std::vector< ModuleDescription
const * > 
getAllModuleDescriptions () const
 Return a vector allowing const access to all the ModuleDescriptions for this SubProcess. More...
 
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, boost::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy)
 
bool 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. More...
 
void writeLumi (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
 
void writeRun (ProcessHistoryID const &parentPhID, int runNumber)
 
virtual ~SubProcess ()
 
- Public Member Functions inherited from edm::OutputModule
BranchChildren const & branchChildren () const
 
BranchIDLists const * branchIDLists () const
 
std::array< bool,
NumBranchTypes > const & 
hasNewlyDroppedBranch () const
 
SelectionsArray const & keptProducts () const
 
int maxEvents () const
 
OutputModuleoperator= (OutputModule const &)=delete
 
 OutputModule (ParameterSet const &pset)
 
 OutputModule (OutputModule const &)=delete
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg)
 
bool wantAllEvents () const
 
virtual ~OutputModule ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 fixBranchIDListsForEDAliases (std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
 
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

std::unique_ptr< ActionTable
const > 
act_table_
 
boost::shared_ptr
< BranchIDListHelper
branchIDListHelper_
 
bool cleaningUpAfterException_
 
std::auto_ptr< ESInfoesInfo_
 
boost::shared_ptr
< eventsetup::EventSetupProvider
esp_
 
std::unique_ptr< HistoryAppenderhistoryAppender_
 
boost::shared_ptr
< ProductRegistry const > 
parentPreg_
 
std::map< ProcessHistoryID,
ProcessHistoryID
parentToChildPhID_
 
boost::shared_ptr
< ProductRegistry const > 
preg_
 
PrincipalCache principalCache_
 
boost::shared_ptr
< ProcessConfiguration const > 
processConfiguration_
 
std::unique_ptr< ParameterSetprocessParameterSet_
 
std::auto_ptr< Scheduleschedule_
 
ServiceToken serviceToken_
 
std::auto_ptr< SubProcesssubProcess_
 

Additional Inherited Members

- Public Types inherited from edm::OutputModule
typedef OutputModule ModuleType
 
typedef OutputWorker WorkerType
 
- Static Public Member Functions inherited from edm::OutputModule
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::OutputModule
void configure (OutputModuleDescription const &desc)
 
CurrentProcessingContext const * currentContext () const
 
ModuleDescription const & description () const
 
void doBeginJob ()
 
bool doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doBeginRun (RunPrincipal const &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doEndRun (RunPrincipal const &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doEvent (EventPrincipal const &ep, EventSetup const &c, CurrentProcessingContext const *cpc)
 
std::map< BranchID::value_type,
BranchID::value_type > const & 
droppedBranchIDToKeptBranchID ()
 
Trig getTriggerResults (Event const &ep) const
 
Trig getTriggerResults (EventPrincipal const &ep) const
 
ParameterSetID selectorConfig () const
 
void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 28 of file SubProcess.h.

Constructor & Destructor Documentation

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

Definition at line 33 of file SubProcess.cc.

References act_table_, branchIDListHelper_, edm::OutputModule::configure(), edm::ActivityRegistry::connectToSubProcess(), esp_, edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameterSet(), historyAppender_, edm::PrincipalCache::insert(), edm::eventsetup::EventSetupsController::makeProvider(), edm::OutputModule::maxEvents(), edm::ParameterSet::popParameterSet(), edm::popSubProcessParameterSet(), preg_, principalCache_, processConfiguration_, processParameterSet_, schedule_, edm::OutputModule::selectProducts(), serviceToken_, edm::OutputModule::setEventSelectionInfo(), edm::IllegalParameters::setThrowAnException(), AlCaHLTBitMon_QueryRunRegistry::string, and subProcess_.

40  :
41  OutputModule(parameterSet),
42  serviceToken_(),
43  parentPreg_(parentProductRegistry),
44  preg_(),
46  act_table_(),
49  esp_(),
50  schedule_(),
52  historyAppender_(new HistoryAppender),
53  esInfo_(nullptr),
54  subProcess_(),
57 
58  selectProducts(*parentProductRegistry);
59 
60  std::string const maxEvents("maxEvents");
61  std::string const maxLumis("maxLuminosityBlocks");
62 
63  processParameterSet_.reset(parameterSet.popParameterSet(std::string("process")).release());
64 
65  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
66  if(processParameterSet_->exists(maxEvents)) {
67  processParameterSet_->popParameterSet(maxEvents);
68  }
69  if(processParameterSet_->exists(maxLumis)) {
70  processParameterSet_->popParameterSet(maxLumis);
71  }
72 
73  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
74  if(topLevelParameterSet.exists(maxEvents)) {
75  processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
76  }
77  if(topLevelParameterSet.exists(maxLumis)) {
78  processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
79  }
80 
81  // If this process has a subprocess, pop the subprocess parameter set out of the process parameter set
82 
83  boost::shared_ptr<ParameterSet> subProcessParameterSet(popSubProcessParameterSet(*processParameterSet_).release());
84 
85  ScheduleItems items(*parentProductRegistry, *parentBranchIDListHelper, *this);
86 
87  ParameterSet const& optionsPset(processParameterSet_->getUntrackedParameterSet("options", ParameterSet()));
88  IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true));
89 
90  //initialize the services
91  ServiceToken iToken;
92 
93  // get any configured services.
94  std::auto_ptr<std::vector<ParameterSet> > serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
95 
96  ServiceToken newToken = items.initServices(*serviceSets, *processParameterSet_, token, iLegacy, false);
97  parentActReg.connectToSubProcess(*items.actReg_);
98  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
99 
100 
101  //make the services available
103 
104  // intialize miscellaneous items
105  items.initMisc(*processParameterSet_);
106 
107  // intialize the event setup provider
108  esp_ = esController.makeProvider(*processParameterSet_);
109 
110  // intialize the Schedule
111  schedule_ = items.initSchedule(*processParameterSet_,subProcessParameterSet.get());
112 
113  // set the items
114  act_table_ = std::move(items.act_table_);
115  preg_.reset(items.preg_.release());
116  branchIDListHelper_ = items.branchIDListHelper_;
117  processConfiguration_ = items.processConfiguration_;
118 
119  OutputModuleDescription desc(branchIDListHelper_->branchIDLists());
120  configure(desc);
121 
122  std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
123  setEventSelectionInfo(outputModulePathPositions, parentProductRegistry->anyProductProduced());
124 
125  boost::shared_ptr<EventPrincipal> ep(new EventPrincipal(preg_, branchIDListHelper_, *processConfiguration_, historyAppender_.get()));
127 
128  if(subProcessParameterSet) {
129  subProcess_.reset(new SubProcess(*subProcessParameterSet, topLevelParameterSet, preg_, branchIDListHelper_, esController, *items.actReg_, newToken, iLegacy));
130  }
131  }
boost::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:215
SubProcess(ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, boost::shared_ptr< ProductRegistry const > parentProductRegistry, boost::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy)
Definition: SubProcess.cc:33
void selectProducts(ProductRegistry const &preg)
std::auto_ptr< ParameterSet > popSubProcessParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:378
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:221
std::unique_ptr< HistoryAppender > historyAppender_
Definition: SubProcess.h:224
void insert(boost::shared_ptr< RunPrincipal > rp)
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
ServiceToken serviceToken_
Definition: SubProcess.h:214
bool cleaningUpAfterException_
Definition: SubProcess.h:227
static void setThrowAnException(bool v)
std::unique_ptr< ActionTable const > act_table_
Definition: SubProcess.h:218
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:223
int maxEvents() const
Definition: OutputModule.h:51
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:217
std::unique_ptr< ParameterSet > processParameterSet_
Definition: SubProcess.h:228
void configure(OutputModuleDescription const &desc)
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
boost::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:219
boost::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:216
PrincipalCache principalCache_
Definition: SubProcess.h:220
OutputModule(ParameterSet const &pset)
edm::SubProcess::~SubProcess ( )
virtual

Definition at line 133 of file SubProcess.cc.

133 {}

Member Function Documentation

void edm::SubProcess::beginJob ( void  )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 136 of file SubProcess.cc.

References edm::OutputModule::droppedBranchIDToKeptBranchID(), relativeConstraints::empty, fixBranchIDListsForEDAliases(), preg_, schedule_, serviceToken_, and subProcess_.

136  {
139  }
141  schedule_->beginJob(*preg_);
142  if(subProcess_.get()) subProcess_->doBeginJob();
143  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: OutputModule.h:112
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:157
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
boost::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:216
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 286 of file SubProcess.cc.

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

286  {
287  boost::shared_ptr<LuminosityBlockAuxiliary> aux(new LuminosityBlockAuxiliary(principal.aux()));
288  aux->setProcessHistoryID(principal.processHistoryID());
289  boost::shared_ptr<LuminosityBlockPrincipal> lbpp(new LuminosityBlockPrincipal(aux, preg_, *processConfiguration_, historyAppender_.get()));
290  lbpp->fillLuminosityBlockPrincipal(principal.reader());
291  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
292  principalCache_.insert(lbpp);
293  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
295  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionBegin> Traits;
296  schedule_->processOneOccurrence<Traits>(lbp, esInfo_->es_);
297  if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, esInfo_->ts_);
298  }
std::unique_ptr< HistoryAppender > historyAppender_
Definition: SubProcess.h:224
void insert(boost::shared_ptr< RunPrincipal > rp)
boost::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
boost::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:337
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
boost::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:219
boost::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:216
PrincipalCache principalCache_
Definition: SubProcess.h:220
void edm::SubProcess::beginRun ( RunPrincipal const &  r)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 220 of file SubProcess.cc.

References printConversionInfo::aux, edm::RunPrincipal::aux(), esInfo_, historyAppender_, edm::InRun, edm::PrincipalCache::insert(), edm::detail::ThreadSafeRegistry< KEY, T, E >::instance(), parentToChildPhID_, preg_, principalCache_, processConfiguration_, edm::RunAuxiliary::processHistoryID(), edm::Principal::processHistoryID(), propagateProducts(), edm::Principal::reader(), edm::FullHistoryToReducedHistoryMap::reduceProcessHistoryID(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcess_.

220  {
221  boost::shared_ptr<RunAuxiliary> aux(new RunAuxiliary(principal.aux()));
222  aux->setProcessHistoryID(principal.processHistoryID());
223  boost::shared_ptr<RunPrincipal> rpp(new RunPrincipal(aux, preg_, *processConfiguration_, historyAppender_.get()));
224  rpp->fillRunPrincipal(principal.reader());
225  principalCache_.insert(rpp);
226 
227  FullHistoryToReducedHistoryMap & phidConverter(ProcessHistoryRegistry::instance()->extra());
228  ProcessHistoryID const& parentInputReducedPHID = phidConverter.reduceProcessHistoryID(principal.aux().processHistoryID());
229  ProcessHistoryID const& inputReducedPHID = phidConverter.reduceProcessHistoryID(principal.processHistoryID());
230 
231  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
232 
233  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
235  typedef OccurrenceTraits<RunPrincipal, BranchActionBegin> Traits;
236  schedule_->processOneOccurrence<Traits>(rp, esInfo_->es_);
237  if(subProcess_.get()) subProcess_->doBeginRun(rp, esInfo_->ts_);
238  }
static ThreadSafeRegistry * instance()
std::unique_ptr< HistoryAppender > historyAppender_
Definition: SubProcess.h:224
void insert(boost::shared_ptr< RunPrincipal > rp)
boost::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
Hash< ProcessHistoryType > ProcessHistoryID
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:223
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:337
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
boost::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:219
boost::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:216
PrincipalCache principalCache_
Definition: SubProcess.h:220
void edm::SubProcess::clearCounters ( )
inline

Clear all the counters in the trigger report.

Definition at line 188 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

188  {
190  schedule_->clearCounters();
191  if(subProcess_.get()) subProcess_->clearCounters();
192  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::closeOutputFiles ( )
inline

Definition at line 70 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

70  {
72  schedule_->closeOutputFiles();
73  if(subProcess_.get()) subProcess_->closeOutputFiles();
74  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::deleteLumiFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 329 of file SubProcess.cc.

References edm::PrincipalCache::deleteLumi(), parentToChildPhID_, principalCache_, and subProcess_.

329  {
330  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
331  assert(it != parentToChildPhID_.end());
332  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
333  if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber);
334  }
void deleteLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:223
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
PrincipalCache principalCache_
Definition: SubProcess.h:220
void edm::SubProcess::deleteRunFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 269 of file SubProcess.cc.

References edm::PrincipalCache::deleteRun(), parentToChildPhID_, principalCache_, and subProcess_.

269  {
270  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
271  assert(it != parentToChildPhID_.end());
272  principalCache_.deleteRun(it->second, runNumber);
273  if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber);
274  }
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:223
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
PrincipalCache principalCache_
Definition: SubProcess.h:220
void edm::SubProcess::doBeginLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 277 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

277  {
279  esInfo_.reset(new ESInfo(ts, *esp_));
280  CurrentProcessingContext cpc;
282  esInfo_.reset();
283  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:221
void doBeginLuminosityBlock(LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
Definition: SubProcess.cc:277
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
void edm::SubProcess::doBeginRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 211 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

211  {
213  esInfo_.reset(new ESInfo(ts, *esp_));
214  CurrentProcessingContext cpc;
215  doBeginRun(principal, esInfo_->es_, &cpc);
216  esInfo_.reset();
217  }
void doBeginRun(RunPrincipal const &principal, IOVSyncValue const &ts)
Definition: SubProcess.cc:211
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:221
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
void edm::SubProcess::doEndLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 301 of file SubProcess.cc.

References cleaningUpAfterException_, esInfo_, esp_, and serviceToken_.

301  {
302  cleaningUpAfterException_ = cleaningUpAfterException;
304  esInfo_.reset(new ESInfo(ts, *esp_));
305  CurrentProcessingContext cpc;
307  esInfo_.reset();
308  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:221
ServiceToken serviceToken_
Definition: SubProcess.h:214
bool cleaningUpAfterException_
Definition: SubProcess.h:227
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
void doEndLuminosityBlock(LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:301
void edm::SubProcess::doEndRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 241 of file SubProcess.cc.

References cleaningUpAfterException_, esInfo_, esp_, and serviceToken_.

241  {
242  cleaningUpAfterException_ = cleaningUpAfterException;
244  esInfo_.reset(new ESInfo(ts, *esp_));
245  CurrentProcessingContext cpc;
246  doEndRun(principal, esInfo_->es_, &cpc);
247  esInfo_.reset();
248  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:221
ServiceToken serviceToken_
Definition: SubProcess.h:214
bool cleaningUpAfterException_
Definition: SubProcess.h:227
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
void doEndRun(RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:241
void edm::SubProcess::doEvent ( EventPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 177 of file SubProcess.cc.

References esInfo_, esp_, and serviceToken_.

177  {
179  esInfo_.reset(new ESInfo(ts, *esp_));
180  CurrentProcessingContext cpc;
181  doEvent(principal, esInfo_->es_, &cpc);
182  esInfo_.reset();
183  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:221
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
void doEvent(EventPrincipal const &principal, IOVSyncValue const &ts)
Definition: SubProcess.cc:177
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 161 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

161  {
163  schedule_->enableEndPaths(active);
164  if(subProcess_.get()) subProcess_->enableEndPaths(active);
165  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::endJob ( void  )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 146 of file SubProcess.cc.

References trackerHits::c, edm::ExceptionCollector::hasThrown(), edm::ExceptionCollector::rethrow(), schedule_, serviceToken_, and subProcess_.

146  {
148  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
149  schedule_->endJob(c);
150  if(c.hasThrown()) {
151  c.rethrow();
152  }
153  if(subProcess_.get()) subProcess_->doEndJob();
154  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::endLuminosityBlock ( LuminosityBlockPrincipal const &  lb)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 311 of file SubProcess.cc.

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

311  {
312  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
314  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionEnd> Traits;
315  schedule_->processOneOccurrence<Traits>(lbp, esInfo_->es_, cleaningUpAfterException_);
316  if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, esInfo_->ts_, cleaningUpAfterException_);
317  }
bool cleaningUpAfterException_
Definition: SubProcess.h:227
boost::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:337
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
PrincipalCache principalCache_
Definition: SubProcess.h:220
bool edm::SubProcess::endPathsEnabled ( ) const
inline

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

Definition at line 168 of file SubProcess.h.

References schedule_, and serviceToken_.

168  {
170  return schedule_->endPathsEnabled();
171  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
void edm::SubProcess::endRun ( RunPrincipal const &  r)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 251 of file SubProcess.cc.

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

251  {
252  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
254  typedef OccurrenceTraits<RunPrincipal, BranchActionEnd> Traits;
255  schedule_->processOneOccurrence<Traits>(rp, esInfo_->es_, cleaningUpAfterException_);
256  if(subProcess_.get()) subProcess_->doEndRun(rp, esInfo_->ts_, cleaningUpAfterException_);
257  }
boost::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
bool cleaningUpAfterException_
Definition: SubProcess.h:227
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:337
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
PrincipalCache principalCache_
Definition: SubProcess.h:220
void edm::SubProcess::fixBranchIDListsForEDAliases ( std::map< BranchID::value_type, BranchID::value_type > const &  droppedBranchIDToKeptBranchID)
private

Definition at line 157 of file SubProcess.cc.

References branchIDListHelper_, and subProcess_.

Referenced by beginJob().

157  {
158  // Check for branches dropped while an EDAlias was kept.
159  // Replace BranchID of each dropped branch with that of the kept alias.
160  for(BranchIDList& branchIDList : branchIDListHelper_->branchIDLists()) {
161  for(BranchID::value_type& branchID : branchIDList) {
162  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
163  if(iter != droppedBranchIDToKeptBranchID.end()) {
164  branchID = iter->second;
165  }
166  }
167  }
168  if(subProcess_.get()) subProcess_->fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
169  }
unsigned int value_type
Definition: BranchID.h:16
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: OutputModule.h:112
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:217
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
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 175 of file SubProcess.h.

References schedule_, and serviceToken_.

175  {
177  schedule_->getTriggerReport(rep);
178  }
string rep
Definition: cuy.py:1188
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
void edm::SubProcess::openNewOutputFilesIfNeeded ( )
inline

Definition at line 77 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

77  {
79  schedule_->openNewOutputFilesIfNeeded();
80  if(subProcess_.get()) subProcess_->openNewOutputFilesIfNeeded();
81  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::openOutputFiles ( FileBlock fb)
inline

Definition at line 84 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

84  {
86  schedule_->openOutputFiles(fb);
87  if(subProcess_.get()) subProcess_->openOutputFiles(fb);
88  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
inlinevirtual

Reimplemented from edm::OutputModule.

Definition at line 126 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

126  {
128  schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
129  if(subProcess_.get()) subProcess_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
130  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::preForkReleaseResources ( )
inlinevirtual

Reimplemented from edm::OutputModule.

Definition at line 120 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

120  {
122  schedule_->preForkReleaseResources();
123  if(subProcess_.get()) subProcess_->preForkReleaseResources();
124  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::propagateProducts ( BranchType  type,
Principal const &  parentPrincipal,
Principal principal 
) const
private

Definition at line 337 of file SubProcess.cc.

References Selections::begin(), Selections::end(), edm::Principal::getProductHolder(), edm::OutputModule::keptProducts(), edm::Provenance::processHistoryID(), edm::ProductHolderBase::productData(), edm::Provenance::productID(), edm::Provenance::productProvenance(), edm::Provenance::productProvenanceValid(), edm::ProductHolderBase::productUnavailable(), edm::ProductData::prov_, edm::Provenance::resetProductProvenance(), edm::Provenance::setProcessHistoryID(), edm::Provenance::setProductID(), edm::Provenance::setProductProvenance(), edm::Provenance::setStore(), edm::Provenance::store(), and edm::ProductData::wrapper_.

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

337  {
338  Selections const& keptVector = keptProducts()[type];
339  for(Selections::const_iterator it = keptVector.begin(), itEnd = keptVector.end(); it != itEnd; ++it) {
340  ProductHolderBase const* parentProductHolder = parentPrincipal.getProductHolder((*it)->branchID(), false, false);
341  if(parentProductHolder != 0) {
342  ProductData const& parentData = parentProductHolder->productData();
343  ProductHolderBase const* productHolder = principal.getProductHolder((*it)->branchID(), false, false);
344  if(productHolder != 0) {
345  ProductData& thisData = const_cast<ProductData&>(productHolder->productData());
346  //Propagate the per event(run)(lumi) data for this product to the subprocess.
347  //First, the product itself.
348  thisData.wrapper_ = parentData.wrapper_;
349  // Then the product ID and the ProcessHistory
350  thisData.prov_.setProductID(parentData.prov_.productID());
351  thisData.prov_.setProcessHistoryID(parentData.prov_.processHistoryID());
352  // Then the store, in case the product needs reading in a subprocess.
353  thisData.prov_.setStore(parentData.prov_.store());
354  // And last, the other per event provenance.
355  if(parentData.prov_.productProvenanceValid()) {
356  thisData.prov_.setProductProvenance(*parentData.prov_.productProvenance());
357  } else {
358  thisData.prov_.resetProductProvenance();
359  }
360  // Sets unavailable flag, if known that product is not available
361  (void)productHolder->productUnavailable();
362  }
363  }
364  }
365  }
type
Definition: HCALResponse.h:21
SelectionsArray const & keptProducts() const
Definition: OutputModule.h:61
iterator end()
Definition: Selections.h:367
iterator begin()
Definition: Selections.h:366
void edm::SubProcess::respondToCloseInputFile ( FileBlock const &  fb)
inlinevirtual

Reimplemented from edm::OutputModule.

Definition at line 94 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

94  {
96  schedule_->respondToCloseInputFile(fb);
97  if(subProcess_.get()) subProcess_->respondToCloseInputFile(fb);
98  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::respondToCloseOutputFiles ( FileBlock const &  fb)
inlinevirtual

Reimplemented from edm::OutputModule.

Definition at line 108 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

108  {
110  schedule_->respondToCloseOutputFiles(fb);
111  if(subProcess_.get()) subProcess_->respondToCloseOutputFiles(fb);
112  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::respondToOpenInputFile ( FileBlock const &  fb)
virtual

Reimplemented from edm::OutputModule.

Definition at line 369 of file SubProcess.cc.

References branchIDListHelper_, edm::FileBlock::branchIDLists(), schedule_, serviceToken_, and subProcess_.

369  {
371  branchIDListHelper_->updateFromInput(fb.branchIDLists());
372  schedule_->respondToOpenInputFile(fb);
373  if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
374  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:217
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
void edm::SubProcess::respondToOpenOutputFiles ( FileBlock const &  fb)
inlinevirtual

Reimplemented from edm::OutputModule.

Definition at line 101 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

101  {
103  schedule_->respondToOpenOutputFiles(fb);
104  if(subProcess_.get()) subProcess_->respondToOpenOutputFiles(fb);
105  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
bool edm::SubProcess::shouldWeCloseOutput ( ) const
inline

Definition at line 115 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

115  {
117  return schedule_->shouldWeCloseOutput() || (subProcess_.get() ? subProcess_->shouldWeCloseOutput() : false);
118  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
bool 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 182 of file SubProcess.h.

References schedule_, serviceToken_, and subProcess_.

182  {
184  return subProcess_.get() ? subProcess_->terminate() : schedule_->terminate();
185  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
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 142 of file SubProcess.h.

References schedule_.

142  {
143  return schedule_->totalEvents();
144  }
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
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 154 of file SubProcess.h.

References schedule_, and serviceToken_.

154  {
156  return schedule_->totalEventsFailed();
157  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
int edm::SubProcess::totalEventsPassed ( ) const
inline

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

Definition at line 147 of file SubProcess.h.

References schedule_, and serviceToken_.

147  {
149  return schedule_->totalEventsPassed();
150  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
void edm::SubProcess::write ( EventPrincipal const &  e)
privatevirtual

Implements edm::OutputModule.

Definition at line 186 of file SubProcess.cc.

References edm::ProductRegistry::anyProductProduced(), printConversionInfo::aux, edm::EventPrincipal::aux(), edm::EventPrincipal::branchListIndexes(), edm::EventPrincipal::branchMapperPtr(), esInfo_, edm::PrincipalCache::eventPrincipal(), edm::EventPrincipal::eventSelectionIDs(), edm::EventPrincipal::fillEventPrincipal(), edm::InEvent, edm::PrincipalCache::lumiPrincipalPtr(), principalCache_, edm::Principal::processHistoryID(), edm::Principal::productRegistry(), propagateProducts(), edm::Principal::reader(), schedule_, edm::OutputModule::selectorConfig(), edm::EventPrincipal::setLuminosityBlockPrincipal(), subProcess_, and edm::OutputModule::wantAllEvents().

Referenced by pkg.AbstractPkg::generate().

186  {
187  EventAuxiliary aux(principal.aux());
188  aux.setProcessHistoryID(principal.processHistoryID());
189 
190  boost::shared_ptr<EventSelectionIDVector> esids(new EventSelectionIDVector);
191  *esids = principal.eventSelectionIDs();
192  if (principal.productRegistry().anyProductProduced() || !wantAllEvents()) {
193  esids->push_back(selectorConfig());
194  }
195 
196  EventPrincipal& ep = principalCache_.eventPrincipal();
198  esids,
199  boost::shared_ptr<BranchListIndexes>(new BranchListIndexes(principal.branchListIndexes())),
200  principal.branchMapperPtr(),
201  principal.reader());
202  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
204  typedef OccurrenceTraits<EventPrincipal, BranchActionBegin> Traits;
205  schedule_->processOneOccurrence<Traits>(ep, esInfo_->es_);
206  if(subProcess_.get()) subProcess_->doEvent(ep, esInfo_->ts_);
207  ep.clearEventPrincipal();
208  }
void fillEventPrincipal(EventAuxiliary const &aux, boost::shared_ptr< EventSelectionIDVector > eventSelectionIDs=boost::shared_ptr< EventSelectionIDVector >(), boost::shared_ptr< BranchListIndexes > branchListIndexes=boost::shared_ptr< BranchListIndexes >(), boost::shared_ptr< BranchMapper > mapper=boost::shared_ptr< BranchMapper >(new BranchMapper), DelayedReader *reader=0)
std::vector< EventSelectionID > EventSelectionIDVector
bool wantAllEvents() const
Definition: OutputModule.h:71
std::vector< BranchListIndex > BranchListIndexes
boost::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< ESInfo > esInfo_
Definition: SubProcess.h:225
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
EventPrincipal & eventPrincipal() const
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:337
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
PrincipalCache principalCache_
Definition: SubProcess.h:220
ParameterSetID selectorConfig() const
Definition: OutputModule.h:92
void edm::SubProcess::writeLumi ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 320 of file SubProcess.cc.

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

320  {
322  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
323  assert(it != parentToChildPhID_.end());
324  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber));
325  if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
326  }
LuminosityBlockPrincipal & lumiPrincipal(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:223
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
PrincipalCache principalCache_
Definition: SubProcess.h:220
virtual void edm::SubProcess::writeLuminosityBlock ( LuminosityBlockPrincipal const &  )
inlineprivatevirtual

Implements edm::OutputModule.

Definition at line 209 of file SubProcess.h.

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

Definition at line 260 of file SubProcess.cc.

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

260  {
262  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
263  assert(it != parentToChildPhID_.end());
264  schedule_->writeRun(principalCache_.runPrincipal(it->second, runNumber));
265  if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
266  }
ServiceToken serviceToken_
Definition: SubProcess.h:214
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:222
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:223
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:226
PrincipalCache principalCache_
Definition: SubProcess.h:220
RunPrincipal & runPrincipal(ProcessHistoryID const &phid, RunNumber_t run) const
virtual void edm::SubProcess::writeRun ( RunPrincipal const &  )
inlineprivatevirtual

Implements edm::OutputModule.

Definition at line 208 of file SubProcess.h.

208 { throw 0; }

Member Data Documentation

std::unique_ptr<ActionTable const> edm::SubProcess::act_table_
private

Definition at line 218 of file SubProcess.h.

Referenced by SubProcess().

boost::shared_ptr<BranchIDListHelper> edm::SubProcess::branchIDListHelper_
private

Definition at line 217 of file SubProcess.h.

Referenced by fixBranchIDListsForEDAliases(), respondToOpenInputFile(), and SubProcess().

bool edm::SubProcess::cleaningUpAfterException_
private

Definition at line 227 of file SubProcess.h.

Referenced by doEndLuminosityBlock(), doEndRun(), endLuminosityBlock(), and endRun().

std::auto_ptr<ESInfo> edm::SubProcess::esInfo_
private
boost::shared_ptr<eventsetup::EventSetupProvider> edm::SubProcess::esp_
private
std::unique_ptr<HistoryAppender> edm::SubProcess::historyAppender_
private

Definition at line 224 of file SubProcess.h.

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

boost::shared_ptr<ProductRegistry const> edm::SubProcess::parentPreg_
private

Definition at line 215 of file SubProcess.h.

std::map<ProcessHistoryID, ProcessHistoryID> edm::SubProcess::parentToChildPhID_
private

Definition at line 223 of file SubProcess.h.

Referenced by beginRun(), deleteLumiFromCache(), deleteRunFromCache(), writeLumi(), and writeRun().

boost::shared_ptr<ProductRegistry const> edm::SubProcess::preg_
private

Definition at line 216 of file SubProcess.h.

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

PrincipalCache edm::SubProcess::principalCache_
private
boost::shared_ptr<ProcessConfiguration const> edm::SubProcess::processConfiguration_
private

Definition at line 219 of file SubProcess.h.

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

std::unique_ptr<ParameterSet> edm::SubProcess::processParameterSet_
private

Definition at line 228 of file SubProcess.h.

Referenced by SubProcess().

std::auto_ptr<Schedule> edm::SubProcess::schedule_
private
ServiceToken edm::SubProcess::serviceToken_
private
std::auto_ptr<SubProcess> edm::SubProcess::subProcess_
private