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

Public Types

typedef std::vector< int > intvector_t
 
typedef art::PtrVector< int > intPtrvector_t
 
- 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

 PtrMakerProducer2 (fhicl::ParameterSet const &p)
 
 PtrMakerProducer2 (PtrMakerProducer2 const &)=delete
 
 PtrMakerProducer2 (PtrMakerProducer2 &&)=delete
 
PtrMakerProducer2operator= (PtrMakerProducer2 const &)=delete
 
PtrMakerProducer2operator= (PtrMakerProducer2 &&)=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

int nvalues
 

Additional Inherited Members

- 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 20 of file PtrMakerProducer2_module.cc.

Member Typedef Documentation

Definition at line 23 of file PtrMakerProducer2_module.cc.

Definition at line 22 of file PtrMakerProducer2_module.cc.

Constructor & Destructor Documentation

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

Definition at line 43 of file PtrMakerProducer2_module.cc.

44  : EDProducer{p}, nvalues( p.get<int>("nvalues") )
45  {
46  produces<intvector_t>();
47  produces<intPtrvector_t>();
48  }
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
p
Definition: test.py:223
PtrMakerProducer2::PtrMakerProducer2 ( PtrMakerProducer2 const &  )
delete
PtrMakerProducer2::PtrMakerProducer2 ( PtrMakerProducer2 &&  )
delete

Member Function Documentation

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

Implements art::EDProducer.

Definition at line 50 of file PtrMakerProducer2_module.cc.

51 {
52  std::cerr << "PtrMakerProducer 2 is running!\n";
53  int value_ = e.id().event();
54  std::unique_ptr<intvector_t> intvector(new intvector_t);
55  auto intptrs = std::make_unique<intPtrvector_t>();
56  art::PtrMaker<int> make_intptr(e);
57 
58  for( int i = 0; i != nvalues; ++i ) {
59  intvector->push_back(value_ * i);
60  auto p = make_intptr(i);
61  intptrs->push_back(p);
62  }
63  e.put(std::move(intvector));
64  e.put(std::move(intptrs));
65 }
def move(depos, offset)
Definition: depos.py:107
p
Definition: test.py:223
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
std::vector< int > intvector_t
EventNumber_t event() const
Definition: EventID.h:116
EventID id() const
Definition: Event.cc:34

Member Data Documentation

int PtrMakerProducer2::nvalues
private

Definition at line 39 of file PtrMakerProducer2_module.cc.


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