ATLAS Offline Software
Loading...
Searching...
No Matches
LArRoIMap.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
4 */
15
16
17#ifndef LARRECCONDITIONS_LARROIMAP_H
18#define LARRECCONDITIONS_LARROIMAP_H
19
20
21#include "Identifier/Identifier.h"
23#include <vector>
24#include <unordered_map>
25
26
31{
32public:
33 // TT_ID is TT hashId + sam coded in unsigned int, (sam+ hash<<2)
34 typedef unsigned int TT_ID;
36
37
42 LArRoIMap (TT_ID layer_hash_max);
43
44
48 TT_ID trigTowerID (const Identifier& channel_id ) const;
49
50
54 TT_ID trigTowerID (const HWIdentifier& id ) const;
55
56
60 const std::vector<COLL_ID>& collectionID(const TT_ID& id) const ;
61
62
66 bool validID(const TT_ID& tt_id) const ;
67
68
69
77 void addEntry (const Identifier& id,
78 const HWIdentifier& sigId,
79 const HWIdentifier& robId,
80 TT_ID hashid_sam);
81
82
83private:
86
88 std::unordered_map<Identifier, TT_ID> m_offmap;
89
91 std::unordered_map<Identifier, TT_ID> m_onlmap;
92
94 std::unordered_map<TT_ID, std::vector<COLL_ID> > m_roimap;
95};
96
97
99CLASS_DEF( LArRoIMap, 13658032, 1)
101
102
103#endif // not LARRECCONDITIONS_LARROIMAP_H
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Mapping between calorimeter trigger id to offline/online Identifier.
Definition LArRoIMap.h:31
std::unordered_map< Identifier, TT_ID > m_offmap
Map from offline ID to trigger tower ID.
Definition LArRoIMap.h:88
std::unordered_map< TT_ID, std::vector< COLL_ID > > m_roimap
Map from trigger tower ID to list of ROBs.
Definition LArRoIMap.h:94
LArRoIMap(TT_ID layer_hash_max)
Constructor.
Definition LArRoIMap.cxx:23
std::unordered_map< Identifier, TT_ID > m_onlmap
Map from online ID to trigger tower ID.
Definition LArRoIMap.h:91
bool validID(const TT_ID &tt_id) const
Check validity of a trigger tower ID.
Definition LArRoIMap.cxx:78
TT_ID trigTowerID(const Identifier &channel_id) const
Translate offline channel identifier to trigger tower ID.
Definition LArRoIMap.cxx:32
const std::vector< COLL_ID > & collectionID(const TT_ID &id) const
Get list of robIds for a given trigger tower ID.
Definition LArRoIMap.cxx:59
void addEntry(const Identifier &id, const HWIdentifier &sigId, const HWIdentifier &robId, TT_ID hashid_sam)
Add a new entry to the map.
Definition LArRoIMap.cxx:91
unsigned int TT_ID
Definition LArRoIMap.h:34
HWIdentifier COLL_ID
Definition LArRoIMap.h:35
TT_ID m_layer_hash_max
Maximum hash ID.
Definition LArRoIMap.h:85