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

#include <TRT_FillCablingData_SR1.h>

Inheritance diagram for TRT_FillCablingData_SR1:
Collaboration diagram for TRT_FillCablingData_SR1:

Public Member Functions

 TRT_FillCablingData_SR1 (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~TRT_FillCablingData_SR1 ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
TRT_CablingDatafillData ()
 
void defineCollID ()
 
std::vector< uint32_t > getRobID (Identifier id) const
 
void fillCollID (uint32_t rob_id, std::vector< IdentifierHash > &ids)
 
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 ()
 

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 ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void defineParameters ()
 
void defineTables ()
 
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

const TRT_IDm_TRTHelper
 
IdContext m_cntx
 
TRT_CablingDatam_cabling = nullptr
 
int m_numberOfRings = 0
 
int m_numberOfLayersA = 0
 
int m_numberOfLayersB = 0
 
int m_numberOfLayersC = 0
 
int m_numberOfIdentifierSectors = 0
 
std::map< int, std::vector< uint32_t > > m_phi_to_source
 
std::vector< std::vector< Identifier > > m_identfierForAllStraws
 
std::vector< std::vector< IdentifierHash > > m_identfierHashForAllStraws
 
std::vector< std::vector< IdentifierHash > * > m_collID
 
std::vector< int > m_numberOfStrawsInLayers
 
std::map< int, int > m_1BS_1BL_map
 
std::map< int, int > m_2BS_2BL1_map
 
std::map< int, int > m_2BL2_3BL1_map
 
std::map< int, int > m_3BL2_map
 
std::map< int, int > m_3BS_map
 
std::map< int, int > m_1FS_1FL_map
 
std::map< int, int > m_2FS_2FL1_map
 
std::map< int, int > m_2FL2_3FL1_map
 
std::map< int, int > m_3FL2_map
 
std::map< int, int > m_3FS_map
 
std::map< int, int > m_ec_1l_map
 
std::map< int, int > m_ec_2l_map
 
std::map< int, int > m_ec_3l_map
 
std::map< int, int > m_ec_1r_map
 
std::map< int, int > m_ec_2r_map
 
std::map< int, int > m_ec_3r_map
 
GlobalCableMap m_CableMap
 
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

Definition at line 38 of file TRT_FillCablingData_SR1.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TRT_FillCablingData_SR1()

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

Definition at line 42 of file TRT_FillCablingData_SR1.cxx.

44  m_TRTHelper(nullptr)
45 {
46  declareInterface< TRT_FillCablingData_SR1 >( this );
47 }

◆ ~TRT_FillCablingData_SR1()

TRT_FillCablingData_SR1::~TRT_FillCablingData_SR1 ( )
virtual

Definition at line 51 of file TRT_FillCablingData_SR1.cxx.

52 {}

Member Function Documentation

◆ 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  }

◆ defineCollID()

void TRT_FillCablingData_SR1::defineCollID ( )

Definition at line 766 of file TRT_FillCablingData_SR1.cxx.

767 {
768  ATH_MSG_INFO( "In defineCollID()" );
769 
771  for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); ++pos )
772  {
773  std::vector<IdentifierHash> * vectID = new std::vector<IdentifierHash>();
774  fillCollID( pos->first, *vectID);
775 
776  ATH_MSG_INFO( "Adding Collid for ROB " << std::hex << pos->first << std::dec );
777 
778  m_cabling->add_collID( pos->first, vectID);
779  }
780 
781  return;
782 }

◆ defineParameters()

void TRT_FillCablingData_SR1::defineParameters ( )
private

Definition at line 102 of file TRT_FillCablingData_SR1.cxx.

103 {
104  m_numberOfRings = 3;
105 
106  m_numberOfLayersA = 19;
107  m_numberOfLayersB = 24;
108  m_numberOfLayersC = 30;
109 
110  // m_numberOfStrawsInBarrelROD = 1642;
112 
113  // Mapping from phi sector index to source id
114  //m_phi_to_source.push_back( 2 ); // Phi 0 is Source ID 0x3102
115  //m_phi_to_source.push_back( 3 ); // Phi 1 is Source ID 0x3103
116  // m_phi_to_source.push_back( 3 ); // Phi 0 is Source ID 0x3103
117  // m_phi_to_source.push_back( 2 ); // Phi 1 is Source ID 0x3102
118  // NB: Source ID 0x3101 is the 3S boards on BOTH Phi 0 and Phi 1
119 
120 
121  int tmpArray[] = {15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, // Module Type 1
122  18, 18, 18, 18, 19, 19, 19, 18, // Module Type 1
123  19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, // Module Type 2
124  22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 23, // Module Type 2
125  23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26, // Module Type 3
126  26, 26, 26, 26, 27, 27, 27, 27, 27, 28, 28, 28, 28, // Module Type 3
127  28, 29, 29, 29, 29, 28, -1}; // Module Type 3
128 
129  int i=0;
130  int RunningCount=0;
131  while( -1 != tmpArray[i] )
132  {
133  RunningCount += tmpArray[i];
134  m_numberOfStrawsInLayers.push_back( RunningCount );
135 
136  i++;
137  }
138  m_numberOfStrawsInLayers.push_back( -1 );
139 
140  return;
141 }

◆ defineTables()

void TRT_FillCablingData_SR1::defineTables ( )
private

Definition at line 145 of file TRT_FillCablingData_SR1.cxx.

146 {
147  ATH_MSG_INFO( "In defineTables" );
148 
149 
150  // Reading mapping
151  int moduleId, strawLayerId, strawInLayerId;
152  Identifier strawID;
153  IdentifierHash hashId;
154 
155  uint32_t strawNumber, bufferOffset;
156  string thisLine;
157 
158  std::string dataFile;
159  std::string file;
160 
161  std::ifstream *inputFile;
162 
163  /**************************************************************/
164  /* Back Side Connector Tables */
165  /**************************************************************/
166 
167  /*
168  * Module Type 1, Back Side, Small and Large Triangles
169  */
170  ATH_MSG_INFO( "defineTables: 1BS-1BL " );
171 
172  dataFile = "TRT_SR1_1BS-1BL_map.dat";
173  file = PathResolver::find_file (dataFile, "DATAPATH");
174  inputFile = new std::ifstream( file.c_str() );
175 
176  if (!inputFile->is_open())
177  {
178  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
179  }
180 
181  while ( getline( *inputFile, thisLine ) )
182  {
183  istringstream parse( thisLine );
184 
185  parse >> strawNumber >> bufferOffset;
186 
187  m_1BS_1BL_map[bufferOffset] = strawNumber;
188  }
189 
190 
191  inputFile->close();
192  delete inputFile;
193 
194 
195  /*
196  * Module Type 2, Back Side, Small Triangle and Large Quad
197  */
198  ATH_MSG_INFO( "defineTables: 2BS-2BL1 " );
199 
200  dataFile = "TRT_SR1_2BS-2BL1_map.dat";
201  file = PathResolver::find_file (dataFile, "DATAPATH");
202  inputFile = new std::ifstream( file.c_str() );
203 
204  if (!inputFile->is_open())
205  {
206  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
207  }
208 
209  while ( getline( *inputFile, thisLine ) )
210  {
211  istringstream parse( thisLine );
212 
213  parse >> strawNumber >> bufferOffset;
214 
215  m_2BS_2BL1_map[bufferOffset] = strawNumber;
216  }
217 
218 
219  inputFile->close();
220  delete inputFile;
221 
222 
223  /*
224  * Back Side, Module Type 2 Large Triangle and Module Type 3 Large Quad
225  */
226  ATH_MSG_INFO( "defineTables: 2BL2-3BL1 " );
227 
228  dataFile = "TRT_SR1_2BL2-3BL1_map.dat";
229  file = PathResolver::find_file (dataFile, "DATAPATH");
230  inputFile = new std::ifstream( file.c_str() );
231 
232  if (!inputFile->is_open())
233  {
234  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
235  }
236 
237  while ( getline( *inputFile, thisLine ) )
238  {
239  istringstream parse( thisLine );
240 
241  parse >> strawNumber >> bufferOffset;
242 
243  m_2BL2_3BL1_map[bufferOffset] = strawNumber;
244  }
245 
246  inputFile->close();
247 
248 
249  /*
250  * Back Side, Module Type 3 Large Triangle
251  */
252  ATH_MSG_INFO( "defineTables: 3BL2 " );
253 
254  dataFile = "TRT_SR1_3BL2_map.dat";
255  file = PathResolver::find_file (dataFile, "DATAPATH");
256  inputFile = new std::ifstream( file.c_str() );
257 
258  if (!inputFile->is_open())
259  {
260  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
261  }
262 
263  while ( getline( *inputFile, thisLine ) )
264  {
265  istringstream parse( thisLine );
266 
267  parse >> strawNumber >> bufferOffset;
268 
269  m_3BL2_map[bufferOffset] = strawNumber;
270  }
271 
272  inputFile->close();
273 
274 
275  /*
276  * Back Side, Module Type 3 Small Triangle
277  */
278  ATH_MSG_INFO( "defineTables: 3BS " );
279 
280  dataFile = "TRT_SR1_3BS_map.dat";
281  file = PathResolver::find_file (dataFile, "DATAPATH");
282  inputFile = new std::ifstream( file.c_str() );
283 
284  if (!inputFile->is_open())
285  {
286  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
287  }
288 
289  while ( getline( *inputFile, thisLine ) )
290  {
291  istringstream parse( thisLine );
292 
293  parse >> strawNumber >> bufferOffset;
294 
295  m_3BS_map[bufferOffset] = strawNumber;
296  }
297 
298  inputFile->close();
299 
300 
301  /**************************************************************/
302  /* Front Side Connector Tables */
303  /**************************************************************/
304 
305  /*
306  * Module Type 1, Front Side, Small and Large Triangles
307  */
308  ATH_MSG_INFO( "defineTables: 1FS-1FL " );
309 
310  dataFile = "TRT_SR1_1FS-1FL_map.dat";
311  file = PathResolver::find_file (dataFile, "DATAPATH");
312  inputFile = new std::ifstream( file.c_str() );
313 
314  if (!inputFile->is_open())
315  {
316  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
317  }
318 
319  while ( getline( *inputFile, thisLine ) )
320  {
321  istringstream parse( thisLine );
322 
323  parse >> strawNumber >> bufferOffset;
324 
325  m_1FS_1FL_map[bufferOffset] = strawNumber;
326  }
327 
328  inputFile->close();
329 
330 
331  /*
332  * Module Type 2, Front Side, Small Triangle and Large Trapezoid
333  */
334  ATH_MSG_INFO( "defineTables: 2FS-2FL1 " );
335 
336  dataFile = "TRT_SR1_2FS-2FL1_map.dat";
337  file = PathResolver::find_file (dataFile, "DATAPATH");
338  inputFile = new std::ifstream( file.c_str() );
339 
340  if (!inputFile->is_open())
341  {
342  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
343  }
344 
345  while ( getline( *inputFile, thisLine ) )
346  {
347  istringstream parse( thisLine );
348 
349  parse >> strawNumber >> bufferOffset;
350 
351  m_2FS_2FL1_map[bufferOffset] = strawNumber;
352  }
353 
354  inputFile->close();
355 
356 
357  /*
358  * Front Side, Module Type 2 Large Triangle and Module Type 3 Large Quad
359  */
360  ATH_MSG_INFO( "defineTables: 2FL2-3FL1 " );
361 
362  dataFile = "TRT_SR1_2FL2-3FL1_map.dat";
363  file = PathResolver::find_file (dataFile, "DATAPATH");
364  inputFile = new std::ifstream( file.c_str() );
365 
366  if (!inputFile->is_open())
367  {
368  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
369  }
370 
371  while ( getline( *inputFile, thisLine ) )
372  {
373  istringstream parse( thisLine );
374 
375  parse >> strawNumber >> bufferOffset;
376 
377  m_2FL2_3FL1_map[bufferOffset] = strawNumber;
378  }
379 
380  inputFile->close();
381 
382 
383  /*
384  * Front Side, Module Type 3 Large Triangle
385  */
386  ATH_MSG_INFO( "defineTables: 3FL2 " );
387 
388  dataFile = "TRT_SR1_3FL2_map.dat";
389  file = PathResolver::find_file (dataFile, "DATAPATH");
390  inputFile = new std::ifstream( file.c_str() );
391 
392  if (!inputFile->is_open())
393  {
394  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
395  }
396 
397  while ( getline( *inputFile, thisLine ) )
398  {
399  istringstream parse( thisLine );
400 
401  parse >> strawNumber >> bufferOffset;
402 
403  m_3FL2_map[bufferOffset] = strawNumber;
404  }
405 
406  inputFile->close();
407 
408 
409  /*
410  * Front Side, Module Type 3 Small Triangle
411  */
412  ATH_MSG_INFO( "defineTables: 3FS " );
413 
414  dataFile = "TRT_SR1_3FS_map.dat";
415  file = PathResolver::find_file (dataFile, "DATAPATH");
416  inputFile = new std::ifstream( file.c_str() );
417 
418  if (!inputFile->is_open())
419  {
420  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
421  }
422 
423  while ( getline( *inputFile, thisLine ) )
424  {
425  istringstream parse( thisLine );
426 
427  parse >> strawNumber >> bufferOffset;
428 
429  m_3FS_map[bufferOffset] = strawNumber;
430  }
431 
432  inputFile->close();
433 
434 
435  /**************************************************************/
436  /* Global Cabling Specification */
437  /**************************************************************/
438 
439  ATH_MSG_INFO( "defineTables: Global Spec " );
440 
441  dataFile = "TRT_SR1_Barrel_Cable_map.dat";
442 
443 
444  file = PathResolver::find_file (dataFile, "DATAPATH");
445  inputFile = new std::ifstream( file.c_str() );
446 
447  if (!inputFile->is_open())
448  {
449  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Could not open file " << dataFile );
450  }
451 
452  uint32_t srcId;
453  std::string feId;
454 
455  while ( getline( *inputFile, thisLine ) )
456  {
457  if ( thisLine.length() == 0 )
458  continue;
459 
460  string::size_type loc = thisLine.find( '#' );
461  if ( loc != string::npos )
462  {
463  thisLine.replace( loc, thisLine.length(), 1, ' ' );
464 
465  loc = thisLine.find_first_not_of( " \t" );
466  if ( loc == string::npos )
467  continue;
468  }
469 
470 
471  istringstream parse( thisLine );
472 
473  GlobalCableMap_t *my_map = new GlobalCableMap_t;
474 
475  parse >> (hex) >> srcId >> (dec) >> my_map->Phi >> my_map->RODGroup >> my_map->FEid;
476 
477 
478  // int this_phi; // set but not used
479 
480  if ( (srcId & 0xFF0000) == 0x310000 )
481  {
482  my_map->SubDet = 1;
483  // this_phi = my_map->Phi; // set but not used
484  }
485  else if ( (srcId & 0xFF0000) == 0x320000 )
486  {
487  my_map->SubDet = -1;
488  // this_phi = -my_map->Phi; // set but not used
489  }
490  else if ( (srcId & 0xFF0000) == 0x330000 )
491  {
492  my_map->SubDet = 2;
493  // this_phi = my_map->Phi; // set but not used
494  }
495  else if ( (srcId & 0xFF0000) == 0x340000 )
496  {
497  my_map->SubDet = -2;
498  // this_phi = -my_map->Phi; // set but not used
499  }
500  else {
501  ATH_MSG_FATAL( "TRT_FillCablingData_SR1: Invalid source id " << (hex) << srcId << (dec) );
502  my_map->SubDet = 0;
503  }
504 
505 
506  /*
507  * my_phi is
508  32 - 63 for +barrel
509  64 - 95 for +end cap
510  -32 - -63 for -barrel
511  -64 - -95 for -end cap
512  */
513 
514 
515  // int my_phi = my_map->Phi * my_map->SubDet;
516  int my_phi = my_map->SubDet * 32 + my_map->Phi;
517 
518 
520  while ( (it != (m_phi_to_source[my_phi]).end()) && (srcId != *it) )
521  ++it;
522 
523  if ( it == m_phi_to_source[my_phi].end() )
524  {
525  (m_phi_to_source[my_phi]).push_back( srcId );
526  }
527 
528 
529  (m_CableMap[srcId]).push_back( my_map );
530  }
531 
532  inputFile->close();
533 
534 #ifdef NOTDEF
535  int ptk_i;
536  for ( ptk_i=1; ptk_i<=444; ptk_i++ )
537  {
538  std::map<int, int>::iterator map_it = m_1BS_1BL_map.find( ptk_i );
539  // if ( map_it != m_1BS_1BL_map.end() )
540  // cout << "Offset " << map_it->first << " is Straw " << map_it->second << endl;
541  }
542 #endif // NOTDEF
543 
545  for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); ++pos )
546  {
547  std::vector< GlobalCableMap_t *> GCM;
548 
549  GCM = pos->second;
550 
551  sort( GCM.begin(), GCM.end(), greater_RG_GCM );
552 
553  int ConnectorCount=-1;
555  for ( it=GCM.begin(); it != GCM.end(); ++it )
556  {
557  ConnectorCount++;
558 
559  GlobalCableMap_t *my_map = *it;
560  std::map<int, int> con_map;
561 
562 
563  if ( my_map->FEid == "1BS_1BL" )
564  con_map = m_1BS_1BL_map;
565  else if ( my_map->FEid == "2BS_2BL1" )
566  con_map = m_2BS_2BL1_map;
567  else if ( my_map->FEid == "2BL2_3BL1" )
568  con_map = m_2BL2_3BL1_map;
569  else if ( my_map->FEid == "3BL2" )
570  con_map = m_3BL2_map;
571  else if ( my_map->FEid == "3BS" )
572  con_map = m_3BS_map;
573  else if ( my_map->FEid == "1FS_1FL" )
574  con_map = m_1FS_1FL_map;
575  else if ( my_map->FEid == "2FS_2FL1" )
576  con_map = m_2FS_2FL1_map;
577  else if ( my_map->FEid == "2FL2_3FL1" )
578  con_map = m_2FL2_3FL1_map;
579  else if ( my_map->FEid == "3FL2" )
580  con_map = m_3FL2_map;
581  else if ( my_map->FEid == "3FS" )
582  con_map = m_3FS_map;
583  else if ( my_map->FEid == "ec_rod1l" )
584  con_map = m_ec_1l_map;
585  else if ( my_map->FEid == "ec_rod2l" )
586  con_map = m_ec_2l_map;
587  else if ( my_map->FEid == "ec_rod3l" )
588  con_map = m_ec_3l_map;
589  else if ( my_map->FEid == "ec_rod1r" )
590  con_map = m_ec_1r_map;
591  else if ( my_map->FEid == "ec_rod2r" )
592  con_map = m_ec_2r_map;
593  else if ( my_map->FEid == "ec_rod3r" )
594  con_map = m_ec_3r_map;
595 
596 
597  int i;
598  Identifier NULLstrawID(0);
599 
600  if ( abs( my_map->SubDet ) == 1 ) // barrel
601  {
602  for ( i=1; i<=444; i++ ) // loop over buffer offset
603  {
604  std::map<int, int>::iterator map_it = con_map.find( i );
605 
606  if ( map_it == con_map.end() )
607  {
609  i + ConnectorCount*444,
610  NULLstrawID );
611  continue;
612  }
613 
614  int BufferLocation = map_it->first + ConnectorCount*444;
615  int Straw = map_it->second - 1; // Offline starts at 0
616 
617  strawLayerId = 0;
618  while ( (m_numberOfStrawsInLayers[strawLayerId] <= Straw) &&
619  (m_numberOfStrawsInLayers[strawLayerId] != -1) )
620  {
621  strawLayerId++;
622  }
623 
624  if ( m_numberOfStrawsInLayers[strawLayerId] == -1)
625  {
626  ATH_MSG_WARNING( "Invalid Straw in table: " << Straw );
627  continue;
628  }
629 
630 
631  strawInLayerId = m_numberOfStrawsInLayers[strawLayerId] - Straw - 1;
632 
633  moduleId = -1;
634  if ( strawLayerId < m_numberOfLayersA )
635  moduleId = 0;
636  else if ( strawLayerId < (m_numberOfLayersA + m_numberOfLayersB) )
637  {
638  moduleId = 1;
639  strawLayerId = strawLayerId - m_numberOfLayersA;
640  }
641  else if ( strawLayerId < (m_numberOfLayersA + m_numberOfLayersB + m_numberOfLayersC) )
642  {
643  moduleId = 2;
644  strawLayerId = strawLayerId - (m_numberOfLayersA + m_numberOfLayersB);
645  }
646 
647 
648 
649  strawID = m_TRTHelper->straw_id( my_map->SubDet, my_map->Phi,
650  moduleId, strawLayerId,
651  strawInLayerId );
652 
653 
654  m_cabling->set_identifierForAllStraws( pos->first, BufferLocation,
655  strawID );
656 
657 
658  // IdLayer = m_TRTHelper->layer_id( strawID );
659 
660  // int result = m_TRTHelper->get_hash( strawID, hashId, &m_cntx );
661 
662  Identifier Lid = m_TRTHelper->layer_id( my_map->SubDet,
663  my_map->Phi, moduleId,
664  strawLayerId );
665 
666  int result = m_TRTHelper->get_hash( Lid, hashId, &m_cntx );
667  if ( result != 0 )
668  {
669  ATH_MSG_WARNING( ">>>>>>>>>>> Get Hash FAILED! <<<<<<<<<<" );
670  ATH_MSG_WARNING( "Straw = " << Straw \
671  << " array = " << m_numberOfStrawsInLayers[strawLayerId] \
672  << " SubDet = " << my_map->SubDet \
673  << " Phi = " << my_map->Phi \
674  << " Module = " << moduleId \
675  << " Layer = " << strawLayerId \
676  << " StrInLay = " << strawInLayerId );
677  }
678 
679 
681  BufferLocation,
682  hashId );
683  }
684  }
685  else // Endcap
686  {
687  for ( i=0; i<1776; i++ ) // loop over buffer offset
688  {
689  std::map<int, int>::iterator map_it = con_map.find( i );
690 
691  if ( map_it == con_map.end() )
692  {
694  NULLstrawID );
695  continue;
696  }
697 
698  int BufferLocation = i;
699  int Straw = map_it->second; // Offline starts at 0
700 
701  strawLayerId = (Straw >> 8) & 0xff;
702  strawInLayerId = Straw & 0xff;
703 
704  moduleId = strawLayerId / 8;
705  if ( moduleId < 12 ) // A wheel?
706  {
707  moduleId = moduleId / 2;
708  strawLayerId = strawLayerId % 16;
709  }
710  else // B wheel
711  {
712  moduleId = moduleId - 6;
713  strawLayerId = strawLayerId % 8;
714  }
715 
716 
717  strawID = m_TRTHelper->straw_id( my_map->SubDet, my_map->Phi,
718  moduleId, strawLayerId,
719  strawInLayerId );
720 
721 
722  m_cabling->set_identifierForAllStraws( pos->first, BufferLocation,
723  strawID );
724 
725 
726  // IdLayer = m_TRTHelper->layer_id( strawID );
727 
728  // int result = m_TRTHelper->get_hash( strawID, hashId, &m_cntx );
729 
730  Identifier Lid = m_TRTHelper->layer_id( my_map->SubDet,
731  my_map->Phi, moduleId,
732  strawLayerId );
733 
734  int result = m_TRTHelper->get_hash( Lid, hashId, &m_cntx );
735  if ( result != 0 )
736  {
737  ATH_MSG_WARNING( ">>>>>>>>>>> Get Hash FAILED! <<<<<<<<<<" );
738 
739  ATH_MSG_WARNING( "Straw = " << Straw \
740  << " SubDet = " << my_map->SubDet \
741  << " Phi = " << my_map->Phi \
742  << " Module = " << moduleId \
743  << " Layer = " << strawLayerId \
744  << " StrInLay = " << strawInLayerId );
745  }
746 
747 
749  BufferLocation,
750  hashId );
751  } // loop over bufferOffsets
752  } // Endcap
753  } // loop over GCM
754  } // loop over CableMap
755 
756 
757 
758  ATH_MSG_INFO( "Out of defineTables" );
759 
760  return;
761 }

