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::DumpSpacePoints Class Reference

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

Inheritance diagram for recob::DumpSpacePoints:

Classes

struct  Config
 Configuration parameters. More...
 

Public Types

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

Public Member Functions

 DumpSpacePoints (Parameters const &config)
 Default constructor. More...
 
virtual void analyze (const art::Event &evt) 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...
 
bool fPrintHexFloats
 whether to print floats in base 16 More...
 

Detailed Description

Prints the content of all the space points on screen.

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

Configuration parameters

Definition at line 45 of file DumpSpacePoints_module.cc.

Member Typedef Documentation

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

Definition at line 70 of file DumpSpacePoints_module.cc.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 228 of file DumpSpacePoints_module.cc.

229  : EDAnalyzer(config)
230  , fInputTag(config().SpacePointModuleLabel())
231  , fOutputCategory(config().OutputCategory())
232  , fPrintHexFloats(config().PrintHexFloats())
233  {}
bool fPrintHexFloats
whether to print floats in base 16
std::string fOutputCategory
category for LogInfo output
art::InputTag fInputTag
input tag of the SpacePoint product

Member Function Documentation

void recob::DumpSpacePoints::analyze ( const art::Event &  evt)
overridevirtual

Does the printing.

Definition at line 237 of file DumpSpacePoints_module.cc.

237  {
238 
239  //
240  // collect all the available information
241  //
242  // fetch the data to be dumped on screen
243  auto SpacePoints
244  = evt.getValidHandle<std::vector<recob::SpacePoint>>(fInputTag);
245 
246  art::FindMany<recob::Hit> const PointHits(SpacePoints, evt, fInputTag);
247 
248  size_t const nPoints = SpacePoints->size();
249  mf::LogInfo(fOutputCategory)
250  << "The event contains " << nPoints << " space points from '"
251  << fInputTag.encode() << "'";
252 
253  // prepare the dumper
254  SpacePointDumper dumper(*SpacePoints);
255  if (PointHits.isValid()) dumper.SetHits(&PointHits);
256  else mf::LogWarning("DumpSpacePoints") << "hit information not avaialble";
257 
258  dumper.DumpAllSpacePoints(mf::LogVerbatim(fOutputCategory), " ");
259 
260  mf::LogVerbatim(fOutputCategory) << "\n"; // two empty lines
261 
262  } // DumpSpacePoints::analyze()
std::string fOutputCategory
category for LogInfo output
art::InputTag fInputTag
input tag of the SpacePoint product
TCEvent evt
Definition: DataStructs.cxx:8

Member Data Documentation

art::InputTag recob::DumpSpacePoints::fInputTag
private

input tag of the SpacePoint product

Definition at line 80 of file DumpSpacePoints_module.cc.

std::string recob::DumpSpacePoints::fOutputCategory
private

category for LogInfo output

Definition at line 81 of file DumpSpacePoints_module.cc.

bool recob::DumpSpacePoints::fPrintHexFloats
private

whether to print floats in base 16

Definition at line 82 of file DumpSpacePoints_module.cc.


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