File indexing completed on 2025-06-29 22:58:05
0001 #include "FWCore/Framework/interface/maker/WorkerT.h"
0002 #include "FWCore/Framework/interface/EventPrincipal.h"
0003
0004 #include "FWCore/Framework/interface/one/EDProducerBase.h"
0005 #include "FWCore/Framework/interface/one/EDFilterBase.h"
0006 #include "FWCore/Framework/interface/one/EDAnalyzerBase.h"
0007 #include "FWCore/Framework/interface/one/OutputModuleBase.h"
0008 #include "FWCore/Framework/interface/global/EDProducerBase.h"
0009 #include "FWCore/Framework/interface/global/EDFilterBase.h"
0010 #include "FWCore/Framework/interface/global/EDAnalyzerBase.h"
0011 #include "FWCore/Framework/interface/global/OutputModuleBase.h"
0012
0013 #include "FWCore/Framework/interface/stream/EDProducerAdaptorBase.h"
0014 #include "FWCore/Framework/interface/stream/EDFilterAdaptorBase.h"
0015 #include "FWCore/Framework/interface/stream/EDAnalyzerAdaptorBase.h"
0016
0017 #include "FWCore/Framework/interface/limited/EDProducerBase.h"
0018 #include "FWCore/Framework/interface/limited/EDFilterBase.h"
0019 #include "FWCore/Framework/interface/limited/EDAnalyzerBase.h"
0020 #include "FWCore/Framework/interface/limited/OutputModuleBase.h"
0021
0022 #include "FWCore/ServiceRegistry/interface/ModuleConsumesInfo.h"
0023
0024 #include <type_traits>
0025
0026 namespace edm {
0027 namespace workerimpl {
0028 template <typename T>
0029 struct has_stream_functions {
0030 static bool constexpr value = false;
0031 };
0032
0033 template <>
0034 struct has_stream_functions<edm::global::EDProducerBase> {
0035 static bool constexpr value = true;
0036 };
0037
0038 template <>
0039 struct has_stream_functions<edm::global::EDFilterBase> {
0040 static bool constexpr value = true;
0041 };
0042
0043 template <>
0044 struct has_stream_functions<edm::global::EDAnalyzerBase> {
0045 static bool constexpr value = true;
0046 };
0047
0048 template <>
0049 struct has_stream_functions<edm::limited::EDProducerBase> {
0050 static bool constexpr value = true;
0051 };
0052
0053 template <>
0054 struct has_stream_functions<edm::limited::EDFilterBase> {
0055 static bool constexpr value = true;
0056 };
0057
0058 template <>
0059 struct has_stream_functions<edm::limited::EDAnalyzerBase> {
0060 static bool constexpr value = true;
0061 };
0062
0063 template <>
0064 struct has_stream_functions<edm::stream::EDProducerAdaptorBase> {
0065 static bool constexpr value = true;
0066 };
0067
0068 template <>
0069 struct has_stream_functions<edm::stream::EDFilterAdaptorBase> {
0070 static bool constexpr value = true;
0071 };
0072
0073 template <>
0074 struct has_stream_functions<edm::stream::EDAnalyzerAdaptorBase> {
0075 static bool constexpr value = true;
0076 };
0077
0078 template <typename T>
0079 struct has_only_stream_transition_functions {
0080 static bool constexpr value = false;
0081 };
0082
0083 template <>
0084 struct has_only_stream_transition_functions<edm::global::OutputModuleBase> {
0085 static bool constexpr value = true;
0086 };
0087
0088 struct DoNothing {
0089 template <typename... T>
0090 inline void operator()(const T&...) {}
0091 };
0092
0093 template <typename T>
0094 struct DoBeginStream {
0095 inline void operator()(WorkerT<T>* iWorker, StreamID id) { iWorker->callWorkerBeginStream(0, id); }
0096 };
0097
0098 template <typename T>
0099 struct DoEndStream {
0100 inline void operator()(WorkerT<T>* iWorker, StreamID id) { iWorker->callWorkerEndStream(0, id); }
0101 };
0102
0103 template <typename T, typename INFOTYPE>
0104 struct DoStreamBeginTrans {
0105 inline void operator()(WorkerT<T>* iWorker, StreamID id, INFOTYPE const& info, ModuleCallingContext const* mcc) {
0106 iWorker->callWorkerStreamBegin(0, id, info, mcc);
0107 }
0108 };
0109
0110 template <typename T, typename INFOTYPE>
0111 struct DoStreamEndTrans {
0112 inline void operator()(WorkerT<T>* iWorker, StreamID id, INFOTYPE const& info, ModuleCallingContext const* mcc) {
0113 iWorker->callWorkerStreamEnd(0, id, info, mcc);
0114 }
0115 };
0116 }
0117
0118 template <typename T>
0119 inline WorkerT<T>::WorkerT(std::shared_ptr<T> ed, ModuleDescription const& md, ExceptionToActionTable const* actions)
0120 : Worker(md, actions), module_(ed) {
0121 assert(module_ != nullptr);
0122 }
0123
0124 template <typename T>
0125 WorkerT<T>::~WorkerT() {}
0126
0127 template <typename T>
0128 bool WorkerT<T>::wantsProcessBlocks() const noexcept {
0129 return module_->wantsProcessBlocks();
0130 }
0131
0132 template <typename T>
0133 bool WorkerT<T>::wantsInputProcessBlocks() const noexcept {
0134 return module_->wantsInputProcessBlocks();
0135 }
0136
0137 template <typename T>
0138 bool WorkerT<T>::wantsGlobalRuns() const noexcept {
0139 return module_->wantsGlobalRuns();
0140 }
0141
0142 template <typename T>
0143 bool WorkerT<T>::wantsGlobalLuminosityBlocks() const noexcept {
0144 return module_->wantsGlobalLuminosityBlocks();
0145 }
0146
0147 template <typename T>
0148 bool WorkerT<T>::wantsStreamRuns() const noexcept {
0149 return module_->wantsStreamRuns();
0150 }
0151
0152 template <typename T>
0153 bool WorkerT<T>::wantsStreamLuminosityBlocks() const noexcept {
0154 return module_->wantsStreamLuminosityBlocks();
0155 }
0156
0157 template <typename T>
0158 SerialTaskQueue* WorkerT<T>::globalRunsQueue() {
0159 return nullptr;
0160 }
0161 template <typename T>
0162 SerialTaskQueue* WorkerT<T>::globalLuminosityBlocksQueue() {
0163 return nullptr;
0164 }
0165
0166
0167 template <>
0168 SerialTaskQueue* WorkerT<one::EDProducerBase>::globalRunsQueue() {
0169 return module_->globalRunsQueue();
0170 }
0171 template <>
0172 SerialTaskQueue* WorkerT<one::EDProducerBase>::globalLuminosityBlocksQueue() {
0173 return module_->globalLuminosityBlocksQueue();
0174 }
0175 template <>
0176 SerialTaskQueue* WorkerT<one::EDFilterBase>::globalRunsQueue() {
0177 return module_->globalRunsQueue();
0178 }
0179 template <>
0180 SerialTaskQueue* WorkerT<one::EDFilterBase>::globalLuminosityBlocksQueue() {
0181 return module_->globalLuminosityBlocksQueue();
0182 }
0183 template <>
0184 SerialTaskQueue* WorkerT<one::EDAnalyzerBase>::globalRunsQueue() {
0185 return module_->globalRunsQueue();
0186 }
0187 template <>
0188 SerialTaskQueue* WorkerT<one::EDAnalyzerBase>::globalLuminosityBlocksQueue() {
0189 return module_->globalLuminosityBlocksQueue();
0190 }
0191 template <>
0192 SerialTaskQueue* WorkerT<one::OutputModuleBase>::globalRunsQueue() {
0193 return module_->globalRunsQueue();
0194 }
0195 template <>
0196 SerialTaskQueue* WorkerT<one::OutputModuleBase>::globalLuminosityBlocksQueue() {
0197 return module_->globalLuminosityBlocksQueue();
0198 }
0199
0200 template <typename T>
0201 inline bool WorkerT<T>::implDo(EventTransitionInfo const& info, ModuleCallingContext const* mcc) {
0202 EventPrincipal const& ep = info.principal();
0203 std::shared_ptr<Worker> sentry(this, [&ep](Worker* obj) { obj->postDoEvent(ep); });
0204 return module_->doEvent(info, activityRegistry(), mcc);
0205 }
0206
0207 template <typename T>
0208 inline void WorkerT<T>::implDoAcquire(EventTransitionInfo const&, ModuleCallingContext const*, WaitingTaskHolder&&) {}
0209
0210 template <>
0211 inline void WorkerT<global::EDProducerBase>::implDoAcquire(EventTransitionInfo const& info,
0212 ModuleCallingContext const* mcc,
0213 WaitingTaskHolder&& holder) {
0214 module_->doAcquire(info, activityRegistry(), mcc, std::move(holder));
0215 }
0216
0217 template <>
0218 inline void WorkerT<global::EDFilterBase>::implDoAcquire(EventTransitionInfo const& info,
0219 ModuleCallingContext const* mcc,
0220 WaitingTaskHolder&& holder) {
0221 module_->doAcquire(info, activityRegistry(), mcc, std::move(holder));
0222 }
0223
0224 template <>
0225 inline void WorkerT<global::OutputModuleBase>::implDoAcquire(EventTransitionInfo const& info,
0226 ModuleCallingContext const* mcc,
0227 WaitingTaskHolder&& holder) {
0228 module_->doAcquire(info, activityRegistry(), mcc, std::move(holder));
0229 }
0230
0231 template <>
0232 inline void WorkerT<stream::EDProducerAdaptorBase>::implDoAcquire(EventTransitionInfo const& info,
0233 ModuleCallingContext const* mcc,
0234 WaitingTaskHolder&& holder) {
0235 module_->doAcquire(info, activityRegistry(), mcc, std::move(holder));
0236 }
0237
0238 template <>
0239 inline void WorkerT<stream::EDFilterAdaptorBase>::implDoAcquire(EventTransitionInfo const& info,
0240 ModuleCallingContext const* mcc,
0241 WaitingTaskHolder&& holder) {
0242 module_->doAcquire(info, activityRegistry(), mcc, std::move(holder));
0243 }
0244
0245 template <typename T>
0246 inline void WorkerT<T>::implDoTransformAsync(WaitingTaskHolder iTask,
0247 size_t iTransformIndex,
0248 EventPrincipal const& iEvent,
0249 ParentContext const& iParent,
0250 ServiceWeakToken const& weakToken) noexcept {
0251 CMS_SA_ALLOW try {
0252 ServiceRegistry::Operate guard(weakToken.lock());
0253
0254 ModuleCallingContext mcc(
0255 &module_->moduleDescription(), iTransformIndex + 1, ModuleCallingContext::State::kRunning, iParent, nullptr);
0256 module_->doTransformAsync(iTask, iTransformIndex, iEvent, activityRegistry(), mcc, weakToken);
0257 } catch (...) {
0258 iTask.doneWaiting(std::current_exception());
0259 return;
0260 }
0261 iTask.doneWaiting(std::exception_ptr());
0262 }
0263
0264 template <>
0265 inline void WorkerT<global::EDAnalyzerBase>::implDoTransformAsync(WaitingTaskHolder task,
0266 size_t iTransformIndex,
0267 EventPrincipal const& iEvent,
0268 ParentContext const& iParent,
0269 ServiceWeakToken const& weakToken) noexcept {}
0270 template <>
0271 inline void WorkerT<global::OutputModuleBase>::implDoTransformAsync(WaitingTaskHolder task,
0272 size_t iTransformIndex,
0273 EventPrincipal const& iEvent,
0274 ParentContext const& iParent,
0275 ServiceWeakToken const& weakToken) noexcept {}
0276 template <>
0277 inline void WorkerT<limited::EDAnalyzerBase>::implDoTransformAsync(WaitingTaskHolder task,
0278 size_t iTransformIndex,
0279 EventPrincipal const& iEvent,
0280 ParentContext const& iParent,
0281 ServiceWeakToken const& weakToken) noexcept {}
0282 template <>
0283 inline void WorkerT<limited::OutputModuleBase>::implDoTransformAsync(WaitingTaskHolder task,
0284 size_t iTransformIndex,
0285 EventPrincipal const& iEvent,
0286 ParentContext const& iParent,
0287 ServiceWeakToken const& weakToken) noexcept {}
0288 template <>
0289 inline void WorkerT<one::EDAnalyzerBase>::implDoTransformAsync(WaitingTaskHolder task,
0290 size_t iTransformIndex,
0291 EventPrincipal const& iEvent,
0292 ParentContext const& iParent,
0293 ServiceWeakToken const& weakToken) noexcept {}
0294 template <>
0295 inline void WorkerT<one::OutputModuleBase>::implDoTransformAsync(WaitingTaskHolder task,
0296 size_t iTransformIndex,
0297 EventPrincipal const& iEvent,
0298 ParentContext const& iParent,
0299 ServiceWeakToken const& weakToken) noexcept {}
0300 template <>
0301 inline void WorkerT<stream::EDAnalyzerAdaptorBase>::implDoTransformAsync(WaitingTaskHolder task,
0302 size_t iTransformIndex,
0303 EventPrincipal const& iEvent,
0304 ParentContext const& iParent,
0305 ServiceWeakToken const& weakToken) noexcept {
0306 }
0307
0308 template <typename T>
0309 inline size_t WorkerT<T>::transformIndex(edm::ProductDescription const&) const noexcept {
0310 return -1;
0311 }
0312 template <>
0313 inline size_t WorkerT<global::EDFilterBase>::transformIndex(edm::ProductDescription const& iBranch) const noexcept {
0314 return module_->transformIndex_(iBranch);
0315 }
0316 template <>
0317 inline size_t WorkerT<global::EDProducerBase>::transformIndex(edm::ProductDescription const& iBranch) const noexcept {
0318 return module_->transformIndex_(iBranch);
0319 }
0320 template <>
0321 inline size_t WorkerT<stream::EDProducerAdaptorBase>::transformIndex(
0322 edm::ProductDescription const& iBranch) const noexcept {
0323 return module_->transformIndex_(iBranch);
0324 }
0325 template <>
0326 inline size_t WorkerT<limited::EDFilterBase>::transformIndex(edm::ProductDescription const& iBranch) const noexcept {
0327 return module_->transformIndex_(iBranch);
0328 }
0329 template <>
0330 inline size_t WorkerT<limited::EDProducerBase>::transformIndex(edm::ProductDescription const& iBranch) const noexcept {
0331 return module_->transformIndex_(iBranch);
0332 }
0333 template <>
0334 inline size_t WorkerT<one::EDFilterBase>::transformIndex(edm::ProductDescription const& iBranch) const noexcept {
0335 return module_->transformIndex_(iBranch);
0336 }
0337 template <>
0338 inline size_t WorkerT<one::EDProducerBase>::transformIndex(edm::ProductDescription const& iBranch) const noexcept {
0339 return module_->transformIndex_(iBranch);
0340 }
0341
0342 template <typename T>
0343 inline ProductResolverIndex WorkerT<T>::itemToGetForTransform(size_t iTransformIndex) const noexcept {
0344 return -1;
0345 }
0346 template <>
0347 inline ProductResolverIndex WorkerT<global::EDFilterBase>::itemToGetForTransform(
0348 size_t iTransformIndex) const noexcept {
0349 return module_->transformPrefetch_(iTransformIndex);
0350 }
0351 template <>
0352 inline ProductResolverIndex WorkerT<global::EDProducerBase>::itemToGetForTransform(
0353 size_t iTransformIndex) const noexcept {
0354 return module_->transformPrefetch_(iTransformIndex);
0355 }
0356 template <>
0357 inline ProductResolverIndex WorkerT<stream::EDProducerAdaptorBase>::itemToGetForTransform(
0358 size_t iTransformIndex) const noexcept {
0359 return module_->transformPrefetch_(iTransformIndex);
0360 }
0361 template <>
0362 inline ProductResolverIndex WorkerT<limited::EDFilterBase>::itemToGetForTransform(
0363 size_t iTransformIndex) const noexcept {
0364 return module_->transformPrefetch_(iTransformIndex);
0365 }
0366 template <>
0367 inline ProductResolverIndex WorkerT<limited::EDProducerBase>::itemToGetForTransform(
0368 size_t iTransformIndex) const noexcept {
0369 return module_->transformPrefetch_(iTransformIndex);
0370 }
0371 template <>
0372 inline ProductResolverIndex WorkerT<one::EDFilterBase>::itemToGetForTransform(size_t iTransformIndex) const noexcept {
0373 return module_->transformPrefetch_(iTransformIndex);
0374 }
0375 template <>
0376 inline ProductResolverIndex WorkerT<one::EDProducerBase>::itemToGetForTransform(
0377 size_t iTransformIndex) const noexcept {
0378 return module_->transformPrefetch_(iTransformIndex);
0379 }
0380
0381 template <typename T>
0382 inline bool WorkerT<T>::implNeedToRunSelection() const noexcept {
0383 return false;
0384 }
0385
0386 template <typename T>
0387 inline bool WorkerT<T>::implDoPrePrefetchSelection(StreamID id,
0388 EventPrincipal const& ep,
0389 ModuleCallingContext const* mcc) {
0390 return true;
0391 }
0392 template <typename T>
0393 inline void WorkerT<T>::itemsToGetForSelection(std::vector<ProductResolverIndexAndSkipBit>&) const {}
0394
0395 template <>
0396 inline bool WorkerT<edm::one::OutputModuleBase>::implNeedToRunSelection() const noexcept {
0397 return true;
0398 }
0399
0400 template <>
0401 inline bool WorkerT<edm::one::OutputModuleBase>::implDoPrePrefetchSelection(StreamID id,
0402 EventPrincipal const& ep,
0403 ModuleCallingContext const* mcc) {
0404 return module_->prePrefetchSelection(id, ep, mcc);
0405 }
0406 template <>
0407 inline void WorkerT<edm::one::OutputModuleBase>::itemsToGetForSelection(
0408 std::vector<ProductResolverIndexAndSkipBit>& iItems) const {
0409 iItems = module_->productsUsedBySelection();
0410 }
0411
0412 template <>
0413 inline bool WorkerT<edm::global::OutputModuleBase>::implNeedToRunSelection() const noexcept {
0414 return true;
0415 }
0416 template <>
0417 inline bool WorkerT<edm::global::OutputModuleBase>::implDoPrePrefetchSelection(StreamID id,
0418 EventPrincipal const& ep,
0419 ModuleCallingContext const* mcc) {
0420 return module_->prePrefetchSelection(id, ep, mcc);
0421 }
0422 template <>
0423 inline void WorkerT<edm::global::OutputModuleBase>::itemsToGetForSelection(
0424 std::vector<ProductResolverIndexAndSkipBit>& iItems) const {
0425 iItems = module_->productsUsedBySelection();
0426 }
0427
0428 template <>
0429 inline bool WorkerT<edm::limited::OutputModuleBase>::implNeedToRunSelection() const noexcept {
0430 return true;
0431 }
0432 template <>
0433 inline bool WorkerT<edm::limited::OutputModuleBase>::implDoPrePrefetchSelection(StreamID id,
0434 EventPrincipal const& ep,
0435 ModuleCallingContext const* mcc) {
0436 return module_->prePrefetchSelection(id, ep, mcc);
0437 }
0438 template <>
0439 inline void WorkerT<edm::limited::OutputModuleBase>::itemsToGetForSelection(
0440 std::vector<ProductResolverIndexAndSkipBit>& iItems) const {
0441 iItems = module_->productsUsedBySelection();
0442 }
0443
0444 template <typename T>
0445 bool WorkerT<T>::implDoBeginProcessBlock(ProcessBlockPrincipal const& pbp, ModuleCallingContext const* mcc) {
0446 module_->doBeginProcessBlock(pbp, mcc);
0447 return true;
0448 }
0449
0450 template <typename T>
0451 bool WorkerT<T>::implDoAccessInputProcessBlock(ProcessBlockPrincipal const& pbp, ModuleCallingContext const* mcc) {
0452 module_->doAccessInputProcessBlock(pbp, mcc);
0453 return true;
0454 }
0455
0456 template <typename T>
0457 bool WorkerT<T>::implDoEndProcessBlock(ProcessBlockPrincipal const& pbp, ModuleCallingContext const* mcc) {
0458 module_->doEndProcessBlock(pbp, mcc);
0459 return true;
0460 }
0461
0462 template <typename T>
0463 inline bool WorkerT<T>::implDoBegin(RunTransitionInfo const& info, ModuleCallingContext const* mcc) {
0464 module_->doBeginRun(info, mcc);
0465 return true;
0466 }
0467
0468 template <typename T>
0469 template <typename D>
0470 void WorkerT<T>::callWorkerStreamBegin(D,
0471 StreamID id,
0472 RunTransitionInfo const& info,
0473 ModuleCallingContext const* mcc) {
0474 module_->doStreamBeginRun(id, info, mcc);
0475 }
0476
0477 template <typename T>
0478 template <typename D>
0479 void WorkerT<T>::callWorkerStreamEnd(D, StreamID id, RunTransitionInfo const& info, ModuleCallingContext const* mcc) {
0480 module_->doStreamEndRun(id, info, mcc);
0481 }
0482
0483 template <typename T>
0484 inline bool WorkerT<T>::implDoStreamBegin(StreamID id,
0485 RunTransitionInfo const& info,
0486 ModuleCallingContext const* mcc) {
0487 std::conditional_t<workerimpl::has_stream_functions<T>::value,
0488 workerimpl::DoStreamBeginTrans<T, RunTransitionInfo const>,
0489 workerimpl::DoNothing>
0490 might_call;
0491 might_call(this, id, info, mcc);
0492 return true;
0493 }
0494
0495 template <typename T>
0496 inline bool WorkerT<T>::implDoStreamEnd(StreamID id, RunTransitionInfo const& info, ModuleCallingContext const* mcc) {
0497 std::conditional_t<workerimpl::has_stream_functions<T>::value,
0498 workerimpl::DoStreamEndTrans<T, RunTransitionInfo const>,
0499 workerimpl::DoNothing>
0500 might_call;
0501 might_call(this, id, info, mcc);
0502 return true;
0503 }
0504
0505 template <typename T>
0506 inline bool WorkerT<T>::implDoEnd(RunTransitionInfo const& info, ModuleCallingContext const* mcc) {
0507 module_->doEndRun(info, mcc);
0508 return true;
0509 }
0510
0511 template <typename T>
0512 inline bool WorkerT<T>::implDoBegin(LumiTransitionInfo const& info, ModuleCallingContext const* mcc) {
0513 module_->doBeginLuminosityBlock(info, mcc);
0514 return true;
0515 }
0516
0517 template <typename T>
0518 template <typename D>
0519 void WorkerT<T>::callWorkerStreamBegin(D,
0520 StreamID id,
0521 LumiTransitionInfo const& info,
0522 ModuleCallingContext const* mcc) {
0523 module_->doStreamBeginLuminosityBlock(id, info, mcc);
0524 }
0525
0526 template <typename T>
0527 template <typename D>
0528 void WorkerT<T>::callWorkerStreamEnd(D, StreamID id, LumiTransitionInfo const& info, ModuleCallingContext const* mcc) {
0529 module_->doStreamEndLuminosityBlock(id, info, mcc);
0530 }
0531
0532 template <typename T>
0533 inline bool WorkerT<T>::implDoStreamBegin(StreamID id,
0534 LumiTransitionInfo const& info,
0535 ModuleCallingContext const* mcc) {
0536 std::conditional_t<workerimpl::has_stream_functions<T>::value,
0537 workerimpl::DoStreamBeginTrans<T, LumiTransitionInfo>,
0538 workerimpl::DoNothing>
0539 might_call;
0540 might_call(this, id, info, mcc);
0541 return true;
0542 }
0543
0544 template <typename T>
0545 inline bool WorkerT<T>::implDoStreamEnd(StreamID id,
0546 LumiTransitionInfo const& info,
0547 ModuleCallingContext const* mcc) {
0548 std::conditional_t<workerimpl::has_stream_functions<T>::value,
0549 workerimpl::DoStreamEndTrans<T, LumiTransitionInfo>,
0550 workerimpl::DoNothing>
0551 might_call;
0552 might_call(this, id, info, mcc);
0553
0554 return true;
0555 }
0556
0557 template <typename T>
0558 inline bool WorkerT<T>::implDoEnd(LumiTransitionInfo const& info, ModuleCallingContext const* mcc) {
0559 module_->doEndLuminosityBlock(info, mcc);
0560 return true;
0561 }
0562
0563 template <typename T>
0564 template <typename D>
0565 void WorkerT<T>::callWorkerBeginStream(D, StreamID id) {
0566 module_->doBeginStream(id);
0567 }
0568
0569 template <typename T>
0570 template <typename D>
0571 void WorkerT<T>::callWorkerEndStream(D, StreamID id) {
0572 module_->doEndStream(id);
0573 }
0574
0575 template <typename T>
0576 inline void WorkerT<T>::implRespondToOpenInputFile(FileBlock const& fb) {
0577 module_->doRespondToOpenInputFile(fb);
0578 }
0579
0580 template <typename T>
0581 inline void WorkerT<T>::implRespondToCloseInputFile(FileBlock const& fb) {
0582 module_->doRespondToCloseInputFile(fb);
0583 }
0584
0585 template <typename T>
0586 void WorkerT<T>::implRespondToCloseOutputFile() {
0587 module_->doRespondToCloseOutputFile();
0588 }
0589
0590 template <typename T>
0591 inline Worker::TaskQueueAdaptor WorkerT<T>::serializeRunModule() {
0592 return Worker::TaskQueueAdaptor{};
0593 }
0594 template <>
0595 Worker::TaskQueueAdaptor WorkerT<one::EDAnalyzerBase>::serializeRunModule() {
0596 return &(module_->sharedResourcesAcquirer().serialQueueChain());
0597 }
0598 template <>
0599 Worker::TaskQueueAdaptor WorkerT<one::EDFilterBase>::serializeRunModule() {
0600 return &(module_->sharedResourcesAcquirer().serialQueueChain());
0601 }
0602 template <>
0603 Worker::TaskQueueAdaptor WorkerT<one::EDProducerBase>::serializeRunModule() {
0604 return &(module_->sharedResourcesAcquirer().serialQueueChain());
0605 }
0606 template <>
0607 Worker::TaskQueueAdaptor WorkerT<one::OutputModuleBase>::serializeRunModule() {
0608 return &(module_->sharedResourcesAcquirer().serialQueueChain());
0609 }
0610 template <>
0611 Worker::TaskQueueAdaptor WorkerT<limited::EDAnalyzerBase>::serializeRunModule() {
0612 return &(module_->queue());
0613 }
0614 template <>
0615 Worker::TaskQueueAdaptor WorkerT<limited::EDFilterBase>::serializeRunModule() {
0616 return &(module_->queue());
0617 }
0618 template <>
0619 Worker::TaskQueueAdaptor WorkerT<limited::EDProducerBase>::serializeRunModule() {
0620 return &(module_->queue());
0621 }
0622 template <>
0623 Worker::TaskQueueAdaptor WorkerT<limited::OutputModuleBase>::serializeRunModule() {
0624 return &(module_->queue());
0625 }
0626
0627 template <>
0628 Worker::Types WorkerT<edm::one::EDProducerBase>::moduleType() const {
0629 return Worker::kProducer;
0630 }
0631 template <>
0632 Worker::Types WorkerT<edm::one::EDFilterBase>::moduleType() const {
0633 return Worker::kFilter;
0634 }
0635 template <>
0636 Worker::Types WorkerT<edm::one::EDAnalyzerBase>::moduleType() const {
0637 return Worker::kAnalyzer;
0638 }
0639 template <>
0640 Worker::Types WorkerT<edm::one::OutputModuleBase>::moduleType() const {
0641 return Worker::kOutputModule;
0642 }
0643
0644 template <>
0645 Worker::Types WorkerT<edm::global::EDProducerBase>::moduleType() const {
0646 return Worker::kProducer;
0647 }
0648 template <>
0649 Worker::Types WorkerT<edm::global::EDFilterBase>::moduleType() const {
0650 return Worker::kFilter;
0651 }
0652 template <>
0653 Worker::Types WorkerT<edm::global::EDAnalyzerBase>::moduleType() const {
0654 return Worker::kAnalyzer;
0655 }
0656 template <>
0657 Worker::Types WorkerT<edm::global::OutputModuleBase>::moduleType() const {
0658 return Worker::kOutputModule;
0659 }
0660
0661 template <>
0662 Worker::Types WorkerT<edm::limited::EDProducerBase>::moduleType() const {
0663 return Worker::kProducer;
0664 }
0665 template <>
0666 Worker::Types WorkerT<edm::limited::EDFilterBase>::moduleType() const {
0667 return Worker::kFilter;
0668 }
0669 template <>
0670 Worker::Types WorkerT<edm::limited::EDAnalyzerBase>::moduleType() const {
0671 return Worker::kAnalyzer;
0672 }
0673 template <>
0674 Worker::Types WorkerT<edm::limited::OutputModuleBase>::moduleType() const {
0675 return Worker::kOutputModule;
0676 }
0677
0678 template <>
0679 Worker::Types WorkerT<edm::stream::EDProducerAdaptorBase>::moduleType() const {
0680 return Worker::kProducer;
0681 }
0682 template <>
0683 Worker::Types WorkerT<edm::stream::EDFilterAdaptorBase>::moduleType() const {
0684 return Worker::kFilter;
0685 }
0686 template <>
0687 Worker::Types WorkerT<edm::stream::EDAnalyzerAdaptorBase>::moduleType() const {
0688 return Worker::kAnalyzer;
0689 }
0690
0691 template <>
0692 Worker::ConcurrencyTypes WorkerT<edm::one::EDProducerBase>::moduleConcurrencyType() const {
0693 return Worker::kOne;
0694 }
0695 template <>
0696 Worker::ConcurrencyTypes WorkerT<edm::one::EDFilterBase>::moduleConcurrencyType() const {
0697 return Worker::kOne;
0698 }
0699 template <>
0700 Worker::ConcurrencyTypes WorkerT<edm::one::EDAnalyzerBase>::moduleConcurrencyType() const {
0701 return Worker::kOne;
0702 }
0703 template <>
0704 Worker::ConcurrencyTypes WorkerT<edm::one::OutputModuleBase>::moduleConcurrencyType() const {
0705 return Worker::kOne;
0706 }
0707
0708 template <>
0709 Worker::ConcurrencyTypes WorkerT<edm::global::EDProducerBase>::moduleConcurrencyType() const {
0710 return Worker::kGlobal;
0711 }
0712 template <>
0713 Worker::ConcurrencyTypes WorkerT<edm::global::EDFilterBase>::moduleConcurrencyType() const {
0714 return Worker::kGlobal;
0715 }
0716 template <>
0717 Worker::ConcurrencyTypes WorkerT<edm::global::EDAnalyzerBase>::moduleConcurrencyType() const {
0718 return Worker::kGlobal;
0719 }
0720 template <>
0721 Worker::ConcurrencyTypes WorkerT<edm::global::OutputModuleBase>::moduleConcurrencyType() const {
0722 return Worker::kGlobal;
0723 }
0724
0725 template <>
0726 Worker::ConcurrencyTypes WorkerT<edm::limited::EDProducerBase>::moduleConcurrencyType() const {
0727 return Worker::kLimited;
0728 }
0729 template <>
0730 Worker::ConcurrencyTypes WorkerT<edm::limited::EDFilterBase>::moduleConcurrencyType() const {
0731 return Worker::kLimited;
0732 }
0733 template <>
0734 Worker::ConcurrencyTypes WorkerT<edm::limited::EDAnalyzerBase>::moduleConcurrencyType() const {
0735 return Worker::kLimited;
0736 }
0737 template <>
0738 Worker::ConcurrencyTypes WorkerT<edm::limited::OutputModuleBase>::moduleConcurrencyType() const {
0739 return Worker::kLimited;
0740 }
0741
0742 template <>
0743 Worker::ConcurrencyTypes WorkerT<edm::stream::EDProducerAdaptorBase>::moduleConcurrencyType() const {
0744 return Worker::kStream;
0745 }
0746 template <>
0747 Worker::ConcurrencyTypes WorkerT<edm::stream::EDFilterAdaptorBase>::moduleConcurrencyType() const {
0748 return Worker::kStream;
0749 }
0750 template <>
0751 Worker::ConcurrencyTypes WorkerT<edm::stream::EDAnalyzerAdaptorBase>::moduleConcurrencyType() const {
0752 return Worker::kStream;
0753 }
0754
0755 template <typename T>
0756 std::vector<ModuleConsumesInfo> WorkerT<T>::moduleConsumesInfos() const {
0757 return module_->moduleConsumesInfos();
0758 }
0759
0760
0761
0762 template class WorkerT<one::EDProducerBase>;
0763 template class WorkerT<one::EDFilterBase>;
0764 template class WorkerT<one::EDAnalyzerBase>;
0765 template class WorkerT<one::OutputModuleBase>;
0766 template class WorkerT<global::EDProducerBase>;
0767 template class WorkerT<global::EDFilterBase>;
0768 template class WorkerT<global::EDAnalyzerBase>;
0769 template class WorkerT<global::OutputModuleBase>;
0770 template class WorkerT<stream::EDProducerAdaptorBase>;
0771 template class WorkerT<stream::EDFilterAdaptorBase>;
0772 template class WorkerT<stream::EDAnalyzerAdaptorBase>;
0773 template class WorkerT<limited::EDProducerBase>;
0774 template class WorkerT<limited::EDFilterBase>;
0775 template class WorkerT<limited::EDAnalyzerBase>;
0776 template class WorkerT<limited::OutputModuleBase>;
0777 }