ATLAS Offline Software
RPCRODStructure.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <cstring>
8 #include <fstream>
9 #include <iostream>
10 
12 
13 using namespace std;
14 
15 //----------------------------------------------------------------------------//
17  //
18  // Constructor used by the simulation program
19  //
20  setInit();
21 } // end-of-RPCRODStructure::RPCRODStructure()
22 //----------------------------------------------------------------------------//
24  //
25  // Constructor used by the simulation program
26  //
27  // decodeFragment;
28  m_sourceIDreserved = 0xffff;
29  m_moduleType = 0xffff;
30  m_subDetectorID = 0xffff;
31  m_RODID = 0xffff;
32 } // end-of-RPCRODStructure::RPCRODStructure()
33 //----------------------------------------------------------------------------//
34 RPCRODStructure::~RPCRODStructure() {} // end-of-RPCRODStructure::~RPCRODStructure
35 //----------------------------------------------------------------------------//
37  m_sourceIDreserved = 0xffff;
38  m_moduleType = 0xffff;
39  m_subDetectorID = 0xffff;
40  m_RODID = 0xffff;
41 } // end-of-setInit
42 //----------------------------------------------------------------------------//
44  RODword sourceIdentifier = 0;
45  sourceIdentifier = s_sourceIDreserved << 24 | s_moduleType << 16 | getSubDetectorID(subsystem) << 8 | RODID;
46  return sourceIdentifier;
47 } // end-of-RPCRODStructure::getSourceID
48 //----------------------------------------------------------------------------//
50  m_sourceIDreserved = (sourceID & 0xff000000) >> 24;
51  m_moduleType = (sourceID & 0x00ff0000) >> 16;
52  m_subDetectorID = (sourceID & 0x0000ff00) >> 8;
53  m_RODID = (sourceID & 0x000000ff);
54 } // end-of-decodeSourceID
55 //----------------------------------------------------------------------------//
57  ubit16 id = s_subDetectorIDA;
58  if (subsystem) id = s_subDetectorIDC;
59  return id;
60 } // end-of-getSubDetectorID
RPCRODStructure.h
RPCReadOut.h
RODword
uint32_t RODword
Definition: Lvl1Def.h:18
RPCRODStructure::getSubDetectorID
ubit16 getSubDetectorID(ubit16 subsystem)
Definition: RPCRODStructure.cxx:56
RPCRODStructure::getSourceID
RODword getSourceID(ubit16 subsystem, ubit16 RODID)
Definition: RPCRODStructure.cxx:43
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
RPCRODStructure::~RPCRODStructure
~RPCRODStructure()
Definition: RPCRODStructure.cxx:34
RPCRODStructure::setInit
void setInit()
Definition: RPCRODStructure.cxx:36
RPCRODStructure::decodeSourceID
void decodeSourceID(RODword sourceID)
Definition: RPCRODStructure.cxx:49
ubit16
unsigned short int ubit16
Definition: RpcByteStreamEncoder.h:20
L1TopoSimulationConfig.subsystem
subsystem
Definition: L1TopoSimulationConfig.py:263
RPCRODStructure::RPCRODStructure
RPCRODStructure()
Definition: RPCRODStructure.cxx:16