Skip to content

Commit

Permalink
Use the new edm4hep::CellIDEncoding
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Nov 1, 2023
1 parent 7f1dd93 commit 5ea21f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 3 additions & 5 deletions Detector/DetComponents/src/RedoSegmentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// EDM4hep
#include "edm4hep/CalorimeterHitCollection.h"
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/Constants.h"

/** @class RedoSegmentation Detector/DetComponents/src/RedoSegmentation.h RedoSegmentation.h
*
Expand Down Expand Up @@ -61,15 +62,12 @@ class RedoSegmentation : public GaudiAlgorithm {
/// Handle for the EDM positioned hits to be read
DataHandle<edm4hep::CalorimeterHitCollection> m_inHits{
"hits/caloInHits", Gaudi::DataHandle::Reader, this};
/// Handle for the input hits cell id encoding
MetaDataHandle<std::string> m_inHitsCellIDEncoding{
m_inHits,"CellIDEncodingString", Gaudi::DataHandle::Reader};
/// Handle for the EDM hits to be written
DataHandle<edm4hep::SimCalorimeterHitCollection> m_outHits{
"hits/caloOutHits", Gaudi::DataHandle::Writer, this};
/// Handle for the output hits cell id encoding
/// Handle for the output hits cell id encoding.
MetaDataHandle<std::string> m_outHitsCellIDEncoding{
m_outHits,"CellIDEncodingString", Gaudi::DataHandle::Writer};
m_outHits, edm4hep::CellIDEncoding, Gaudi::DataHandle::Writer};
/// New segmentation
dd4hep::DDSegmentation::Segmentation* m_segmentation;
int m_segmentationType; // use enum instead? defined in some namespace?
Expand Down
3 changes: 2 additions & 1 deletion SimG4Components/src/SimG4SaveCalHits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

// EDM4hep
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/Constants.h"

/** @class SimG4SaveCalHits SimG4Components/src/SimG4SaveCalHits.h SimG4SaveCalHits.h
*
Expand Down Expand Up @@ -68,7 +69,7 @@ class SimG4SaveCalHits : public GaudiTool, virtual public ISimG4SaveOutputTool {
"CaloHits", Gaudi::DataHandle::Writer, this};
/// Output handle for cell ID encoding string
MetaDataHandle<std::string> m_cellIDEncoding{
m_caloHits, "CellIDEncodingString", Gaudi::DataHandle::Writer};
m_caloHits, edm4hep::CellIDEncoding, Gaudi::DataHandle::Writer};
/// Name of the readouts (hits collections) to save, deprecated
Gaudi::Property<std::vector<std::string>> m_readoutNames{
this, "readoutNames", {}, "[Deprecated] Names of the readouts (hits collections) to save"};
Expand Down
3 changes: 2 additions & 1 deletion SimG4Components/src/SimG4SaveTrackerHits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

// EDM4hep
#include "edm4hep/SimTrackerHitCollection.h"
#include "edm4hep/Constants.h"

/** @class SimG4SaveTrackerHits SimG4Components/src/SimG4SaveTrackerHits.h SimG4SaveTrackerHits.h
*
Expand Down Expand Up @@ -69,7 +70,7 @@ class SimG4SaveTrackerHits : public GaudiTool, virtual public ISimG4SaveOutputTo
"TrackerHits", Gaudi::DataHandle::Writer, this};
/// Output handle for cell ID encoding string
MetaDataHandle<std::string> m_cellIDEncoding {
m_trackHits, "CellIDEncodingString", Gaudi::DataHandle::Writer};
m_trackHits, edm4hep::CellIDEncoding, Gaudi::DataHandle::Writer};
/// Names of the readouts (hits collections) to save, deprecated
Gaudi::Property<std::vector<std::string>> m_readoutNames {
this, "readoutNames", {}, "[Deprecated] Name of the readouts (hits collections) to save"};
Expand Down

0 comments on commit 5ea21f5

Please sign in to comment.