Repository navigation
Simplify calotowerbuilder - #4499
pinkenburg merged 5 commits into
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
PRDF packet processing offline/packages/CaloReco/CaloTowerBuilder.h, offline/packages/CaloReco/CaloTowerBuilder.cc |
process_data processes packets from a present PRDF event. It aborts for a present non-data event and skips packet processing when no PRDF event exists. The offline packet paths and packet-flag members are removed. set_offlineflag remains but stores its argument in tmpdummy. |
TPC calibration diagnostic
| Layer / File(s) | Summary |
|---|---|
Calibration diagnostic message offline/packages/tpc/TpcCombinedRawDataUnpacker.cc |
The missing-calibration message now names TpcCombinedRawDataUnpacker::InitRun. The subsequent exit(1) is unchanged. |
Priority:
Merge Risk: 
Moderate · up to fedd1
-
Events without calorimeter input can acquire synthetic towers. Skip tower generation for those events before merging.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: sPHENIX-Collaboration/coresoftware
- Branch: master
- File: .coderabbit.yaml
- Commit: bfce189
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
fa7e4a9a-39cb-4604-b36b-fcd8cbfe4a1e
Files selected for processing: 3-
offline/packages/CaloReco/CaloTowerBuilder.ccoffline/packages/CaloReco/CaloTowerBuilder.hoffline/packages/tpc/TpcCombinedRawDataUnpacker.cc
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Propagate malformed CaloPacket failures. · CaloTowerBuilder.cc:421-425
offline/packages/CaloReco/CaloTowerBuilder.cc:421-425
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPropagate malformed
CaloPacketfailures.When
CaloPacket::iValue(0, "CHANNELS")exceedsm_nchannels,process_packetreturnsABORTEVENT. This fallback discards that result, soprocess_datacan returnEVENT_OKandprocess_eventcan accept the event with missing or partial tower reconstruction. The base code had the same omission in its explicit offline-node branch, but the PR makes this path active by default whenPRDFis absent.Suggested fix
CaloPacket *calopacket = findNode::getClass<CaloPacket>(topNode, pid); - process_packet(calopacket, pid); + if (process_packet(calopacket, pid) == Fun4AllReturnCodes::ABORTEVENT) + { + return Fun4AllReturnCodes::ABORTEVENT; + }

Review info
-
Run configuration-
- Source mode: Auto
- Repository: sPHENIX-Collaboration/coresoftware
- Branch: master
- File: .coderabbit.yaml
- Commit: bfce189
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
74828299-7374-4d0d-8ce8-816e18eedc57
Files selected for processing: 1-
offline/packages/CaloReco/CaloTowerBuilder.h
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
Build & test reportReport for commit 1b6fe028ad7ca83833ff5a523558306b11ccc38a:
Automatically generated by sPHENIX Jenkins continuous integration |
Build & test reportReport for commit fedd19734688718b5808bfa6d7d9d010c670cb10:
Automatically generated by sPHENIX Jenkins continuous integration |
5ef5c4a
into
sPHENIX-Collaboration:master



Types of changes
What kind of change does this PR introduce? (Bug fix, feature, ...)
This PR removes the used of the long obsolete (years) CaloPacketContainer object and the need to set set_offlineflag(true) in the macro. The CaloTowerBuilder now checks the nodes (Event or CaloPacket) and calls the appropriate reconstruction rather than relying on the user to figure this out. Also moved the lambda function to the beginning of the method for clarity rather than dumping it somewhere in the middle.
TODOs (if applicable)
Links to other PRs in macros and calibration repositories (if applicable)
Motivation
Simplify
CaloTowerBuilderinput handling. Remove reliance on the obsoleteCaloPacketContainerand onset_offlineflagto select an input path.Key changes
process_datauses packets from thePRDFEventwhen that node exists.DATAEVENT, the builder returnsABORTEVENT.PRDFEventexists, the builder looks up individualCaloPacketnodes by packet ID.set_offlineflagfor compatibility, but its argument no longer controls input selection.TpcCombinedRawDataUnpacker.Potential risk areas
PRDFEvent; it does not read the individualCaloPacketnodes.-1waveforms. Validate this behavior for the workflows that use packet nodes.Possible future improvements
set_offlineflagwill remain for API compatibility.AI-generated summaries can make mistakes. Verify these details against the implementation and relevant reconstruction workflows. Review-finding counts are unavailable from the supplied information.