5#ifndef TRKEVENTPRIMITIVES_SURFACEHOLDER_H
6#define TRKEVENTPRIMITIVES_SURFACEHOLDER_H
78 other.m_associatedSurface =
nullptr;
99 other.m_associatedSurface =
nullptr;
126 return (input && input->isFree() ? input->clone() : input);
165 other.m_associatedSurface =
nullptr;
171 if (
this != &other) {
186 other.m_associatedSurface =
nullptr;
215 return (input && input->associatedDetectorElement() ==
nullptr
265 if (
this != &other) {
267 (other.m_associatedSurface && other.m_associatedSurface->isFree())
268 ? other.m_associatedSurface->clone()
269 : other.m_associatedSurface.get());
Handle conditional ownership of surfaces.
SurfacePtrHolderImplDetEl(const S &s)
ctor from const Surface ref.
SurfacePtrHolderImplDetEl()=default
default ctor
SurfacePtrHolderImplDetEl & operator=(const SurfacePtrHolderImplDetEl &other)
copy assingmemnt if surface is free we clone/copy.
void destroySurface() noexcept
destroySurface deletes the ptr if not null and the surface has not a associatedDetectorElement Useful...
static const Surface * cloneHelper(const Surface *input)
const S * release() noexcept
release ala unique_ptr release
~SurfacePtrHolderImplDetEl()
SurfacePtrHolderImplDetEl & operator=(SurfacePtrHolderImplDetEl &&other) noexcept
Move assignement we just steal the resource and leave other to point to nullptr.
const Surface * m_associatedSurface
const S * surfacePtr()
return the ptr we hold useful for tests
SurfacePtrHolderImplDetEl(const SurfacePtrHolderImplDetEl &other)
copy ctor
SurfacePtrHolderImplDetEl(SurfacePtrHolderImplDetEl &&other) noexcept
Move constructor we just steal the resource and leave other to point to nullptr.
SurfacePtrHolderImplDetEl(const S *s)
ctor from const Surface ptr. Takes ownership
void destroySurface() noexcept
destroySurface deletes the ptr if not null and the surface isFree Usefull also for testing
const ConeSurface * m_associatedSurface
SurfacePtrHolderImpl(const SurfacePtrHolderImpl &other)
copy ctor
SurfacePtrHolderImpl(const S &s)
ctor from const Surface ref.
SurfacePtrHolderImpl & operator=(const SurfacePtrHolderImpl &other)
copy assingmemnt if surface is free we clone/copy.
SurfacePtrHolderImpl(SurfacePtrHolderImpl &&other) noexcept
Move constructor we just steal the resource and leave other to point to nullptr.
const S * surfacePtr()
return the ptr we hold useful for tests
SurfacePtrHolderImpl & operator=(SurfacePtrHolderImpl &&other) noexcept
Move assignement we just steal the resource and leave other to point to nullptr.
SurfacePtrHolderImpl(const S *s)
ctor from const Surface ptr. Takes ownership
SurfacePtrHolderImpl()=default
default ctor
const S * release() noexcept
release ala unique_ptr release
static const ConeSurface * cloneHelper(const ConeSurface *input)
void destroySurface() noexcept
destroySurface deletes the ptr if not null and is free usefull also for testing
SurfaceUniqHolderImpl(const S *s)
ctor from const Surface ptr. Takes ownership
~SurfaceUniqHolderImpl()=default
SurfaceUniqHolderImpl(const SurfaceUniqHolderImpl &other)
copy ctor, if surface is free we clone/copy.
SurfaceUniqHolderImpl & operator=(SurfaceUniqHolderImpl &&) noexcept=default
default move assignement
SurfaceUniquePtrT< const ConeSurface > m_associatedSurface
SurfaceUniqHolderImpl(SurfaceUniqHolderImpl &&) noexcept=default
default move ctor
const ConeSurface * surfacePtr()
const S * release() noexcept
release , release the unique_ptr we hold
SurfaceUniqHolderImpl()=default
default ctor
SurfaceUniqHolderImpl(const S &s)
ctor from const Surface ref.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Ensure that the ATLAS eigen extensions are properly loaded.
std::unique_ptr< S, SurfaceDeleter< S > > SurfaceUniquePtrT