ATLAS Offline Software
MdtCsm.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MuonRDO/MdtCsm.h"
6 #include "GaudiKernel/MsgStream.h"
7 
8 // Default constructor
11  m_Id(),
12  m_idHash(),
13  m_SubDetId(0),
14  m_MrodId(0),
15  m_CsmId(0)
16 { }
17 
18 // Partialconstructor
19 MdtCsm::MdtCsm(const Identifier id, const IdentifierHash idHash) :
21  m_Id(id),
22  m_idHash(idHash),
23  m_SubDetId(0),
24  m_MrodId(0),
25  m_CsmId(0)
26 { }
27 
28 // Full constructor
29 MdtCsm::MdtCsm(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId) :
31  m_Id(id),
32  m_idHash(idHash),
33  m_SubDetId(SubDetId),
34  m_MrodId(MrodId),
35  m_CsmId(CsmId)
36 { }
37 
38 
39 void MdtCsm::set_values(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId)
40 {
41  m_Id = id;
42  m_idHash = idHash;
44  m_MrodId = MrodId;
45  m_CsmId = CsmId;
46 }
47 
48 
49 MsgStream& operator << ( MsgStream& sl, const MdtCsm& coll)
50 {
51  sl << "MdtCsm: "
52  << "identify()="<< coll.identify().getString()
53  << ", SubDetId()="<< coll.SubDetId()
54  << ", MrodId()="<< coll.MrodId()
55  << ", CsmId()="<< coll.CsmId()<<" MdtAmtHit=[";
57  MdtCsm::const_iterator itEnd = coll.end();
58  for (;it!=itEnd;++it) sl<< (**it)<<", ";
59  sl <<" ]"<<std::endl;
60  return sl;
61 }
62 
63 
64 std::ostream& operator << ( std::ostream& sl, const MdtCsm& coll)
65 {
66  sl << "MdtCsm: "
67  << "identify()="<< coll.identify().getString()
68  << ", SubDetId()="<< coll.SubDetId()
69  << ", MrodId()="<< coll.MrodId()
70  << ", CsmId()="<< coll.CsmId()<<" MdtAmtHit=[";
72  MdtCsm::const_iterator itEnd = coll.end();
73  for (;it!=itEnd;++it) sl<< (**it)<<", ";
74  sl <<" ]"<<std::endl;
75  return sl;
76 }
MdtCsm::m_Id
Identifier m_Id
Definition: MdtCsm.h:23
MdtCsm::CsmId
uint16_t CsmId() const
Returns the CSM online id (online identifier inside a MROD)
Definition: MdtCsm.h:61
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
MdtAmtHit
MDT RDO's : data from a single channel of an AMT Atlas Muon TDC.
Definition: MdtAmtHit.h:20
MdtCsm::m_SubDetId
uint16_t m_SubDetId
Sub-detector identifier.
Definition: MdtCsm.h:25
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MdtCsm::identify
Identifier identify() const
Returns the CSM offline identifier (chamber offline id)
Definition: MdtCsm.h:51
MdtCsm::SubDetId
uint16_t SubDetId() const
Returns the sub-detector Id.
Definition: MdtCsm.h:57
MdtCsm
MDT RDOs : Chamber Service Module, container of AmtHits of a single Mdt chamber.
Definition: MdtCsm.h:19
MdtCsm::MrodId
uint16_t MrodId() const
Returns the MROD id from the CSM header.
Definition: MdtCsm.h:59
MdtCsm::m_idHash
IdentifierHash m_idHash
Offline idenfifier hash corresponding to this collection.
Definition: MdtCsm.h:24
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
MdtCsm::m_CsmId
uint16_t m_CsmId
Csm link number.
Definition: MdtCsm.h:27
MdtCsm::m_MrodId
uint16_t m_MrodId
Mrod number.
Definition: MdtCsm.h:26
operator<<
MsgStream & operator<<(MsgStream &sl, const MdtCsm &coll)
Overload of << operator for MsgStream for debug output.
Definition: MdtCsm.cxx:49
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
MdtCsm.h
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
MdtCsm::set_values
void set_values(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId)
Definition: MdtCsm.cxx:39
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
MdtCsm::MdtCsm
MdtCsm()
Default constructor.
Definition: MdtCsm.cxx:9
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Identifier
Definition: IdentifierFieldParser.cxx:14