ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::PrepRawData Class Referenceabstract

#include <PrepRawData.h>

Inheritance diagram for Trk::PrepRawData:
Collaboration diagram for Trk::PrepRawData:

Public Member Functions

 PrepRawData ()
 public because of DataPool
 PrepRawData (const PrepRawData &)=default
 PrepRawData (PrepRawData &&) noexcept=default
PrepRawDataoperator= (const PrepRawData &)=default
PrepRawDataoperator= (PrepRawData &&) noexcept=default
virtual ~PrepRawData ()=default
 PrepRawData (const Identifier &clusId, const Amg::Vector2D &locpos, const std::vector< Identifier > &rdoList, const Amg::MatrixX &locerr)
 Full Constructor using lvalue references.
 PrepRawData (const Identifier &clusId, const Amg::Vector2D &locpos, std::vector< Identifier > &&rdoList, Amg::MatrixX &&locerr)
 Full Constructor with r-value references.
 PrepRawData (const Identifier &clusId, const Amg::Vector2D &locpos, const Amg::MatrixX &locerr)
 Constructor - same as above, but no need to pass a vector of Identifiers (i.e.
 PrepRawData (const Identifier &clusId, const Amg::Vector2D &locpos, Amg::MatrixX &&locerr)
Identifier identify () const
 return the identifier
const Amg::Vector2DlocalPosition () const
 return the local position reference
const std::vector< Identifier > & rdoList () const
 return the List of rdo identifiers (pointers)
const Amg::MatrixXlocalCovariance () const
 return const ref to the error matrix
bool hasLocalCovariance () const
 returns localCovariance().size()!=0
virtual const TrkDetElementBasedetectorElement () const =0
 return the detector element corresponding to this PRD The pointer will be zero if the det el is not defined (i.e.
virtual bool type (PrepRawDataType type) const
 Interface method checking the type.
virtual PrepRawDataType prdType () const =0
 Interface method returning the prdType.
virtual MsgStream & dump (MsgStream &stream) const
 dump information about the PRD object.
virtual std::ostream & dump (std::ostream &stream) const
 dump information about the PRD object.
void setHashAndIndex (unsigned short collHash, unsigned short objIndex)
 TEMP for testing: might make some classes friends later ...
const IdentContIndexgetHashAndIndex () const

Static Public Member Functions

static std::size_t numberOfInstantiations ()

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations

Private Attributes

Identifier m_clusId { 0 }
 PrepRawData ID, not const because of DataPool.
Amg::Vector2D m_localPos {}
 see derived classes for definition of meaning of LocalPosition
std::vector< Identifierm_rdoList {}
 Stores the identifiers of the RDOs.
Amg::MatrixX m_localCovariance {}
 See derived classes for definition of ErrorMatrix.
IdentContIndex m_indexAndHash
 Stores its own position (index) in collection plus the hash id for the collection (needed for the EL to IDC)

Friends

class ::PrepRawDataCnv_p1
class Muon::RpcPrepDataContainerCnv_p1

Detailed Description

Definition at line 61 of file PrepRawData.h.

Constructor & Destructor Documentation

◆ PrepRawData() [1/7]

Trk::PrepRawData::PrepRawData ( )

public because of DataPool

Definition at line 68 of file PrepRawData.cxx.

69 : Trk::ObjectCounter<Trk::PrepRawData>()
70 , m_clusId(0)
71 , m_localPos()
72 , m_rdoList()
75{
76}
std::vector< Identifier > m_rdoList
Stores the identifiers of the RDOs.
Amg::Vector2D m_localPos
see derived classes for definition of meaning of LocalPosition
Amg::MatrixX m_localCovariance
See derived classes for definition of ErrorMatrix.
IdentContIndex m_indexAndHash
Stores its own position (index) in collection plus the hash id for the collection (needed for the EL ...
Identifier m_clusId
PrepRawData ID, not const because of DataPool.

◆ PrepRawData() [2/7]

Trk::PrepRawData::PrepRawData ( const PrepRawData & )
default

◆ PrepRawData() [3/7]

Trk::PrepRawData::PrepRawData ( PrepRawData && )
defaultnoexcept

◆ ~PrepRawData()

virtual Trk::PrepRawData::~PrepRawData ( )
virtualdefault

◆ PrepRawData() [4/7]

Trk::PrepRawData::PrepRawData ( const Identifier & clusId,
const Amg::Vector2D & locpos,
const std::vector< Identifier > & rdoList,
const Amg::MatrixX & locerr )

Full Constructor using lvalue references.

Parameters
clusIdIdentifier of the tube, strip etc which has produced this Trk::PrepRawData.
locposLocalPosition of the measurement (see Trk::LocalPosition for more discussion about what this means).
rdoListVector the Identifiers tubes, strips etc which produced this Trk::PrepRawData (cluster).
locerrErrors of the above measurement.

Definition at line 16 of file PrepRawData.cxx.

20 : Trk::ObjectCounter<Trk::PrepRawData>()
21 , m_clusId(clusId)
22 , m_localPos(locpos)
24 , m_localCovariance(locerr)
26{
27}
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)

◆ PrepRawData() [5/7]

Trk::PrepRawData::PrepRawData ( const Identifier & clusId,
const Amg::Vector2D & locpos,
std::vector< Identifier > && rdoList,
Amg::MatrixX && locerr )

Full Constructor with r-value references.

Definition at line 29 of file PrepRawData.cxx.

33 : Trk::ObjectCounter<Trk::PrepRawData>()
34 , m_clusId(clusId)
35 , m_localPos(locpos)
36 , m_rdoList(std::move(rdoList))
37 , m_localCovariance(std::move(locerr))
39{
40}

◆ PrepRawData() [6/7]

Trk::PrepRawData::PrepRawData ( const Identifier & clusId,
const Amg::Vector2D & locpos,
const Amg::MatrixX & locerr )

Constructor - same as above, but no need to pass a vector of Identifiers (i.e.

for DriftCircles)

Parameters
clusIdIdentifier of the tube, strip etc which has produced this Trk::PrepRawData.
locposLocalPosition of the measurement (see Trk::LocalPosition for more discussion about what this means).
locerrErrors of the above measurement. It is not required to pass this (e.g. for Trigger clients) in which case a null pointer is passed

Definition at line 43 of file PrepRawData.cxx.

46 : Trk::ObjectCounter<Trk::PrepRawData>()
47 , m_clusId(clusId)
48 , m_localPos(locpos)
49 , m_localCovariance(locerr)
51{
52 m_rdoList.push_back(clusId);
53}

◆ PrepRawData() [7/7]

Trk::PrepRawData::PrepRawData ( const Identifier & clusId,
const Amg::Vector2D & locpos,
Amg::MatrixX && locerr )

Definition at line 55 of file PrepRawData.cxx.

58 : Trk::ObjectCounter<Trk::PrepRawData>()
59 , m_clusId(clusId)
60 , m_localPos(locpos)
61 , m_localCovariance(std::move(locerr))
63{
64 m_rdoList.push_back(clusId);
65}

Member Function Documentation

◆ detectorElement()

virtual const TrkDetElementBase * Trk::PrepRawData::detectorElement ( ) const
pure virtual

return the detector element corresponding to this PRD The pointer will be zero if the det el is not defined (i.e.

it was not passed in by the ctor)

Implemented in CscPrepData, CscStripPrepData, HGTD_Cluster, InDet::SiCluster, InDet::TRT_DriftCircle, Muon::CscPrepData, Muon::CscStripPrepData, Muon::MdtPrepData, Muon::MMPrepData, Muon::RpcPrepData, Muon::sTgcPrepData, and Muon::TgcPrepData.

◆ dump() [1/2]

MsgStream & Trk::PrepRawData::dump ( MsgStream & stream) const
virtual

dump information about the PRD object.

Reimplemented in CscPrepData, CscStripPrepData, InDet::PixelCluster, InDet::SCT_Cluster, InDet::SiCluster, InDet::TRT_DriftCircle, Muon::CscPrepData, Muon::CscStripPrepData, Muon::MdtPrepData, Muon::MdtTwinPrepData, Muon::MMPrepData, Muon::MuonCluster, Muon::RpcCoinData, Muon::RpcPrepData, Muon::sTgcPrepData, and Muon::TgcPrepData.

Definition at line 79 of file PrepRawData.cxx.

80{
81 stream << "PrepRawData object" << endmsg;
82 stream << "Identifier = (" << this->identify().getString() << "), ";
83
84 stream << "Local Position = (";
85 stream << Amg::toString(this->localPosition()) << "), ";
86
87 stream << "Local Covariance = (";
88 if (this->m_localCovariance.size() != 0) {
89 stream << Amg::toString(this->localCovariance()) << "), ";
90 } else {
91 stream << "NULL!), ";
92 }
93
94 stream << "RDO List = [";
95 std::vector<Identifier>::const_iterator rdoIt = this->rdoList().begin();
96 std::vector<Identifier>::const_iterator rdoItEnd = this->rdoList().end();
97 for (; rdoIt != rdoItEnd; ++rdoIt) {
98 stream << rdoIt->getString() << ", ";
99 }
100 stream << "], ";
101
102 stream << "}" << endmsg;
103 return stream;
104}
#define endmsg
std::string getString() const
Provide a string form of the identifier - hexadecimal.
const Amg::Vector2D & localPosition() const
return the local position reference
Identifier identify() const
return the identifier
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.

◆ dump() [2/2]

std::ostream & Trk::PrepRawData::dump ( std::ostream & stream) const
virtual

dump information about the PRD object.

I would like to make this pure virtual, but I don't want to risk screwing up the muon classes for the moment

Reimplemented in CscPrepData, CscStripPrepData, InDet::PixelCluster, InDet::SCT_Cluster, InDet::SiCluster, InDet::TRT_DriftCircle, Muon::CscPrepData, Muon::CscStripPrepData, Muon::MdtPrepData, Muon::MdtTwinPrepData, Muon::MMPrepData, Muon::MuonCluster, Muon::RpcCoinData, Muon::RpcPrepData, Muon::sTgcPrepData, and Muon::TgcPrepData.

Definition at line 107 of file PrepRawData.cxx.

108{
109 stream << "PrepRawData object" << std::endl;
110 stream << "Identifier " << m_clusId << std::endl;
111 stream << "Local Position = (";
112
113 stream << Amg::toString(this->localPosition()) << "), ";
114 stream << "Local Covariance = (";
115 if (this->m_localCovariance.size() != 0) {
116 stream << Amg::toString(this->localCovariance()) << "), ";
117 } else {
118 stream << "NULL!), ";
119 }
120 stream << "Collection Hash: " << m_indexAndHash.collHash()
121 << "\tIndex in collection: " << m_indexAndHash.objIndex() << std::endl;
122 stream << "RDO List = [";
123 for (auto it : m_rdoList) {
124 stream << it << std::endl;
125 }
126 stream << "], ";
127 return stream;
128}

◆ getHashAndIndex()

const IdentContIndex & Trk::PrepRawData::getHashAndIndex ( ) const

◆ hasLocalCovariance()

bool Trk::PrepRawData::hasLocalCovariance ( ) const

returns localCovariance().size()!=0

◆ identify()

Identifier Trk::PrepRawData::identify ( ) const

return the identifier

◆ localCovariance()

const Amg::MatrixX & Trk::PrepRawData::localCovariance ( ) const

return const ref to the error matrix

◆ localPosition()

const Amg::Vector2D & Trk::PrepRawData::localPosition ( ) const

return the local position reference

◆ numberOfInstantiations()

std::size_t Trk::ObjectCounter< Trk::PrepRawData >::numberOfInstantiations ( )
inlinestaticinherited

Definition at line 25 of file TrkObjectCounter.h.

26 {
27#ifndef NDEBUG
28 return s_numberOfInstantiations.load();
29#endif
30 return 0;
31 }
Helper to enable counting number of instantiations in debug builds.

◆ operator=() [1/2]

PrepRawData & Trk::PrepRawData::operator= ( const PrepRawData & )
default

◆ operator=() [2/2]

PrepRawData & Trk::PrepRawData::operator= ( PrepRawData && )
defaultnoexcept

◆ prdType()

◆ rdoList()

const std::vector< Identifier > & Trk::PrepRawData::rdoList ( ) const

return the List of rdo identifiers (pointers)

◆ setHashAndIndex()

void Trk::PrepRawData::setHashAndIndex ( unsigned short collHash,
unsigned short objIndex )

TEMP for testing: might make some classes friends later ...

◆ type()

virtual bool Trk::PrepRawData::type ( PrepRawDataType type) const
inlinevirtual

Interface method checking the type.

Reimplemented in InDet::PixelCluster, and InDet::SCT_Cluster.

Definition at line 133 of file PrepRawData.h.

133 {
134 return prdType() == type;
135 }
virtual bool type(PrepRawDataType type) const
Interface method checking the type.
virtual PrepRawDataType prdType() const =0
Interface method returning the prdType.

◆ ::PrepRawDataCnv_p1

friend class ::PrepRawDataCnv_p1
friend

Definition at line 152 of file PrepRawData.h.

◆ Muon::RpcPrepDataContainerCnv_p1

friend class Muon::RpcPrepDataContainerCnv_p1
friend

Definition at line 153 of file PrepRawData.h.

Member Data Documentation

◆ m_clusId

Identifier Trk::PrepRawData::m_clusId { 0 }
private

PrepRawData ID, not const because of DataPool.

Definition at line 156 of file PrepRawData.h.

156{ 0 };

◆ m_indexAndHash

IdentContIndex Trk::PrepRawData::m_indexAndHash
private

Stores its own position (index) in collection plus the hash id for the collection (needed for the EL to IDC)

Definition at line 167 of file PrepRawData.h.

◆ m_localCovariance

Amg::MatrixX Trk::PrepRawData::m_localCovariance {}
private

See derived classes for definition of ErrorMatrix.

Definition at line 163 of file PrepRawData.h.

163{};

◆ m_localPos

Amg::Vector2D Trk::PrepRawData::m_localPos {}
private

see derived classes for definition of meaning of LocalPosition

Definition at line 159 of file PrepRawData.h.

159{};

◆ m_rdoList

std::vector<Identifier> Trk::PrepRawData::m_rdoList {}
private

Stores the identifiers of the RDOs.

Definition at line 161 of file PrepRawData.h.

161{};

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< Trk::PrepRawData >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.


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