◆ 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

◆ fillCollID()

void TRT_FillCablingData_SR1::fillCollID ( uint32_t  rob_id,
std::vector< IdentifierHash > &  ids 
)

Definition at line 789 of file TRT_FillCablingData_SR1.cxx.

791 {
792 
793  IdentifierHash idHash;
794 
795  // eformat::SubDetector det_id; // set but not used
796  // int module; // set but not used
797 
798  eformat::helper::SourceIdentifier id (rob_id);
799  // det_id = id.subdetector_id(); // set but not used
800  // module = (int) id.module_id(); // set but not used
801 
802 
803  std::map<int, std::vector<GlobalCableMap_t *> >::iterator map_it = m_CableMap.find( rob_id );
804  if ( map_it == m_CableMap.end() )
805  {
806  ATH_MSG_FATAL( "fillCollID: Unable to get CableMap for rob_id " << std::hex << rob_id << std::dec );
807  return;
808  }
809 
810  std::vector< GlobalCableMap_t *> GCM = map_it->second;
811 
812  sort( GCM.begin(), GCM.end(), greater_Phi_GCM );
813 
815 
816 
817  it=GCM.begin();
818  while ( it != GCM.end() )
819  {
820  GlobalCableMap_t *my_map = *it;
821  int rings = 0;
822  int phi = my_map->Phi;
823  int barrelId = my_map->SubDet;
824 
825  if ( abs( barrelId ) == 1 ) // barrel?
826  {
827 
828  bool done = !((my_map->SubDet == barrelId) && (my_map->Phi == phi));
829  while ( !done && (it != GCM.end()) )
830  {
831 
832 
833  if ( (my_map->FEid == "1BS_1BL") || (my_map->FEid == "1FS_1FL") )
834  rings |= 1;
835  else if ( (my_map->FEid == "2BS_2BL1") || (my_map->FEid == "2FS_2FL1") )
836  rings |= 2;
837  else if ( (my_map->FEid == "2BL2_3BL1") || (my_map->FEid == "2FL2_3FL1") )
838  rings |= 3;
839  else if ( (my_map->FEid == "3BL2") || (my_map->FEid == "3BS") ||
840  (my_map->FEid == "3FL2") || (my_map->FEid == "3FS") )
841  rings |= 4;
842 
843  ++it;
844 
845  if ( it != GCM.end() )
846  {
847  my_map = *it;
848  done = !((my_map->SubDet == barrelId) && (my_map->Phi == phi));
849  }
850 
851  }
852 
853 
854  int phiModule = phi;
855 
856  for (int ring = 0; ring < m_numberOfRings; ++ring)
857  {
858  if ( (ring == 0) && ((1<<ring) & rings) ) // Module Type 1
859  {
860  for (int layer = 0; layer < m_numberOfLayersA; ++layer)
861  {
862  Identifier id = m_TRTHelper->layer_id(barrelId, phiModule,
863  ring, layer);
864 
865  if (!m_TRTHelper->get_hash(id, idHash, &m_cntx))
866  {
867  ids.push_back(idHash);
868  }
869  else
870  ATH_MSG_FATAL( " Unable to get hash for id " << m_TRTHelper->show_to_string(id) );
871  }
872  }
873  else if ( (ring == 1) && ((1<<ring) & rings) ) // Module Type 2
874  {
875  for (int layer = 0; layer < m_numberOfLayersB; ++layer)
876  {
877  Identifier id = m_TRTHelper->layer_id(barrelId, phiModule,
878  ring, layer);
879 
880  if (!m_TRTHelper->get_hash(id, idHash, &m_cntx))
881  {
882  ids.push_back(idHash);
883  }
884  else
885  ATH_MSG_FATAL( " Unable to get hash for id " << m_TRTHelper->show_to_string(id) );
886  }
887  }
888  else if ( (ring == 2) && ((1<<ring) & rings) ) // Module Type 3
889  {
890  for (int layer = 0; layer < m_numberOfLayersC; ++layer)
891  {
892  Identifier id = m_TRTHelper->layer_id(barrelId, phiModule,
893  ring, layer);
894 
895  if (!m_TRTHelper->get_hash(id, idHash, &m_cntx))
896  {
897  ids.push_back(idHash);
898  }
899  else
900  ATH_MSG_FATAL( " Unable to get hash for id " << m_TRTHelper->show_to_string(id) );
901 
902  }
903  }
904  }
905  }
906  else // End cap
907  {
908  int StartWheel=0;
909  int EndWheel=0;
910  int StartLayer=0;
911  int EndLayer=0;
912 
913  int phiModule = phi;
914 
915  bool done = !((my_map->SubDet == barrelId) && (my_map->Phi == phi));
916  while ( !done && (it != GCM.end()) )
917  {
918 
919  if ( (my_map->FEid == "ec_rod1l") ||
920  (my_map->FEid == "ec_rod1r") )
921  {
922  StartWheel = 0;
923  EndWheel = 4;
924  StartLayer = 0;
925  EndLayer = 16;
926  }
927  else if ( (my_map->FEid == "ec_rod2l") ||
928  (my_map->FEid == "ec_rod2r") )
929  {
930  StartWheel = 4;
931  EndWheel = 6;
932  StartLayer = 0;
933  EndLayer = 16;
934  }
935  else if ( (my_map->FEid == "ec_rod3l") ||
936  (my_map->FEid == "ec_rod3r") )
937  {
938  StartWheel = 6;
939  EndWheel = 14;
940  StartLayer = 0;
941  EndLayer = 8;
942  }
943  else
944  {
945  ATH_MSG_ERROR( "Invalid my_map->FEid. This should not happen!" );
946  return;
947  }
948 
949  ++it;
950 
951  if ( it != GCM.end() )
952  {
953  my_map = *it;
954  done = !((my_map->SubDet == barrelId) && (my_map->Phi == phi));
955  }
956 
957  }
958 
959 
960  for (int wheel = StartWheel; wheel < EndWheel; wheel++ )
961  {
962  for (int layer = StartLayer; layer < EndLayer; layer++ )
963  {
964  Identifier id = m_TRTHelper->layer_id( barrelId, phiModule,
965  wheel, layer);
966 
967  if (!m_TRTHelper->get_hash(id, idHash, &m_cntx))
968  {
969  ids.push_back(idHash);
970  }
971  else
972  ATH_MSG_FATAL( " Unable to get hash for id " << m_TRTHelper->show_to_string(id) );
973  } // loop over layer
974  } // loop over wheel
975  } // endcap
976  }
977 
978  return;
979 }

