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 const SCT_SensorCondDatagetSensorsData (const unsigned int truncatedSerialNumber, const EventContext &ctx) const override
virtual std::string getManufacturer (unsigned int truncatedSerialNumber, const EventContext &ctx) const override
virtual void printManufacturers (const EventContext &ctx) 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 66 of file SCT_SensorsTool.cxx.

66 {
67 SG::ReadCondHandle<SCT_SensorsCondData> condData{m_condKey, ctx};
68 return condData.retrieve();
69}
SG::ReadCondHandleKey< SCT_SensorsCondData > m_condKey
const_pointer_type retrieve()

◆ getManufacturer()

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

Definition at line 43 of file SCT_SensorsTool.cxx.

43 {
44 std::string manufacturer{""};
45
46 const SCT_SensorsCondData* condData{getCondData(ctx)};
47 if (condData==nullptr) return manufacturer;
48
49 SCT_SensorsCondData::const_iterator it{condData->find(truncatedSerialNumber)};
50 if (it!=condData->end()) {
51 manufacturer = (*it).second.getManufacturer();
52 }
53 return manufacturer;
54}
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/2]

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() [2/2]

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

Definition at line 39 of file SCT_SensorsTool.cxx.

39 {
40 ATH_MSG_WARNING("This void SCT_SensorsTool::getSensorsData(std::vector<std::string>& userVector) method is not implemented.");
41}
#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()

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

Definition at line 56 of file SCT_SensorsTool.cxx.

56 {
57 const SCT_SensorsCondData* condData{getCondData(ctx)};
58 if (condData==nullptr) return;
59
60 for (const std::pair<const CondAttrListCollection::ChanNum, SCT_SensorCondData>& it: *condData) {
61 ATH_MSG_ALWAYS("channel " << it.first << " manufacturer " << (it.second).getManufacturer());
62 }
63}
#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 47 of file SCT_SensorsTool.h.

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

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