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

Class TBCaloCoolPosTool. More...

#include <TBCaloCoolPosTool.h>

Inheritance diagram for TBCaloCoolPosTool:
Collaboration diagram for TBCaloCoolPosTool:

Public Member Functions

 TBCaloCoolPosTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~TBCaloCoolPosTool ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual void handle (const Incident &)
 
virtual double eta ()
 access eta value More...
 
virtual double theta ()
 access eta value More...
 
virtual double z ()
 access eta value More...
 
virtual double delta ()
 access eta value More...
 

Private Member Functions

bool initHandles ATLAS_NOT_THREAD_SAFE ()
 

Private Attributes

const DataHandle< AthenaAttributeListm_etaTable
 
const DataHandle< AthenaAttributeListm_thetaTable
 
const DataHandle< AthenaAttributeListm_zTable
 
const DataHandle< AthenaAttributeListm_deltaTable
 
bool m_init
 

Detailed Description

Class TBCaloCoolPosTool.

Implementation of ITBCaloPosTool using COOL

Feb 6, 2006 Richard Hawkings

Definition at line 25 of file TBCaloCoolPosTool.h.

Constructor & Destructor Documentation

◆ TBCaloCoolPosTool()

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

Definition at line 14 of file TBCaloCoolPosTool.cxx.

17  :
18  base_class(type, name, parent),m_init(0)
19 {
20 }

◆ ~TBCaloCoolPosTool()

TBCaloCoolPosTool::~TBCaloCoolPosTool ( )
virtual

Definition at line 23 of file TBCaloCoolPosTool.cxx.

24 {}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

bool initHandles TBCaloCoolPosTool::ATLAS_NOT_THREAD_SAFE ( )
private

◆ delta()

double TBCaloCoolPosTool::delta ( )
virtual

access eta value

Definition at line 149 of file TBCaloCoolPosTool.cxx.

150 {
151  float d=0;
152  try {
153  d=(* m_deltaTable)["delta"].data<float>();
154  }
155  catch (const std::exception& ex) {
156  ATH_MSG_ERROR("delta AttributeList access failed");
157  return 0 ;
158  }
159  return d;
160 }

◆ eta()

double TBCaloCoolPosTool::eta ( )
virtual

access eta value

Definition at line 110 of file TBCaloCoolPosTool.cxx.

111 {
112  float e=0;
113  try {
114  e=(* m_etaTable)["eta"].data<float>();
115  }
116  catch (const std::exception& ex) {
117  ATH_MSG_ERROR("eta AttributeList access failed");
118  return 0 ;
119  }
120  return e;
121 }

◆ finalize()

StatusCode TBCaloCoolPosTool::finalize ( )
virtual

Definition at line 27 of file TBCaloCoolPosTool.cxx.

28 {
29  return StatusCode::SUCCESS ;
30 }

◆ handle()

void TBCaloCoolPosTool::handle ( const Incident &  )
virtual

Definition at line 52 of file TBCaloCoolPosTool.cxx.

53 {
54  // This should be the beginning of Run.
55 
56  ATH_MSG_DEBUG ("in handle()" );
57  if(! m_init) {
58  // not yet initialized.
59  if( initHandles() ) {
60  m_init = true;
61  } else
62  {
63  ATH_MSG_ERROR ( " unable initialize DataHandle in BeginRun Incident " );
64  }
65  }
66 
67  return;
68 }

◆ initialize()

StatusCode TBCaloCoolPosTool::initialize ( )
virtual

Definition at line 33 of file TBCaloCoolPosTool.cxx.

34 {
35  ATH_MSG_DEBUG ("in initialize()" );
36 
37  if( initHandles() ) {
38  m_init = true;
39  } else
40  { // wait for the begin run
41  // start listening to "BeginRun"
42  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", name());
43  ATH_CHECK( incSvc.retrieve() );
44  const int PRIORITY = 100;
45  incSvc->addListener(this, "BeginRun", PRIORITY);
46  }
47 
48  return StatusCode::SUCCESS;
49 }

◆ theta()

double TBCaloCoolPosTool::theta ( )
virtual

access eta value

Definition at line 123 of file TBCaloCoolPosTool.cxx.

124 {
125  float t=0;
126  try {
127  t=(* m_thetaTable)["theta"].data<float>();
128  }
129  catch (const std::exception& ex) {
130  ATH_MSG_ERROR("theta AttributeList access failed");
131  return 0 ;
132  }
133  return t;
134 }

◆ z()

double TBCaloCoolPosTool::z ( )
virtual

access eta value

Definition at line 136 of file TBCaloCoolPosTool.cxx.

137 {
138  float z=0;
139  try {
140  z=(* m_zTable)["z"].data<float>();
141  }
142  catch (const std::exception& ex) {
143  ATH_MSG_ERROR("z AttributeList access failed");
144  return 0 ;
145  }
146  return z;
147 }

Member Data Documentation

◆ m_deltaTable

const DataHandle<AthenaAttributeList> TBCaloCoolPosTool::m_deltaTable
private

Definition at line 62 of file TBCaloCoolPosTool.h.

◆ m_etaTable

const DataHandle<AthenaAttributeList> TBCaloCoolPosTool::m_etaTable
private

Definition at line 59 of file TBCaloCoolPosTool.h.

◆ m_init

bool TBCaloCoolPosTool::m_init
private

Definition at line 64 of file TBCaloCoolPosTool.h.

◆ m_thetaTable

const DataHandle<AthenaAttributeList> TBCaloCoolPosTool::m_thetaTable
private

Definition at line 60 of file TBCaloCoolPosTool.h.

◆ m_zTable

const DataHandle<AthenaAttributeList> TBCaloCoolPosTool::m_zTable
private

Definition at line 61 of file TBCaloCoolPosTool.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
hist_file_dump.d
d
Definition: hist_file_dump.py:137
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
calibdata.exception
exception
Definition: calibdata.py:496
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TBCaloCoolPosTool::m_init
bool m_init
Definition: TBCaloCoolPosTool.h:64
TBCaloCoolPosTool::z
virtual double z()
access eta value
Definition: TBCaloCoolPosTool.cxx:136
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ServiceHandle< IIncidentSvc >