Skip to content

Commit

Permalink
Move DECLARE_SEGMENTATIONs for CartesianGridXYStaggered and HexGrid t…
Browse files Browse the repository at this point in the history
…o ReadoutSegmentations

This fixes runtime errors like:

    libc++abi: __cxa_guard_acquire detected recursive initialization
  • Loading branch information
veprbl authored and andresailer committed Nov 17, 2023
1 parent ff4c726 commit ef0e4c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions DDCore/src/plugins/ReadoutSegmentations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ DECLARE_SEGMENTATION(CartesianGridYZ,create_segmentation<dd4hep::DDSegmentation:
#include "DDSegmentation/CartesianGridXYZ.h"
DECLARE_SEGMENTATION(CartesianGridXYZ,create_segmentation<dd4hep::DDSegmentation::CartesianGridXYZ>)

#include "DDSegmentation/CartesianGridXYStaggered.h"
DECLARE_SEGMENTATION(CartesianGridXYStaggered,dd4hep::create_segmentation<dd4hep::DDSegmentation::CartesianGridXYStaggered>)

#include "DDSegmentation/CartesianStripX.h"
DECLARE_SEGMENTATION(CartesianStripX,create_segmentation<dd4hep::DDSegmentation::CartesianStripX>)

Expand Down Expand Up @@ -75,3 +78,6 @@ DECLARE_SEGMENTATION(ProjectiveCylinder,create_segmentation<dd4hep::DDSegmentati

#include "DDSegmentation/MultiSegmentation.h"
DECLARE_SEGMENTATION(MultiSegmentation,create_segmentation<dd4hep::DDSegmentation::MultiSegmentation>)

#include "DDSegmentation/HexGrid.h"
DECLARE_SEGMENTATION(HexGrid,create_segmentation<dd4hep::DDSegmentation::HexGrid>)
4 changes: 0 additions & 4 deletions DDCore/src/segmentations/CartesianGridXYStaggered.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,3 @@ std::vector<double> CartesianGridXYStaggered::cellDimensions(const CellID& cellI

} /* namespace DDSegmentation */
} /* namespace dd4hep */

// This is done DDCore/src/plugins/ReadoutSegmentations.cpp so the plugin is not part of libDDCore
// needs also #include "DD4hep/Factories.h"
// DECLARE_SEGMENTATION(CartesianGridXYStaggered,dd4hep::create_segmentation<dd4hep::DDSegmentation::CartesianGridXYStaggered>)
2 changes: 0 additions & 2 deletions DDCore/src/segmentations/HexGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,3 @@ namespace dd4hep {

} /* namespace DDSegmentation */
} /* namespace dd4hep */

DECLARE_SEGMENTATION(HexGrid, create_segmentation<dd4hep::DDSegmentation::HexGrid>)

0 comments on commit ef0e4c6

Please sign in to comment.