96 class DumpChannelToWires {
107 { pGeom = &geometry; }
125 void CheckConfig()
const;
131 class DumpWireToChannel {
135 DumpWireToChannel() {}
139 { pGeom = &geometry; }
149 void CheckConfig()
const;
193 DumpChannelToWires dumper;
200 DumpWireToChannel dumper;
216 #include "larcoreobj/SimpleTypesAndConstants/geo_types.h" // geo::WireID 229 void DumpChannelToWires::CheckConfig()
const {
234 <<
"DumpChannelToWires: no valid geometry available!";
245 unsigned int const NChannels = pGeom->Nchannels();
247 if (NChannels == 0) {
249 <<
"Nice detector we have here, with no channels.";
259 unsigned int const NPrintedChannels = (PrintLast - PrintFirst) + 1;
260 if (NPrintedChannels == NChannels) {
261 mf::LogInfo(OutputCategory) <<
"Printing all " << NChannels <<
" channels";
264 mf::LogInfo(OutputCategory) <<
"Printing channels from " << PrintFirst
265 <<
" to " <<
LastChannel <<
" (" << NPrintedChannels
266 <<
" channels out of " << NChannels <<
")";
271 for (
raw::ChannelID_t channel = PrintFirst; channel <= PrintLast; ++channel) {
272 std::vector<geo::WireID>
const Wires = pGeom->ChannelToWire(channel);
274 log <<
"\n " << ((int) channel) <<
" ->";
275 switch (Wires.size()) {
276 case 0: log <<
" no wires";
break;
278 default: log <<
" [" << Wires.size() <<
" wires]";
break;
282 log <<
" { " << std::string(wireID) <<
" };";
291 void DumpWireToChannel::CheckConfig()
const {
296 <<
"DumpWireToChannel: no valid geometry available!";
307 unsigned int const NChannels = pGeom->Nchannels();
309 if (NChannels == 0) {
311 <<
"Nice detector we have here, with no channels.";
317 <<
"Printing wire channels for up to " << NChannels <<
" channels";
321 for (
geo::WireID const& wireID: pGeom->IterateWireIDs()) {
323 log <<
"\n { " << std::string(wireID) <<
" } => ";
325 else log <<
"invalid!";
std::string OutputCategory
name of the category for output
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
DumpChannelMap & operator=(DumpChannelMap const &)=delete
Access the description of detector geometry.
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
#define DEFINE_ART_MODULE(klass)
virtual void beginRun(art::Run const &) override
Drives the dumping.
constexpr bool isValidChannelID(raw::ChannelID_t channel)
bool DoWireToChannel
dump wire -> channel mapping
EDAnalyzer(Table< Config > const &config)
Description of geometry of one entire detector.
bool DoChannelToWires
dump channel -> wires mapping
raw::ChannelID_t LastChannel
last channel to be printed
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
virtual void analyze(art::Event const &) override
Prints on screen the current channel-wire map.
raw::ChannelID_t FirstChannel
first channel to be printed
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Namespace collecting geometry-related classes utilities.
art framework interface to geometry description
DumpChannelMap(fhicl::ParameterSet const &p)