ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_SensorsTool Class Reference

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

#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 {
87 SG::ReadCondHandle<SCT_SensorsCondData> condData{m_condKey, ctx};
88 return condData.retrieve();
89}
SG::ReadCondHandleKey< SCT_SensorsCondData > m_condKey
const_pointer_type retrieve()

◆ 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}
virtual std::string getManufacturer(unsigned int truncatedSerialNumber, const EventContext &ctx) const override

◆ 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}
std::map< CondAttrListCollection::ChanNum, SCT_SensorCondData > SCT_SensorsCondData
Class for data object for SCT_SensorsCondAlg and SCT_SensorsTool.
const SCT_SensorsCondData * getCondData(const EventContext &ctx) const

◆ 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}
virtual void getSensorsData(std::vector< std::string > &userVector, const EventContext &ctx) const override

◆ 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}
#define ATH_MSG_WARNING(x)

◆ initialize()

StatusCode SCT_SensorsTool::initialize ( )
overridevirtual

Definition at line 17 of file SCT_SensorsTool.cxx.

17 {
18 // Read Cond Handle Key
19 ATH_CHECK(m_condKey.initialize());
20
21 return StatusCode::SUCCESS;
22}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ 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}
virtual void printManufacturers() const override

◆ 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}
#define ATH_MSG_ALWAYS(x)

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.

51{this, "CondKey", "SCT_SensorsCondData", "SCT sensor conditions"};

The documentation for this class was generated from the following files: