88 struct PrintOptions_t {
89 bool hexFloats =
false;
94 VertexDumper(std::vector<recob::Vertex>
const& vertex_list)
95 : VertexDumper(vertex_list, {})
100 std::vector<recob::Vertex>
const& vertex_list,
101 PrintOptions_t print_options
103 : vertices(vertex_list)
109 template <
typename Stream>
111 (Stream&& out,
size_t iVertex,
std::string indentstr =
"")
const 120 out <<
"\n" << indentstr
121 <<
"[#" << iVertex <<
"]";
123 std::array<double, 3> vtx_pos;
124 vertex.
XYZ(vtx_pos.data());
125 out <<
" ID=" << vertex.
ID() <<
" at (" 126 << hexfloat(vtx_pos[0]) <<
"," << hexfloat(vtx_pos[1])
127 <<
"," << hexfloat(vtx_pos[2])
138 template <
typename Stream>
139 void DumpAllVertices(Stream&& out,
std::string indentstr =
"")
const 142 size_t const nVertices = vertices.size();
143 for (
size_t iVertex = 0; iVertex < nVertices; ++iVertex)
144 DumpVertex(out, iVertex, indentstr);
150 std::vector<recob::Vertex>
const& vertices;
184 size_t const nVertices = Vertices->size();
186 <<
" contains " << nVertices <<
" vertices from '" 190 VertexDumper::PrintOptions_t
options;
192 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.
EDAnalyzer(fhicl::ParameterSet const &pset)
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)
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
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.
auto const & get(AssnsNode< L, R, D > const &r)
virtual void analyze(const art::Event &evt) override
Does the printing.