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

Public Member Functions

 AssnProducer2 (fhicl::ParameterSet const &p)
 
 AssnProducer2 (AssnProducer2 const &)=delete
 
 AssnProducer2 (AssnProducer2 &&)=delete
 
AssnProducer2operator= (AssnProducer2 const &)=delete
 
AssnProducer2operator= (AssnProducer2 &&)=delete
 
void produce (art::Event &e) override
 
- Public Member Functions inherited from art::EDProducer
 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 (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob (SharedResources const &resources)
 
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
 ~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 &)
 
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 Attributes

std::string fInputLabel
 

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)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
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 ()
 

Detailed Description

Definition at line 24 of file AssnProducer2_module.cc.

Constructor & Destructor Documentation

AssnProducer2::AssnProducer2 ( fhicl::ParameterSet const &  p)
explicit

Definition at line 46 of file AssnProducer2_module.cc.

47  : EDProducer{p}
48  , fInputLabel(p.get<std::string>("input_label"))
49 {
50  produces<art::Assns<int, std::string>>();
51 }
std::string string
Definition: nybbler.cc:12
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
p
Definition: test.py:223
lartest::AssnProducer2::AssnProducer2 ( AssnProducer2 const &  )
delete
lartest::AssnProducer2::AssnProducer2 ( AssnProducer2 &&  )
delete

Member Function Documentation

AssnProducer2& lartest::AssnProducer2::operator= ( AssnProducer2 const &  )
delete
AssnProducer2& lartest::AssnProducer2::operator= ( AssnProducer2 &&  )
delete
void AssnProducer2::produce ( art::Event e)
overridevirtual

Implements art::EDProducer.

Definition at line 53 of file AssnProducer2_module.cc.

54 {
56  e.getByLabel(fInputLabel, ih);
58  e.getByLabel(fInputLabel, sh);
59 
60  art::PtrMaker<int> make_intptr(e, ih.id());
61  art::PtrMaker<std::string> make_strptr(e, sh.id());
62 
63  auto assns = std::make_unique<art::Assns<int, std::string>>();
64  for (size_t i=0; i < 3; ++i) {
65  auto p1 = make_intptr(i);
66  for(size_t j=0; j < 2; ++j) {
67  auto p2 = make_strptr(i*2+j);
68  assns -> addSingle(p1, p2);
69  }
70  }
71  e.put(std::move(assns));
72 }
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:633
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
ProductID id() const
Definition: Handle.h:212

Member Data Documentation

std::string lartest::AssnProducer2::fInputLabel
private

Definition at line 40 of file AssnProducer2_module.cc.


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