All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
recob::test::HitCollectionCreatorTest Class Reference

Test module for recob::HitCollector. More...

Inheritance diagram for recob::test::HitCollectionCreatorTest:

Classes

struct  Config
 

Public Types

using Parameters = art::EDProducer::Table< Config >
 

Public Member Functions

 HitCollectionCreatorTest (Parameters const &config)
 
virtual void produce (art::Event &event) override
 

Private Member Functions

void produceHits (art::Event &event, std::string instanceName)
 Produces a collection of hits and stores it into the event. More...
 

Private Attributes

recob::HitCollectionCreatorManager hitCollManager
 
std::string fInstanceName
 Instance name to be used for products. More...
 

Detailed Description

Test module for recob::HitCollector.

Currently exercises:

Todo:

Throws an exception on failure.

Service requirements

This module requires no service.

Configuration parameters

Definition at line 51 of file HitCollectionCreatorTest_module.cc.

Member Typedef Documentation

Definition at line 68 of file HitCollectionCreatorTest_module.cc.

Constructor & Destructor Documentation

recob::test::HitCollectionCreatorTest::HitCollectionCreatorTest ( Parameters const &  config)
explicit

Definition at line 100 of file HitCollectionCreatorTest_module.cc.

101  : art::EDProducer(config)
102  , hitCollManager(
103  producesCollector(), config().instanceName(),
104  false /* doWireAssns */, false /* doRawDigitAssns */
105  ) // produces<>() hit collections
106  {}
recob::HitCollectionCreatorManager hitCollManager

Member Function Documentation

void recob::test::HitCollectionCreatorTest::produce ( art::Event &  event)
overridevirtual

Definition at line 110 of file HitCollectionCreatorTest_module.cc.

110  {
111  produceHits(event, fInstanceName);
112 } // HitCollectionCreatorTest::produce()
std::string fInstanceName
Instance name to be used for products.
void produceHits(art::Event &event, std::string instanceName)
Produces a collection of hits and stores it into the event.
void recob::test::HitCollectionCreatorTest::produceHits ( art::Event &  event,
std::string  instanceName 
)
private

Produces a collection of hits and stores it into the event.

Definition at line 117 of file HitCollectionCreatorTest_module.cc.

118 {
119 
120  // this object will contain al the hits until they are moved into the event;
121  // while it's useful to test the creation of the associations, that is too
122  // onerous for this test
123  auto Hits = hitCollManager.collectionWriter(event);
124 
125  // create hits, one by one
126  for (double time: { 0.0, 200.0, 400.0 }) {
127  Hits.emplace_back(
128  recob::Hit(
129  raw::InvalidChannelID, /* channel */
130  raw::TDCtick_t(1000 + time), /* start_tick */
131  raw::TDCtick_t(1010 + time), /* end_tick */
132  time, /* peak_time */
133  1.0, /* sigma_peak_time */
134  5.0, /* rms */
135  100.0, /* peak_amplitude */
136  1.0, /* sigma_peak_amplitude */
137  500.0, /* summedADC */
138  500.0, /* hit_integral */
139  1.0, /* hit_sigma_integral */
140  1, /* multiplicity */
141  0, /* local_index */
142  1.0, /* goodness_of_fit */
143  7, /* dof */
144  geo::kUnknown, /* view */
145  geo::kMysteryType, /* signal_type */
146  geo::WireID{} /* wireID */
147  )
148  );
149  } // for hits
150 
151  Hits.put_into(event);
152 
153 } // recob::test::HitCollectionCreatorTest::produceHits()
Who knows?
Definition: geo_types.h:147
Writer_t collectionWriter(art::Event &event) const
Returns a new writer already configured.
Definition: HitCreator.h:1106
Unknown view.
Definition: geo_types.h:136
int TDCtick_t
Type representing a TDC tick.
Definition: RawTypes.h:25
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:32
recob::HitCollectionCreatorManager hitCollManager
art::PtrVector< recob::Hit > Hits
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:48

Member Data Documentation

std::string recob::test::HitCollectionCreatorTest::fInstanceName
private

Instance name to be used for products.

Definition at line 80 of file HitCollectionCreatorTest_module.cc.

recob::HitCollectionCreatorManager recob::test::HitCollectionCreatorTest::hitCollManager
private

Definition at line 78 of file HitCollectionCreatorTest_module.cc.


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