ATLAS Offline Software
RpcPad.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // RpcPad.h
6 
7 #ifndef RpcPadH
8 #define RpcPadH
9 
10 // M.Grothe, 28/11/02
11 // K. Assamagan 07/12/02
12 
13 #include "MuonRDO/RpcCoinMatrix.h"
15 #include "AthenaKernel/CLASS_DEF.h"
16 #include "Identifier/Identifier.h"
18 
19 typedef unsigned short int ubit16;
20 
21 class RpcPad : public DataVector<RpcCoinMatrix> {
22 
23 public: // functions
24 
25  //typedef
26  typedef Identifier ID;
27  typedef RpcCoinMatrix DIGIT;
28 
29  // Constructors.
30 
32  RpcPad ()
33  : DataVector<RpcCoinMatrix>(), m_id(0), m_idHash(0),
34  m_onlineId(0), m_lvl1Id(0), m_bcId(0), m_status(0), m_errorCode(0), m_sector(0)
35  {
36  // std::cout<<"RpcPad default ctor ["<<this<<"]"<<std::endl;
37 
38 }
39 
44  RpcPad(const Identifier& id, const IdentifierHash& idHash)
45  : DataVector<RpcCoinMatrix>(), m_id(id), m_idHash(idHash),
46  m_onlineId(0), m_lvl1Id(0), m_bcId(0), m_status(0), m_errorCode(0), m_sector(0)
47  {
48  // std::cout<<"RpcPad ctor 2 ["<<this<<"]"<<std::endl;
49 
50  };
51 
54  ubit16 errorCode, int sector)
56  m_lvl1Id(0), m_bcId(0),
58  {
59  // std::cout<<"RpcPadContainer ctor 3 ["<<this<<"]"<<std::endl;
60 
61  };
62 
64  RpcPad(const Identifier& id, const IdentifierHash& idHash, ubit16 onlineId,
66  ubit16 errorCode, int sector)
70  {
71  // std::cout<<"RpcPadContainer ctor 4 ["<<this<<"]"<<std::endl;
72 
73  };
74 
77  RpcPad(const Identifier& id, const IdentifierHash& idHash, ubit16 onlineId,
78  int sector, ubit16 status)
80  m_lvl1Id(0), m_bcId(0),
82  {
83  // std::cout<<"RpcPadContainer ctor 5 ["<<this<<"]"<<std::endl;
84 
85 };
86 
87  // virtual destructor for persistency
88  virtual ~RpcPad() {
89  // std::cout<<"RpcPadContainer dtor ["<<this<<"]"<<std::endl;
90  // for( auto it : this->stdcont() ) {
91  // for (auto it2 : it->stdcont() ) {
92  // delete it2;
93  // }
94  // delete it;
95  // }
96 }
97 
98  RpcPad& operator= (RpcPad&&) = default;
99 
100  Identifier identify() const { return m_id; }
101 
104 
105  ubit16 status() const { return m_status; }
106  ubit16 errorCode() const { return m_errorCode; }
107  ubit16 onlineId() const {return m_onlineId; }
108 
109  ubit16 lvl1Id() const {return m_lvl1Id; }
110  ubit16 bcId() const {return m_bcId; }
111 
112  int sector() const {return m_sector; }
113 
114  // This method to be used with the second constructor above
119 
121  void setSector (int sector) { m_sector = sector;}
122 
123 private:
124  friend class RpcPadContainerCnv_p1;
125  friend class RpcPadCnv_p1;
126 
130 
133 
136  int m_sector;
137 
138 };
139 
141 MsgStream& operator << ( MsgStream& sl, const RpcPad& coll);
142 
144 std::ostream& operator << ( std::ostream& sl, const RpcPad& coll);
145 
146 
147 CLASS_DEF(RpcPad, 4189, 1)
148 
149 // Class needed only for persistency
151 CLASS_DEF( RPC_PAD_vector, 4181, 1 )
152 
153 #endif
154 
155 
156 
157 
RpcPad::lvl1Id
ubit16 lvl1Id() const
Definition: RpcPad.h:109
RpcPad::identify
Identifier identify() const
Definition: RpcPad.h:100
RpcPad::RpcPad
RpcPad(const Identifier &id, const IdentifierHash &idHash, ubit16 onlineId, int sector, ubit16 status)
partial contructor: needed when filling pad from bytestream errorCode not know until one is reading t...
Definition: RpcPad.h:77
RpcPad::RpcPad
RpcPad()
Default constructor.
Definition: RpcPad.h:32
RpcPad::bcId
ubit16 bcId() const
Definition: RpcPad.h:110
RpcPad::status
ubit16 status() const
Definition: RpcPad.h:105
RpcPad::m_lvl1Id
ubit16 m_lvl1Id
Definition: RpcPad.h:131
RpcCoinMatrix
Definition: RpcCoinMatrix.h:20
RpcPad::RpcPad
RpcPad(const Identifier &id, const IdentifierHash &idHash, ubit16 onlineId, ubit16 status, ubit16 errorCode, int sector)
full constructor
Definition: RpcPad.h:53
RpcPad::setSector
void setSector(int sector)
Definition: RpcPad.h:121
RpcPad::~RpcPad
virtual ~RpcPad()
Definition: RpcPad.h:88
RpcPad::errorCode
ubit16 errorCode() const
Definition: RpcPad.h:106
RpcPad::m_idHash
IdentifierHash m_idHash
Definition: RpcPad.h:128
RpcPadContainerCnv_p1
Definition: RpcPadContainerCnv_p1.h:25
RpcPad::m_errorCode
ubit16 m_errorCode
Definition: RpcPad.h:135
RpcPadCnv_p1
Definition: RpcPadCnv_p1.h:26
RpcPad::m_onlineId
ubit16 m_onlineId
Definition: RpcPad.h:129
RpcPad::setLvl1Id
void setLvl1Id(ubit16 lvl1Id)
Definition: RpcPad.h:118
RpcPad::m_bcId
ubit16 m_bcId
Definition: RpcPad.h:132
RpcPad::operator=
RpcPad & operator=(RpcPad &&)=default
RpcPad::m_sector
int m_sector
Definition: RpcPad.h:136
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
RpcPad::onlineId
ubit16 onlineId() const
Definition: RpcPad.h:107
RpcPad::RpcPad
RpcPad(const Identifier &id, const IdentifierHash &idHash)
Creates an empty container ready for writing.
Definition: RpcPad.h:44
RpcPad::setBcId
void setBcId(ubit16 bcId)
Definition: RpcPad.h:117
RpcPad::setStatus
void setStatus(ubit16 status)
Definition: RpcPad.h:120
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
IdentifierHash.h
RpcPad::identifyHash
IdentifierHash identifyHash() const
Returns the OFFLINE identifier hash for this collection.
Definition: RpcPad.h:103
RpcPad::setOnlineId
void setOnlineId(ubit16 onlineId)
Definition: RpcPad.h:116
RpcPad
Definition: RpcPad.h:21
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
RpcPad::RpcPad
RpcPad(const Identifier &id, const IdentifierHash &idHash, ubit16 onlineId, ubit16 lvl1Id, ubit16 bcId, ubit16 status, ubit16 errorCode, int sector)
full constructor with Lvl1 and Bcid
Definition: RpcPad.h:64
ubit16
unsigned short int ubit16
Definition: RpcPad.h:19
RpcPad::sector
int sector() const
Definition: RpcPad.h:112
RpcPad::m_id
Identifier m_id
Definition: RpcPad.h:127
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
RpcPad::ID
Identifier ID
Definition: RpcPad.h:26
RpcPad::setErrorCode
void setErrorCode(ubit16 errorCode)
Definition: RpcPad.h:115
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
RpcPad::m_status
ubit16 m_status
Definition: RpcPad.h:134
ubit16
unsigned short int ubit16
Definition: RpcByteStreamEncoder.h:20
CLASS_DEF.h
macros to associate a CLID to a type
RpcPad::DIGIT
RpcCoinMatrix DIGIT
Definition: RpcPad.h:27
operator<<
MsgStream & operator<<(MsgStream &sl, const RpcPad &coll)
Overload of << operator for MsgStream for debug output.
Definition: RpcPad.cxx:8
RpcCoinMatrix.h
Identifier
Definition: IdentifierFieldParser.cxx:14