ATLAS Offline Software
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 
25 struct 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 {
34 public:
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 
81 private:
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 
93 #include "AthenaKernel/CLASS_DEF.h"
94 CLASS_DEF( CaloTTOnAttrIdMap,167960877,1)
95 #endif
AttrStruct::module_type
unsigned int module_type
Definition: CaloTTOnAttrIdMap.h:29
CaloTTOnAttrIdMap::getP
CaloTTOnAttrId_P * getP()
return the persistified map
Definition: CaloTTOnAttrIdMap.cxx:142
CaloTTOnAttrIdMap::pos_neg
unsigned int pos_neg(HWIdentifier channelId) const
return 0 for z<0 channels and 1 for z>0 channels
Definition: CaloTTOnAttrIdMap.cxx:103
hist_file_dump.d
d
Definition: hist_file_dump.py:137
CaloTTOnAttrIdMap::barrel_endcap_fcal
unsigned int barrel_endcap_fcal(HWIdentifier channelId) const
To know if a channel belongs to the barrel, end cap or fcal parts.
Definition: CaloTTOnAttrIdMap.cxx:116
CaloTTOnAttrId
std::vector< CaloTTOnAttrId_t > CaloTTOnAttrId
Definition: CaloTTOnAttrId.h:27
AttrStruct::pos_neg
unsigned int pos_neg
Definition: CaloTTOnAttrIdMap.h:27
CaloTTOnAttrId.h
CaloTTOnAttrId_P.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
HWIdentifier
Definition: HWIdentifier.h:13
CaloTTOnAttrIdMap::module_type
unsigned int module_type(HWIdentifier channelId) const
To get the type of the module connected to the channel:
Definition: CaloTTOnAttrIdMap.cxx:129
CaloTTOnAttrIdMap::em_had
unsigned int em_had(HWIdentifier channelId) const
return the corresponding sampling of channelId:
Definition: CaloTTOnAttrIdMap.cxx:90
CaloTTOnAttrIdMap::convert_to_P
void convert_to_P(const CaloTTOnAttrId &t)
Definition: CaloTTOnAttrIdMap.cxx:146
CaloTTOnAttrIdMap::PDATA
CaloTTOnAttrId PDATA
Definition: CaloTTOnAttrIdMap.h:36
AttrStruct
This is a StoreGate object holding the TT online-attribute map.
Definition: CaloTTOnAttrIdMap.h:25
CaloTTOnAttrIdMap
Definition: CaloTTOnAttrIdMap.h:33
TTOnlineID.h
CaloTTOnAttrIdMap::CaloTTOnAttrIdMap
CaloTTOnAttrIdMap()
Definition: CaloTTOnAttrIdMap.cxx:19
CaloTTOnAttrIdMap::convert_to_D
void convert_to_D(const CaloTTOnAttrId_P &t, CaloTTOnAttrId &d)
Definition: CaloTTOnAttrIdMap.cxx:170
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
CaloTTOnAttrIdMap::m_persData
CaloTTOnAttrId_P m_persData
Definition: CaloTTOnAttrIdMap.h:89
CaloTTOnAttrIdMap::~CaloTTOnAttrIdMap
~CaloTTOnAttrIdMap()
Definition: CaloTTOnAttrIdMap.cxx:23
CaloTTOnAttrIdMap::m_on2attrIdMap
std::map< HWIdentifier, AttrStruct > m_on2attrIdMap
Definition: CaloTTOnAttrIdMap.h:87
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
CaloTTOnAttrId_P
This is a database object holding the TT online-attribute map.
Definition: CaloTTOnAttrId_P.h:22
AttrStruct::barrel_endcap_fcal
unsigned int barrel_endcap_fcal
Definition: CaloTTOnAttrIdMap.h:28
CLASS_DEF.h
macros to associate a CLID to a type
CaloTTOnAttrIdMap::set
void set(const PDATA &t)
initialize from Nova
Definition: CaloTTOnAttrIdMap.cxx:27
AttrStruct::em_had
unsigned int em_had
Definition: CaloTTOnAttrIdMap.h:26