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  preg,
21  &preallocConfig,
22  processConfiguration,
23  label,
24  unscheduledLabels,
25  shouldBeUsedLabels);
26  }
27  if(!unscheduledLabels.empty()) {
28  preg.setUnscheduledProducts(unscheduledLabels);
29  }
30  } // SecondaryEventProvider::SecondaryEventProvider
31 
32 
34  workerManager_.beginJob(iRegistry, iIndices);
35  }
36 
37  //NOTE: When the Stream interfaces are propagated to the modules, this code must be updated
38  // to also send the stream based transitions
41  nullptr, mcc);
43  &sContext, mcc);
44  }
45 
48  nullptr, mcc);
50  &sContext, mcc);
51  }
52 
55  &sContext, mcc);
57  nullptr, mcc);
58  }
59 
62  &sContext, mcc);
64  nullptr, mcc);
65  }
66 
69  }
71  workerManager_.beginStream(iID, sContext);
72  }
73 
75  workerManager_.endStream(iID, sContext);
76  }
77 }
void endStream(edm::StreamID iID, StreamContext &sContext)
void setupPileUpEvent(EventPrincipal &ep, const EventSetupImpl &setup, StreamContext &sContext)
void endStream(StreamID iID, StreamContext &streamContext)
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetupImpl const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices 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)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
static StreamID invalidStreamID()
Definition: StreamID.h:44
char const * label
void setupOnDemandSystem(Principal &principal, EventSetupImpl const &es)
void setUnscheduledProducts(std::set< std::string > const &unscheduledLabels)
void beginRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void endLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices const &)
void endRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void beginStream(edm::StreamID iID, StreamContext &sContext)
StreamID const & streamID() const
Definition: StreamContext.h:54
void beginStream(StreamID iID, StreamContext &streamContext)
SecondaryEventProvider(std::vector< ParameterSet > &psets, ProductRegistry &pregistry, std::shared_ptr< ProcessConfiguration > processConfiguration)
HLT enums.
void beginLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)