Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
art::test::IntReaderThenProducer Class Reference
Inheritance diagram for art::test::IntReaderThenProducer:
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

 IntReaderThenProducer (Parameters const &p, ProcessingFrame const &)
 
 IntReaderThenProducer (IntReaderThenProducer const &)=delete
 
 IntReaderThenProducer (IntReaderThenProducer &&)=delete
 
IntReaderThenProduceroperator= (IntReaderThenProducer const &)=delete
 
IntReaderThenProduceroperator= (IntReaderThenProducer &&)=delete
 
- 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 (Event &e, ProcessingFrame const &) override
 

Private Attributes

ProductToken< arttest::IntProduct > const token_
 
int const deltaValue_
 
bool const shouldSucceed_
 

Detailed Description

Definition at line 19 of file IntReaderThenProducer_module.cc.

Member Typedef Documentation

Definition at line 31 of file IntReaderThenProducer_module.cc.

Constructor & Destructor Documentation

art::test::IntReaderThenProducer::IntReaderThenProducer ( Parameters const &  p,
ProcessingFrame const &   
)
explicit

Definition at line 48 of file IntReaderThenProducer_module.cc.

50  : SharedProducer{p}
51  , token_{consumes<arttest::IntProduct>(p().inputTag())}
52  , deltaValue_{p().deltaValue()}
53  , shouldSucceed_{p().shouldSucceed()}
54 {
55  produces<arttest::IntProduct>();
56  async<InEvent>();
57 }
ProductToken< arttest::IntProduct > const token_
SharedProducer(fhicl::ParameterSet const &pset)
p
Definition: test.py:228
art::test::IntReaderThenProducer::IntReaderThenProducer ( IntReaderThenProducer const &  )
delete
art::test::IntReaderThenProducer::IntReaderThenProducer ( IntReaderThenProducer &&  )
delete

Member Function Documentation

IntReaderThenProducer& art::test::IntReaderThenProducer::operator= ( IntReaderThenProducer const &  )
delete
IntReaderThenProducer& art::test::IntReaderThenProducer::operator= ( IntReaderThenProducer &&  )
delete
void art::test::IntReaderThenProducer::produce ( Event e,
ProcessingFrame const &   
)
overrideprivatevirtual

Implements art::SharedProducer.

Definition at line 60 of file IntReaderThenProducer_module.cc.

61 {
62  // getByToken adds parent for the about-to-be-created IntProduct.
63  Handle<arttest::IntProduct> intH;
64  bool const fetched{e.getByToken(token_, intH)};
65  assert(shouldSucceed_ == fetched);
66  auto new_value = std::make_unique<arttest::IntProduct>(deltaValue_);
67  if (shouldSucceed_) {
68  new_value->value += intH->value;
69  }
70  e.put(move(new_value));
71 }
ProductToken< arttest::IntProduct > const token_
const double e

Member Data Documentation

int const art::test::IntReaderThenProducer::deltaValue_
private

Definition at line 44 of file IntReaderThenProducer_module.cc.

bool const art::test::IntReaderThenProducer::shouldSucceed_
private

Definition at line 45 of file IntReaderThenProducer_module.cc.

ProductToken<arttest::IntProduct> const art::test::IntReaderThenProducer::token_
private

Definition at line 43 of file IntReaderThenProducer_module.cc.


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