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

#include <PixelDetectorElementStatusToolBase.h>

Inheritance diagram for PixelDetectorElementStatusToolBase:
Collaboration diagram for PixelDetectorElementStatusToolBase:

Public Member Functions

 PixelDetectorElementStatusToolBase (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~PixelDetectorElementStatusToolBase ()
 
virtual StatusCode initialize () override
 

Protected Member Functions

std::unique_ptr< InDet::SiDetectorElementStatuscreateDetectorElementStatus (const EventContext &ctx, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const
 Create a new detector element status element container. More...
 

Protected Attributes

const PixelIDm_pixelID {}
 

Private Attributes

ServiceHandle< InDetDD::IPixelReadoutManagerm_pixelReadout {this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" }
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
 
SG::ReadCondHandleKey< InDet::SiDetectorElementStatusm_pixelDetElStatusCondKey {this, "PixelDetElStatusCondDataBaseKey", "" , "Optional conditions data key of an input SiDetectorElementStatus on which the newly created object will be based."}
 

Detailed Description

Definition at line 24 of file PixelDetectorElementStatusToolBase.h.

Constructor & Destructor Documentation

◆ PixelDetectorElementStatusToolBase()

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

Definition at line 8 of file PixelDetectorElementStatusToolBase.cxx.

9  :base_class(type, name, parent)
10 {
11 }

◆ ~PixelDetectorElementStatusToolBase()

PixelDetectorElementStatusToolBase::~PixelDetectorElementStatusToolBase ( )
virtualdefault

Member Function Documentation

◆ createDetectorElementStatus()

std::unique_ptr< InDet::SiDetectorElementStatus > PixelDetectorElementStatusToolBase::createDetectorElementStatus ( const EventContext &  ctx,
SG::WriteCondHandle< InDet::SiDetectorElementStatus > *  whandle 
) const
protected

Create a new detector element status element container.

Depending on the properties the container may be a copy of an event data or conditions data element status container.

Definition at line 34 of file PixelDetectorElementStatusToolBase.cxx.

35  {
38  if (whandle) {
39  whandle->addDependency (input_element_status);
40  }
41 
42  return std::make_unique<InDet::PixelDetectorElementStatus>(*castToDerived(input_element_status.cptr()));
43  }
44  else {
46  if (not pixelDetEleHandle.isValid() ) {
47  std::stringstream msg;
48  msg << m_pixelDetEleCollKey.fullKey() << " is not available.";
49  throw std::runtime_error(msg.str());
50  }
51  if (whandle) {
52  whandle->addDependency (pixelDetEleHandle);
53  }
54  const InDetDD::SiDetectorElementCollection* elements(*pixelDetEleHandle);
55  return std::make_unique<InDet::PixelDetectorElementStatus>(*elements);
56  }
57 }

◆ initialize()

StatusCode PixelDetectorElementStatusToolBase::initialize ( )
overridevirtual

Member Data Documentation

◆ m_pixelDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> PixelDetectorElementStatusToolBase::m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
private

Definition at line 45 of file PixelDetectorElementStatusToolBase.h.

◆ m_pixelDetElStatusCondKey

SG::ReadCondHandleKey<InDet::SiDetectorElementStatus> PixelDetectorElementStatusToolBase::m_pixelDetElStatusCondKey {this, "PixelDetElStatusCondDataBaseKey", "" , "Optional conditions data key of an input SiDetectorElementStatus on which the newly created object will be based."}
private

Definition at line 48 of file PixelDetectorElementStatusToolBase.h.

◆ m_pixelID

const PixelID* PixelDetectorElementStatusToolBase::m_pixelID {}
protected

Definition at line 39 of file PixelDetectorElementStatusToolBase.h.

◆ m_pixelReadout

ServiceHandle<InDetDD::IPixelReadoutManager> PixelDetectorElementStatusToolBase::m_pixelReadout {this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" }
private

Definition at line 42 of file PixelDetectorElementStatusToolBase.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
PixelDetectorElementStatusToolBase::m_pixelID
const PixelID * m_pixelID
Definition: PixelDetectorElementStatusToolBase.h:39
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
PixelDetectorElementStatusToolBase::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: PixelDetectorElementStatusToolBase.h:46
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
PixelDetectorElementStatusToolBase::m_pixelDetElStatusCondKey
SG::ReadCondHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatusCondKey
Definition: PixelDetectorElementStatusToolBase.h:49
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition: WriteCondHandle.h:275