Commit 2346b543 authored by Niels Van Eldik's avatar Niels Van Eldik Committed by Graeme Stewart
Browse files

remove constructors taking pointers (TrkRIO_OnTrack-09-00-01)

parent 961fe65a
<?xml version="1.0"?>
<author>Edward Moyse</author>
<toc>Guide to the Qt Translation Tools</toc>
<toc>Qt Assistant Manual</toc>
<toc>Qt Designer Manual</toc>
<toc>Qt Reference Documentation</toc>
<toc>qmake User Guide</toc>
<toc>KDE Libraries (Doxygen)</toc>
<type ext="ui" />
<type ext="cpp" />
<type ext="h" />
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
// RIO_OnTrack.h, (c) ATLAS Detector software
// Amg
#include "EventPrimitives/EventPrimitives.h"
#include "GeoPrimitives/GeoPrimitives.h"
// Trk
#include "TrkMeasurementBase/MeasurementBase.h"
#include "TrkEventPrimitives/LocalParameters.h"
// Identifier
#include "Identifier/Identifier.h"
#include "Identifier/IdentifierHash.h"
#include <ostream>
class MsgStream;
namespace Trk {
class PrepRawData;
class TrkDetElementBase;
class ITrkEventCnvTool;
/** @class RIO_OnTrack
Class to handle RIO On Tracks ROT) for InDet and Muons,
it inherits from the common MeasurementBase.
The Track holds a vector of TrackStateOnSurface
that carry the MeasurmentBase class pointers.
Need a multimap{RIO, ROT} to go from RIO to ROT
and a map{ROT, Track} to go from ROT to Track
class RIO_OnTrack : public MeasurementBase {
friend class ITrkEventCnvTool;
/** Default Constructor for POOL */
/** Copy Constructor */
RIO_OnTrack(const RIO_OnTrack& rot);
/** Assignment operator */
RIO_OnTrack& operator=(const RIO_OnTrack& rot);
/** Constructor with parameters and without externalPrediction: LocalParameters,
LocalAmg::MatrixX, id&
This class owns the LocalParameters and the error matrix */
RIO_OnTrack( const LocalParameters& locpars,
const Amg::MatrixX& loccov,
const Identifier& id);
/** Destructor */
virtual ~RIO_OnTrack();
/** Pseudo-constructor, needed to avoid excessive RTTI*/
virtual RIO_OnTrack* clone() const = 0;
/** returns the surface for the local to global transformation
- interface from MeasurementBase */
virtual const Surface& associatedSurface() const = 0;
/**Interface method to get the global Position
- interface from MeasurementBase */
virtual const Amg::Vector3D& globalPosition() const = 0;
/**returns the some information about this RIO_OnTrack. */
virtual MsgStream& dump( MsgStream& out ) const;
/**returns the some information about this RIO_OnTrack. */
virtual std::ostream& dump( std::ostream& out ) const;
/** returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
Can be null (in case where the Trk::PrepRawData is not persistified).
Use Detector Element if possible (this is always there).
- extends MeasurementBase */
virtual const Trk::PrepRawData* prepRawData() const = 0;
/** returns the DE hashID
- extends MeasurementBase */
virtual IdentifierHash idDE() const = 0;
/** returns the detector element, assoicated with the PRD of this class
- extends MeasurementBase */
virtual const TrkDetElementBase* detectorElement() const = 0;
/** return the identifier
-extends MeasurementBase */
virtual Identifier identify() const;
/**return number of parameters currently created*/
static unsigned int numberOfInstantiations() ;
/** ONLY for use in custom convertor
Allows the custom convertor to reset values when persistying/reading back RoTs*/
virtual void setValues(
const Trk::TrkDetElementBase* detEl,
const Trk::PrepRawData* prd)=0;
/**Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)*/
Identifier m_identifier;
/** number of objects of this type in memory */
static unsigned int s_numberOfInstantiations;
inline Identifier RIO_OnTrack::identify() const
{ return m_identifier; }
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
// RIO_OnTrackMap.h, (c) ATLAS Detector software
#include "CLIDSvc/CLASS_DEF.h"
#include <map>
namespace Trk{
class PrepRawData;
class RIO_OnTrack;
typedef std::multimap<Trk::PrepRawData*, RIO_OnTrack*> RIOtoROT_Multimap;
CLASS_DEF( Trk::RIOtoROT_Multimap , 160822029 , 1 )
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#include "TrkRIO_OnTrack/RIO_OnTrack.h"
#include "TrkRIO_OnTrack/RIO_OnTrackMap.h"
<class name="Trk::RIO_OnTrack" >
<field name="m_identifier" transient="false" />
<field name="s_numberOfInstantiations" transient="true" />
package TrkRIO_OnTrack
author Edward Moyse < >
use AtlasPolicy AtlasPolicy-*
use CLIDSvc CLIDSvc-* Control
use EventPrimitives EventPrimitives-* Event
use GeoPrimitives GeoPrimitives-* DetectorDescription
use Identifier Identifier-* DetectorDescription
use TrkEventPrimitives TrkEventPrimitives-* Tracking/TrkEvent
use TrkMeasurementBase TrkMeasurementBase-* Tracking/TrkEvent
apply_pattern installed_library
library TrkRIO_OnTrack *.cxx
use TrkPrepRawData TrkPrepRawData-* Tracking/TrkEvent
use GaudiInterface GaudiInterface-* External
use AtlasReflex AtlasReflex-* External
# Pattern to build the dict lib. User should create a single header
# file: <package>Dict.h which includes all other .h files. See MissingETDict
# A selection file must be created by hand. This file lists the
# classes to be added to the dictionary, and which fields are
# transient. It should be put in ../<package> dir and is conventionally called
# selection.xml.
# apply_pattern lcgdict dict=TrkRIO_OnTrack selectionfile=selection.xml headerfiles="../TrkRIO_OnTrack/TrkRIO_OnTrackDict.h"
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
@mainpage The RIO_OnTrack class
@section introductionTrkRIO_OnTrack Introduction
Other conceptual names for this class is HitOnTrack or ClusterOnTrack. It contains the modified location of the RIOs according to a track. There are no container of RIO_OnTrack objects since the Track is essentially the container. The RIO_OnTrack contains the RIO from which it comes from. For most use cases there will be a single RIO associated with a RIO_OnTrack, while several RIO_OnTrack for each RIO (since there can be different tracks that make use of the same RIOs). However some users (like xKalman) might join clusters together so for this case a vector of RIOs is provided.
For the navigation, a multimap is recorded between RIO and RIO_OnTrack. In the TrkTrack package there is a map between RIO_OnTrack and Track. In summary the navigation is as followed:
- from Track to RIO_OnTrack: Track class
- from RIO_OnTrack to RIO: RIO_OnTrack class
- from RIO to RIO_OnTrack: multimap
- from RIO_OnTrack to Track: map
- from RIO to Track: use the multimap then the map
- from Track to RIO: Track class to get to RIO_OnTrack, then RIO_OnTrack class to get to RIO
All of these items are under active discussion.
Please let me know of any errors, or if anything is unclear.
@section used_packagesTrkRIO_OnTrack Used Packages
@htmlinclude used_packages.html
@section requirements Requirements
@include requirements
@namespace Trk
A namespace to enclose the Tracking classes.
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
// RIO_OnTrack.cxx, (c) ATLAS Detector software
#include "TrkRIO_OnTrack/RIO_OnTrack.h"
#include "TrkEventPrimitives/LocalParameters.h"
#include "TrkPrepRawData/PrepRawData.h"
// Gaudi & AthenaCommon
#include "Identifier/Identifier.h"
#include "GaudiKernel/MsgStream.h"
#include <string>
#include <typeinfo>
unsigned int Trk::RIO_OnTrack::s_numberOfInstantiations=0;
// Constructor with parameters:
Trk::RIO_OnTrack::RIO_OnTrack( const Trk::LocalParameters& locpars,
const Amg::MatrixX& loccov,
const Identifier& id)
: MeasurementBase(locpars,loccov),
#ifndef NDEBUG
s_numberOfInstantiations++; // new RIO_OnTrack, so increment total count
// Destructor:
#ifndef NDEBUG
s_numberOfInstantiations--; // delete RIO_OnTrack, so decrement total count
// default constructor:
Trk::RIO_OnTrack::RIO_OnTrack() :
#ifndef NDEBUG
s_numberOfInstantiations++; // new RIO_OnTrack, so increment total count
// copy constructor:
Trk::RIO_OnTrack::RIO_OnTrack( const Trk::RIO_OnTrack& rot) :
m_identifier( rot.m_identifier )
#ifndef NDEBUG
s_numberOfInstantiations++; // new RIO_OnTrack, so increment total count
// assignment operator:
Trk::RIO_OnTrack& Trk::RIO_OnTrack::operator=(const RIO_OnTrack& rot)
if ( &rot != this) {
m_identifier = rot.m_identifier;
return *this;
MsgStream& Trk::RIO_OnTrack::dump( MsgStream& sl ) const
sl << "Trk::RIO_OnTrack { "<< endreq;
sl << "\t identifier = "<< identify() << endreq;
sl << "\t position = ("
<< localParameters()
<< endreq;
sl << "\t has Error Matrix: "<< endreq;
sl<< localCovariance() <<"}"<< endreq;
if (prepRawData()!=0) {
sl<<"PrepRawData: "<< (*prepRawData()) << endreq;
sl<<"PrepRawData: NULL"<<endreq;
return sl;
std::ostream& Trk::RIO_OnTrack::dump( std::ostream& sl ) const
sl << "Trk::RIO_OnTrack { "<<std::endl;
sl << "\t identifier = "<< identify() << std::endl;
sl << "\t position = ("
<< localParameters()
<< std::endl;
sl << "\t has Error Matrix: " << std::endl;
sl << localCovariance() <<" }" << std::endl;
if (prepRawData()!=0) {
sl <<"PrepRawData: "<< (*prepRawData()) << std::endl;
sl<<"PrepRawData: NULL" << std::endl;
return sl;
unsigned int Trk::RIO_OnTrack::numberOfInstantiations()
return s_numberOfInstantiations;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment