ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTTOnAttrIdMap.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CALOTRIGGERTOOL_CALOTTONATTRIDMAP_H
6#define CALOTRIGGERTOOL_CALOTTONATTRIDMAP_H
7
11#include "Identifier/Identifier.h"
12
13#include <map>
14
24
25struct AttrStruct {
26 unsigned int em_had;
27 unsigned int pos_neg;
28 unsigned int barrel_endcap_fcal;
29 unsigned int module_type;
30};
31
33{
34public:
35
37
38 /* Constructor
39 **/
41
42 /* Destructor
43 **/
45
47 void set( const PDATA& t ) ;
48
54 unsigned int em_had ( HWIdentifier channelId ) const;
55
57 unsigned int pos_neg ( HWIdentifier channelId ) const;
58
65 unsigned int barrel_endcap_fcal( HWIdentifier channelId ) const;
66
73 unsigned int module_type ( HWIdentifier channelId ) const;
74
77
79 void set( const CaloTTOnAttrId_P& t ) ; // initialize from POOL
80
81private:
82
83 void convert_to_P(const CaloTTOnAttrId &t) ; // from NOVA to POOL
84 void convert_to_D(const CaloTTOnAttrId_P &t, CaloTTOnAttrId& d) ; // POOL to NOVA
85
86 /* Online Identifier to Attribute mapping */
87 std::map<HWIdentifier,AttrStruct> m_on2attrIdMap;
88
90
91};
92
94CLASS_DEF( CaloTTOnAttrIdMap,167960877,1)
95#endif
std::vector< CaloTTOnAttrId_t > CaloTTOnAttrId
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
unsigned int pos_neg(HWIdentifier channelId) const
return 0 for z<0 channels and 1 for z>0 channels
void convert_to_P(const CaloTTOnAttrId &t)
CaloTTOnAttrId_P * getP()
return the persistified map
std::map< HWIdentifier, AttrStruct > m_on2attrIdMap
void set(const PDATA &t)
initialize from Nova
unsigned int barrel_endcap_fcal(HWIdentifier channelId) const
To know if a channel belongs to the barrel, end cap or fcal parts.
CaloTTOnAttrId PDATA
unsigned int module_type(HWIdentifier channelId) const
To get the type of the module connected to the channel:
void convert_to_D(const CaloTTOnAttrId_P &t, CaloTTOnAttrId &d)
CaloTTOnAttrId_P m_persData
unsigned int em_had(HWIdentifier channelId) const
return the corresponding sampling of channelId:
This is a database object holding the TT online-attribute map.
This is a StoreGate object holding the TT online-attribute map.
unsigned int pos_neg
unsigned int barrel_endcap_fcal
unsigned int module_type
unsigned int em_had