ATLAS Offline Software
Public Member Functions | Static 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 StatusCode queryInterface (const InterfaceID &riid, void **ppvIf) override
 
bool containsIBL ()
 
bool contains3D ()
 
bool containsDBM ()
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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
 
ServiceHandle< IRDBAccessSvcm_rdbAccessSvc
 
bool m_disablePixMapCondDB
 
bool m_disableSpecialPixels
 
bool m_disableAlignable
 
bool m_disableAllClusterSplitting
 
bool m_disableDCS
 

Detailed Description

Definition at line 28 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_rdbAccessSvc("RDBAccessSvc",name),
31  m_disablePixMapCondDB(false),
33  m_disableAlignable(false),
35  m_disableDCS(true)
36 {
37  declareProperty("GeoDbTagSvc",m_geoDbTagSvc);
38  declareProperty("RDBAccessSvc",m_rdbAccessSvc);
39  declareProperty("DisablePixMapCondDB",m_disablePixMapCondDB);
40  declareProperty("DisableSpecialPixels",m_disableSpecialPixels);
41  declareProperty("DisableAlignable",m_disableAlignable);
42  declareProperty("DisableAllClusterSplitting",m_disableAllClusterSplitting);
43  declareProperty("DisableDCS",m_disableDCS);
44 }

◆ ~IBLParameterSvc()

IBLParameterSvc::~IBLParameterSvc ( )
virtual

Definition at line 46 of file IBLParameterSvc.cxx.

47 {
48 }

Member Function Documentation

◆ contains3D()

bool IBLParameterSvc::contains3D ( )
inline

Definition at line 102 of file IBLParameterSvc.h.

102 {return m_LayerFEsPerHalfModule_3d>0;}

◆ containsDBM()

bool IBLParameterSvc::containsDBM ( )
inline

Definition at line 103 of file IBLParameterSvc.h.

103 {return m_DBMpresent;}

◆ containsIBL()

bool IBLParameterSvc::containsIBL ( )
inline

Definition at line 101 of file IBLParameterSvc.h.

101 {return m_IBLpresent;}

◆ finalize()

StatusCode IBLParameterSvc::finalize ( )
overridevirtual

Definition at line 137 of file IBLParameterSvc.cxx.

138 {
139  return StatusCode::SUCCESS;
140 }

◆ initialize()

StatusCode IBLParameterSvc::initialize ( )
overridevirtual

Initialize Service.

Definition at line 64 of file IBLParameterSvc.cxx.

65 {
66  //MsgStream log(msgSvc(), name());
67 
69  if (result.isFailure())
70  {
71  ATH_MSG_FATAL ( "Unable to initialize the service!" );
72  return result;
73  }
74  // read Charge Collection Probability Maps
75  //
76  // get the PixelDigitization random stream
77  //
78 
79  if (!setIblParameters().isSuccess()) return StatusCode::FAILURE;
80 
81  ATH_MSG_DEBUG ( "initialized service!" );
82  return result;
83 
84 }

◆ interfaceID()

const InterfaceID & IBLParameterSvc::interfaceID ( )
inlinestatic

Definition at line 105 of file IBLParameterSvc.h.

105  {
106  return IID_IIBLParameterSvc;
107 }

◆ queryInterface()

StatusCode IBLParameterSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvIf 
)
inlineoverridevirtual

Definition at line 50 of file IBLParameterSvc.cxx.

51 {
52  if (riid == IBLParameterSvc::interfaceID()){
53  *ppvIf = dynamic_cast<IBLParameterSvc*>(this);
54  addRef();
55  return StatusCode::SUCCESS;
56  }
57  return base_class::queryInterface( riid, ppvIf );
58 
59 }

◆ setBoolParameters()

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

Definition at line 71 of file IBLParameterSvc.h.

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  }

◆ 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 54 of file IBLParameterSvc.h.

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

◆ setIblParameters()

