Closed benjaminhuth closed 3 days ago
Changes made to the RootTrackSummaryWriter
class enhance its flexibility and robustness. The Config
struct comments were updated to indicate optional inputs. The constructor and writeT
method were modified to improve initialization and error handling, allowing the program to proceed without exceptions for missing inputs. A new test was introduced to validate the functionality of the RootTrackSummaryWriter
, ensuring it integrates well with existing tests and adheres to the expected interface.
File | Change Summary |
---|---|
Examples/Io/Root/include/ActsExamples/Io/Root/RootTrackSummaryWriter.hpp |
Updated comments in Config struct for inputParticles and inputTrackParticleMatching to indicate they are optional. |
Examples/Io/Root/src/RootTrackSummaryWriter.cpp |
Constructor logic updated to use maybeInitialize for input checks. Modified writeT to handle empty input collections with static containers. Enhanced handling of track states and measurements. |
Examples/Python/tests/test_writer.py |
Added test_root_tracksummary_writer to validate RootTrackSummaryWriter . Updated test_root_writer_interface to include it in parameterized tests. |
sequenceDiagram
participant User
participant Config
participant RootTrackSummaryWriter
participant InputCollections
participant OutputFiles
User->>Config: Create configuration
User->>RootTrackSummaryWriter: Initialize with config
RootTrackSummaryWriter->>InputCollections: Check for input particles
alt Input particles available
RootTrackSummaryWriter->>InputCollections: Process input particles
else No input particles
RootTrackSummaryWriter->>InputCollections: Use emptyParticles
end
RootTrackSummaryWriter->>OutputFiles: Write output files
OutputFiles-->>User: Return generated files
In the realm of code, changes unfold,
Flexibility and strength, a story told.
Comments updated, inputs now clear,
Robustness enhanced, letβs give a cheer!
Tests now included, validation in sight,
A brighter future, our code takes flight!
πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Overall I wonder if it might be easier to just have empty truth information in case these entries in the whiteboard are not present. I think not having any truth should act similarly to not matching to truth?
I would also like to avoid special casing in all directions so we can make data workflows work as this seems really not the goal of our design.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Since some people start to do tests within the examples framework with real data, we should extend our algorithms/writers to not require these information. This PR does the relevant changes for the
RootTracksummaryWriter
.--- END COMMIT MESSAGE ---
Any further description goes here, @-mentions are ok here!
feat
,fix
,refactor
,docs
,chore
andbuild
types.Summary by CodeRabbit
New Features
RootTrackSummaryWriter
, allowing the program to operate without mandatory input collections.Bug Fixes
Tests
RootTrackSummaryWriter
and integrated it into existing testing frameworks for comprehensive coverage.