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

Prints the content of all the space points and charge on screen. More...

Inheritance diagram for recob::DumpChargedSpacePoints:

Classes

struct  Config
 Configuration parameters. More...
 

Public Types

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

Public Member Functions

 DumpChargedSpacePoints (Parameters const &config)
 Constructor. More...
 
virtual void analyze (art::Event const &event) override
 Does the printing. More...
 

Private Attributes

art::InputTag fInputTag
 Input tag of the SpacePoint product. More...
 
std::string fOutputCategory
 Category for LogInfo output. More...
 

Detailed Description

Prints the content of all the space points and charge on screen.

This analyser prints the content of all the space points into the LogInfo/LogVerbatim stream.

The space point and charge data products must fulfil the requirements of the proxy::ChargedSpacePoints proxy.

Configuration parameters

Definition at line 47 of file DumpChargedSpacePoints_module.cc.

Member Typedef Documentation

using recob::DumpChargedSpacePoints::Parameters = art::EDAnalyzer::Table<Config>

Definition at line 70 of file DumpChargedSpacePoints_module.cc.

Constructor & Destructor Documentation

recob::DumpChargedSpacePoints::DumpChargedSpacePoints ( Parameters const &  config)
explicit

Constructor.

Definition at line 95 of file DumpChargedSpacePoints_module.cc.

96  : EDAnalyzer(config)
97  , fInputTag(config().SpacePointTag())
98  , fOutputCategory(config().OutputCategory())
99  {}
std::string fOutputCategory
Category for LogInfo output.
art::InputTag fInputTag
Input tag of the SpacePoint product.

Member Function Documentation

void recob::DumpChargedSpacePoints::analyze ( art::Event const &  event)
overridevirtual

Does the printing.

Definition at line 103 of file DumpChargedSpacePoints_module.cc.

103  {
104 
105  //
106  // collect all the available information
107  //
108  // fetch the data to be dumped on screen
109  auto const& points = proxy::getChargedSpacePoints(event, fInputTag);
110 
111  size_t const nPoints = points.size();
112  mf::LogVerbatim log(fOutputCategory);
113  log
114  << "The event " << event.id()
115  << " contains " << nPoints
116  << " space points from '" << fInputTag.encode() << "'";
117 
118  for (auto const& point: points) {
119 
120  log << "\n [#" << point.index() << "] "
121  << point.point() << " " << point.charge();
122 
123  } // for
124 
125  log << "\n"; // two empty lines
126 
127 } // DumpChargedSpacePoints::analyze()
auto getChargedSpacePoints(Event const &event, art::InputTag inputTag, Args &&...withArgs)
Creates and returns a proxy to space points with associated charge.
std::string fOutputCategory
Category for LogInfo output.
art::InputTag fInputTag
Input tag of the SpacePoint product.

Member Data Documentation

art::InputTag recob::DumpChargedSpacePoints::fInputTag
private

Input tag of the SpacePoint product.

Definition at line 81 of file DumpChargedSpacePoints_module.cc.

std::string recob::DumpChargedSpacePoints::fOutputCategory
private

Category for LogInfo output.

Definition at line 82 of file DumpChargedSpacePoints_module.cc.


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