Skip to content
Snippets Groups Projects
Commit b55287b1 authored by Markus Frank's avatar Markus Frank
Browse files

Add more segmentation handle implementations

parent e9aa54dd
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define DD4HEP_DDCORE_CARTESIANGRIDXY_H 1 #define DD4HEP_DDCORE_CARTESIANGRIDXY_H 1
// Framework include files // Framework include files
#include "DD4hep/Segmentations.h" #include "DD4hep/Objects.h"
/// Namespace for the AIDA detector description toolkit /// Namespace for the AIDA detector description toolkit
namespace DD4hep { namespace DD4hep {
...@@ -26,6 +26,9 @@ namespace DD4hep { ...@@ -26,6 +26,9 @@ namespace DD4hep {
/// Namespace for the geometry part of the AIDA detector description toolkit /// Namespace for the geometry part of the AIDA detector description toolkit
namespace Geometry { namespace Geometry {
// Forward declarations
class Segmentation;
/// Implementation class for the grid XY segmentation. /// Implementation class for the grid XY segmentation.
/** /**
* \author M.Frank * \author M.Frank
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
//========================================================================== //==========================================================================
// Framework include files // Framework include files
#include "DD4hep/Handle.inl"
#include "DD4hep/Segmentations.h" #include "DD4hep/Segmentations.h"
#include "DD4hep/CartesianGridXY.h" #include "DD4hep/CartesianGridXY.h"
#include "DDSegmentation/CartesianGridXY.h" #include "DDSegmentation/CartesianGridXY.h"
...@@ -20,12 +19,8 @@ ...@@ -20,12 +19,8 @@
// C/C++ include files // C/C++ include files
using namespace std; using namespace std;
using namespace DD4hep;
using namespace DD4hep::Geometry; using namespace DD4hep::Geometry;
/// Instantiate handle functions
DD4HEP_INSTANTIATE_HANDLE_UNNAMED(CartesianGridXY::Object);
/// Copy Constructor from segmentation base object /// Copy Constructor from segmentation base object
CartesianGridXY::CartesianGridXY(const Segmentation& e) : Handle<Object>() CartesianGridXY::CartesianGridXY(const Segmentation& e) : Handle<Object>()
{ {
...@@ -38,9 +33,9 @@ Position CartesianGridXY::position(const CellID& id) const { ...@@ -38,9 +33,9 @@ Position CartesianGridXY::position(const CellID& id) const {
} }
/// determine the cell ID based on the position /// determine the cell ID based on the position
CellID CartesianGridXY::cellID(const Position& local, DD4hep::CellID CartesianGridXY::cellID(const Position& local,
const Position& global, const Position& global,
const VolumeID& volID) const const VolumeID& volID) const
{ {
return access()->cellID(local, global, volID); return access()->cellID(local, global, volID);
} }
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
// Framework include files // Framework include files
#include "DD4hep/Segmentations.h" #include "DD4hep/Segmentations.h"
#include "DD4hep/InstanceCount.h" #include "DD4hep/InstanceCount.h"
#include "DD4hep/Handle.inl"
#include "DD4hep/Printout.h" #include "DD4hep/Printout.h"
#include "DD4hep/Handle.inl"
// C/C++ include files // C/C++ include files
#include <iostream> #include <iostream>
...@@ -172,6 +172,7 @@ namespace DD4hep { ...@@ -172,6 +172,7 @@ namespace DD4hep {
} /* End namespace DD4hep */ } /* End namespace DD4hep */
#define IMPLEMENT_SEGMENTATION_HANDLE(X) \ #define IMPLEMENT_SEGMENTATION_HANDLE(X) \
DD4HEP_INSTANTIATE_HANDLE_UNNAMED(DDSegmentation::X); \
namespace DD4hep { namespace Geometry { \ namespace DD4hep { namespace Geometry { \
template DDSegmentation::X* \ template DDSegmentation::X* \
Segmentation::get<DDSegmentation::X>(const Object* obj); }} Segmentation::get<DDSegmentation::X>(const Object* obj); }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment