ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloSrcIdMap.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGT1CALOBYTESTREAM_L1CALOSRCIDMAP_H
6#define TRIGT1CALOBYTESTREAM_L1CALOSRCIDMAP_H
7
8#include <stdint.h>
9#include <atomic>
10
11#include "eformat/SourceIdentifier.h"
13
14namespace LVL1BS {
15
23
25
26public:
28
30 static void useSWROD(bool in) { s_useSWROD = in; }
31
33 uint32_t getRodID (int crate, int slink, int daqOrRoi,
34 eformat::SubDetector subdet) const;
35
37 uint32_t getRobID (uint32_t rod_id) const;
38
40 uint32_t getRosID (uint32_t rob_id) const;
41
43 uint32_t getDetID (uint32_t ros_id) const;
44
46 int crate(uint32_t code) const;
47
49 int daqOrRoi(uint32_t code) const;
50
52 int slink(uint32_t code) const;
53
55 int maxSlinks() const;
56
58 eformat::SubDetector subDet(uint32_t code) const;
59
61 uint16_t minorVersion() const {return 0x1004;} // Or may go up to 0x2000, CHECK
62
64 uint16_t minorVersionPreLS1() const {return 0x1003;}
65
66 private:
67 static std::atomic<bool> s_useSWROD ATLAS_THREAD_SAFE;
68
69};
70
71} // end namespace
72
73#endif
Define macros for attributes used to control the static checker.
int crate(uint32_t code) const
Return crate from unpacked moduleID.
uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet) const
Make a ROD Source ID.
int daqOrRoi(uint32_t code) const
Return daqOrRoi from unpacked moduleID.
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
uint16_t minorVersionPreLS1() const
Return last ROD header minor version for pre-LS1 data.
eformat::SubDetector subDet(uint32_t code) const
Return sub-detector for given ID.
static std::atomic< bool > s_useSWROD ATLAS_THREAD_SAFE
int slink(uint32_t code) const
Return slink from unpacked moduleID.
static void useSWROD(bool in)
Flag to decide if SWROD readout should be used instead of legacy.
uint16_t minorVersion() const
Return ROD header minor version to use when writing BS.
int maxSlinks() const
Return the maximum possible number of slinks.
uint32_t getRosID(uint32_t rob_id) const
Make a ROS Source ID from a ROB source ID.
uint32_t getDetID(uint32_t ros_id) const
Make a SubDetector ID from ROS source ID.