89 struct PrintOptions_t {
90 bool hexFloats =
false;
95 VertexDumper(std::vector<recob::Vertex>
const& vertex_list)
96 : VertexDumper(vertex_list, {})
101 std::vector<recob::Vertex>
const& vertex_list,
102 PrintOptions_t print_options
104 : vertices(vertex_list)
105 , options(print_options)
110 template <
typename Stream>
112 (Stream&& out,
size_t iVertex, std::string indentstr =
"")
const 121 out <<
"\n" << indentstr
122 <<
"[#" << iVertex <<
"]";
124 std::array<double, 3> vtx_pos;
125 vertex.
XYZ(vtx_pos.data());
126 out <<
" ID=" << vertex.
ID() <<
" at (" 127 << hexfloat(vtx_pos[0]) <<
"," << hexfloat(vtx_pos[1])
128 <<
"," << hexfloat(vtx_pos[2])
139 template <
typename Stream>
140 void DumpAllVertices(Stream&& out, std::string indentstr =
"")
const 143 size_t const nVertices = vertices.size();
144 for (
size_t iVertex = 0; iVertex < nVertices; ++iVertex)
145 DumpVertex(out, iVertex, indentstr);
151 std::vector<recob::Vertex>
const& vertices;
153 PrintOptions_t options;
170 ,
fInputTag (pset.get<
art::InputTag>(
"VertexModuleLabel"))
185 size_t const nVertices = Vertices->size();
187 <<
" contains " << nVertices <<
" vertices from '" 191 VertexDumper::PrintOptions_t options;
193 VertexDumper dumper(*Vertices, options);
void XYZ(double *xyz) const
Legacy method to access vertex position, preserved to avoid breaking code. Please try to use Vertex::...
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
Reconstruction base classes.
DumpVertices(fhicl::ParameterSet const &pset)
Default constructor.
Definition of vertex object for LArSoft.
std::string fOutputCategory
category for LogInfo output
art::InputTag fInputTag
input tag of the Vertex product
#define DEFINE_ART_MODULE(klass)
EDAnalyzer(Table< Config > const &config)
Prints the content of all the vertices on screen.
Helper for formatting floats in base 16.
bool fPrintHexFloats
whether to print floats in base 16
Helper to support output of real numbers in base 16.
int ID() const
Return vertex id.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
virtual void analyze(const art::Event &evt) override
Does the printing.