ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TileRoI_Map Class Reference

TileCal RoI map to offline Identifier. More...

#include <TileRoI_Map.h>

Inheritance diagram for TileRoI_Map:
Collaboration diagram for TileRoI_Map:

Classes

class  EtaPhiRegion
 

Public Types

typedef Identifier TT_ID
 
typedef int COLL_ID
 

Public Member Functions

 TileRoI_Map (const std::string &type, const std::string &name, const IInterface *parent)
 constructor More...
 
StatusCode initialize ()
 define a RoI identifier type, two ints. More...
 
virtual ~TileRoI_Map ()
 
TT_ID TrigTowerID (const Identifier &id) const
 return TrigTowerID for various queries. More...
 
TT_ID TrigTowerID (const HWIdentifier &id) const
 
const std::vector< COLL_ID > & CollectionID (const TT_ID &id) const
 reserve lookup. More...
 
bool validId (const TT_ID &tt_id) const
 check validity More...
 
bool getEtaPhiRegion (unsigned int hashid, float &etamin, float &etamax, float &phimin, float &phimax) const
 returns Eta-Phi Region for a hashed ID of the Collection. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool InterfaceID. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef std::map< Identifier, TT_IDOFFMAP
 Map for offline ID and online id. More...
 
typedef std::map< HWIdentifier, TT_IDONLMAP
 
typedef std::vector< COLL_IDCOLL_ID_VEC
 
typedef std::map< TT_ID, COLL_ID_VECROIMAP
 
typedef std::map< int, EtaPhiRegionE_P_MAP
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool addEntry (const HWIdentifier &adc_hwid)
 
void printEtaPhiRegions ()
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

OFFMAP m_offmap
 
ONLMAP m_onlmap
 
ROIMAP m_roimap
 
E_P_MAP m_epmap
 
const TileIDm_tileID
 
const TileHWIDm_tileHWID
 
const TileDetDescrManagerm_tileMgr
 
const TileCablingServicem_cablingSvc
 
TileFragHash m_idhash
 
bool m_print
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

TileCal RoI map to offline Identifier.

Author
Alexandre Solodkov
Version
00-00-01 , 26/08/2002

Definition at line 32 of file TileRoI_Map.h.

Member Typedef Documentation

◆ COLL_ID

typedef int TileRoI_Map::COLL_ID

Definition at line 47 of file TileRoI_Map.h.

◆ COLL_ID_VEC

typedef std::vector<COLL_ID> TileRoI_Map::COLL_ID_VEC
private

Definition at line 113 of file TileRoI_Map.h.

◆ E_P_MAP

typedef std::map<int, EtaPhiRegion > TileRoI_Map::E_P_MAP
private

Definition at line 116 of file TileRoI_Map.h.

◆ OFFMAP

typedef std::map<Identifier, TT_ID> TileRoI_Map::OFFMAP
private

Map for offline ID and online id.

Definition at line 111 of file TileRoI_Map.h.

◆ ONLMAP

typedef std::map<HWIdentifier, TT_ID> TileRoI_Map::ONLMAP
private

Definition at line 112 of file TileRoI_Map.h.

◆ ROIMAP

typedef std::map<TT_ID, COLL_ID_VEC > TileRoI_Map::ROIMAP
private

Definition at line 114 of file TileRoI_Map.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TT_ID

Definition at line 46 of file TileRoI_Map.h.

Constructor & Destructor Documentation

◆ TileRoI_Map()

TileRoI_Map::TileRoI_Map ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

constructor

Definition at line 24 of file TileRoI_Map.cxx.

27 {
28  declareInterface<TileRoI_Map>( this );
29 
30  // property
31  declareProperty("Print",m_print);
32 
33  return ;
34 }

◆ ~TileRoI_Map()

TileRoI_Map::~TileRoI_Map ( )
virtual

Definition at line 67 of file TileRoI_Map.cxx.

68 {
69 }

Member Function Documentation

◆ addEntry()

bool TileRoI_Map::addEntry ( const HWIdentifier adc_hwid)
private

Definition at line 72 of file TileRoI_Map.cxx.