◆ fillData()

TRT_CablingData * TRT_FillCablingData_SR1::fillData ( )

Definition at line 96 of file TRT_FillCablingData_SR1.cxx.

97 {
98  return m_cabling;
99 }

◆ finalize()

StatusCode TRT_FillCablingData_SR1::finalize ( )
virtual

Definition at line 87 of file TRT_FillCablingData_SR1.cxx.

88 {
89  delete m_cabling;
90 
92  return sc;
93 }

◆ getRobID()

std::vector< uint32_t > TRT_FillCablingData_SR1::getRobID ( Identifier  id) const

Definition at line 987 of file TRT_FillCablingData_SR1.cxx.

988 {
989  std::vector<uint32_t> v;
990 
991 
992  int id_barrel_ec = m_TRTHelper->barrel_ec(id);
993  int id_phi_module = m_TRTHelper->phi_module(id);
994  // int id_layer = m_TRTHelper->layer_or_wheel(id);
995 
996  /*
997  * It seems to be assumed that the ROD/ROB source IDs are aligned to
998  * the phi sector numbering. This is NOT the case for SR1, so we
999  * need to fix it up.
1000  * In addition, for Module type 3 (ie, layer 2), we need to read out
1001  * the ROB with the 3S boards (number 1), as well as the ROB with
1002  * the rest of the sector.
1003  * We assume only one side here.
1004  */
1005 
1006  id_phi_module = id_phi_module + 32 * id_barrel_ec;
1007 
1008  const auto& it = m_phi_to_source.find (id_phi_module);
1009  if (it != m_phi_to_source.end()) {
1010  for (u_int32_t id : it->second) {
1011  eformat::helper::SourceIdentifier sid( id );
1012  v.push_back(sid.code());
1013  }
1014  }
1015 
1016  return v;
1017 }

