Skip to content

Add EventHeader printers#1890

Open
rlcee wants to merge 2 commits into
Mu2e:mainfrom
rlcee:pr_260717
Open

Add EventHeader printers#1890
rlcee wants to merge 2 commits into
Mu2e:mainfrom
rlcee:pr_260717

Conversation

@rlcee

@rlcee rlcee commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Add three printers which are becoming more relevant. This should not affect operations or validation

@FNALbuild

Copy link
Copy Markdown
Collaborator

Hi @rlcee,
You have proposed changes to files in these packages:

  • Print

which require these tests: build.

@Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main.

⌛ The following tests have been triggered for 6923e53: build (Build queue - API unavailable)

About FNALbuild. Code review on Mu2e/Offline.

@FNALbuild

Copy link
Copy Markdown
Collaborator

☀️ The build tests passed at 6923e53.

Test Result Details
test with Command did not list any other PRs to include
merge Merged 6923e53 at e8de2a4
build (prof) Log file. Build time: 04 min 18 sec
ceSimReco Log file.
g4test_03MT Log file.
transportOnly Log file.
POT Log file.
g4study Log file.
cosmicSimReco Log file.
cosmicOffSpill Log file.
ceSteps Log file.
ceDigi Log file.
muDauSteps Log file.
ceMix Log file.
rootOverlaps Log file.
g4surfaceCheck Log file.
trigger Log file.
check_cmake Log file.
FIXME, TODO TODO (0) FIXME (0) in 7 files
clang-tidy ➡️ 5 errors 13 warnings
whitespace check no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at 6923e53 after being merged into the base branch at e8de2a4.

For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

@oksuzian

Copy link
Copy Markdown
Collaborator

Issues found

1. EventHeaderPrinter::Print has verbose gate inconsistent with the FCL configPrint/fcl/printLong.fcl
The FCL sets EventHeadersPrinter and RawEventHeaderPrinter to verbose : 0, but every Print() method early-returns when verbose() < 1. So the two new printers configured at verbose:0 will never print anything. Either the FCL defaults should be 1, or the intent should be documented. Worth confirming this is deliberate.

2. Unused int ind parameterEventHeaderPrinter.cc, EventHeadersPrinter.cc, RawEventHeaderPrinter.cc

void mu2e::EventHeaderPrinter::Print(const mu2e::EventHeader& obj,
                                     int ind, std::ostream& os) {

ind is declared but never used in any of the three Print(obj, ind, os) overloads. Harmless but will likely trigger -Wunused-parameter. Consider dropping the name or (void)ind;.

3. Unused includes — all three inc/*.hh
<cstring> and canvas/Persistency/Common/Ptr.h are included but neither Ptr nor cstring functions are used. Copy-paste carryover; minor cleanup.

4. os parameter ignored in the multi-arg overloads
In Print(const EventHeader& obj, int ind, std::ostream& os) the code writes to os correctly, but the Print(art::Event const&, os) fan-out calls Print(ah) / Print(ih) without forwarding os, so a non-default stream passed to the top-level Print is silently dropped for the per-handle prints. Same pattern in all three files. Functionally fine with the default std::cout, but inconsistent.

5. Build-system duplication riskPrint/src/SConscript vs Print/CMakeLists.txt
CMake adds artdaq-core-mu2e::Data only; SConscript adds artdaq-core-mu2e_Data, artdaq-core-mu2e_Data_dict, and artdaq-core_Data. The dependency sets differ between the two build systems — verify both actually link RawEventHeader (from artdaq-core, which CMake does not list).

@FNALbuild

Copy link
Copy Markdown
Collaborator

📝 The HEAD of main has changed to f853866. Tests are now out of date.

@rlcee

rlcee commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

AI comments:

  1. by design
  2. cleaned up
  3. cleaned up
  4. fixed
  5. cleaned up, checked
    ready to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants