ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SCT_SensorsTool Class Reference

#include <SCT_SensorsTool.h>

Inheritance diagram for SCT_SensorsTool:
Collaboration diagram for SCT_SensorsTool:

Public Member Functions

 SCT_SensorsTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SCT_SensorsTool ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual void getSensorsData (std::vector< std::string > &userVector, const EventContext &ctx) const override
 
virtual void getSensorsData (std::vector< std::string > &userVector) const override
 
virtual const SCT_SensorCondDatagetSensorsData (const unsigned int truncatedSerialNumber, const EventContext &ctx) const override
 
virtual const SCT_SensorCondDatagetSensorsData (const unsigned int truncatedSerialNumber) const override
 
virtual std::string getManufacturer (unsigned int truncatedSerialNumber, const EventContext &ctx) const override
 
virtual std::string getManufacturer (unsigned int truncatedSerialNumber) const override
 
virtual void printManufacturers (const EventContext &ctx) const override
 
virtual void printManufacturers () const override
 

Private Member Functions

const SCT_SensorsCondDatagetCondData (const EventContext &ctx) const
 

Private Attributes

SG::ReadCondHandleKey< SCT_SensorsCondDatam_condKey {this, "CondKey", "SCT_SensorsCondData", "SCT sensor conditions"}
 

Detailed Description

Tool allowing one to manually get Vdep, crystal orientation and Mfr for a sensor(s)

Definition at line 29 of file SCT_SensorsTool.h.

Constructor & Destructor Documentation

◆ SCT_SensorsTool()

SCT_SensorsTool::SCT_SensorsTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 13 of file SCT_SensorsTool.cxx.

13  :
14  base_class(type, name, parent) {
15 }

◆ ~SCT_SensorsTool()

virtual SCT_SensorsTool::~SCT_SensorsTool ( )
virtualdefault

Member Function Documentation

◆ finalize()

StatusCode SCT_SensorsTool::finalize ( )
overridevirtual

Definition at line 24 of file SCT_SensorsTool.cxx.

24  {
25  return StatusCode::SUCCESS;
26 }

◆ getCondData()

const SCT_SensorsCondData * SCT_SensorsTool::getCondData ( const EventContext &  ctx) const
private

Definition at line 86 of file SCT_SensorsTool.cxx.

86  {
88  return condData.retrieve();
89 }

◆ getManufacturer() [1/2]

std::string SCT_SensorsTool::getManufacturer ( unsigned int  truncatedSerialNumber) const
overridevirtual

Definition at line 66 of file SCT_SensorsTool.cxx.

66  {
67  const EventContext& ctx{Gaudi::Hive::currentContext()};
68  return getManufacturer(truncatedSerialNumber, ctx);
69 }

◆ getManufacturer() [2/2]

std::string SCT_SensorsTool::getManufacturer ( unsigned int  truncatedSerialNumber,
const EventContext &  ctx 
) const
overridevirtual

Definition at line 53 of file SCT_SensorsTool.cxx.

53  {
54  std::string manufacturer{""};
55 
56  const SCT_SensorsCondData* condData{getCondData(ctx)};
57  if (condData==nullptr) return manufacturer;
58 
59  SCT_SensorsCondData::const_iterator it{condData->find(truncatedSerialNumber)};
60  if (it!=condData->end()) {
61  manufacturer = (*it).second.getManufacturer();
62  }
63  return manufacturer;
64 }

◆ getSensorsData() [1/4]

const SCT_SensorCondData * SCT_SensorsTool::getSensorsData ( const unsigned int  truncatedSerialNumber) const
overridevirtual

Definition at line 39 of file SCT_SensorsTool.cxx.

39  {
40  const EventContext& ctx{Gaudi::Hive::currentContext()};
41  return getSensorsData(truncatedSerialNumber, ctx);
42 }

◆ getSensorsData() [2/4]

const SCT_SensorCondData * SCT_SensorsTool::getSensorsData ( const unsigned int  truncatedSerialNumber,
const EventContext &  ctx 
) const
overridevirtual

Definition at line 30 of file SCT_SensorsTool.cxx.

30  {
31  const SCT_SensorsCondData* condData{getCondData(ctx)};
32  if (condData==nullptr) return nullptr;
33 
34  SCT_SensorsCondData::const_iterator it{condData->find(truncatedSerialNumber)};
35  if (it!=condData->end()) return &((*it).second);
36  return nullptr;
37 }

◆ getSensorsData() [3/4]

void SCT_SensorsTool::getSensorsData ( std::vector< std::string > &  userVector) const
overridevirtual

Definition at line 48 of file SCT_SensorsTool.cxx.

48  {
49  const EventContext& ctx{Gaudi::Hive::currentContext()};
50  getSensorsData(userVector, ctx);
51 }

◆ getSensorsData() [4/4]

void SCT_SensorsTool::getSensorsData ( std::vector< std::string > &  userVector,
const EventContext &  ctx 
) const
overridevirtual

Definition at line 44 of file SCT_SensorsTool.cxx.

44  {
45  ATH_MSG_WARNING("This void SCT_SensorsTool::getSensorsData(std::vector<std::string>& userVector) method is not implemented.");
46 }

◆ initialize()

StatusCode SCT_SensorsTool::initialize ( )
overridevirtual

Definition at line 17 of file SCT_SensorsTool.cxx.

17  {
18  // Read Cond Handle Key
20 
21  return StatusCode::SUCCESS;
22 }

◆ printManufacturers() [1/2]

void SCT_SensorsTool::printManufacturers ( ) const
overridevirtual

Definition at line 80 of file SCT_SensorsTool.cxx.

80  {
81  const EventContext& ctx{Gaudi::Hive::currentContext()};
82  return printManufacturers(ctx);
83 }

◆ printManufacturers() [2/2]

void SCT_SensorsTool::printManufacturers ( const EventContext &  ctx) const
overridevirtual

Definition at line 71 of file SCT_SensorsTool.cxx.

71  {
72  const SCT_SensorsCondData* condData{getCondData(ctx)};
73  if (condData==nullptr) return;
74 
75  for (const std::pair<const CondAttrListCollection::ChanNum, SCT_SensorCondData>& it: *condData) {
76  ATH_MSG_ALWAYS("channel " << it.first << " manufacturer " << (it.second).getManufacturer());
77  }
78 }

Member Data Documentation

◆ m_condKey

SG::ReadCondHandleKey<SCT_SensorsCondData> SCT_SensorsTool::m_condKey {this, "CondKey", "SCT_SensorsCondData", "SCT sensor conditions"}
private

Definition at line 51 of file SCT_SensorsTool.h.


The documentation for this class was generated from the following files:
SCT_SensorsTool::getManufacturer
virtual std::string getManufacturer(unsigned int truncatedSerialNumber, const EventContext &ctx) const override
Definition: SCT_SensorsTool.cxx:53
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
skel.it
it
Definition: skel.GENtoEVGEN.py:396
SCT_SensorsTool::getSensorsData
virtual void getSensorsData(std::vector< std::string > &userVector, const EventContext &ctx) const override
Definition: SCT_SensorsTool.cxx:44
SCT_SensorsTool::m_condKey
SG::ReadCondHandleKey< SCT_SensorsCondData > m_condKey
Definition: SCT_SensorsTool.h:51
SCT_SensorsTool::printManufacturers
virtual void printManufacturers() const override
Definition: SCT_SensorsTool.cxx:80
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_SensorsTool::getCondData
const SCT_SensorsCondData * getCondData(const EventContext &ctx) const
Definition: SCT_SensorsTool.cxx:86
SCT_SensorsCondData
std::map< CondAttrListCollection::ChanNum, SCT_SensorCondData > SCT_SensorsCondData
Class for data object for SCT_SensorsCondAlg and SCT_SensorsTool.
Definition: SCT_SensorsCondData.h:28