Public Member Functions | Static Public Member Functions | List of all members
lar_content::LArObjectHelper::TypeAdaptor Class Reference

TypeAdaptor. More...

#include <LArObjectHelper.h>

Public Member Functions

template<>
CartesianVector GetPosition (const CartesianVector &t)
 
template<>
CartesianVector GetPosition (const CaloHit *const &pT)
 
template<>
const CaloHit * GetCaloHit (const CartesianVector &)
 
template<>
const CaloHit * GetCaloHit (const CaloHit *const &pCaloHit3D)
 

Static Public Member Functions

template<typename T >
static pandora::CartesianVector GetPosition (const T &t)
 Get the associated position. More...
 
template<typename T >
static const pandora::CaloHit * GetCaloHit (const T &t)
 Get the associated calo hit, or nullptr if none. More...
 

Detailed Description

TypeAdaptor.

Definition at line 25 of file LArObjectHelper.h.

Member Function Documentation

template<>
const CaloHit* lar_content::LArObjectHelper::TypeAdaptor::GetCaloHit ( const CartesianVector &  )

Definition at line 31 of file LArObjectHelper.cc.

32 {
33  return nullptr;
34 }
template<>
const CaloHit* lar_content::LArObjectHelper::TypeAdaptor::GetCaloHit ( const CaloHit *const &  pCaloHit3D)

Definition at line 37 of file LArObjectHelper.cc.

38 {
39  const CaloHit *const pCaloHit2D = static_cast<const CaloHit *>(pCaloHit3D->GetParentAddress());
40  return pCaloHit2D;
41 }
template<typename T >
static const pandora::CaloHit* lar_content::LArObjectHelper::TypeAdaptor::GetCaloHit ( const T &  t)
static

Get the associated calo hit, or nullptr if none.

Parameters
tthe input object
Returns
the associated calo hit, or nullptr if none
template<>
CartesianVector lar_content::LArObjectHelper::TypeAdaptor::GetPosition ( const CartesianVector &  t)

Definition at line 17 of file LArObjectHelper.cc.

18 {
19  return t;
20 }
template<>
CartesianVector lar_content::LArObjectHelper::TypeAdaptor::GetPosition ( const CaloHit *const &  pT)

Definition at line 23 of file LArObjectHelper.cc.

24 {
25  return pT->GetPositionVector();
26 }
template<typename T >
static pandora::CartesianVector lar_content::LArObjectHelper::TypeAdaptor::GetPosition ( const T &  t)
static

Get the associated position.

Parameters
tthe input object
Returns
the associated position

The documentation for this class was generated from the following files: