1 #ifndef FWCore_Framework_global_outputmoduleAbilityToImplementor_h
2 #define FWCore_Framework_global_outputmoduleAbilityToImplementor_h
31 class ModuleCallingContext;
34 namespace outputmodule {
58 for (
auto c : caches_) {
67 void preallocStreams(
unsigned int iNStreams)
final { caches_.resize(iNStreams, static_cast<C*>(
nullptr)); }
71 delete caches_[
id.value()];
72 caches_[
id.value()] =
nullptr;
75 virtual std::unique_ptr<C> beginStream(
edm::StreamID)
const = 0;
82 template <
typename T,
typename C>
100 virtual std::shared_ptr<C> globalBeginRun(
RunForOutput const&)
const = 0;
101 virtual void globalEndRun(
RunForOutput const&)
const = 0;
106 template <
typename T,
typename C>
115 void preallocLumis(
unsigned int iNLumis)
final { caches_.reset(
new std::shared_ptr<C>[iNLumis]); }
120 caches_[lp.index()] = globalBeginLuminosityBlock(lp);
123 globalEndLuminosityBlock(lp);
124 caches_[lp.index()].reset();
130 std::unique_ptr<std::shared_ptr<C>[]>
caches_;
133 template <
typename T>
145 acquire(
id,
event, holder);
151 template <
typename T>
159 template <
typename C>
164 template <
typename C>
169 template <
typename C>
const edm::EventSetup & c
edm::global::outputmodule::ExternalWork< edm::global::OutputModuleBase > Type
C const * runCache(edm::RunIndex iID) const
void preallocLumis(unsigned int iNLumis) final
void doEndStream_(StreamID id) final
LuminosityBlockCacheHolder(edm::ParameterSet const &iPSet)
~RunCacheHolder() noexcept(false) override
ExternalWork(edm::ParameterSet const &iPSet)
void doEndRun_(RunForOutput const &rp) final
std::vector< C * > caches_
std::unique_ptr< std::shared_ptr< C >[]> caches_
StreamCacheHolder(edm::ParameterSet const &iPSet)
void doAcquire_(StreamID id, EventForOutput const &event, WaitingTaskWithArenaHolder &holder) final
edm::global::outputmodule::LuminosityBlockCacheHolder< edm::global::OutputModuleBase, C > Type
void doBeginStream_(StreamID id) final
C const * luminosityBlockCache(edm::LuminosityBlockIndex iID) const
edm::propagate_const< std::shared_ptr< C > > cache_
virtual void endStream(edm::StreamID) const
edm::global::outputmodule::StreamCacheHolder< edm::global::OutputModuleBase, C > Type
~ExternalWork() noexcept(false) override
unsigned int value() const
void doBeginLuminosityBlock_(LuminosityBlockForOutput const &lp) final
void preallocStreams(unsigned int iNStreams) final
bool hasAcquire() const override
RunCacheHolder(edm::ParameterSet const &iPSet)
edm::global::outputmodule::RunCacheHolder< edm::global::OutputModuleBase, C > Type
void doBeginRun_(RunForOutput const &rp) final
void doEndLuminosityBlock_(LuminosityBlockForOutput const &lp) final
~LuminosityBlockCacheHolder() noexcept(false) override
C * streamCache(edm::StreamID iID) const
~StreamCacheHolder() override