#include <AlignableDetOrUnitPtr.h>
Public Member Functions | |
Alignable * | alignable () |
const Alignable * | alignable () const |
AlignableBeamSpot * | alignableBeamSpot () |
const AlignableBeamSpot * | alignableBeamSpot () const |
AlignableDet * | alignableDet () |
const AlignableDet * | alignableDet () const |
AlignableDetOrUnitPtr (AlignableDet *aliDet) | |
Constructor from AlignableDet* (non-explicit: for automatic conversions) | |
AlignableDetOrUnitPtr (AlignableBeamSpot *aliBeamSpot) | |
Constructor from AlignableBeamSpot* (non-explicit: for automatic conversions) | |
AlignableDetOrUnitPtr (AlignableDetUnit *aliDetUnit) | |
Constructor from AlignableDetUnit* (non-explicit: for automatic conversions) | |
AlignableDetUnit * | alignableDetUnit () |
const AlignableDetUnit * | alignableDetUnit () const |
const AlignmentPositionError * | alignmentPositionError () const |
alignment position error (see comments in specific classes) | |
bool | isNull () const |
check for empty pointer | |
operator Alignable * () | |
operator const Alignable * () const | |
const Alignable * | operator-> () const |
Alignable * | operator-> () |
AlignableDetOrUnitPtr & | operator= (AlignableDet *aliDet) |
AlignableDetOrUnitPtr & | operator= (AlignableBeamSpot *aliBeamSpot) |
AlignableDetOrUnitPtr & | operator= (AlignableDetUnit *aliDetUnit) |
~AlignableDetOrUnitPtr () | |
Non-virtual destructor: do not use as base class. | |
Private Attributes | |
AlignableBeamSpot * | theAliBeamSpot |
Pointer to Alignable if it is the beam spot. | |
AlignableDet * | theAliDet |
Pointer to Alignable if it is a Det. | |
AlignableDetUnit * | theAliDetUnit |
Pointer to Alignable if it is a DetUnit. |
Class to hold either a pointer to an AlignableDet or to an AlignableDetUnit. As such it is like a pointer to an Alignable of that hierarchy level on which hits can exists. Therefore it should be used whenever it should be ensured by C++ type safety that a lowest level Alignable* is dealt with.
Conversion and '->' operators exist to use this class as a pointer to the base class Alignable. On the other hand, the accessors alignableDet() and alignableDetUnit() can be used to check which concrete type it is.
Since this class is very light weighted, it can be used by value.
Original author: Gero Flucke, April 2007
(last update by
)
Definition at line 30 of file AlignableDetOrUnitPtr.h.
AlignableDetOrUnitPtr::AlignableDetOrUnitPtr | ( | AlignableBeamSpot * | aliBeamSpot | ) | [inline] |
Constructor from AlignableBeamSpot* (non-explicit: for automatic conversions)
Definition at line 35 of file AlignableDetOrUnitPtr.h.
: theAliBeamSpot(aliBeamSpot), theAliDet(0), theAliDetUnit(0) {}
AlignableDetOrUnitPtr::AlignableDetOrUnitPtr | ( | AlignableDet * | aliDet | ) | [inline] |
Constructor from AlignableDet* (non-explicit: for automatic conversions)
Definition at line 39 of file AlignableDetOrUnitPtr.h.
: theAliBeamSpot(0), theAliDet(aliDet), theAliDetUnit(0) {}
AlignableDetOrUnitPtr::AlignableDetOrUnitPtr | ( | AlignableDetUnit * | aliDetUnit | ) | [inline] |
Constructor from AlignableDetUnit* (non-explicit: for automatic conversions)
Definition at line 43 of file AlignableDetOrUnitPtr.h.
: theAliBeamSpot(0), theAliDet(0), theAliDetUnit(aliDetUnit) {}
AlignableDetOrUnitPtr::~AlignableDetOrUnitPtr | ( | ) | [inline] |
Non-virtual destructor: do not use as base class.
Definition at line 46 of file AlignableDetOrUnitPtr.h.
{}
Alignable* AlignableDetOrUnitPtr::alignable | ( | ) | [inline] |
Definition at line 62 of file AlignableDetOrUnitPtr.h.
References operator Alignable *().
Referenced by CSCAlignmentCorrections::applyAlignment(), and CSCChamberFitter::radiusCorrection().
{ return this->operator Alignable*();}
const Alignable* AlignableDetOrUnitPtr::alignable | ( | ) | const [inline] |
Definition at line 63 of file AlignableDetOrUnitPtr.h.
References operator const Alignable *().
{ return this->operator const Alignable*();}
AlignableBeamSpot* AlignableDetOrUnitPtr::alignableBeamSpot | ( | ) | [inline] |
Definition at line 66 of file AlignableDetOrUnitPtr.h.
References theAliBeamSpot.
{ return theAliBeamSpot;}
const AlignableBeamSpot* AlignableDetOrUnitPtr::alignableBeamSpot | ( | ) | const [inline] |
Definition at line 67 of file AlignableDetOrUnitPtr.h.
References theAliBeamSpot.
{ return theAliBeamSpot;}
AlignableDet* AlignableDetOrUnitPtr::alignableDet | ( | ) | [inline] |
const AlignableDet* AlignableDetOrUnitPtr::alignableDet | ( | ) | const [inline] |
const AlignableDetUnit* AlignableDetOrUnitPtr::alignableDetUnit | ( | ) | const [inline] |
Definition at line 71 of file AlignableDetOrUnitPtr.h.
References theAliDetUnit.
{ return theAliDetUnit;}
AlignableDetUnit* AlignableDetOrUnitPtr::alignableDetUnit | ( | ) | [inline] |
Definition at line 70 of file AlignableDetOrUnitPtr.h.
References theAliDetUnit.
{ return theAliDetUnit;}
const AlignmentPositionError * AlignableDetOrUnitPtr::alignmentPositionError | ( | ) | const |
alignment position error (see comments in specific classes)
Definition at line 36 of file AlignableDetOrUnitPtr.cc.
References AlignableDet::alignmentPositionError(), AlignableBeamSpot::alignmentPositionError(), AlignableDetUnit::alignmentPositionError(), theAliBeamSpot, theAliDet, and theAliDetUnit.
{ if (theAliBeamSpot) return theAliBeamSpot->alignmentPositionError(); else if (theAliDet) return theAliDet->alignmentPositionError(); else if (theAliDetUnit) return theAliDetUnit->alignmentPositionError(); else return 0; }
bool AlignableDetOrUnitPtr::isNull | ( | ) | const [inline] |
check for empty pointer
Definition at line 74 of file AlignableDetOrUnitPtr.h.
References theAliBeamSpot, theAliDet, and theAliDetUnit.
Referenced by CurrentAlignmentKFUpdator::includeCurrentAlignmentEstimate().
{ return (!theAliBeamSpot && !theAliDet && !theAliDetUnit);}
AlignableDetOrUnitPtr::operator Alignable * | ( | ) |
Definition at line 20 of file AlignableDetOrUnitPtr.cc.
References theAliBeamSpot, theAliDet, and theAliDetUnit.
Referenced by alignable(), and operator->().
{ if (theAliBeamSpot) return theAliBeamSpot; else if (theAliDet) return theAliDet; else return theAliDetUnit; }
AlignableDetOrUnitPtr::operator const Alignable * | ( | ) | const |
Definition at line 28 of file AlignableDetOrUnitPtr.cc.
References theAliBeamSpot, theAliDet, and theAliDetUnit.
Referenced by alignable(), and operator->().
{ if (theAliBeamSpot) return theAliBeamSpot; else if (theAliDet) return theAliDet; else return theAliDetUnit; }
Alignable* AlignableDetOrUnitPtr::operator-> | ( | ) | [inline] |
Definition at line 59 of file AlignableDetOrUnitPtr.h.
References operator Alignable *().
{ return this->operator Alignable*();}
const Alignable* AlignableDetOrUnitPtr::operator-> | ( | ) | const [inline] |
Definition at line 60 of file AlignableDetOrUnitPtr.h.
References operator const Alignable *().
{ return this->operator const Alignable*();}
AlignableDetOrUnitPtr& AlignableDetOrUnitPtr::operator= | ( | AlignableDetUnit * | aliDetUnit | ) | [inline] |
Definition at line 52 of file AlignableDetOrUnitPtr.h.
References theAliBeamSpot, theAliDet, and theAliDetUnit.
{ theAliBeamSpot = 0; theAliDet = 0; theAliDetUnit = aliDetUnit; return *this;}
AlignableDetOrUnitPtr& AlignableDetOrUnitPtr::operator= | ( | AlignableBeamSpot * | aliBeamSpot | ) | [inline] |
Definition at line 48 of file AlignableDetOrUnitPtr.h.
References theAliBeamSpot, theAliDet, and theAliDetUnit.
{ theAliBeamSpot = aliBeamSpot; theAliDet = 0; theAliDetUnit = 0; return *this;}
AlignableDetOrUnitPtr& AlignableDetOrUnitPtr::operator= | ( | AlignableDet * | aliDet | ) | [inline] |
Definition at line 50 of file AlignableDetOrUnitPtr.h.
References theAliBeamSpot, theAliDet, and theAliDetUnit.
{ theAliBeamSpot = 0; theAliDet = aliDet; theAliDetUnit = 0; return *this;}
Pointer to Alignable if it is the beam spot.
Definition at line 82 of file AlignableDetOrUnitPtr.h.
Referenced by alignableBeamSpot(), alignmentPositionError(), isNull(), operator Alignable *(), operator const Alignable *(), and operator=().
AlignableDet* AlignableDetOrUnitPtr::theAliDet [private] |
Pointer to Alignable if it is a Det.
Definition at line 83 of file AlignableDetOrUnitPtr.h.
Referenced by alignableDet(), alignmentPositionError(), isNull(), operator Alignable *(), operator const Alignable *(), and operator=().
Pointer to Alignable if it is a DetUnit.
Definition at line 84 of file AlignableDetOrUnitPtr.h.
Referenced by alignableDetUnit(), alignmentPositionError(), isNull(), operator Alignable *(), operator const Alignable *(), and operator=().