All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
lartest::PtrMakerProducer Class Reference
Inheritance diagram for lartest::PtrMakerProducer:

Public Types

typedef std::vector< int > intvector_t
 
typedef art::PtrVector< int > intPtrvector_t
 

Public Member Functions

 PtrMakerProducer (fhicl::ParameterSet const &p)
 
 PtrMakerProducer (PtrMakerProducer const &)=delete
 
 PtrMakerProducer (PtrMakerProducer &&)=delete
 
PtrMakerProduceroperator= (PtrMakerProducer const &)=delete
 
PtrMakerProduceroperator= (PtrMakerProducer &&)=delete
 
void produce (art::Event &e) override
 

Private Attributes

std::string fInputLabel
 

Detailed Description

Definition at line 29 of file PtrMakerProducer_module.cc.

Member Typedef Documentation

typedef art::PtrVector<int> lartest::PtrMakerProducer::intPtrvector_t

Definition at line 32 of file PtrMakerProducer_module.cc.

typedef std::vector<int> lartest::PtrMakerProducer::intvector_t

Definition at line 31 of file PtrMakerProducer_module.cc.

Constructor & Destructor Documentation

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

Definition at line 56 of file PtrMakerProducer_module.cc.

57  : EDProducer{p}, fInputLabel( p.get<std::string>("input_label") )
58  {
59  produces<intPtrvector_t>();
60  }
pdgs p
Definition: selectors.fcl:22
lartest::PtrMakerProducer::PtrMakerProducer ( PtrMakerProducer const &  )
delete
lartest::PtrMakerProducer::PtrMakerProducer ( PtrMakerProducer &&  )
delete

Member Function Documentation

PtrMakerProducer& lartest::PtrMakerProducer::operator= ( PtrMakerProducer const &  )
delete
PtrMakerProducer& lartest::PtrMakerProducer::operator= ( PtrMakerProducer &&  )
delete
void PtrMakerProducer::produce ( art::Event &  e)
override

Definition at line 62 of file PtrMakerProducer_module.cc.

63 {
64  std::cerr << "PtrMakerProducer::produce is running!\n";
65  art::Handle<std::vector<int>> h;
66  e.getByLabel(fInputLabel, h);
67  art::PtrMaker<int> make_intptr(e, h.id());
68  auto intptrs = std::make_unique<intPtrvector_t>();
69  for ( size_t i = 0; i < h->size(); ++i ) {
70  auto p = make_intptr(i);
71  intptrs->push_back(p);
72  }
73  e.put(std::move(intptrs));
74 }
BEGIN_PROLOG could also be cerr
pdgs p
Definition: selectors.fcl:22
while getopts h
do i e

Member Data Documentation

std::string lartest::PtrMakerProducer::fInputLabel
private

Definition at line 51 of file PtrMakerProducer_module.cc.


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