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

Public Types

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

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
 

Private Attributes

int nvalues
 

Detailed Description

Definition at line 20 of file PtrMakerProducer2_module.cc.

Member Typedef Documentation

typedef art::PtrVector<int> PtrMakerProducer2::intPtrvector_t

Definition at line 23 of file PtrMakerProducer2_module.cc.

typedef std::vector<int> PtrMakerProducer2::intvector_t

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  }
pdgs p
Definition: selectors.fcl:22
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)
override

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 }
BEGIN_PROLOG could also be cerr
pdgs p
Definition: selectors.fcl:22
std::vector< int > intvector_t
do i e

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: