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#include <iostream>
8
9// Partialconstructor
10MdtCsm::MdtCsm(const Identifier id, const IdentifierHash idHash) :
12 m_Id(id),
13 m_idHash(idHash),
14 m_SubDetId(0),
15 m_MrodId(0),
16 m_CsmId(0)
17{ }
18
19// Full constructor
20MdtCsm::MdtCsm(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId) :
22 m_Id(id),
23 m_idHash(idHash),
27{ }
28
29
30void MdtCsm::set_values(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId)
31{
32 m_Id = id;
33 m_idHash = idHash;
36 m_CsmId = CsmId;
37}
38
39
40MsgStream& operator << ( MsgStream& sl, const MdtCsm& coll)
41{
42 sl << "MdtCsm: "
43 << "identify()="<< coll.identify().getString()
44 << ", SubDetId()="<< coll.SubDetId()
45 << ", MrodId()="<< coll.MrodId()
46 << ", CsmId()="<< coll.CsmId()<<" MdtAmtHit=[";
47 MdtCsm::const_iterator it = coll.begin();
48 MdtCsm::const_iterator itEnd = coll.end();
49 for (;it!=itEnd;++it) sl<< (**it)<<", ";
50 sl <<" ]"<<std::endl;
51 return sl;
52}
53
54
55std::ostream& operator << ( std::ostream& sl, const MdtCsm& coll)
56{
57 sl << "MdtCsm: "
58 << "identify()="<< coll.identify().getString()
59 << ", SubDetId()="<< coll.SubDetId()
60 << ", MrodId()="<< coll.MrodId()
61 << ", CsmId()="<< coll.CsmId()<<" MdtAmtHit=[";
62 MdtCsm::const_iterator it = coll.begin();
63 MdtCsm::const_iterator itEnd = coll.end();
64 for (;it!=itEnd;++it) sl<< (**it)<<", ";
65 sl <<" ]"<<std::endl;
66 return sl;
67}
MsgStream & operator<<(MsgStream &sl, const MdtCsm &coll)
Overload of << operator for MsgStream for debug output.
Definition MdtCsm.cxx:40
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:22
uint16_t m_MrodId
Mrod number.
Definition MdtCsm.h:29
uint16_t CsmId() const
Returns the CSM online id (online identifier inside a MROD)
Definition MdtCsm.h:65
MdtCsm()=default
Default constructor.
uint16_t MrodId() const
Returns the MROD id from the CSM header.
Definition MdtCsm.h:63
Identifier m_Id
Definition MdtCsm.h:26
uint16_t m_SubDetId
Sub-detector identifier.
Definition MdtCsm.h:28
void set_values(const Identifier id, const IdentifierHash idHash, uint16_t SubDetId, uint16_t MrodId, uint16_t CsmId)
Definition MdtCsm.cxx:30
Identifier identify() const
Returns the CSM offline identifier (chamber offline id)
Definition MdtCsm.h:55
uint16_t m_CsmId
Csm link number.
Definition MdtCsm.h:30
uint16_t SubDetId() const
Returns the sub-detector Id.
Definition MdtCsm.h:61
IdentifierHash m_idHash
Offline idenfifier hash corresponding to this collection.
Definition MdtCsm.h:27