ATLAS Offline Software
Loading...
Searching...
No Matches
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
13using 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//----------------------------------------------------------------------------//
34RPCRODStructure::~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//----------------------------------------------------------------------------//
58 if (subsystem) id = s_subDetectorIDC;
59 return id;
60} // end-of-getSubDetectorID
uint32_t RODword
Definition Lvl1Def.h:18
unsigned short int ubit16
RODword getSourceID(ubit16 subsystem, ubit16 RODID)
static const ubit16 s_moduleType
static const ubit16 s_subDetectorIDC
static const ubit16 s_sourceIDreserved
void decodeSourceID(RODword sourceID)
static const ubit16 s_subDetectorIDA
ubit16 getSubDetectorID(ubit16 subsystem)
STL namespace.