43 for (
auto m : m_streamModules) {
54 m_streamModules.resize(iPrealloc.
numberOfStreams(),
static_cast<T*
>(
nullptr));
62 auto firstMod = m_streamModules[0];
63 if (firstMod->registrationCallback() and m_streamModules.size() > 1) {
66 std::vector<std::function<void(BranchDescription const&)>>
callbacks;
67 callbacks.reserve(m_streamModules.size());
69 for (
auto mod : m_streamModules) {
70 callbacks.push_back(
mod->registrationCallback());
74 firstMod->callWhenNewProductsRegistered([callbacks](
BranchDescription const& iBD) {
75 for (
auto c : callbacks) {
80 firstMod->registerProducts(firstMod, reg, moduleDescription_);
85 std::vector<ProductResolverIndexAndSkipBit>& iIndices)
const {
86 assert(not m_streamModules.empty());
87 m_streamModules[0]->itemsToGet(iType, iIndices);
92 std::vector<ProductResolverIndexAndSkipBit>& iIndices)
const {
93 assert(not m_streamModules.empty());
94 m_streamModules[0]->itemsMayGet(iType, iIndices);
100 assert(not m_streamModules.empty());
101 return m_streamModules[0]->itemsToGetFrom(iType);
104 template <
typename T>
106 std::vector<ModuleDescription const*>&
modules,
108 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
110 assert(not m_streamModules.empty());
111 return m_streamModules[0]->modulesWhoseProductsAreConsumed(modules, preg, labelsToDesc, processName);
114 template <
typename T>
116 for (
auto mod : m_streamModules) {
117 mod->convertCurrentProcessAlias(processName);
121 template <
typename T>
123 assert(not m_streamModules.empty());
124 return m_streamModules[0]->consumesInfo();
127 template <
typename T>
130 bool iPrefetchMayGet) {
131 for (
auto mod : m_streamModules) {
132 mod->updateLookup(iType, iHelper, iPrefetchMayGet);
135 template <
typename T>
137 for (
auto mod : m_streamModules) {
138 mod->updateLookup(iPI);
142 template <
typename T>
146 for (
auto mod : m_streamModules) {
147 mod->resolvePutIndicies(iBranchType, iIndicies, moduleLabel);
151 template <
typename T>
154 return m_streamModules[0]->indiciesForPutProducts(iBranchType);
157 template <
typename T>
160 template <
typename T>
162 m_streamModules[
id]->beginStream(
id);
164 template <
typename T>
166 m_streamModules[
id]->endStream();
169 template <
typename T>
174 auto mod = m_streamModules[
id];
177 Run r(rp, moduleDescription_, mcc,
false);
183 template <
typename T>
188 auto mod = m_streamModules[
id];
189 Run r(rp, moduleDescription_, mcc,
true);
194 streamEndRunSummary(
mod, r,
c);
197 template <
typename T>
202 auto mod = m_streamModules[
id];
203 setupLuminosityBlock(
mod, lbp.
index());
211 mod->beginLuminosityBlock(lb,
c);
214 template <
typename T>
219 auto mod = m_streamModules[
id];
226 mod->endLuminosityBlock(lb,
c);
227 streamEndLuminosityBlockSummary(
mod, lb,
c);
230 template <
typename T>
232 template <
typename T>
235 template <
typename T>
238 assert(not m_streamModules.empty());
239 auto mod = m_streamModules[0];
240 mod->registerThinnedAssociations(registry, helper);
void doStreamEndRun(StreamID id, RunPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
void doStreamBeginLuminosityBlock(StreamID id, LuminosityBlockPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
void setConsumer(EDConsumerBase const *iConsumer)
std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> ModuleToResolverIndicies
void doRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
void doRespondToOpenInputFile(FileBlock const &fb)
void itemsToGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
LuminosityBlockIndex index() const
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType) const
void doPreallocate(PreallocationConfiguration const &)
std::vector< ConsumesInfo > consumesInfo() const
virtual ~ProducingModuleAdaptorBase()
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts(BranchType iBranchType) const
void registerProductsAndCallbacks(ProducingModuleAdaptorBase const *, ProductRegistry *reg)
void doEndStream(StreamID id)
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
ProducingModuleAdaptorBase()
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those callbacks
unsigned int numberOfLuminosityBlocks() const
void doBeginStream(StreamID id)
void convertCurrentProcessAlias(std::string const &processName)
void doStreamBeginRun(StreamID id, RunPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
void resolvePutIndicies(BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
void modulesWhoseProductsAreConsumed(std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
unsigned int numberOfStreams() const
void doStreamEndLuminosityBlock(StreamID id, LuminosityBlockPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
void doRespondToCloseInputFile(FileBlock const &fb)
void itemsMayGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
T mod(const T &a, const T &b)
void setConsumer(EDConsumerBase const *iConsumer)