Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
arttest::IntProducer Class Reference
Inheritance diagram for arttest::IntProducer:
art::SharedProducer art::detail::Producer art::detail::SharedModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Classes

struct  Config
 

Public Types

using Parameters = Table< Config >
 
- Public Types inherited from art::SharedProducer
using ModuleType = SharedProducer
 
using WorkerType = WorkerT< SharedProducer >
 
- 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 >
 

Public Member Functions

 IntProducer (Parameters const &p, art::ProcessingFrame const &)
 
- Public Member Functions inherited from art::SharedProducer
 SharedProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 SharedProducer (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)
 
- Public Member Functions inherited from art::detail::SharedModule
 SharedModule ()
 
 SharedModule (std::string const &moduleLabel)
 
 ~SharedModule () noexcept
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
void createQueues ()
 
template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType BT = InEvent>
void async ()
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 

Private Member Functions

void produce (art::Event &e, art::ProcessingFrame const &) override
 
void endSubRun (art::SubRun &sr, art::ProcessingFrame const &) override
 
void endRun (art::Run &r, art::ProcessingFrame const &) override
 

Private Attributes

int const value_
 
art::BranchType const branchType_
 

Detailed Description

Definition at line 32 of file IntProducer_module.cc.

Member Typedef Documentation

Definition at line 38 of file IntProducer_module.cc.

Constructor & Destructor Documentation

IntProducer::IntProducer ( Parameters const &  p,
art::ProcessingFrame const &   
)
explicit

Definition at line 50 of file IntProducer_module.cc.

52  , value_{p().ivalue()} // enums don't usually have a conversion from string
53  , branchType_{art::BranchType(p().branchType())}
54 {
55  art::test::run_time_produces<IntProduct>(this, branchType_);
56  async<art::InEvent>();
57 }
art::BranchType const branchType_
p
Definition: test.py:228
BranchType
Definition: BranchType.h:18

Member Function Documentation

void IntProducer::endRun ( art::Run r,
art::ProcessingFrame const &   
)
overrideprivatevirtual

Reimplemented from art::SharedProducer.

Definition at line 74 of file IntProducer_module.cc.

75 {
76  if (branchType_ == art::InRun)
77  r.put(std::make_unique<IntProduct>(value_), art::runFragment());
78 }
art::BranchType const branchType_
constexpr auto runFragment()
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
void IntProducer::endSubRun ( art::SubRun sr,
art::ProcessingFrame const &   
)
overrideprivatevirtual

Reimplemented from art::SharedProducer.

Definition at line 67 of file IntProducer_module.cc.

68 {
70  sr.put(std::make_unique<IntProduct>(value_), art::subRunFragment());
71 }
art::BranchType const branchType_
constexpr auto subRunFragment()
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
void IntProducer::produce ( art::Event e,
art::ProcessingFrame const &   
)
overrideprivatevirtual

Implements art::SharedProducer.

Definition at line 60 of file IntProducer_module.cc.

61 {
63  e.put(std::make_unique<IntProduct>(value_));
64 }
art::BranchType const branchType_
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692

Member Data Documentation

art::BranchType const arttest::IntProducer::branchType_
private

Definition at line 47 of file IntProducer_module.cc.

int const arttest::IntProducer::value_
private

Definition at line 46 of file IntProducer_module.cc.


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