ATLAS Offline Software
Loading...
Searching...
No Matches
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
19MdtCsm::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
29MdtCsm::MdtCsm(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId) :
31 m_Id(id),
32 m_idHash(idHash),
36{ }
37
38
39void 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;
45 m_CsmId = CsmId;
46}
47
48
49MsgStream& 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=[";
56 MdtCsm::const_iterator it = coll.begin();
57 MdtCsm::const_iterator itEnd = coll.end();
58 for (;it!=itEnd;++it) sl<< (**it)<<", ";
59 sl <<" ]"<<std::endl;
60 return sl;
61}
62
63
64std::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=[";
71 MdtCsm::const_iterator it = coll.begin();
72 MdtCsm::const_iterator itEnd = coll.end();
73 for (;it!=itEnd;++it) sl<< (**it)<<", ";
74 sl <<" ]"<<std::endl;
75 return sl;
76}
MsgStream & operator<<(MsgStream &sl, const MdtCsm &coll)
Overload of << operator for MsgStream for debug output.
Definition MdtCsm.cxx:49
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
This is a "hash" representation of an Identifier.
std::string getString() const
Provide a string form of the identifier - hexadecimal.
MDT RDO's : data from a single channel of an AMT Atlas Muon TDC.
Definition MdtAmtHit.h:20
MDT RDOs : Chamber Service Module, container of AmtHits of a single Mdt chamber.
Definition MdtCsm.h:19
uint16_t m_MrodId
Mrod number.
Definition MdtCsm.h:26
uint16_t CsmId() const
Returns the CSM online id (online identifier inside a MROD)
Definition MdtCsm.h:61
uint16_t MrodId() const
Returns the MROD id from the CSM header.
Definition MdtCsm.h:59
Identifier m_Id
Definition MdtCsm.h:23
uint16_t m_SubDetId
Sub-detector identifier.
Definition MdtCsm.h:25
void set_values(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId)
Definition MdtCsm.cxx:39
Identifier identify() const
Returns the CSM offline identifier (chamber offline id)
Definition MdtCsm.h:51
uint16_t m_CsmId
Csm link number.
Definition MdtCsm.h:27
uint16_t SubDetId() const
Returns the sub-detector Id.
Definition MdtCsm.h:57
MdtCsm()
Default constructor.
Definition MdtCsm.cxx:9
IdentifierHash m_idHash
Offline idenfifier hash corresponding to this collection.
Definition MdtCsm.h:24