◆ initialize()

StatusCode TRT_FillCablingData_SR1::initialize ( )
virtual

Definition at line 60 of file TRT_FillCablingData_SR1.cxx.

61 {
62  ATH_MSG_INFO( "TRT_FillCablingData_SR1::initialize" );
63 
64 
65  // Get the TRT Helper
66  if (detStore()->retrieve(m_TRTHelper, "TRT_ID").isFailure())
67  {
68  ATH_MSG_FATAL( "Could not get TRT ID helper" );
69  return StatusCode::FAILURE;
70  }
72 
73 
75 
76 
78  defineTables();
79  defineCollID();
80 
81  ATH_MSG_INFO( "TRT_FillCablingData_SR1::initializiation finished" );
82 
83  return StatusCode::SUCCESS;
84 }

◆ 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 & TRT_FillCablingData_SR1::interfaceID ( )
static

Definition at line 55 of file TRT_FillCablingData_SR1.cxx.

56 { return IID_ITRT_FillCablingData_SR1; }

◆ 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.

◆ 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.

◆ 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  }

Member Data Documentation

◆ m_1BS_1BL_map

std::map< int, int > TRT_FillCablingData_SR1::m_1BS_1BL_map
private

Definition at line 110 of file TRT_FillCablingData_SR1.h.

