Public Member Functions | Private Member Functions | List of all members
arttest::HMSubRunProdProducer Class Reference
Inheritance diagram for arttest::HMSubRunProdProducer:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Member Functions

 HMSubRunProdProducer (fhicl::ParameterSet const &)
 
- Public Member Functions inherited from art::EDProducer
 EDProducer ()=default
 
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer ()
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob ()
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Modifier
virtual ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void produce (art::Event &) override
 
void endSubRun (art::SubRun &sr) override
 

Additional Inherited Members

- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 
- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 

Detailed Description

Definition at line 28 of file HMSubRunProdProducer_module.cc.

Constructor & Destructor Documentation

arttest::HMSubRunProdProducer::HMSubRunProdProducer ( fhicl::ParameterSet const &  ps)
explicit

Definition at line 37 of file HMSubRunProdProducer_module.cc.

39  : EDProducer{ps}
40 {
41  for (unsigned short i = 0; i < N_BLOCKS; ++i) {
42  produces<HMLargeData, art::InSubRun>("block"s + std::to_string(i));
43  }
44 }
static const double ps
Definition: Units.h:103
EDProducer()=default
constexpr unsigned short N_BLOCKS
Definition: HMLargeData.h:12
static const double s
Definition: Units.h:99
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34

Member Function Documentation

void arttest::HMSubRunProdProducer::endSubRun ( art::SubRun sr)
overrideprivatevirtual

Reimplemented from art::EDProducer.

Definition at line 47 of file HMSubRunProdProducer_module.cc.

48 {
49  auto stencil = std::make_unique<HMLargeData>();
50  std::iota(stencil->data(), stencil->data() + stencil->size(), 0);
51 
52  for (unsigned short i = 0; i < N_BLOCKS; ++i) {
53  auto prod = std::make_unique<HMLargeData>(*stencil);
54  sr.put(
55  std::move(prod), "block"s + std::to_string(i), art::subRunFragment());
56  }
57 }
constexpr unsigned short N_BLOCKS
Definition: HMLargeData.h:12
constexpr auto subRunFragment()
static const double s
Definition: Units.h:99
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
void arttest::HMSubRunProdProducer::produce ( art::Event )
inlineoverrideprivatevirtual

Implements art::EDProducer.

Definition at line 33 of file HMSubRunProdProducer_module.cc.

33 {};

The documentation for this class was generated from the following file: