ATLAS Offline Software
Loading...
Searching...
No Matches
SrcIdMap.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "eformat/SourceIdentifier.h"
8
9// implementation of SrcIdMap
10// This is only provided as an example. Each detector should
11// implement the specific mapping between the identifiers.
12// .i.e, how each lower level fragments should be mapped onto an
13// high level fragment, and especially, how the Module_ID field
14// should be defined.
15
16// Modified Oct 27, 2002
17// use SourceID class to make Source ID.
18
22
23
24uint32_t SrcIdMap::getRobID (uint32_t rod_id) const
25{
26 return rod_id;
27}
28
29
30uint32_t SrcIdMap::getRosID (uint32_t rob_id) const
31{
32 // Set module ID = 0
33 // ALL ROB goes to one ROS
34 eformat::helper::SourceIdentifier id = eformat::helper::SourceIdentifier(rob_id);
35 eformat::helper::SourceIdentifier id2 = eformat::helper::SourceIdentifier(id.subdetector_id(),0);
36 return id2.code();
37}
38
39
40uint32_t SrcIdMap::getDetID (uint32_t ros_id) const
41{
42 // Change Module Type to SUBDET and set module ID = 0
43 // ALL ROS goes to one SUBDET
44 eformat::helper::SourceIdentifier id = eformat::helper::SourceIdentifier(ros_id);
45 eformat::helper::SourceIdentifier id2 = eformat::helper::SourceIdentifier(id.subdetector_id(),0);
46 return id2.code();
47}
48
HWIdentifier id2
uint32_t getDetID(uint32_t ros_id) const
Make a SubDetector ID from ROS source ID.
Definition SrcIdMap.cxx:40
uint32_t getRosID(uint32_t rob_id) const
Make a ROS Source ID from a ROB source ID.
Definition SrcIdMap.cxx:30
SrcIdMap()
constructor
Definition SrcIdMap.cxx:19
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
Definition SrcIdMap.cxx:24