73 {
74 
75  Identifier adc_id = m_cablingSvc->h2s_adc_id(adc_hwid);
76 
77  if (adc_id.is_valid()) {
78 
79  Identifier pmt_id = m_tileID->pmt_id(adc_id);
80  Identifier cell_id = m_tileID->cell_id(adc_id);
81 
82  Identifier rId = m_cablingSvc->pmt2tt_id(pmt_id);
83 
84  m_offmap[ cell_id ] = rId; // mapping for Cell id
85  m_offmap[ pmt_id ] = rId; // mapping for PMT id
86  m_offmap[ adc_id ] = rId; // mapping for ADC id
87 
88  HWIdentifier chan_id = m_tileHWID->channel_id(adc_hwid);
89  m_onlmap[ chan_id ] = rId; // mapping for online channel id
90  m_onlmap[ adc_hwid ] = rId; // mapping for online ADC id
91 
92  std::cout
93  << " HW id " << m_tileHWID->to_string(adc_hwid)
94  << " id " << m_tileID->to_string(adc_id)
95  << " tt id " << rId // don't know how to print TT ID
96  << std::endl;
97 
98  // add entry for RoI to COLL_ID map.
99  // make an Tile frag ID
100  int frag = m_tileHWID->frag(chan_id);
101  COLL_ID_VEC& v = m_roimap[rId];
102  COLL_ID_VEC::const_iterator it = v.begin();
103  COLL_ID_VEC::const_iterator it_end = v.end();
104  bool found = false;
105 
106  const CaloDetDescrElement* caloDDE = m_tileMgr->get_cell_element(cell_id);
107  m_epmap[frag].set(caloDDE->eta(),caloDDE->phi());
108 
109  for(; it != it_end; ++it)
110  if(frag == (*it) ) found = true;
111  if(!found) {
112 // std::cout <<" Mapped RoI "<<rId.sample()<<" "<<rId.eta()<<" "
113 // <<rId.phi()<<" to frag "<<std::hex<<frag<<std::dec<<std::endl;
114  v.push_back(frag);
115  }
116  } else
117  {
118  std::cout <<" Failed to get Identifier in TileRoI_Map::add "<< std::endl;
119  return false;
120  }
121 
122  return true;
123 
124 }

◆ CollectionID()

const TileRoI_Map::COLL_ID_VEC & TileRoI_Map::CollectionID ( const TT_ID id) const

reserve lookup.

given RoI, get CollectionID

Definition at line 162 of file TileRoI_Map.cxx.

