Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
IBLParameterSvc Class Reference

#include <IBLParameterSvc.h>

Inheritance diagram for IBLParameterSvc:
Collaboration diagram for IBLParameterSvc:

Public Member Functions

 IBLParameterSvc (const std::string &name, ISvcLocator *svc)
 Constructor(s) More...
 
virtual ~IBLParameterSvc ()
 
virtual StatusCode initialize () override
 Initialize Service. More...
 
virtual StatusCode finalize () override
 
virtual bool containsIBL () override
 
virtual bool contains3D () override
 
virtual bool containsDBM () override
 
std::string setStringParameters (const std::string &param, const std::string &paramName)
 
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)
 
virtual void setBoolParameters (bool &param, const std::string &paramName) override
 

Private Member Functions

StatusCode setIblParameters ()
 

Private Attributes

bool m_IBLpresent
 
bool m_DBMpresent
 
int m_LayerColumnsPerFE
 
int m_LayerRowsPerFE
 
int m_LayerFEsPerHalfModule_planar
 
int m_LayerFEsPerHalfModule_3d
 
int m_layout
 
std::vector< int > m_LayerFEsPerHalfModule
 
ServiceHandle< IGeoDbTagSvcm_geoDbTagSvc
 
bool m_disablePixMapCondDB
 
bool m_disableSpecialPixels
 
bool m_disableAlignable
 
bool m_disableAllClusterSplitting
 
bool m_disableDCS
 

Detailed Description

Definition at line 26 of file IBLParameterSvc.h.

Constructor & Destructor Documentation

◆ IBLParameterSvc()

IBLParameterSvc::IBLParameterSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Constructor(s)

Definition at line 20 of file IBLParameterSvc.cxx.

21  : base_class(name,svc),
22  m_IBLpresent{},
23  m_DBMpresent{},
28  m_layout{},
29  m_geoDbTagSvc("GeoDbTagSvc",name),
30  m_disablePixMapCondDB(false),
32  m_disableAlignable(false),
34  m_disableDCS(true) {
35  declareProperty("GeoDbTagSvc",m_geoDbTagSvc);
36  declareProperty("DisablePixMapCondDB",m_disablePixMapCondDB);
37  declareProperty("DisableSpecialPixels",m_disableSpecialPixels);
38  declareProperty("DisableAlignable",m_disableAlignable);
39  declareProperty("DisableAllClusterSplitting",m_disableAllClusterSplitting);
40  declareProperty("DisableDCS",m_disableDCS);
41 }

◆ ~IBLParameterSvc()

IBLParameterSvc::~IBLParameterSvc ( )
virtual

Definition at line 43 of file IBLParameterSvc.cxx.

44 {
45 }

Member Function Documentation

◆ contains3D()

virtual bool IBLParameterSvc::contains3D ( )
inlineoverridevirtual

Definition at line 39 of file IBLParameterSvc.h.

◆ containsDBM()

virtual bool IBLParameterSvc::containsDBM ( )
inlineoverridevirtual

Definition at line 40 of file IBLParameterSvc.h.

40 {return m_DBMpresent;}

◆ containsIBL()

virtual bool IBLParameterSvc::containsIBL ( )
inlineoverridevirtual

Definition at line 38 of file IBLParameterSvc.h.

38 {return m_IBLpresent;}

◆ finalize()

StatusCode IBLParameterSvc::finalize ( )
overridevirtual

Definition at line 128 of file IBLParameterSvc.cxx.

129 {
130  return StatusCode::SUCCESS;
131 }

◆ initialize()

StatusCode IBLParameterSvc::initialize ( )
overridevirtual

Initialize Service.

Definition at line 50 of file IBLParameterSvc.cxx.

51 {
52  //MsgStream log(msgSvc(), name());
53 
55  if (result.isFailure())
56  {
57  ATH_MSG_FATAL ( "Unable to initialize the service!" );
58  return result;
59  }
60  // read Charge Collection Probability Maps
61  //
62  // get the PixelDigitization random stream
63  //
64 
65  if (!setIblParameters().isSuccess()) return StatusCode::FAILURE;
66 
67  ATH_MSG_DEBUG ( "initialized service!" );
68  return result;
69 
70 }

◆ setBoolParameters()

virtual void IBLParameterSvc::setBoolParameters ( bool &  param,
const std::string &  paramName 
)
inlineoverridevirtual

Definition at line 66 of file IBLParameterSvc.h.

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  }

◆ setCablingParameters()

