Skip to content

DumpTPCchannelStatusDB: module to dump on screen TPC channel status - #811

Merged
jas1005 merged 2 commits into
SBNSoftware:developfrom
PetrilloAtWork:feature/gp_dumpChStatus
Oct 21, 2026
Merged

jas1005 merged 2 commits into
SBNSoftware:developfrom
PetrilloAtWork:feature/gp_dumpChStatus

Conversation

@PetrilloAtWork

Copy link
Copy Markdown
Member

The new art module DumpTPCchannelStatusDB is able to dump the content of the TPC channel status service provider lariov::SIOVChannelStatusProvider (the one used by ICARUS) on screen for the timestamps specified in configuration.
A self-standing job configuration dump_tpc_channelstatus_latest_icarus.fcl is provided, which uses the standard ICARUS ChannelStatusService configuration and dumps the channel status information pertaining the most recent time. This is today's output:

Status of 55296 channels for 1 timestamps:
=== BEGIN TIMESTAMP: 2000000000000000000 =======================================
Counting 118 BAD channels: 167 1795 1796 1824 1826 1828 1830 1860 1888 1889 1890 1891 1922 2013 2806 3725 3743 4262 5572 8523 8524 8525 8526 8527 8945 9180 9387 9391 9664 10138 12051 14028 14403 15307 15737 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16937 17201 19580 23225 23457 23984 23985 25662 27219 27231 27335 27967 28640 28804 28805 28806 28807 28808 28809 28810 30705 31316 31317 31726 34220 38294 41501 41975 42851 43231 43518 44051 44410 49216 50080 50081 50082 50083 50084 50085 50086 50087 50088 50089 50090 50091 50092 50093 50094 50095 50096 50097 50098 50099 50100 50101 50102 50103 50104 50105 50106 50107 50108 50109 50110 50111 50673 51900
Counting 0 NOISY channels.
Counting 53066 good channels.
=== END   TIMESTAMP: 2000000000000000000 =======================================

It pull request comes with two kind-of-art-independent algorithms.
One, lariov::TPCSIOVchannelStatusDBdumper, is the backend of the module DumpTPCchannelStatusDB and works only with SIOVChannelStatusProvider, using its specific interface to select the timestamps. It should not be used on the art-managed service ChannelStatusService, since the algorithm and art will compete in setting the timestamps.
The other, lariov::TPCchannelStatusDBdumper, works with any ChannelStatusProvider (including the one managed by art) and dumps only the current channel status, whatever time it refers to (ChannelStatusProvider interface does not have the concept of time). This is a dumping algorithm suitable to be used in a produce() or analyze() module method, since it will not change the status of the service it is dumping.

Note that while the algorithms are art-independent, unfortunately the service providers are not, because of the small detail that they need the total number of TPC channels, and they ask it directly to WireReadout art service. It is a simple change to have this parameter passed to the providers rather than discovered by the algorithm, so it should be requested if access to this database with high level interface is desired in gallery (and Python).

Reviewers:

  • @SFBayLaser, the in-house channel status mapping expert
  • @dtorretta56 because her request this afternoon triggered this code

It comes with two kind-of-art-independent algorithms.
@PetrilloAtWork PetrilloAtWork added the enhancement New feature or request label Mar 12, 2025
@SFBayLaser

Copy link
Copy Markdown
Contributor

Surprise! I am a reviewer! How would I have known this if I didn't happen to look here?

@SFBayLaser SFBayLaser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to not only output the channel number, but provide an option to output in electronics space values?

@jas1005

jas1005 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

@SFBayLaser and @dtorretta56

I'm going through old PRs and it looks like this one never got approved. Were Tracy's comments ever addressed? I realize the number of changes is quite large, but I hope your relative familiarity with the code will make things easier. Do y'all have time to review this PR or should I ask someone else?

@jas1005

jas1005 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@SFBayLaser and @dtorretta56,

Can you both give formal approval if this PR is good to go?

@dtorretta56 dtorretta56 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this tested?
if so, I approve.

@jas1005

