ATLAS Offline Software
MdtPrepData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MdtPrepData.cxx
7 // Implementation file for class MdtPrepData
9 // (c) ATLAS Detector software
11 // Version 1.0 03/30/2005 Ketevi A. Assamagan
13 
15 #include "GaudiKernel/MsgStream.h"
16 
17 namespace Muon
18 {
19 
20  // Constructor with parameters:
22  const Identifier &id,
23  const IdentifierHash& /*collectionHash*/, // FIXME! (Should be removed)
25  const Amg::MatrixX& errDriftRadius,
26  const MuonGM::MdtReadoutElement* detEl,
27  const int tdc,
28  const int adc,
30  )
31  :
32  PrepRawData(id, driftRadius, errDriftRadius), //call base class constructor
33  m_detEl(detEl),
34  m_tdc(tdc),
35  m_adc(adc),
36  m_status(status),
37  m_globalPosition()
38 {
39 // assert(rdoList.size()==1);
40 // assert( rdoList[0]==id);
41 }
42 
43 
45  const Identifier &id,
46  const IdentifierHash& /*collectionHash*/, // FIXME! (Should be removed)
48  Amg::MatrixX&& errDriftRadius,
49  std::vector<Identifier>&& rdoList,
50  const MuonGM::MdtReadoutElement* detEl,
51  const int tdc,
52  const int adc,
54  )
55  :
56  PrepRawData(id, driftRadius,
57  std::move(rdoList),
58  std::move(errDriftRadius)),
59  m_detEl(detEl),
60  m_tdc(tdc),
61  m_adc(adc),
62  m_status(status),
63  m_globalPosition()
64 {
65 // assert(rdoList.size()==1);
66 // assert( rdoList[0]==id);
67 }
68 
69 
70  // Destructor:
72 = default;
73 
74 
75 // Default constr
77  :
78  PrepRawData(),
79  m_detEl( nullptr ),
80  m_tdc( 0 ),
81  m_adc( 0 ),
82  m_status( MdtStatusUnDefined ),
83  m_globalPosition()
84 {}
85 
86 //Copy constructor:
88  :
89  PrepRawData( RIO ),
90  m_detEl(RIO.m_detEl),
91  m_tdc(RIO.m_tdc),
92  m_adc(RIO.m_adc),
93  m_status(RIO.m_status),
94  m_globalPosition()
95 {}
96 
97 //Move constructor:
99  :
100  PrepRawData( std::move(RIO) ),
101  m_detEl(RIO.m_detEl),
102  m_tdc(RIO.m_tdc),
103  m_adc(RIO.m_adc),
104  m_status(RIO.m_status),
105  m_globalPosition()
106 {}
107 
108 //assignment operator
110 {
111  if (&RIO !=this)
112  {
114  m_detEl = RIO.m_detEl;
115  m_tdc = RIO.m_tdc;
116  m_adc = RIO.m_adc;
117  m_status = RIO.m_status;
118  if (m_globalPosition) m_globalPosition.release().reset();
119  }
120  return *this;
121 }
122 
123 //assignment operator
125 {
126  if (&RIO !=this)
127  {
128  m_detEl = RIO.m_detEl;
129  m_tdc = RIO.m_tdc;
130  m_adc = RIO.m_adc;
131  m_status = RIO.m_status;
132  Trk::PrepRawData::operator=(std::move(RIO));
133  if (m_globalPosition)
134  m_globalPosition.release().reset();
135  }
136  return *this;
137 }
138 
139 MsgStream& MdtPrepData::dump( MsgStream& stream) const
140  {
141  stream << MSG::INFO<<"MdtPrepData {"<<std::endl;
142 
144 
145  //MdtPrepData methods
146  stream <<"TDC = "<<this->tdc()<<", ";
147  stream <<"ADC = "<<this->adc()<<", ";
148  stream <<"status = "<<this->status()<<", ";
149  stream<<"} End MdtPrepData"<<endmsg;
150 
151  return stream;
152  }
153 
154  std::ostream& MdtPrepData::dump( std::ostream& stream) const
155  {
156  stream << "MdtPrepData {"<<std::endl;
157 
159 
160  //MdtPrepData methods
161  stream <<"TDC = "<<this->tdc()<<", ";
162  stream <<"ADC = "<<this->adc()<<", ";
163  stream <<"status = "<<this->status()<<", ";
164  stream<<"} End MdtPrepData"<<std::endl;
165  return stream;
166  }
167 
168 
169 
170 }//end of ns
171 
172 
Muon::MdtPrepData::m_adc
int m_adc
ADC value - typical ADC spectra can go from 0 up to 250.
Definition: MdtPrepData.h:131
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::PrepRawData::dump
virtual MsgStream & dump(MsgStream &stream) const
dump information about the PRD object.
Definition: PrepRawData.cxx:79
Muon::MdtDriftCircleStatus
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
Definition: MdtDriftCircleStatus.h:25
Muon::MdtPrepData::m_detEl
const MuonGM::MdtReadoutElement * m_detEl
Cached pointer to detector element (not deleted in destructor, not written to disk)
Definition: MdtPrepData.h:125
MdtPrepData.h
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:166
Muon::MdtPrepData::m_tdc
int m_tdc
TDC value - typical TDC spectra can go from 0 up to 2500.
Definition: MdtPrepData.h:128
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::MdtPrepData::operator=
MdtPrepData & operator=(const MdtPrepData &)
Definition: MdtPrepData.cxx:109
Muon::MdtPrepData::MdtPrepData
MdtPrepData()
Definition: MdtPrepData.cxx:76
Muon::MdtPrepData::~MdtPrepData
virtual ~MdtPrepData()
Destructor.
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:50
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Muon::MdtPrepData::m_status
MdtDriftCircleStatus m_status
enum to hold 'status' of measurement
Definition: MdtPrepData.h:134
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:59
Trk::PrepRawData::operator=
PrepRawData & operator=(const PrepRawData &)=default
Muon::MdtPrepData::tdc
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Definition: MdtPrepData.h:161
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
Muon::MdtPrepData::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
Definition: MdtPrepData.h:140
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
Muon::MdtPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition: MdtPrepData.cxx:139
Muon::MdtStatusUnDefined
@ MdtStatusUnDefined
Undefined.
Definition: MdtDriftCircleStatus.h:43
merge.status
status
Definition: merge.py:17
IdentifierHash
Definition: IdentifierHash.h:38
Muon::MdtPrepData::status
MdtDriftCircleStatus status() const
Returns the status of the measurement.
Definition: MdtPrepData.h:171