CMS 3D CMS Logo

SecondaryEventProvider.cc
Go to the documentation of this file.
7 
8 namespace edm {
9  SecondaryEventProvider::SecondaryEventProvider(std::vector<ParameterSet>& psets,
10  ProductRegistry& preg,
11  std::shared_ptr<ProcessConfiguration> processConfiguration)
12  : exceptionToActionTable_(new ExceptionToActionTable),
13  workerManager_(std::make_shared<ActivityRegistry>(), *exceptionToActionTable_) {
14  std::vector<std::string> shouldBeUsedLabels;
15  std::set<std::string> unscheduledLabels;
16  const PreallocationConfiguration preallocConfig;
17  for (auto& pset : psets) {
18  std::string label = pset.getParameter<std::string>("@module_label");
20  pset, preg, &preallocConfig, processConfiguration, label, unscheduledLabels, shouldBeUsedLabels);
21  }
22  if (!unscheduledLabels.empty()) {
23  preg.setUnscheduledProducts(unscheduledLabels);
24  }
25  } // SecondaryEventProvider::SecondaryEventProvider
26 
28  eventsetup::ESRecordsToProxyIndices const& iIndices) {
29  workerManager_.beginJob(iRegistry, iIndices);
30  }
31 
32  //NOTE: When the Stream interfaces are propagated to the modules, this code must be updated
33  // to also send the stream based transitions
35  const EventSetupImpl& setup,
36  ModuleCallingContext const* mcc,
37  StreamContext& sContext) {
39  run, setup, StreamID::invalidStreamID(), nullptr, mcc);
41  run, setup, sContext.streamID(), &sContext, mcc);
42  }
43 
45  const EventSetupImpl& setup,
46  ModuleCallingContext const* mcc,
47  StreamContext& sContext) {
49  lumi, setup, StreamID::invalidStreamID(), nullptr, mcc);
51  lumi, setup, sContext.streamID(), &sContext, mcc);
52  }
53 
55  const EventSetupImpl& setup,
56  ModuleCallingContext const* mcc,
57  StreamContext& sContext) {
59  run, setup, sContext.streamID(), &sContext, mcc);
61  run, setup, StreamID::invalidStreamID(), nullptr, mcc);
62  }
63 
65  const EventSetupImpl& setup,
66  ModuleCallingContext const* mcc,
67  StreamContext& sContext) {
69  lumi, setup, sContext.streamID(), &sContext, mcc);
71  lumi, setup, StreamID::invalidStreamID(), nullptr, mcc);
72  }
73 
75  const EventSetupImpl& setup,
76  StreamContext& sContext) {
78  }
80  workerManager_.beginStream(iID, sContext);
81  }
82 
84  workerManager_.endStream(iID, sContext);
85  }
86 } // namespace edm
edm::StreamID
Definition: StreamID.h:30
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalEnd >
Definition: OccurrenceTraits.h:336
edm::eventsetup::ESRecordsToProxyIndices
Definition: ESRecordsToProxyIndices.h:35
edm::SecondaryEventProvider::endStream
void endStream(edm::StreamID iID, StreamContext &sContext)
Definition: SecondaryEventProvider.cc:83
edm::EventSetupImpl
Definition: EventSetupImpl.h:44
edm::SecondaryEventProvider::setupPileUpEvent
void setupPileUpEvent(EventPrincipal &ep, const EventSetupImpl &setup, StreamContext &sContext)
Definition: SecondaryEventProvider.cc:74
edm::OccurrenceTraits< RunPrincipal, BranchActionGlobalBegin >
Definition: OccurrenceTraits.h:65
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::WorkerManager::addToUnscheduledWorkers
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)
Definition: WorkerManager.cc:42
edm::LuminosityBlockPrincipal
Definition: LuminosityBlockPrincipal.h:31
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionStreamBegin >
Definition: OccurrenceTraits.h:258
PreallocationConfiguration.h
ProductRegistry.h
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
edm::OccurrenceTraits< RunPrincipal, BranchActionStreamBegin >
Definition: OccurrenceTraits.h:104
edm::ProductRegistry
Definition: ProductRegistry.h:34
BXlumiParameters_cfi.lumi
lumi
Definition: BXlumiParameters_cfi.py:6
edm::EventPrincipal
Definition: EventPrincipal.h:46
edm::OccurrenceTraits< RunPrincipal, BranchActionGlobalEnd >
Definition: OccurrenceTraits.h:180
edm::StreamContext
Definition: StreamContext.h:31
edm::ActivityRegistry
Definition: ActivityRegistry.h:132
edm::SecondaryEventProvider::beginStream
void beginStream(edm::StreamID iID, StreamContext &sContext)
Definition: SecondaryEventProvider.cc:79
edm::OccurrenceTraits< RunPrincipal, BranchActionStreamEnd >
Definition: OccurrenceTraits.h:142
edm::SecondaryEventProvider::beginJob
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices const &)
Definition: SecondaryEventProvider.cc:27
edm::SecondaryEventProvider::endLuminosityBlock
void endLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
Definition: SecondaryEventProvider.cc:64
edm::WorkerManager::beginJob
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices const &)
Definition: WorkerManager.cc:81
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::WorkerManager::beginStream
void beginStream(StreamID iID, StreamContext &streamContext)
Definition: WorkerManager.cc:105
edm::SecondaryEventProvider::endRun
void endRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
Definition: SecondaryEventProvider.cc:54
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalBegin >
Definition: OccurrenceTraits.h:219
edm::StreamContext::streamID
StreamID const & streamID() const
Definition: StreamContext.h:54
edm::StreamID::invalidStreamID
static StreamID invalidStreamID()
Definition: StreamID.h:44
edm::WorkerManager::processOneOccurrence
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetupImpl const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
Definition: WorkerManager.h:108
ExceptionActions.h
edm::SecondaryEventProvider::beginRun
void beginRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
Definition: SecondaryEventProvider.cc:34
edm::ExceptionToActionTable
Definition: ExceptionActions.h:16
edm::SecondaryEventProvider::workerManager_
WorkerManager workerManager_
Definition: SecondaryEventProvider.h:48
edm::PreallocationConfiguration
Definition: PreallocationConfiguration.h:27
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::SecondaryEventProvider::SecondaryEventProvider
SecondaryEventProvider(std::vector< ParameterSet > &psets, ProductRegistry &pregistry, std::shared_ptr< ProcessConfiguration > processConfiguration)
Definition: SecondaryEventProvider.cc:9
SecondaryEventProvider.h
edm::WorkerManager::setupOnDemandSystem
void setupOnDemandSystem(Principal &principal, EventSetupImpl const &es)
Definition: WorkerManager.cc:125
edm::SecondaryEventProvider::beginLuminosityBlock
void beginLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
Definition: SecondaryEventProvider.cc:44
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionStreamEnd >
Definition: OccurrenceTraits.h:296
edm::WorkerManager::endStream
void endStream(StreamID iID, StreamContext &streamContext)
Definition: WorkerManager.cc:111
ParameterSet.h
edm::RunPrincipal
Definition: RunPrincipal.h:34
lumi
Definition: LumiSectionData.h:20
StreamID.h
edm::ProductRegistry::setUnscheduledProducts
void setUnscheduledProducts(std::set< std::string > const &unscheduledLabels)
Definition: ProductRegistry.cc:233
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
label
const char * label
Definition: PFTauDecayModeTools.cc:11
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29