CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::SecondaryEventProvider Class Reference

#include <SecondaryEventProvider.h>

Public Member Functions

void beginJob (ProductRegistry const &iRegistry)
 
void beginLuminosityBlock (LuminosityBlockPrincipal &lumi, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
 
void beginRun (RunPrincipal &run, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
 
void beginStream (edm::StreamID iID, StreamContext &sContext)
 
void endJob ()
 
void endLuminosityBlock (LuminosityBlockPrincipal &lumi, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
 
void endRun (RunPrincipal &run, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
 
void endStream (edm::StreamID iID, StreamContext &sContext)
 
 SecondaryEventProvider (std::vector< ParameterSet > &psets, ProductRegistry &pregistry, std::shared_ptr< ProcessConfiguration > processConfiguration)
 
void setupPileUpEvent (EventPrincipal &ep, const EventSetup &setup, StreamContext &sContext)
 

Private Attributes

std::unique_ptr< ExceptionToActionTableexceptionToActionTable_
 
WorkerManager workerManager_
 

Detailed Description

Definition at line 14 of file SecondaryEventProvider.h.

Constructor & Destructor Documentation

edm::SecondaryEventProvider::SecondaryEventProvider ( std::vector< ParameterSet > &  psets,
ProductRegistry pregistry,
std::shared_ptr< ProcessConfiguration processConfiguration 
)

Definition at line 8 of file SecondaryEventProvider.cc.

References edm::WorkerManager::addToUnscheduledWorkers(), diffTwoXMLs::label, muonDTDigis_cfi::pset, edm::WorkerManager::setOnDemandProducts(), AlCaHLTBitMon_QueryRunRegistry::string, and workerManager_.

10  :
11  exceptionToActionTable_(new ExceptionToActionTable),
12  workerManager_(std::make_shared<ActivityRegistry>(), *exceptionToActionTable_) {
13  std::vector<std::string> shouldBeUsedLabels;
14  std::set<std::string> unscheduledLabels;
15  const PreallocationConfiguration preallocConfig;
16  for(auto& pset : psets) {
17  std::string label = pset.getParameter<std::string>("@module_label");
19  preg,
20  &preallocConfig,
21  processConfiguration,
22  label,
23  unscheduledLabels,
24  shouldBeUsedLabels);
25  }
26  if(!unscheduledLabels.empty()) {
27  workerManager_.setOnDemandProducts(preg, unscheduledLabels);
28  }
29  } // SecondaryEventProvider::SecondaryEventProvider
void setOnDemandProducts(ProductRegistry &pregistry, std::set< std::string > const &unscheduledLabels) const
void addToUnscheduledWorkers(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration > processConfiguration, std::string label, std::set< std::string > &unscheduledLabels, std::vector< std::string > &shouldBeUsedLabels)
std::unique_ptr< ExceptionToActionTable > exceptionToActionTable_

Member Function Documentation

void edm::SecondaryEventProvider::beginJob ( ProductRegistry const &  iRegistry)
inline

Definition at line 28 of file SecondaryEventProvider.h.

References edm::WorkerManager::beginJob(), and workerManager_.

28 {workerManager_.beginJob(iRegistry);}
void beginJob(ProductRegistry const &iRegistry)
void edm::SecondaryEventProvider::beginLuminosityBlock ( LuminosityBlockPrincipal lumi,
const edm::EventSetup setup,
ModuleCallingContext const *  mcc,
StreamContext sContext 
)

Definition at line 40 of file SecondaryEventProvider.cc.

References edm::StreamID::invalidStreamID(), csvLumiCalc::lumi, edm::WorkerManager::processOneOccurrence(), GeneralSetup::setup(), edm::StreamContext::streamID(), and workerManager_.

40  {
41  workerManager_.processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> >(lumi, setup, StreamID::invalidStreamID(),
42  nullptr, mcc);
43  workerManager_.processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> >(lumi, setup, sContext.streamID(),
44  &sContext, mcc);
45  }
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
static StreamID invalidStreamID()
Definition: StreamID.h:48
void edm::SecondaryEventProvider::beginRun ( RunPrincipal run,
const edm::EventSetup setup,
ModuleCallingContext const *  mcc,
StreamContext sContext 
)

Definition at line 33 of file SecondaryEventProvider.cc.

References edm::StreamID::invalidStreamID(), edm::WorkerManager::processOneOccurrence(), findQualityFiles::run, GeneralSetup::setup(), edm::StreamContext::streamID(), and workerManager_.

33  {
34  workerManager_.processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> >(run, setup, StreamID::invalidStreamID(),
35  nullptr, mcc);
36  workerManager_.processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> >(run, setup, sContext.streamID(),
37  &sContext, mcc);
38  }
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
static StreamID invalidStreamID()
Definition: StreamID.h:48
void edm::SecondaryEventProvider::beginStream ( edm::StreamID  iID,
StreamContext sContext 
)

Definition at line 64 of file SecondaryEventProvider.cc.

References edm::WorkerManager::beginStream(), and workerManager_.

Referenced by endJob().

64  {
65  workerManager_.beginStream(iID, sContext);
66  }
void beginStream(StreamID iID, StreamContext &streamContext)
void edm::SecondaryEventProvider::endJob ( void  )
inline
void edm::SecondaryEventProvider::endLuminosityBlock ( LuminosityBlockPrincipal lumi,
const edm::EventSetup setup,
ModuleCallingContext const *  mcc,
StreamContext sContext 
)

Definition at line 54 of file SecondaryEventProvider.cc.

References edm::StreamID::invalidStreamID(), csvLumiCalc::lumi, edm::WorkerManager::processOneOccurrence(), GeneralSetup::setup(), edm::StreamContext::streamID(), and workerManager_.

54  {
55  workerManager_.processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> >(lumi, setup, sContext.streamID(),
56  &sContext, mcc);
57  workerManager_.processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> >(lumi, setup, StreamID::invalidStreamID(),
58  nullptr, mcc);
59  }
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
static StreamID invalidStreamID()
Definition: StreamID.h:48
void edm::SecondaryEventProvider::endRun ( RunPrincipal run,
const edm::EventSetup setup,
ModuleCallingContext const *  mcc,
StreamContext sContext 
)

Definition at line 47 of file SecondaryEventProvider.cc.

References edm::StreamID::invalidStreamID(), edm::WorkerManager::processOneOccurrence(), findQualityFiles::run, GeneralSetup::setup(), edm::StreamContext::streamID(), and workerManager_.

47  {
48  workerManager_.processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> >(run, setup, sContext.streamID(),
49  &sContext, mcc);
50  workerManager_.processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> >(run, setup, StreamID::invalidStreamID(),
51  nullptr, mcc);
52  }
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
static StreamID invalidStreamID()
Definition: StreamID.h:48
void edm::SecondaryEventProvider::endStream ( edm::StreamID  iID,
StreamContext sContext 
)

Definition at line 68 of file SecondaryEventProvider.cc.

References edm::WorkerManager::endStream(), and workerManager_.

Referenced by endJob().

68  {
69  workerManager_.endStream(iID, sContext);
70  }
void endStream(StreamID iID, StreamContext &streamContext)
void edm::SecondaryEventProvider::setupPileUpEvent ( EventPrincipal ep,
const EventSetup setup,
StreamContext sContext 
)

Definition at line 61 of file SecondaryEventProvider.cc.

References edm::WorkerManager::setupOnDemandSystem(), and workerManager_.

61  {
63  }
void setupOnDemandSystem(Principal &principal, EventSetup const &es)

Member Data Documentation

std::unique_ptr<ExceptionToActionTable> edm::SecondaryEventProvider::exceptionToActionTable_
private

Definition at line 35 of file SecondaryEventProvider.h.

WorkerManager edm::SecondaryEventProvider::workerManager_
private