ATLAS Offline Software
IBLParameterSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // IBLParameterSvc.h
7 // Header file for class IBLParameterSvc
9 // (c) ATLAS Detector software
11 //
12 
13 #ifndef PIXELGEOMODEL_IBLPARAMETERSVC_H
14 #define PIXELGEOMODEL_IBLPARAMETERSVC_H
15 
17 #include "GaudiKernel/ToolHandle.h"
18 #include "Gaudi/Property.h"
19 #include "GaudiKernel/Service.h"
21 #include "GaudiKernel/IInterface.h"
22 
23 class IGeoDbTagSvc;
24 class IRDBAccessSvc;
25 
26 static const InterfaceID IID_IIBLParameterSvc("IBLParameterSvc",1,0);
27 
29  : public extends<AthService, IIBLParameterSvc>
30 {
31 public:
32  // Standard Constructor
33  IBLParameterSvc(const std::string& name, ISvcLocator* svc);
34  // Standard Destructor
35  virtual ~IBLParameterSvc();
36 
37  virtual StatusCode initialize() override;
38  virtual StatusCode finalize() override;
39  // Can get rid of these once all clients are using IIBLParameterSvc
40  // rather than IBLParameterSvc.
41  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvIf ) override;
42  static const InterfaceID& interfaceID();
43  bool containsIBL();
44  bool contains3D();
45  bool containsDBM();
46 
47  std::string setStringParameters(const std::string& param,const std::string& paramName) {
48  if (m_IBLpresent) {
49  if (m_disableAllClusterSplitting && paramName=="clusterSplitter") return "";
50  }
51  return param;
52  }
53 
54  void setCablingParameters(std::vector<int> &columnsPerFE,std::vector<int> &rowsPerFE,std::vector<std::vector<int> > &FEsPerHalfModule,int *DBMColumnsPerFE=NULL,int *DBMRowsPerFE=NULL,int *DBMFEsPerHalfModule=NULL) {
55  if (m_IBLpresent) {
56  columnsPerFE=std::vector<int>(1);
57  rowsPerFE=std::vector<int>(1);
58  columnsPerFE[0]=m_LayerColumnsPerFE;
59  rowsPerFE[0]=m_LayerRowsPerFE;
60  FEsPerHalfModule.clear();
61  FEsPerHalfModule.push_back(m_LayerFEsPerHalfModule);
62  if (m_DBMpresent) {
63  if (DBMColumnsPerFE) *DBMColumnsPerFE=m_LayerColumnsPerFE;
64  if (DBMRowsPerFE) *DBMRowsPerFE=m_LayerRowsPerFE;
65  if (DBMFEsPerHalfModule) *DBMFEsPerHalfModule=m_LayerFEsPerHalfModule_3d ? m_LayerFEsPerHalfModule_3d : m_LayerFEsPerHalfModule_planar;
66  }
67  }
68  }
69 
70  virtual
71  void setBoolParameters(bool& param, const std::string& paramName) override
72  {
73  if (m_IBLpresent) {
74  if (m_disablePixMapCondDB && paramName=="UsePixMapCondDB") param=false;
75  if (m_disableSpecialPixels && paramName=="EnableSpecialPixels") param=false;
76  if (m_disableAlignable && paramName=="alignable") param=false;
77  if (m_disableAllClusterSplitting && paramName=="applyNNcorrection") param = false;
78  if (m_disableAllClusterSplitting && paramName=="doPixelClusterSplitting") param = false;
79  if (m_disableDCS && paramName=="useDCS") param=false;
80  if (paramName=="IBLAbsent") param=false;
81  }
82  }
83 protected:
84 
85 private:
88  std::vector<int> m_LayerFEsPerHalfModule;
89 
97 
99  };
100 
104 
105  inline const InterfaceID& IBLParameterSvc::interfaceID(){
106  return IID_IIBLParameterSvc;
107 }
108 #endif
IBLParameterSvc::m_LayerFEsPerHalfModule_planar
int m_LayerFEsPerHalfModule_planar
Definition: IBLParameterSvc.h:87
IBLParameterSvc::m_IBLpresent
bool m_IBLpresent
Definition: IBLParameterSvc.h:86
IBLParameterSvc::containsDBM
bool containsDBM()
Definition: IBLParameterSvc.h:103
IBLParameterSvc::setCablingParameters
void setCablingParameters(std::vector< int > &columnsPerFE, std::vector< int > &rowsPerFE, std::vector< std::vector< int > > &FEsPerHalfModule, int *DBMColumnsPerFE=NULL, int *DBMRowsPerFE=NULL, int *DBMFEsPerHalfModule=NULL)
Definition: IBLParameterSvc.h:54
IBLParameterSvc::m_disablePixMapCondDB
bool m_disablePixMapCondDB
Definition: IBLParameterSvc.h:92
IBLParameterSvc::IBLParameterSvc
IBLParameterSvc(const std::string &name, ISvcLocator *svc)
Constructor(s)
Definition: IBLParameterSvc.cxx:20
IBLParameterSvc::interfaceID
static const InterfaceID & interfaceID()
Definition: IBLParameterSvc.h:105
IBLParameterSvc::~IBLParameterSvc
virtual ~IBLParameterSvc()
Definition: IBLParameterSvc.cxx:46
IBLParameterSvc::setStringParameters
std::string setStringParameters(const std::string &param, const std::string &paramName)
Definition: IBLParameterSvc.h:47
IBLParameterSvc::m_disableSpecialPixels
bool m_disableSpecialPixels
Definition: IBLParameterSvc.h:93
IBLParameterSvc::m_disableDCS
bool m_disableDCS
Definition: IBLParameterSvc.h:96
IBLParameterSvc::setBoolParameters
virtual void setBoolParameters(bool &param, const std::string &paramName) override
Definition: IBLParameterSvc.h:71
IBLParameterSvc::m_DBMpresent
bool m_DBMpresent
Definition: IBLParameterSvc.h:86
IIBLParameterSvc.h
IBLParameterSvc::m_LayerRowsPerFE
int m_LayerRowsPerFE
Definition: IBLParameterSvc.h:87
IBLParameterSvc
Definition: IBLParameterSvc.h:30
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IBLParameterSvc::m_LayerFEsPerHalfModule_3d
int m_LayerFEsPerHalfModule_3d
Definition: IBLParameterSvc.h:87
IBLParameterSvc::m_LayerFEsPerHalfModule
std::vector< int > m_LayerFEsPerHalfModule
Definition: IBLParameterSvc.h:88
IGeoDbTagSvc
Definition: IGeoDbTagSvc.h:26
IBLParameterSvc::m_disableAllClusterSplitting
bool m_disableAllClusterSplitting
Definition: IBLParameterSvc.h:95
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
IBLParameterSvc::m_rdbAccessSvc
ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc
Definition: IBLParameterSvc.h:91
IBLParameterSvc::m_layout
int m_layout
Definition: IBLParameterSvc.h:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IBLParameterSvc::m_LayerColumnsPerFE
int m_LayerColumnsPerFE
Definition: IBLParameterSvc.h:87
IBLParameterSvc::containsIBL
bool containsIBL()
Definition: IBLParameterSvc.h:101
IBLParameterSvc::initialize
virtual StatusCode initialize() override
Initialize Service.
Definition: IBLParameterSvc.cxx:64
IBLParameterSvc::contains3D
bool contains3D()
Definition: IBLParameterSvc.h:102
AthService.h
IBLParameterSvc::m_disableAlignable
bool m_disableAlignable
Definition: IBLParameterSvc.h:94
IBLParameterSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIf) override
Definition: IBLParameterSvc.cxx:50
IBLParameterSvc::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: IBLParameterSvc.h:90
IBLParameterSvc::finalize
virtual StatusCode finalize() override
Definition: IBLParameterSvc.cxx:137
IBLParameterSvc::setIblParameters
StatusCode setIblParameters()
Definition: IBLParameterSvc.cxx:87
ServiceHandle< IGeoDbTagSvc >