jas1005 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

trigger build larsoft@v10_27_00 LArSoft/lar*@LARSOFT_SUITE_v10_27_00 SBNSoftware/sbnalg@v10_27_00 SBNSoftware/sbnobj@v10_27_00 SBNSoftware/sbnanaobj@v10_27_00 SBNSoftware/sbndaq-artdaq-core@v1_10_06_01 SBNSoftware/sbncode@v10_27_00 SBNSoftware/icarusalg@v10_27_00 SBNSoftware/icarusutil@v10_24_00 SBNSoftware/icarus_signal_processing@v10_25_00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The generic dumper’s constructor rejects the const provider exposed by the art-managed service, blocking its intended use.

3 open issues
What changed in this PR

Adds TPC channel-status dumping utilities for ICARUS, supporting configured timestamps and read-only inspection of the current provider state.

Changes:

  • Adds generic and timestamp-aware dumping algorithms.
  • Adds an art module and build registration.
  • Provides a standalone configuration that writes the latest status to a log file.
File Description
icaruscode/​TPC/​Utilities/​TPCSIOVchannelStatusDBdumper.h Declares timestamp-aware dumping API.
icaruscode/​TPC/​Utilities/​TPCSIOVchannelStatusDBdumper.cxx Selects timestamps and formats dump boundaries.
icaruscode/​TPC/​Utilities/​TPCchannelStatusDBdumper.h Declares read-only dumping API and settings.
icaruscode/​TPC/​Utilities/​TPCchannelStatusDBdumper.cxx Prints channel states and summaries.
icaruscode/​TPC/​Utilities/​DumpTPCchannelStatusDB_module.cc Runs configured dumps at job startup.
icaruscode/​TPC/​Utilities/​CMakeLists.txt Registers the new module.
fcl/​utilities/​dump_tpc_channelstatus_latest_icarus.fcl Configures latest-status dumping to a log file.

Review effort: Balanced

/// Configures and sets up the algorithm.
TPCchannelStatusDBdumper(
Config const& config,
lariov::ChannelStatusProvider& channelStatus, unsigned int nChannels

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right... except that it did not fail compilation. 🤷

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify: passing the art-managed service would make compilation fail.
The module in this PR:

  1. instantiates a new copy of the service provider
  2. uses the derived algorithm lariov::TPCSIOVchannelStatusDBdumper, which needs a non-const version of the provider, to probe different timestamps as requested in the configuration.

@SFBayLaser

Copy link
Copy Markdown
Contributor

It could be worth @PetrilloAtWork glancing at the CoPilot items...

@FNALbuild

Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@PetrilloAtWork
PetrilloAtWork force-pushed the feature/gp_dumpChStatus branch from 61491a8 to 7a2eff9 Compare October 20, 2026 21:31
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@PetrilloAtWork
PetrilloAtWork force-pushed the feature/gp_dumpChStatus branch from 7a2eff9 to fefd8f5 Compare October 20, 2026 21:59
@jas1005

jas1005 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

trigger build larsoft@v10_27_00 LArSoft/lar*@LARSOFT_SUITE_v10_27_00 SBNSoftware/sbnalg@v10_27_00 SBNSoftware/sbnobj@v10_27_00 SBNSoftware/sbnanaobj@v10_27_00 SBNSoftware/sbndaq-artdaq-core@v1_10_06_01 SBNSoftware/sbncode@v10_27_00 SBNSoftware/icarusalg@v10_27_00 SBNSoftware/icarusutil@v10_24_00 SBNSoftware/icarus_signal_processing@v10_25_00

@FNALbuild

Copy link
Copy Markdown
Collaborator

⚠️ CI build for ICARUS Warning at phase ci_tests ICARUS on slf7 for e26:prof -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

⚠️ CI build for ICARUS Warning at phase ci_tests ICARUS on slf7 for e26:prof -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests ICARUS phase logs

parent CI build details are available through the CI dashboard

@jas1005
jas1005 merged commit 18204fb into SBNSoftware:develop Oct 21, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants