ATLAS Offline Software
Loading...
Searching...
No Matches
CSCcablingSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CSCCABLING_CSCCABLINGSVC_H
6#define CSCCABLING_CSCCABLINGSVC_H
7
8/*----------------------------------------------------
9 * Ketevi A. Assamagan - May 2007
10 * CSC Cabling service to decode online-offline maps
11 *---------------------------------------------------*/
12
14
15#include <inttypes.h>
16
17
18class CSCcablingSvc : public AthService {
19public:
21
22 virtual StatusCode initialize() override;
23
25 bool onlineId(const uint16_t subdetectorID, const uint16_t offlineID, uint32_t& rodId) const;
26 bool onlineId(const uint16_t offlineID, uint16_t& rodId) const;
27
29 bool offlineId(const uint32_t onlineIdentifier, uint16_t& rodId ) const;
30
32 bool is_rodId (const uint16_t rodId ) const;
33
35 bool is_offlineRodId (const uint16_t rodId ) const;
36
38 uint16_t collectionId(const uint16_t subdetectorId, const uint16_t rodId) const;
39
40 unsigned int nSide () const { return m_side; }
41 unsigned int nROD () const { return m_rod; }
42 unsigned int maxId() const { return m_max; }
43
45 void hash2Rob(const unsigned int&, uint32_t&) const;
46
48 void hash2RobFull(const unsigned int&, uint32_t&) const;
49
51 void hash2Rod(const unsigned int&, uint32_t&) const;
52
54 void hash2SubdetectorId(const unsigned int&, uint32_t&) const;
55
57 void hash2CollectionId(const unsigned int&, uint16_t&) const;
58
59 private:
60
61 unsigned int m_side{2};
62 unsigned int m_rod{16};
63 unsigned int m_max{32};
64
65 Gaudi::Property<bool> m_run1{this, "Run1Cabling", false};
66};
67
68#endif
unsigned int maxId() const
Gaudi::Property< bool > m_run1
void hash2Rob(const unsigned int &, uint32_t &) const
map PRD collection ID into short ROB ID, e.g.
bool onlineId(const uint16_t subdetectorID, const uint16_t offlineID, uint32_t &rodId) const
map offline ROD identifier to online ID
unsigned int m_rod
void hash2RobFull(const unsigned int &, uint32_t &) const
map PRD collection ID into full ROB ID (with subdetector ID), e.g.
unsigned int nSide() const
void hash2Rod(const unsigned int &, uint32_t &) const
map PRD collection ID into offline ROD ID
uint16_t collectionId(const uint16_t subdetectorId, const uint16_t rodId) const
calculate the collection Identifier
unsigned int nROD() const
bool is_offlineRodId(const uint16_t rodId) const
check that we have the correct offline ROD id
bool is_rodId(const uint16_t rodId) const
check that we have the correct online ROD id
bool offlineId(const uint32_t onlineIdentifier, uint16_t &rodId) const
reverse map of online ID into offline ROD ID
unsigned int m_max
void hash2CollectionId(const unsigned int &, uint16_t &) const
map PRD collection ID into RDO collection ID
void hash2SubdetectorId(const unsigned int &, uint32_t &) const
map PRD collection ID into subdetector ID, i.e.
virtual StatusCode initialize() override
unsigned int m_side