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

Public Types

using input_t = std::vector< arttest::SimpleDerived >
 
using product_t = arttest::MockClusterList
 
- 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 >
 

Public Member Functions

 MockClusterListProducer (fhicl::ParameterSet const &p)
 
- 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 &e) override
 

Private Attributes

std::string const input_label_
 
unsigned const nvalues_
 

Additional Inherited Members

- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 

Detailed Description

Definition at line 25 of file MockClusterListProducer_module.cc.

Member Typedef Documentation

Definition at line 27 of file MockClusterListProducer_module.cc.

Definition at line 28 of file MockClusterListProducer_module.cc.

Constructor & Destructor Documentation

arttest::MockClusterListProducer::MockClusterListProducer ( fhicl::ParameterSet const &  p)
inlineexplicit

Definition at line 30 of file MockClusterListProducer_module.cc.

31  : EDProducer{p}
32  , input_label_(p.get<std::string>("input_label"))
33  , nvalues_(p.get<int>("nvalues"))
34  {
35  produces<product_t>();
36  }
std::string string
Definition: nybbler.cc:12
EDProducer()=default
p
Definition: test.py:228

Member Function Documentation

void MockClusterListProducer::produce ( art::Event e)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 48 of file MockClusterListProducer_module.cc.

49 {
51  e.getByLabel(input_label_, "derived", h);
52 
53  std::unique_ptr<product_t> prod(new product_t);
55  c1.skew = 1;
56  for (unsigned k = 0; k < (nvalues_ / 2); ++k) {
58  c1.cells.push_back(p);
59  }
60  c1.eNum = e.id().event();
61  prod->push_back(c1);
62 
64  c2.skew = 2;
65  for (unsigned k = nvalues_ / 2; k < nvalues_; ++k) {
67  c2.cells.push_back(p);
68  }
69  c2.eNum = e.id().event() + 1;
70  prod->push_back(c2);
71 
72  e.put(std::move(prod));
73 }
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:435
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
p
Definition: test.py:228
art::EventNumber_t eNum
Definition: MockCluster.h:22
EventNumber_t event() const
Definition: EventID.h:117
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
Definition: fwd.h:26
EventID id() const
Definition: Event.cc:37
h
training ###############################
Definition: train_cnn.py:186

Member Data Documentation

std::string const arttest::MockClusterListProducer::input_label_
private

Definition at line 41 of file MockClusterListProducer_module.cc.

unsigned const arttest::MockClusterListProducer::nvalues_
private

Definition at line 42 of file MockClusterListProducer_module.cc.


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