void IBLParameterSvc::setCablingParameters ( std::vector< int > &  columnsPerFE,
std::vector< int > &  rowsPerFE,
std::vector< std::vector< int > > &  FEsPerHalfModule,
int *  DBMColumnsPerFE = NULL,
int *  DBMRowsPerFE = NULL,
int *  DBMFEsPerHalfModule = NULL 
)
inline

Definition at line 49 of file IBLParameterSvc.h.

49  {
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  }

◆ setIblParameters()

StatusCode IBLParameterSvc::setIblParameters ( )
private

Definition at line 73 of file IBLParameterSvc.cxx.

73  {
74  ATH_CHECK(m_geoDbTagSvc.retrieve());
75 
76 
77  std::string versionTag{}, versionNode{};
78  if(!m_geoDbTagSvc->getSqliteReader()) {
79  DecodeVersionKey detectorKey{m_geoDbTagSvc.get(),"Pixel"};
80  versionTag = detectorKey.tag();
81  versionNode = detectorKey.node();
82  }
83 
84  SmartIF<IRDBAccessSvc> rdbAccess{Gaudi::svcLocator()->service(m_geoDbTagSvc->getParamSvcName())};
85  if (!rdbAccess) {
86  ATH_MSG_FATAL("Could not locate RDBAccessSvc");
87  return StatusCode::FAILURE;
88  }
89  IRDBRecordset_ptr switchSet = rdbAccess->getRecordsetPtr("PixelSwitches", versionTag, versionNode);
90  const IRDBRecord *switchTable = (*switchSet)[0];
91  std::string versionName("");
92  if (!switchTable->isFieldNull("VERSIONNAME")) versionName=switchTable->getString("VERSIONNAME");
93  m_DBMpresent=false;
94  if (!switchTable->isFieldNull("BUILDDBM")) m_DBMpresent=switchTable->getInt("BUILDDBM");
95  if (versionName=="IBL") {
96  m_IBLpresent = true;
97  ATH_MSG_INFO("IBL geometry");
98  }
99  else {
100  m_IBLpresent = false;
101  ATH_MSG_VERBOSE("Default geometry");
102  }
104  m_LayerFEsPerHalfModule.clear();
105  if (m_IBLpresent) {
106  IRDBRecordset_ptr PixelReadout = rdbAccess->getRecordsetPtr("PixelReadout", versionTag, versionNode);
107  IRDBRecordset_ptr PixelStave = rdbAccess->getRecordsetPtr("PixelStave", versionTag, versionNode);
108  const IRDBRecord *IBLreadout = (*PixelReadout)[1];
109  if (!IBLreadout->isFieldNull("COLSPERCHIP")) m_LayerColumnsPerFE=IBLreadout->getInt("COLSPERCHIP");
110  if (!IBLreadout->isFieldNull("ROWSPERCHIP")) m_LayerRowsPerFE=IBLreadout->getInt("ROWSPERCHIP");
111  if (!IBLreadout->isFieldNull("NCHIPSETA")) m_LayerFEsPerHalfModule_planar=IBLreadout->getInt("NCHIPSETA");
112  if ((*PixelReadout).size()>2) {
113  const IRDBRecord *IBL3Dreadout = (*PixelReadout)[2];
114  if (!IBL3Dreadout->isFieldNull("NCHIPSETA")) m_LayerFEsPerHalfModule_3d=IBL3Dreadout->getInt("NCHIPSETA");
115  }
116  const IRDBRecord *IBLstave = (*PixelStave)[1];
117  if (!IBLstave->isFieldNull("LAYOUT")) m_layout=IBLstave->getInt("LAYOUT");
118  if (m_layout==4) for (int i = 0; i < 16; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_planar);
119  if (m_layout==5) {
120  for (int i =0; i < 4; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_3d);
121  for (int i =0; i < 12; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_planar);
122  for (int i =0; i < 4; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_3d);
123  }
124  }
125  return StatusCode::SUCCESS;
126 }

◆ setStringParameters()

std::string IBLParameterSvc::setStringParameters ( const std::string &  param,
const std::string &  paramName 
)
inline

Definition at line 42 of file IBLParameterSvc.h.

42  {
43  if (m_IBLpresent) {
44  if (m_disableAllClusterSplitting && paramName=="clusterSplitter") return "";
45  }
46  return param;
47  }

Member Data Documentation

◆ m_DBMpresent

bool IBLParameterSvc::m_DBMpresent
private

Definition at line 81 of file IBLParameterSvc.h.

◆ m_disableAlignable

bool IBLParameterSvc::m_disableAlignable
private

Definition at line 88 of file IBLParameterSvc.h.

