ATLAS Offline Software
IBLParameterSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
27  : public extends<AthService, IIBLParameterSvc>
28 {
29 public:
30  // Standard Constructor
31  IBLParameterSvc(const std::string& name, ISvcLocator* svc);
32  // Standard Destructor
33  virtual ~IBLParameterSvc();
34 
35  virtual StatusCode initialize() override;
36  virtual StatusCode finalize() override;
37 
38  virtual bool containsIBL() override {return m_IBLpresent;}
39  virtual bool contains3D() override {return m_LayerFEsPerHalfModule_3d>0;}
40  virtual bool containsDBM() override {return m_DBMpresent;}
41 
42  std::string setStringParameters(const std::string& param,const std::string& paramName) {
43  if (m_IBLpresent) {
44  if (m_disableAllClusterSplitting && paramName=="clusterSplitter") return "";
45  }
46  return param;
47  }
48 
49  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) {
50  if (m_IBLpresent) {
51  columnsPerFE=std::vector<int>(1);
52  rowsPerFE=std::vector<int>(1);
53  columnsPerFE[0]=m_LayerColumnsPerFE;
54  rowsPerFE[0]=m_LayerRowsPerFE;
55  FEsPerHalfModule.clear();
56  FEsPerHalfModule.push_back(m_LayerFEsPerHalfModule);
57  if (m_DBMpresent) {
58  if (DBMColumnsPerFE) *DBMColumnsPerFE=m_LayerColumnsPerFE;
59  if (DBMRowsPerFE) *DBMRowsPerFE=m_LayerRowsPerFE;
60  if (DBMFEsPerHalfModule) *DBMFEsPerHalfModule=m_LayerFEsPerHalfModule_3d ? m_LayerFEsPerHalfModule_3d : m_LayerFEsPerHalfModule_planar;
61  }
62  }
63  }
64 
65  virtual
66  void setBoolParameters(bool& param, const std::string& paramName) override
67  {
68  if (m_IBLpresent) {
69  if (m_disablePixMapCondDB && paramName=="UsePixMapCondDB") param=false;
70  if (m_disableSpecialPixels && paramName=="EnableSpecialPixels") param=false;
71  if (m_disableAlignable && paramName=="alignable") param=false;
72  if (m_disableAllClusterSplitting && paramName=="applyNNcorrection") param = false;
73  if (m_disableAllClusterSplitting && paramName=="doPixelClusterSplitting") param = false;
74  if (m_disableDCS && paramName=="useDCS") param=false;
75  if (paramName=="IBLAbsent") param=false;
76  }
77  }
78 protected:
79 
80 private:
83  std::vector<int> m_LayerFEsPerHalfModule;
84 
92 
94 };
95 
96 #endif
IBLParameterSvc::m_LayerFEsPerHalfModule_planar
int m_LayerFEsPerHalfModule_planar
Definition: IBLParameterSvc.h:82
IBLParameterSvc::m_IBLpresent
bool m_IBLpresent
Definition: IBLParameterSvc.h:81
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:49
IBLParameterSvc::containsDBM
virtual bool containsDBM() override
Definition: IBLParameterSvc.h:40
IBLParameterSvc::m_disablePixMapCondDB
bool m_disablePixMapCondDB
Definition: IBLParameterSvc.h:87
IBLParameterSvc::IBLParameterSvc
IBLParameterSvc(const std::string &name, ISvcLocator *svc)
Constructor(s)
Definition: IBLParameterSvc.cxx:20
IBLParameterSvc::~IBLParameterSvc
virtual ~IBLParameterSvc()
Definition: IBLParameterSvc.cxx:46
IBLParameterSvc::setStringParameters
std::string setStringParameters(const std::string &param, const std::string &paramName)
Definition: IBLParameterSvc.h:42
IBLParameterSvc::m_disableSpecialPixels
bool m_disableSpecialPixels
Definition: IBLParameterSvc.h:88
IBLParameterSvc::m_disableDCS
bool m_disableDCS
Definition: IBLParameterSvc.h:91
IBLParameterSvc::setBoolParameters
virtual void setBoolParameters(bool &param, const std::string &paramName) override
Definition: IBLParameterSvc.h:66
IBLParameterSvc::contains3D
virtual bool contains3D() override
Definition: IBLParameterSvc.h:39
IBLParameterSvc::m_DBMpresent
bool m_DBMpresent
Definition: IBLParameterSvc.h:81
IIBLParameterSvc.h
IBLParameterSvc::m_LayerRowsPerFE
int m_LayerRowsPerFE
Definition: IBLParameterSvc.h:82
IBLParameterSvc
Definition: IBLParameterSvc.h:28
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:42
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:82
IBLParameterSvc::m_LayerFEsPerHalfModule
std::vector< int > m_LayerFEsPerHalfModule
Definition: IBLParameterSvc.h:83
IGeoDbTagSvc
Definition: IGeoDbTagSvc.h:26
IBLParameterSvc::m_disableAllClusterSplitting
bool m_disableAllClusterSplitting
Definition: IBLParameterSvc.h:90
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
IBLParameterSvc::m_rdbAccessSvc
ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc
Definition: IBLParameterSvc.h:86
IBLParameterSvc::m_layout
int m_layout
Definition: IBLParameterSvc.h:82
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IBLParameterSvc::m_LayerColumnsPerFE
int m_LayerColumnsPerFE
Definition: IBLParameterSvc.h:82
IBLParameterSvc::initialize
virtual StatusCode initialize() override
Initialize Service.
Definition: IBLParameterSvc.cxx:53
AthService.h
IBLParameterSvc::containsIBL
virtual bool containsIBL() override
Definition: IBLParameterSvc.h:38
IBLParameterSvc::m_disableAlignable
bool m_disableAlignable
Definition: IBLParameterSvc.h:89
IBLParameterSvc::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: IBLParameterSvc.h:85
IBLParameterSvc::finalize
virtual StatusCode finalize() override
Definition: IBLParameterSvc.cxx:126
IBLParameterSvc::setIblParameters
StatusCode setIblParameters()
Definition: IBLParameterSvc.cxx:76
ServiceHandle< IGeoDbTagSvc >