1 #ifndef art_Framework_Core_ResultsProducer_h 2 #define art_Framework_Core_ResultsProducer_h 83 #include "cetlib/PluginTypeDeducer.h" 84 #include "cetlib/ProvideFilePathMacro.h" 85 #include "cetlib/compiler_macros.h" 91 class ResultsPrincipal;
92 class ResultsProducer;
100 struct PluginTypeDeducer<
art::ResultsProducer> {
108 void produces(std::string
const& instanceName = {});
113 template <
typename UserConfig,
typename KeysToIgnore =
void>
133 moduleDescription_ = &md;
137 cet::exempt_ptr<ModuleDescription const> moduleDescription_{
nullptr};
141 virtual void endJob();
143 virtual void beginSubRun(
SubRun const&);
144 virtual void endSubRun(
SubRun const&);
146 virtual void beginRun(
Run const&);
147 virtual void endRun(
Run const&);
151 virtual void readResults(
Results const&);
152 virtual void writeResults(
Results&) = 0;
154 virtual void clear() = 0;
161 ProductRegistryHelper::produces<P, InResults>(instanceName);
167 assert(moduleDescription_);
170 auto const& mainID = moduleDescription_->mainParameterSetID();
171 auto const& scheduler_pset =
173 "services.scheduler");
175 prepareForJob(scheduler_pset);
183 showMissingConsumes();
189 SubRun const sr{srp, *moduleDescription_,
this};
196 SubRun const sr{srp, *moduleDescription_,
this};
203 Run const r{rp, *moduleDescription_,
this};
210 Run const r{rp, *moduleDescription_,
this};
217 Event const e{ep, *moduleDescription_,
this};
224 Results const res{resp, *moduleDescription_,
this};
234 #define DEFINE_ART_RESULTS_PLUGIN(klass) \ 235 EXTERN_C_FUNC_DECLARE_START \ 236 CET_PROVIDE_FILE_PATH() \ 237 FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass) \ 238 DEFINE_BASIC_PLUGINTYPE_FUNC(art::ResultsProducer) \ 239 std::unique_ptr<art::RPWorker> makeRP(art::RPParams const& rpParams, \ 240 fhicl::ParameterSet const& ps) \ 242 return std::make_unique<art::RPWorkerT<klass>>(rpParams, ps); \ 244 EXTERN_C_FUNC_DECLARE_END
void registerProducts(MasterProductRegistry &mpr, ProductDescriptions &productsToRegister, ModuleDescription const &md)
static std::string const value
void doEvent(EventPrincipal const &)
void doBeginSubRun(SubRunPrincipal const &)
static collection_type const & get() noexcept
void registerProducts(MasterProductRegistry &mpr, ProductDescriptions &producedProducts, ModuleDescription const &md)
void doReadResults(ResultsPrincipal const &)
std::vector< BranchDescription > ProductDescriptions
void doEndRun(RunPrincipal const &)
void doBeginRun(RunPrincipal const &)
void doEndSubRun(SubRunPrincipal const &)
void setModuleDescription(ModuleDescription const &md)
void produces(std::string const &instanceName={})
Event finding and building.