◆ m_disableAllClusterSplitting

bool IBLParameterSvc::m_disableAllClusterSplitting
private

Definition at line 89 of file IBLParameterSvc.h.

◆ m_disableDCS

bool IBLParameterSvc::m_disableDCS
private

Definition at line 90 of file IBLParameterSvc.h.

◆ m_disablePixMapCondDB

bool IBLParameterSvc::m_disablePixMapCondDB
private

Definition at line 86 of file IBLParameterSvc.h.

◆ m_disableSpecialPixels

bool IBLParameterSvc::m_disableSpecialPixels
private

Definition at line 87 of file IBLParameterSvc.h.

◆ m_geoDbTagSvc

ServiceHandle< IGeoDbTagSvc > IBLParameterSvc::m_geoDbTagSvc
private

Definition at line 85 of file IBLParameterSvc.h.

◆ m_IBLpresent

bool IBLParameterSvc::m_IBLpresent
private

Definition at line 81 of file IBLParameterSvc.h.

◆ m_LayerColumnsPerFE

int IBLParameterSvc::m_LayerColumnsPerFE
private

Definition at line 82 of file IBLParameterSvc.h.

◆ m_LayerFEsPerHalfModule

std::vector<int> IBLParameterSvc::m_LayerFEsPerHalfModule
private

Definition at line 83 of file IBLParameterSvc.h.

◆ m_LayerFEsPerHalfModule_3d

int IBLParameterSvc::m_LayerFEsPerHalfModule_3d
private

Definition at line 82 of file IBLParameterSvc.h.

◆ m_LayerFEsPerHalfModule_planar

int IBLParameterSvc::m_LayerFEsPerHalfModule_planar
private

Definition at line 82 of file IBLParameterSvc.h.

◆ m_LayerRowsPerFE

int IBLParameterSvc::m_LayerRowsPerFE
private

Definition at line 82 of file IBLParameterSvc.h.

◆ m_layout

int IBLParameterSvc::m_layout
private

Definition at line 82 of file IBLParameterSvc.h.


The documentation for this class was generated from the following files:
IRDBRecord::getInt
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
IBLParameterSvc::m_LayerFEsPerHalfModule_planar
int m_LayerFEsPerHalfModule_planar
Definition: IBLParameterSvc.h:82
IBLParameterSvc::m_IBLpresent
bool m_IBLpresent
Definition: IBLParameterSvc.h:81
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
get_generator_info.result
result
Definition: get_generator_info.py:21
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IBLParameterSvc::m_disablePixMapCondDB
bool m_disablePixMapCondDB
Definition: IBLParameterSvc.h:86
initialize
void initialize()
Definition: run_EoverP.cxx:894
IRDBRecord::getString
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
IBLParameterSvc::m_disableSpecialPixels
bool m_disableSpecialPixels
Definition: IBLParameterSvc.h:87
IBLParameterSvc::m_disableDCS
bool m_disableDCS
Definition: IBLParameterSvc.h:90
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
IBLParameterSvc::m_DBMpresent
bool m_DBMpresent
Definition: IBLParameterSvc.h:81
lumiFormat.i
int i
Definition: lumiFormat.py:85
IBLParameterSvc::m_LayerRowsPerFE
int m_LayerRowsPerFE
Definition: IBLParameterSvc.h:82
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
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
IBLParameterSvc::m_LayerFEsPerHalfModule_3d
int m_LayerFEsPerHalfModule_3d
Definition: IBLParameterSvc.h:82
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IBLParameterSvc::m_LayerFEsPerHalfModule
std::vector< int > m_LayerFEsPerHalfModule
Definition: IBLParameterSvc.h:83
IBLParameterSvc::m_disableAllClusterSplitting
bool m_disableAllClusterSplitting
Definition: IBLParameterSvc.h:89
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
IBLParameterSvc::m_layout
int m_layout
Definition: IBLParameterSvc.h:82
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IBLParameterSvc::m_LayerColumnsPerFE
int m_LayerColumnsPerFE
Definition: IBLParameterSvc.h:82
IRDBRecord::isFieldNull
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
IRDBRecord
IRDBRecord is one record in the IRDBRecordset object.
Definition: IRDBRecord.h:27
IBLParameterSvc::m_disableAlignable
bool m_disableAlignable
Definition: IBLParameterSvc.h:88
IBLParameterSvc::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: IBLParameterSvc.h:85
IBLParameterSvc::setIblParameters
StatusCode setIblParameters()
Definition: IBLParameterSvc.cxx:73