◆ m_1FS_1FL_map

std::map< int, int > TRT_FillCablingData_SR1::m_1FS_1FL_map
private

Definition at line 116 of file TRT_FillCablingData_SR1.h.

◆ m_2BL2_3BL1_map

std::map< int, int > TRT_FillCablingData_SR1::m_2BL2_3BL1_map
private

Definition at line 112 of file TRT_FillCablingData_SR1.h.

◆ m_2BS_2BL1_map

std::map< int, int > TRT_FillCablingData_SR1::m_2BS_2BL1_map
private

Definition at line 111 of file TRT_FillCablingData_SR1.h.

◆ m_2FL2_3FL1_map

std::map< int, int > TRT_FillCablingData_SR1::m_2FL2_3FL1_map
private

Definition at line 118 of file TRT_FillCablingData_SR1.h.

◆ m_2FS_2FL1_map

std::map< int, int > TRT_FillCablingData_SR1::m_2FS_2FL1_map
private

Definition at line 117 of file TRT_FillCablingData_SR1.h.

◆ m_3BL2_map

std::map< int, int > TRT_FillCablingData_SR1::m_3BL2_map
private

Definition at line 113 of file TRT_FillCablingData_SR1.h.

◆ m_3BS_map

std::map< int, int > TRT_FillCablingData_SR1::m_3BS_map
private

