ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
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 More...
 
 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. More...
 
 PrepRawData (const Identifier &clusId, const Amg::Vector2D &locpos, std::vector< Identifier > &&rdoList, Amg::MatrixX &&locerr)
 Full Constructor with r-value references. More...
 
 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. More...
 
 PrepRawData (const Identifier &clusId, const Amg::Vector2D &locpos, Amg::MatrixX &&locerr)
 
Identifier identify () const
 return the identifier More...
 
const Amg::Vector2DlocalPosition () const
 return the local position reference More...
 
const std::vector< Identifier > & rdoList () const
 return the List of rdo identifiers (pointers) More...
 
const Amg::MatrixXlocalCovariance () const
 return const ref to the error matrix More...
 
bool hasLocalCovariance () const
 returns localCovariance().size()!=0 More...
 
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. More...
 
virtual bool type (PrepRawDataType type) const =0
 Interface method checking the type. More...
 
virtual MsgStream & dump (MsgStream &stream) const
 dump information about the PRD object. More...
 
virtual std::ostream & dump (std::ostream &stream) const
 dump information about the PRD object. More...
 
void setHashAndIndex (unsigned short collHash, unsigned short objIndex)
 TEMP for testing: might make some classes friends later ... More...
 
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. More...
 
Amg::Vector2D m_localPos {}
 see derived classes for definition of meaning of LocalPosition More...
 
std::vector< Identifierm_rdoList {}
 Stores the identifiers of the RDOs. More...
 
Amg::MatrixX m_localCovariance {}
 See derived classes for definition of ErrorMatrix. More...
 
IdentContIndex m_indexAndHash
 Stores its own position (index) in collection plus the hash id for the collection (needed for the EL to IDC) More...
 

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.

70  , m_clusId(0)
71  , m_localPos()
72  , m_rdoList()
74  , m_indexAndHash()
75 {
76 }

◆ 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.

21  , m_clusId(clusId)
22  , m_localPos(locpos)
24  , m_localCovariance(locerr)
25  , m_indexAndHash()
26 {
27 }

◆ 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.

34  , m_clusId(clusId)
35  , m_localPos(locpos)
36  , m_rdoList(std::move(rdoList))
37  , m_localCovariance(std::move(locerr))
38  , m_indexAndHash()
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.

47  , m_clusId(clusId)
48  , m_localPos(locpos)
49  , m_localCovariance(locerr)
50  , m_indexAndHash()
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.

59  , m_clusId(clusId)
60  , m_localPos(locpos)
61  , m_localCovariance(std::move(locerr))
62  , m_indexAndHash()
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 Muon::MuonCluster, Muon::RpcPrepData, InDet::SiCluster, Muon::CscPrepData, Muon::MMPrepData, InDet::TRT_DriftCircle, Muon::CscStripPrepData, Muon::TgcPrepData, Muon::sTgcPrepData, Muon::MdtPrepData, and HGTD_Cluster.

◆ dump() [1/2]

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

dump information about the PRD object.

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

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 }

◆ 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 InDet::PixelCluster, Muon::MMPrepData, Muon::CscPrepData, InDet::TRT_DriftCircle, Muon::CscStripPrepData, Muon::TgcPrepData, Muon::sTgcPrepData, InDet::SCT_Cluster, Muon::RpcPrepData, InDet::SiCluster, Muon::MdtPrepData, Muon::MuonCluster, Muon::MdtTwinPrepData, and Muon::RpcCoinData.

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

◆ 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()

static 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  }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ 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
pure virtual

Friends And Related Function Documentation

◆ ::PrepRawDataCnv_p1

friend class ::PrepRawDataCnv_p1
friend

Definition at line 147 of file PrepRawData.h.

◆ Muon::RpcPrepDataContainerCnv_p1

friend class Muon::RpcPrepDataContainerCnv_p1
friend

Definition at line 148 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 151 of file PrepRawData.h.

◆ 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 162 of file PrepRawData.h.

◆ m_localCovariance

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

See derived classes for definition of ErrorMatrix.

Definition at line 158 of file PrepRawData.h.

◆ m_localPos

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

see derived classes for definition of meaning of LocalPosition

Definition at line 154 of file PrepRawData.h.

◆ m_rdoList

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

Stores the identifiers of the RDOs.

Definition at line 156 of file PrepRawData.h.

◆ 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:
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
skel.it
it
Definition: skel.GENtoEVGEN.py:423
Trk::PrepRawData::m_localCovariance
Amg::MatrixX m_localCovariance
See derived classes for definition of ErrorMatrix.
Definition: PrepRawData.h:158
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Trk::PrepRawData::m_clusId
Identifier m_clusId
PrepRawData ID, not const because of DataPool.
Definition: PrepRawData.h:151
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Trk::ObjectCounter< Trk::PrepRawData >
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::PrepRawData::m_rdoList
std::vector< Identifier > m_rdoList
Stores the identifiers of the RDOs.
Definition: PrepRawData.h:156
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
IdentContIndex::objIndex
unsigned short objIndex() const
object index in collection
Definition: IdentContIndex.h:92
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Trk::PrepRawData::m_localPos
Amg::Vector2D m_localPos
see derived classes for definition of meaning of LocalPosition
Definition: PrepRawData.h:154
Trk::PrepRawData::m_indexAndHash
IdentContIndex m_indexAndHash
Stores its own position (index) in collection plus the hash id for the collection (needed for the EL ...
Definition: PrepRawData.h:162
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
Trk::ObjectCounter< Trk::PrepRawData >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
IdentContIndex::collHash
unsigned short collHash() const
Accessor to hash, obj index and combined index.
Definition: IdentContIndex.h:85