164 {
165  ROIMAP::const_iterator it = m_roimap.find(RoIid);
166  if(it !=m_roimap.end()) {
167  return (*it).second;
168  }
169  std::cout <<" TileRoI_Map::CollectionID: can not find RoI" << std::endl;
170  static const COLL_ID_VEC v ;
171  return v;
172 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getEtaPhiRegion()

bool TileRoI_Map::getEtaPhiRegion ( unsigned int  hashid,
float &  etamin,
float &  etamax,
float &  phimin,
float &  phimax 
) const

returns Eta-Phi Region for a hashed ID of the Collection.

return false for invalid ID.

Definition at line 213 of file TileRoI_Map.cxx.

217 {
218  if( (int)hashid >= m_idhash.max() ) return false;
219 
220  int frag = m_idhash.identifier(hashid);
221  E_P_MAP::const_iterator it = m_epmap.find(frag);
222  if(it == m_epmap.end()) return false;
223 
224  etamin = (*it).second.etamin;
225  etamax = (*it).second.etamax;
226  phimin = (*it).second.phimin;
227  phimax = (*it).second.phimax;
228 
229  return true;
230 
231 }

◆ initialize()

StatusCode TileRoI_Map::initialize ( )

define a RoI identifier type, two ints.

iterator over all ADC Identifiers

Definition at line 36 of file TileRoI_Map.cxx.

37 {
39  ATH_CHECK( detStore()->retrieve(m_tileID, "TileID") );
40  ATH_CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
41 
42  // get the pointer to CablingSvc
44 
46 
47  // intialize the internal map
48 
50  std::vector<HWIdentifier>::const_iterator first = m_tileHWID->adc_begin();
51  std::vector<HWIdentifier>::const_iterator last = m_tileHWID->adc_end();
52 
53  int nADC = 0;
54  for ( ; first!=last; ++first) {
55  if ( addEntry(*first) ) ++nADC;
56  }
57 
58  if (m_print) {
59  std::cout << " number of ADCs made in TileRoI_Map " << nADC<< std::endl;
60  }
61 
63 
64  return StatusCode::SUCCESS;
65 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & TileRoI_Map::interfaceID ( )
static

AlgTool InterfaceID.

Definition at line 20 of file TileRoI_Map.cxx.

21 { return IID_ITileRoI_Map; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printEtaPhiRegions()

void TileRoI_Map::printEtaPhiRegions ( )
private

Definition at line 181 of file TileRoI_Map.cxx.

182 {
183  // print all Collection ID and eta phi region
184 
185  E_P_MAP::const_iterator it = m_epmap.begin();
186  E_P_MAP::const_iterator it_end = m_epmap.end();
187 
188  std::cout <<" COLLECTION ID , HASHID, ETAMIN, ETAMAX, PHIMIN, PHIMAX "<<std::endl ;
189 
190  TileHWID tileHW;
191 
192  for(; it!=it_end;++it){
193  int frag = (*it).first;
194  int hashid = m_idhash(frag);
195 
196  float e1,e2,p1,p2 ;
197 
198  // check getEtaPhiRegion method.
199  getEtaPhiRegion(hashid,e1,e2,p1,p2);
200 
201  // print them out.
202  std::cout <<std::hex<< frag
203  << " " <<hashid << " "
204  <<e1 << " "
205  <<e2 << " "
206  <<p1 << " "
207  <<p2 << std::endl;
208  }
209  std::cout << std::dec << std::endl;
210 
211 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TrigTowerID() [1/2]

TileRoI_Map::TT_ID TileRoI_Map::TrigTowerID ( const HWIdentifier id) const

Definition at line 146 of file TileRoI_Map.cxx.

148 {
149  ONLMAP::const_iterator it = m_onlmap.find( id );
150  if(it==m_onlmap.end() )
151  {
152  std::string err(" TileRoI_Map::TrigTowerID(const HWIdentifier&): no entry for HWID ");
153  err += m_tileHWID->to_string(id,-1) ;
154  TileID_Exception except(err,2);
155  throw except;
156  }
157 
158  return (*it).second;
159 
160 }

◆ TrigTowerID() [2/2]

TileRoI_Map::TT_ID TileRoI_Map::TrigTowerID ( const Identifier id) const

return TrigTowerID for various queries.

Definition at line 128 of file TileRoI_Map.cxx.

130 {
131  OFFMAP::const_iterator it = m_offmap.find(id);
132  if( it==m_offmap.end() )
133  {
134  std::string err(" TileRoI_Map: not entry for ID ");
135  err += m_tileID->to_string(id,-1) ;
136  TileID_Exception except(err,1);
137  throw except;
138  }
139 
140  return (*it).second;
141 
142 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ validId()

bool TileRoI_Map::validId ( const TT_ID tt_id) const

check validity

Definition at line 174 of file TileRoI_Map.cxx.

176 {
177  ROIMAP::const_iterator it = m_roimap.find(RoIid);
178  return it !=m_roimap.end() ;
179 }

Member Data Documentation

◆ m_cablingSvc

const TileCablingService* TileRoI_Map::m_cablingSvc
private

Definition at line 127 of file TileRoI_Map.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_epmap

E_P_MAP TileRoI_Map::m_epmap
private

Definition at line 122 of file TileRoI_Map.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idhash

TileFragHash TileRoI_Map::m_idhash
private

Definition at line 129 of file TileRoI_Map.h.

◆ m_offmap

OFFMAP TileRoI_Map::m_offmap
private

Definition at line 118 of file TileRoI_Map.h.

◆ m_onlmap

ONLMAP TileRoI_Map::m_onlmap
private

Definition at line 119 of file TileRoI_Map.h.

◆ m_print

bool TileRoI_Map::m_print
private

Definition at line 130 of file TileRoI_Map.h.

◆ m_roimap

ROIMAP TileRoI_Map::m_roimap
private

Definition at line 120 of file TileRoI_Map.h.

◆ m_tileHWID

const TileHWID* TileRoI_Map::m_tileHWID
private

Definition at line 125 of file TileRoI_Map.h.

◆ m_tileID

const TileID* TileRoI_Map::m_tileID
private

Definition at line 124 of file TileRoI_Map.h.

◆ m_tileMgr

const TileDetDescrManager* TileRoI_Map::m_tileMgr
private

Definition at line 126 of file TileRoI_Map.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileRoI_Map::m_onlmap
ONLMAP m_onlmap
Definition: TileRoI_Map.h:119
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TileFragHash::max
int max() const
return maximum number of IDs
Definition: TileFragHash.h:50
TileCablingService::pmt2tt_id
Identifier pmt2tt_id(const Identifier &id) const
Definition: TileCablingService.cxx:375
TileCablingService::getInstance
static const TileCablingService * getInstance()
get pointer to service instance
Definition: TileCablingService.cxx:24
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TileRoI_Map::m_print
bool m_print
Definition: TileRoI_Map.h:130
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TileRoI_Map::m_offmap
OFFMAP m_offmap
Definition: TileRoI_Map.h:118
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TileHWID::adc_begin
std::vector< HWIdentifier >::const_iterator adc_begin(void) const
begin iterator for ADC Identifiers
Definition: TileHWID.h:308
TileHWID::frag
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
Definition: TileHWID.h:181
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TileRoI_Map::m_cablingSvc
const TileCablingService * m_cablingSvc
Definition: TileRoI_Map.h:127
HWIdentifier
Definition: HWIdentifier.h:13
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TileRoI_Map::m_idhash
TileFragHash m_idhash
Definition: TileRoI_Map.h:129
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileRoI_Map::COLL_ID_VEC
std::vector< COLL_ID > COLL_ID_VEC
Definition: TileRoI_Map.h:113
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
TileCablingService::h2s_adc_id
Identifier h2s_adc_id(const HWIdentifier &id) const
Definition: TileCablingService.cxx:898
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TileID_Exception
Exception class for Tile Identifiers.
Definition: TileID_Exception.h:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TileFragHash::initialize
void initialize(const TileHWID *tileHWID, TYPE type=Default)
Definition: TileFragHash.cxx:23
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TileDetDescrManager::get_cell_element
CaloDetDescrElement * get_cell_element(unsigned int cell_hash) const
Definition: TileDetDescrManager.h:156
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
TileRoI_Map::getEtaPhiRegion
bool getEtaPhiRegion(unsigned int hashid, float &etamin, float &etamax, float &phimin, float &phimax) const
returns Eta-Phi Region for a hashed ID of the Collection.
Definition: TileRoI_Map.cxx:213
TileHWID::channel_id
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
Definition: TileHWID.cxx:198
TileRoI_Map::m_tileMgr
const TileDetDescrManager * m_tileMgr
Definition: TileRoI_Map.h:126
TileRoI_Map::printEtaPhiRegions
void printEtaPhiRegions()
Definition: TileRoI_Map.cxx:181
TileRoI_Map::m_roimap
ROIMAP m_roimap
Definition: TileRoI_Map.h:120
python.PyAthena.v
v
Definition: PyAthena.py:157
TileRoI_Map::m_epmap
E_P_MAP m_epmap
Definition: TileRoI_Map.h:122
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
egammaEnergyPositionAllSamples::e2
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
Tile_Base_ID::to_string
std::string to_string(const Identifier &id, int level=0) const
Definition: Tile_Base_ID.cxx:52
Tile_Base_ID::pmt_id
Identifier pmt_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:640
TileRoI_Map::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileRoI_Map.h:125
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DeMoScan.first
bool first
Definition: DeMoScan.py:534
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
TileRoI_Map::addEntry
bool addEntry(const HWIdentifier &adc_hwid)
Definition: TileRoI_Map.cxx:72
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
TileFragHash::identifier
ID identifier(int i) const
reverse conversion
Definition: TileFragHash.cxx:67
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
TileHWID::to_string
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
Definition: TileHWID.cxx:49
Tile_Base_ID::cell_id
Identifier cell_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:581
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TileRoI_Map::m_tileID
const TileID * m_tileID
Definition: TileRoI_Map.h:124
TileHWID::adc_end
std::vector< HWIdentifier >::const_iterator adc_end(void) const
end iterator for ADC Identifiers
Definition: TileHWID.h:312
fitman.k
k
Definition: fitman.py:528