CMS 3D CMS Logo

SecondaryEventProvider.cc
Go to the documentation of this file.
6 
7 namespace edm {
8  SecondaryEventProvider::SecondaryEventProvider(std::vector<ParameterSet>& psets,
9  ProductRegistry& preg,
10  std::shared_ptr<ProcessConfiguration> processConfiguration) :
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
30 
31  //NOTE: When the Stream interfaces are propagated to the modules, this code must be updated
32  // to also send the stream based transitions
35  nullptr, mcc);
37  &sContext, mcc);
38  }
39 
42  nullptr, mcc);
44  &sContext, mcc);
45  }
46 
49  &sContext, mcc);
51  nullptr, mcc);
52  }
53 
56  &sContext, mcc);
58  nullptr, mcc);
59  }
60 
63  }
65  workerManager_.beginStream(iID, sContext);
66  }
67 
69  workerManager_.endStream(iID, sContext);
70  }
71 }
void endStream(edm::StreamID iID, StreamContext &sContext)
void endStream(StreamID iID, StreamContext &streamContext)
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)
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
void beginLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
static StreamID invalidStreamID()
Definition: StreamID.h:48
void endLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
void beginStream(edm::StreamID iID, StreamContext &sContext)
StreamID const & streamID() const
Definition: StreamContext.h:57
void beginRun(RunPrincipal &run, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
void beginStream(StreamID iID, StreamContext &streamContext)
SecondaryEventProvider(std::vector< ParameterSet > &psets, ProductRegistry &pregistry, std::shared_ptr< ProcessConfiguration > processConfiguration)
void setupPileUpEvent(EventPrincipal &ep, const EventSetup &setup, StreamContext &sContext)
HLT enums.
void endRun(RunPrincipal &run, const edm::EventSetup &setup, ModuleCallingContext const *, StreamContext &sContext)
void setupOnDemandSystem(EventPrincipal &principal, EventSetup const &es)