StatusCode IBLParameterSvc::setIblParameters ( )
private

Definition at line 87 of file IBLParameterSvc.cxx.

87  {
88  if (m_geoDbTagSvc.retrieve().isFailure()) {
89  msg(MSG::FATAL) << "Could not locate GeoDbTagSvc" << endmsg;
90  return (StatusCode::FAILURE);
91  }
92  DecodeVersionKey versionKey(&*m_geoDbTagSvc, "Pixel");
93 
94  if (m_rdbAccessSvc.retrieve().isFailure()) {
95  msg(MSG::FATAL) << "Could not locate RDBAccessSvc" << endmsg;
96  return (StatusCode::FAILURE);
97  }
98  IRDBRecordset_ptr switchSet = m_rdbAccessSvc->getRecordsetPtr("PixelSwitches", versionKey.tag(), versionKey.node());
99  const IRDBRecord *switchTable = (*switchSet)[0];
100  std::string versionName("");
101  if (!switchTable->isFieldNull("VERSIONNAME")) versionName=switchTable->getString("VERSIONNAME");
102  m_DBMpresent=false;
103  if (!switchTable->isFieldNull("BUILDDBM")) m_DBMpresent=switchTable->getInt("BUILDDBM");
104  if (versionName=="IBL") {
105  m_IBLpresent = true;
106  ATH_MSG_INFO("IBL geometry");
107  }
108  else {
109  m_IBLpresent = false;
110  ATH_MSG_VERBOSE("Default geometry");
111  }
113  m_LayerFEsPerHalfModule.clear();
114  if (m_IBLpresent) {
115  IRDBRecordset_ptr PixelReadout = m_rdbAccessSvc->getRecordsetPtr("PixelReadout", versionKey.tag(), versionKey.node());
116  IRDBRecordset_ptr PixelStave = m_rdbAccessSvc->getRecordsetPtr("PixelStave", versionKey.tag(), versionKey.node());
117  const IRDBRecord *IBLreadout = (*PixelReadout)[1];
118  if (!IBLreadout->isFieldNull("COLSPERCHIP")) m_LayerColumnsPerFE=IBLreadout->getInt("COLSPERCHIP");
119  if (!IBLreadout->isFieldNull("ROWSPERCHIP")) m_LayerRowsPerFE=IBLreadout->getInt("ROWSPERCHIP");
120  if (!IBLreadout->isFieldNull("NCHIPSETA")) m_LayerFEsPerHalfModule_planar=IBLreadout->getInt("NCHIPSETA");
121  if ((*PixelReadout).size()>2) {
122  const IRDBRecord *IBL3Dreadout = (*PixelReadout)[2];
123  if (!IBL3Dreadout->isFieldNull("NCHIPSETA")) m_LayerFEsPerHalfModule_3d=IBL3Dreadout->getInt("NCHIPSETA");
124  }
125  const IRDBRecord *IBLstave = (*PixelStave)[1];
126  if (!IBLstave->isFieldNull("LAYOUT")) m_layout=IBLstave->getInt("LAYOUT");
127  if (m_layout==4) for (int i = 0; i < 16; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_planar);
128  if (m_layout==5) {
129  for (int i =0; i < 4; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_3d);
130  for (int i =0; i < 12; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_planar);
131  for (int i =0; i < 4; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_3d);
132  }
133  }
134  return StatusCode::SUCCESS;
135 }

◆ setStringParameters()

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

Definition at line 47 of file IBLParameterSvc.h.

47  {
48  if (m_IBLpresent) {
49  if (m_disableAllClusterSplitting && paramName=="clusterSplitter") return "";
50  }
51  return param;
52  }

Member Data Documentation

◆ m_DBMpresent

bool IBLParameterSvc::m_DBMpresent
private

Definition at line 86 of file IBLParameterSvc.h.

◆ m_disableAlignable

bool IBLParameterSvc::m_disableAlignable
private

Definition at line 94 of file IBLParameterSvc.h.

◆ m_disableAllClusterSplitting

bool IBLParameterSvc::m_disableAllClusterSplitting
private

Definition at line 95 of file IBLParameterSvc.h.

◆ m_disableDCS

bool IBLParameterSvc::m_disableDCS
private

Definition at line 96 of file IBLParameterSvc.h.

◆ m_disablePixMapCondDB

bool IBLParameterSvc::m_disablePixMapCondDB
private

Definition at line 92 of file IBLParameterSvc.h.

◆ m_disableSpecialPixels

bool IBLParameterSvc::m_disableSpecialPixels
private

Definition at line 93 of file IBLParameterSvc.h.

◆ m_geoDbTagSvc

ServiceHandle< IGeoDbTagSvc > IBLParameterSvc::m_geoDbTagSvc
private

Definition at line 90 of file IBLParameterSvc.h.

◆ m_IBLpresent

bool IBLParameterSvc::m_IBLpresent
private

Definition at line 86 of file IBLParameterSvc.h.

◆ m_LayerColumnsPerFE

int IBLParameterSvc::m_LayerColumnsPerFE
private

Definition at line 87 of file IBLParameterSvc.h.

◆ m_LayerFEsPerHalfModule

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

Definition at line 88 of file IBLParameterSvc.h.

◆ m_LayerFEsPerHalfModule_3d

int IBLParameterSvc::m_LayerFEsPerHalfModule_3d
private

Definition at line 87 of file IBLParameterSvc.h.

◆ m_LayerFEsPerHalfModule_planar

int IBLParameterSvc::m_LayerFEsPerHalfModule_planar
private

Definition at line 87 of file IBLParameterSvc.h.

◆ m_LayerRowsPerFE

int IBLParameterSvc::m_LayerRowsPerFE
private

Definition at line 87 of file IBLParameterSvc.h.

◆ m_layout

int IBLParameterSvc::m_layout
private

Definition at line 87 of file IBLParameterSvc.h.

◆ m_rdbAccessSvc

ServiceHandle< IRDBAccessSvc > IBLParameterSvc::m_rdbAccessSvc
private

Definition at line 91 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:87
IBLParameterSvc::m_IBLpresent
bool m_IBLpresent
Definition: IBLParameterSvc.h:86
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
get_generator_info.result
result
Definition: get_generator_info.py:21
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IBLParameterSvc::m_disablePixMapCondDB
bool m_disablePixMapCondDB
Definition: IBLParameterSvc.h:92
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::interfaceID
static const InterfaceID & interfaceID()
Definition: IBLParameterSvc.h:105
IBLParameterSvc::m_disableSpecialPixels
bool m_disableSpecialPixels
Definition: IBLParameterSvc.h:93
IBLParameterSvc::m_disableDCS
bool m_disableDCS
Definition: IBLParameterSvc.h:96
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
IBLParameterSvc::m_DBMpresent
bool m_DBMpresent
Definition: IBLParameterSvc.h:86
lumiFormat.i
int i
Definition: lumiFormat.py:92
IBLParameterSvc::m_LayerRowsPerFE
int m_LayerRowsPerFE
Definition: IBLParameterSvc.h:87
IBLParameterSvc
Definition: IBLParameterSvc.h:30
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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:87
IBLParameterSvc::m_LayerFEsPerHalfModule
std::vector< int > m_LayerFEsPerHalfModule
Definition: IBLParameterSvc.h:88
IBLParameterSvc::m_disableAllClusterSplitting
bool m_disableAllClusterSplitting
Definition: IBLParameterSvc.h:95
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
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
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
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
IBLParameterSvc::m_disableAlignable
bool m_disableAlignable
Definition: IBLParameterSvc.h:94
IBLParameterSvc::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: IBLParameterSvc.h:90
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
IBLParameterSvc::setIblParameters
StatusCode setIblParameters()
Definition: IBLParameterSvc.cxx:87