Definition at line 114 of file TRT_FillCablingData_SR1.h.

◆ m_3FL2_map

std::map< int, int > TRT_FillCablingData_SR1::m_3FL2_map
private

Definition at line 119 of file TRT_FillCablingData_SR1.h.

◆ m_3FS_map

std::map< int, int > TRT_FillCablingData_SR1::m_3FS_map
private

Definition at line 120 of file TRT_FillCablingData_SR1.h.

◆ m_CableMap

GlobalCableMap TRT_FillCablingData_SR1::m_CableMap
private

Definition at line 133 of file TRT_FillCablingData_SR1.h.

◆ m_cabling

TRT_CablingData* TRT_FillCablingData_SR1::m_cabling = nullptr
private

Definition at line 72 of file TRT_FillCablingData_SR1.h.

◆ m_cntx

IdContext TRT_FillCablingData_SR1::m_cntx
private

Definition at line 70 of file TRT_FillCablingData_SR1.h.

◆ m_collID

std::vector<std::vector<IdentifierHash> *> TRT_FillCablingData_SR1::m_collID
private

Definition at line 104 of file TRT_FillCablingData_SR1.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_ec_1l_map

std::map< int, int > TRT_FillCablingData_SR1::m_ec_1l_map
private

Definition at line 122 of file TRT_FillCablingData_SR1.h.

◆ m_ec_1r_map

std::map< int, int > TRT_FillCablingData_SR1::m_ec_1r_map
private

Definition at line 126 of file TRT_FillCablingData_SR1.h.

◆ m_ec_2l_map

std::map< int, int > TRT_FillCablingData_SR1::m_ec_2l_map
private

Definition at line 123 of file TRT_FillCablingData_SR1.h.

◆ m_ec_2r_map

std::map< int, int > TRT_FillCablingData_SR1::m_ec_2r_map
private

Definition at line 127 of file TRT_FillCablingData_SR1.h.

◆ m_ec_3l_map

std::map< int, int > TRT_FillCablingData_SR1::m_ec_3l_map
private

Definition at line 124 of file TRT_FillCablingData_SR1.h.

◆ m_ec_3r_map

std::map< int, int > TRT_FillCablingData_SR1::m_ec_3r_map
private

Definition at line 128 of file TRT_FillCablingData_SR1.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_identfierForAllStraws

std::vector< std::vector<Identifier> > TRT_FillCablingData_SR1::m_identfierForAllStraws
private

Definition at line 97 of file TRT_FillCablingData_SR1.h.

◆ m_identfierHashForAllStraws

std::vector< std::vector<IdentifierHash> > TRT_FillCablingData_SR1::m_identfierHashForAllStraws
private

Definition at line 101 of file TRT_FillCablingData_SR1.h.

◆ m_numberOfIdentifierSectors

int TRT_FillCablingData_SR1::m_numberOfIdentifierSectors = 0
private

Definition at line 86 of file TRT_FillCablingData_SR1.h.

◆ m_numberOfLayersA

int TRT_FillCablingData_SR1::m_numberOfLayersA = 0
private

Definition at line 81 of file TRT_FillCablingData_SR1.h.

◆ m_numberOfLayersB

int TRT_FillCablingData_SR1::m_numberOfLayersB = 0
private

Definition at line 82 of file TRT_FillCablingData_SR1.h.

◆ m_numberOfLayersC

int TRT_FillCablingData_SR1::m_numberOfLayersC = 0
private

Definition at line 83 of file TRT_FillCablingData_SR1.h.

◆ m_numberOfRings

int TRT_FillCablingData_SR1::m_numberOfRings = 0
private

Definition at line 80 of file TRT_FillCablingData_SR1.h.

◆ m_numberOfStrawsInLayers

std::vector< int > TRT_FillCablingData_SR1::m_numberOfStrawsInLayers
private

Definition at line 107 of file TRT_FillCablingData_SR1.h.

◆ m_phi_to_source

std::map<int, std::vector<uint32_t> > TRT_FillCablingData_SR1::m_phi_to_source
private

Definition at line 93 of file TRT_FillCablingData_SR1.h.

◆ m_TRTHelper

const TRT_ID* TRT_FillCablingData_SR1::m_TRTHelper
private

