ATLAS Offline Software
Functions
src/PixelDetectorTool.cxx File Reference
#include "PixelDetectorTool.h"
#include "PixelDetectorFactory.h"
#include "PixelDetectorFactoryLite.h"
#include "PixelDetectorFactorySR1.h"
#include "PixelDetectorFactoryDC2.h"
#include "PixelGeometryManager.h"
#include "PixelSwitches.h"
#include "PixelReadoutGeometry/PixelDetectorManager.h"
#include "ReadoutGeometryBase/InDetDD_Defs.h"
#include "DetDescrConditions/AlignableTransformContainer.h"
#include "PixelGeoModelAthenaComps.h"
#include "GeoModelUtilities/GeoModelExperiment.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GeoModelInterfaces/IGeoDbTagSvc.h"
#include "GeoModelUtilities/DecodeVersionKey.h"
#include "GeoModelRead/ReadGeoModel.h"
#include "RDBAccessSvc/IRDBAccessSvc.h"
#include "RDBAccessSvc/IRDBRecord.h"
#include "RDBAccessSvc/IRDBRecordset.h"
#include "AthenaKernel/ClassID_traits.h"
#include "SGTools/DataProxy.h"
#include "CxxUtils/checker_macros.h"

Go to the source code of this file.

Functions

StatusCode PixelDetectorTool::registerCallback ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options. More...
 

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode PixelDetectorTool::registerCallback ATLAS_NOT_THREAD_SAFE ( )
inline

Install fatal handler with default options.

This is meant to be easy to call from python via ctypes.

Install fatal handler with default options.

getLorentzAngle() Read LorentzAngle from HIST and write out into local DB

getBSErrors() Read BSErrors from Monitoring HIST and write out into local DB

getEfficiency() Read Efficiency from Monitoring HIST and write out into local DB

getRawOccupancy() Read RawOccupancy from Monitoring HIST and write out into local DB

getNoiseOccupancy() Read NoiseOccupancy from HIST and write out into local DB

getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats

Definition at line 320 of file src/PixelDetectorTool.cxx.

321 {
322  // Thread unsafe DataHandle template and StoreGateSvc::regFcn method are used.
323  StatusCode sc = StatusCode::FAILURE;
324  if (m_alignable) {
325 
326  if (m_useDynamicAlignFolders) {
327  std::string folderName = "/Indet/AlignL1/ID";
328  if (detStore()->contains<CondAttrListCollection>(folderName)) {
329  ATH_MSG_DEBUG("Registering callback on global Container with folder " << folderName );
331  StatusCode ibltmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, folderName);
332  // We don't expect this to fail as we have already checked that the detstore contains the object.
333  if (ibltmp.isFailure()) {
334  ATH_MSG_ERROR("Problem when register callback on global Container with folder " << folderName);
335  } else {
336  sc = StatusCode::SUCCESS;
337  }
338  } else {
339  ATH_MSG_WARNING("Unable to register callback on global Container with folder " << folderName);
340  //return StatusCode::FAILURE;
341  }
342 
343  folderName = "/Indet/AlignL2/PIX";
344  if (detStore()->contains<CondAttrListCollection>(folderName)) {
345  ATH_MSG_DEBUG("Registering callback on global Container with folder " << folderName );
347  StatusCode ibltmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, folderName);
348  // We don't expect this to fail as we have already checked that the detstore contains the object.
349  if (ibltmp.isFailure()) {
350  ATH_MSG_ERROR("Problem when register callback on global Container with folder " << folderName);
351  } else {
352  sc = StatusCode::SUCCESS;
353  }
354  } else {
355  ATH_MSG_WARNING("Unable to register callback on global Container with folder " << folderName);
356  //return StatusCode::FAILURE;
357  }
358 
359  folderName = "/Indet/AlignL3";
360  if (detStore()->contains<AlignableTransformContainer>(folderName)) {
361  ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << folderName );
363  StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
364  if(sctmp.isFailure()) {
365  ATH_MSG_ERROR("Problem when register callback on AlignableTransformContainer with folder " << folderName);
366  } else {
367  sc = StatusCode::SUCCESS;
368  }
369  }
370  else {
371  ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder " << folderName);
372  //return StatusCode::FAILURE;
373  }
374  }
375 
376 
377  else {
378  std::string folderName = "/Indet/Align";
379  if (detStore()->contains<AlignableTransformContainer>(folderName)) {
380  ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << folderName );
382  StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
383  if(sctmp.isFailure()) {
384  ATH_MSG_ERROR("Problem when register callback on AlignableTransformContainer with folder " << folderName);
385  } else {
386  sc = StatusCode::SUCCESS;
387  }
388  }
389  else {
390  ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder "
391  << folderName << ", Alignment disabled (only if no Run2 scheme is loaded)!" );
392  //return StatusCode::FAILURE;
393  }
394  }
395 
396  if (m_tweakIBLDist) {
397  //IBLDist alignment should be made optional; Will not be available prior to period G in Run2
398  std::string ibl_folderName = "/Indet/IBLDist";
399  if (detStore()->contains<CondAttrListCollection>(ibl_folderName)) {
400  ATH_MSG_DEBUG("Registering callback on IBLDist with folder " << ibl_folderName );
402  StatusCode ibltmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, ibl_folderName);
403  // We don't expect this to fail as we have already checked that the detstore contains the object.
404  if (ibltmp.isFailure()) {
405  ATH_MSG_ERROR("Problem when register callback on IBLDist with folder " << ibl_folderName);
406  } else {
407  sc = StatusCode::SUCCESS;
408  }
409  } else {
410  // We don't return false, as it might be possible that we run an old configuration without new DB;
411  // Return a clear warning msg for now.
412  ATH_MSG_WARNING("Unable to register callback on IBLDist with folder " << ibl_folderName);
413  ATH_MSG_WARNING("This should not happen that no LB-IOV IBL-bowing DB is provided for this run ");
414  }
415  }// end of tweakIBLDist
416 
417  } else {
418  ATH_MSG_INFO("Alignment disabled. No callback registered" );
419  // We return failure otherwise it will try and register
420  // a GeoModelSvc callback associated with this callback.
421  }
422  return sc;
423 
424  return StatusCode::SUCCESS;
425 }
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IGeoModelTool::align
virtual StatusCode align(IOVSVC_CALLBACK_ARGS)=0
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
DataHandle< CondAttrListCollection >
IGeoModelTool
Definition: IGeoModelTool.h:12
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
beamspotnt.calc
calc
Definition: bin/beamspotnt.py:1252