-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use new MetaDataHandles to be compliant with Frame based I/O #41
Conversation
@@ -91,10 +92,10 @@ class CreateCaloCellPositionsFCCee : public GaudiAlgorithm { | |||
dd4hep::DDSegmentation::BitFieldCoder* m_decoder = new dd4hep::DDSegmentation::BitFieldCoder("system:4"); | |||
/// Input collection | |||
DataHandle<edm4hep::CalorimeterHitCollection> m_hits{"hits/hits", Gaudi::DataHandle::Reader, this}; | |||
MetaDataHandle<std::string> m_hitsCellIDEncoding{m_hits, "CellIDEncodingString", Gaudi::DataHandle::Reader, this}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should MetaDataHandle take fatherAlg
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah no. It seems like I didn't update this PR after that has been removed again from key4hep/k4FWCore#100. Let me fix that
/// Output collection | ||
DataHandle<edm4hep::CalorimeterHitCollection> m_positionedHits{"hits/positionedHits", Gaudi::DataHandle::Writer, this}; | ||
PodioDataSvc* m_podioDataSvc; | ||
ServiceHandle<IDataProviderSvc> m_eventDataSvc; | ||
MetaDataHandle<std::string> m_positionedHitsCellIDEncoding{m_positionedHits, "CellIDEncodingString", Gaudi::DataHandle::Reader, this}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
The PR builds locally with the new frame I/O |
Hello! Was it checked that the code would run in addition to building successfully? I managed to compile but when running fccrun with the usual script (https://github.com/BrieucF/LAr_scripts/blob/main/FCCSW_ecal/runTopoAndSlidingWindowAndCaloSim.py) I get a FATAL error: CalBarrelPosit... FATAL Exception with tag=Put for non-writing MetaDataHandle not allowed is caught |
This probably broke here: #43 |
The #43 was intended to fix the issue. The |
Ah, I hadn't pulled #43 yet. Indeed that fixes the error I see with the metadata, though the code fails later in SimG4SaveCalHits TUnixSystem::Di... FATAL segmentation violation ===========================================================
|
Ah right. My bad then. Are there some simple examples that could be put together into a minimal test suite? |
The segmentation violation issue should be fixed by HEP-FCC/k4SimGeant4#40. |
With HEP-FCC/k4SimGeant4#40 the test https://github.com/HEP-FCC/k4RecCalorimeter/blob/main/RecFCCeeCalorimeter/tests/options/runCaloSim.py passes, but consequent one https://github.com/HEP-FCC/k4RecCalorimeter/blob/main/RecFCCeeCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py fails with no obvious error. But this looks suspicious:
|
The warnings can be ignored for now. This is effectively a small issue in the lookup logic in podio. However, since there is no schema evolution to do at the moment, everything works, even with these warnings. We can silence them if we have sorted things out if necessary. |
Indeed, I merged the changes of that MR in my local fork and I have been able to run the simulation successfully in a recent nightly and produce the same hits and cells as with older nightlies and the legacy podio interface |
key4hep/k4FWCore#100 makes the default DataSvc use the Frame, and some of the interfaces for accessing meta data (e.g. cellID strings) will change. This PR changes the access / writing of the cell ID encoding strings to use the new
MetaDataHandle
interface.