Definition at line 69 of file TRT_FillCablingData_SR1.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
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
greater_Phi_GCM
static bool greater_Phi_GCM(const GlobalCableMap_t *a, const GlobalCableMap_t *b)
Definition: TRT_FillCablingData_SR1.cxx:1034
TRT_ID::layer_id
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition: TRT_ID.h:500
TRT_FillCablingData_SR1::m_2BS_2BL1_map
std::map< int, int > m_2BS_2BL1_map
Definition: TRT_FillCablingData_SR1.h:111
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TRT_FillCablingData_SR1::m_cabling
TRT_CablingData * m_cabling
Definition: TRT_FillCablingData_SR1.h:72
get_generator_info.result
result
Definition: get_generator_info.py:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
TRT_CablingData::set_identifierHashForAllStraws
void set_identifierHashForAllStraws(int rod, int bufferPosition, IdentifierHash hashId)
Definition: TRT_CablingData.cxx:107
TRT_FillCablingData_SR1::m_3FS_map
std::map< int, int > m_3FS_map
Definition: TRT_FillCablingData_SR1.h:120
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TRT_FillCablingData_SR1::m_ec_3r_map
std::map< int, int > m_ec_3r_map
Definition: TRT_FillCablingData_SR1.h:128
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:983
TRT_FillCablingData_SR1::m_numberOfLayersB
int m_numberOfLayersB
Definition: TRT_FillCablingData_SR1.h:82
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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
TRT_CablingData::set_identifierForAllStraws
void set_identifierForAllStraws(int rod, int bufferPosition, Identifier strawID)
Definition: TRT_CablingData.cxx:86
GlobalCableMap_t
Definition: TRT_FillCablingData_Types.h:13
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
ActsProtoTrackCreationAndFitConfig.dataFile
dataFile
Definition: ActsProtoTrackCreationAndFitConfig.py:137
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
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
TRT_FillCablingData_SR1::m_numberOfRings
int m_numberOfRings
Definition: TRT_FillCablingData_SR1.h:80
TRT_FillCablingData_SR1::m_numberOfStrawsInLayers
std::vector< int > m_numberOfStrawsInLayers
Definition: TRT_FillCablingData_SR1.h:107
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TRT_FillCablingData_SR1::m_1FS_1FL_map
std::map< int, int > m_1FS_1FL_map
Definition: TRT_FillCablingData_SR1.h:116
TRT_ID::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override final
Create hash id from compact id (return == 0 for OK)
Definition: TRT_ID.cxx:946
TRT_FillCablingData_SR1::m_ec_1l_map
std::map< int, int > m_ec_1l_map
Definition: TRT_FillCablingData_SR1.h:122
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
lumiFormat.i
int i
Definition: lumiFormat.py:92
TRT_FillCablingData_SR1::m_numberOfLayersA
int m_numberOfLayersA
Definition: TRT_FillCablingData_SR1.h:81
TRT_FillCablingData_SR1::m_3BL2_map
std::map< int, int > m_3BL2_map
Definition: TRT_FillCablingData_SR1.h:113
TRT_CablingData::add_collID
void add_collID(uint32_t rob_id, std::vector< IdentifierHash > *vectID)
Definition: TRT_CablingData.cxx:168
TRT_FillCablingData_SR1::m_numberOfIdentifierSectors
int m_numberOfIdentifierSectors
Definition: TRT_FillCablingData_SR1.h:86
TRT_ID::straw_layer_context
IdContext straw_layer_context(void) const
straw_layer id
Definition: TRT_ID.h:713
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT_FillCablingData_SR1::m_ec_1r_map
std::map< int, int > m_ec_1r_map
Definition: TRT_FillCablingData_SR1.h:126
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TRT_FillCablingData_SR1::m_2BL2_3BL1_map
std::map< int, int > m_2BL2_3BL1_map
Definition: TRT_FillCablingData_SR1.h:112
TRT_FillCablingData_SR1::m_2FS_2FL1_map
std::map< int, int > m_2FS_2FL1_map
Definition: TRT_FillCablingData_SR1.h:117
file
TFile * file
Definition: tile_monitor.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TRT_FillCablingData_SR1::m_3BS_map
std::map< int, int > m_3BS_map
Definition: TRT_FillCablingData_SR1.h:114
TRT_FillCablingData_SR1::m_CableMap
GlobalCableMap m_CableMap
Definition: TRT_FillCablingData_SR1.h:133
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
TRT_FillCablingData_SR1::m_3FL2_map
std::map< int, int > m_3FL2_map
Definition: TRT_FillCablingData_SR1.h:119
GlobalCableMap_t::RODGroup
int RODGroup
Definition: TRT_FillCablingData_Types.h:16
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::Straw
@ Straw
Definition: TrackingPrimitives.h:557
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
TRT_FillCablingData_SR1::m_TRTHelper
const TRT_ID * m_TRTHelper
Definition: TRT_FillCablingData_SR1.h:69
TRT_FillCablingData_SR1::m_phi_to_source
std::map< int, std::vector< uint32_t > > m_phi_to_source
Definition: TRT_FillCablingData_SR1.h:93
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:875
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
TRT_FillCablingData_SR1::defineTables
void defineTables()
Definition: TRT_FillCablingData_SR1.cxx:145
python.PyAthena.v
v
Definition: PyAthena.py:157
GlobalCableMap_t::Phi
int Phi
Definition: TRT_FillCablingData_Types.h:15
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TRT::Hit::phiModule
@ phiModule
Definition: HitInfo.h:80
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
TRT_FillCablingData_SR1::m_numberOfLayersC
int m_numberOfLayersC
Definition: TRT_FillCablingData_SR1.h:83
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TRT_FillCablingData_SR1::m_ec_2l_map
std::map< int, int > m_ec_2l_map
Definition: TRT_FillCablingData_SR1.h:123
TRT_CablingData
Definition: TRT_CablingData.h:18
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
TRT_FillCablingData_SR1::m_cntx
IdContext m_cntx
Definition: TRT_FillCablingData_SR1.h:70
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
TRT_FillCablingData_SR1::m_1BS_1BL_map
std::map< int, int > m_1BS_1BL_map
Definition: TRT_FillCablingData_SR1.h:110
TRT_FillCablingData_SR1::fillCollID
void fillCollID(uint32_t rob_id, std::vector< IdentifierHash > &ids)
Definition: TRT_FillCablingData_SR1.cxx:789
TRT_FillCablingData_SR1::defineParameters
void defineParameters()
Definition: TRT_FillCablingData_SR1.cxx:102
TRT_FillCablingData_SR1::m_ec_3l_map
std::map< int, int > m_ec_3l_map
Definition: TRT_FillCablingData_SR1.h:124
TRT_FillCablingData_SR1::m_2FL2_3FL1_map
std::map< int, int > m_2FL2_3FL1_map
Definition: TRT_FillCablingData_SR1.h:118
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TRT_FillCablingData_SR1::defineCollID
void defineCollID()
Definition: TRT_FillCablingData_SR1.cxx:766
TRT_FillCablingData_SR1::m_ec_2r_map
std::map< int, int > m_ec_2r_map
Definition: TRT_FillCablingData_SR1.h:127
fitman.k
k
Definition: fitman.py:528
TRT_ID::straw_id
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
Definition: TRT_ID.h:581
GlobalCableMap_t::FEid
std::string FEid
Definition: TRT_FillCablingData_Types.h:17
GlobalCableMap_t::SubDet
int SubDet
Definition: TRT_FillCablingData_Types.h:14