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

#include <MuonCalibStreamDataProviderSvc.h>

Inheritance diagram for MuonCalibStreamDataProviderSvc:
Collaboration diagram for MuonCalibStreamDataProviderSvc:

Public Member Functions

 MuonCalibStreamDataProviderSvc (const std::string &name, ISvcLocator *svcloc)
virtual ~MuonCalibStreamDataProviderSvc ()
virtual StatusCode initialize ()
virtual void setNextEvent (const LVL2_MUON_CALIBRATION::CalibEvent *re)
virtual const LVL2_MUON_CALIBRATION::CalibEvent * getEvent ()
int fakeEventN ()
int fakeRunN ()
int fakeLumiBlock ()
float LVL2_pt ()
int timeStamp ()

Private Attributes

ServiceHandle< MuonCalibRunLumiBlockCoolSvcm_lumiBlockCoolSvc
bool m_run_number_from_cool
bool m_lumi_block_number_from_cool
const LVL2_MUON_CALIBRATION::CalibEvent * m_event
int m_evtN
int m_runN
int m_fake_evtN
int m_fake_runN
int m_fake_lumiB
float m_pt
int m_timeStamp

Detailed Description

Definition at line 16 of file MuonCalibStreamDataProviderSvc.h.

Constructor & Destructor Documentation

◆ MuonCalibStreamDataProviderSvc()

MuonCalibStreamDataProviderSvc::MuonCalibStreamDataProviderSvc ( const std::string & name,
ISvcLocator * svcloc )

Definition at line 8 of file MuonCalibStreamDataProviderSvc.cxx.

8 :
9 base_class(name, svcloc),
10 m_lumiBlockCoolSvc("MuonCalibRunLumiBlockCoolSvc", "MuonCalibRunLumiBlockCoolSvc"),
13 m_event(nullptr),
14 m_evtN(0),
15 m_runN(0),
16 m_fake_evtN(0),
17 m_fake_runN(-1),
18 m_fake_lumiB(200),
19 m_pt(0),
20 m_timeStamp(0) {
21 declareProperty("RunNumber", m_fake_runN, "run number to be used for DB access");
22 declareProperty("FirstEventNumber", m_fake_evtN, "reset fake event number to this value");
23 declareProperty("LumiBlockCoolSvc", m_lumiBlockCoolSvc);
24 declareProperty("RunNumberFromCool", m_run_number_from_cool);
25 declareProperty("LumiBlockNumberFromCool", m_lumi_block_number_from_cool);
26}
ServiceHandle< MuonCalibRunLumiBlockCoolSvc > m_lumiBlockCoolSvc
const LVL2_MUON_CALIBRATION::CalibEvent * m_event

◆ ~MuonCalibStreamDataProviderSvc()

MuonCalibStreamDataProviderSvc::~MuonCalibStreamDataProviderSvc ( )
virtual

Definition at line 29 of file MuonCalibStreamDataProviderSvc.cxx.

29{}

Member Function Documentation

◆ fakeEventN()

int MuonCalibStreamDataProviderSvc::fakeEventN ( )

Definition at line 65 of file MuonCalibStreamDataProviderSvc.cxx.

65 {
66 if (m_fake_runN < 0) {
67 return m_evtN;
68 } else {
69 return m_fake_evtN;
70 }
71}

◆ fakeLumiBlock()

int MuonCalibStreamDataProviderSvc::fakeLumiBlock ( )

Definition at line 81 of file MuonCalibStreamDataProviderSvc.cxx.

81{ return m_fake_lumiB; }

◆ fakeRunN()

int MuonCalibStreamDataProviderSvc::fakeRunN ( )

Definition at line 73 of file MuonCalibStreamDataProviderSvc.cxx.

73 {
74 if (m_fake_runN < 0) {
75 return m_runN;
76 } else {
77 return m_fake_runN;
78 }
79}

◆ getEvent()

const LVL2_MUON_CALIBRATION::CalibEvent * MuonCalibStreamDataProviderSvc::getEvent ( )
virtual

Definition at line 63 of file MuonCalibStreamDataProviderSvc.cxx.

63{ return m_event; }

◆ initialize()

StatusCode MuonCalibStreamDataProviderSvc::initialize ( )
virtual

Definition at line 32 of file MuonCalibStreamDataProviderSvc.cxx.

32 {
34 return StatusCode::SUCCESS;
35}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ LVL2_pt()

float MuonCalibStreamDataProviderSvc::LVL2_pt ( )

Definition at line 83 of file MuonCalibStreamDataProviderSvc.cxx.

83 {
84 return m_pt;
85}

◆ setNextEvent()

void MuonCalibStreamDataProviderSvc::setNextEvent ( const LVL2_MUON_CALIBRATION::CalibEvent * re)
virtual

Definition at line 37 of file MuonCalibStreamDataProviderSvc.cxx.

37 {
38 m_event = re;
39 m_evtN = m_event->lvl1_id();
40 m_runN = m_event->run_number();
41 m_pt = m_event->pt();
42 m_timeStamp = m_event->timestamp();
45 int runN(-1);
47 if (m_fake_runN >= 0)
48 runN = m_fake_runN;
49 else
50 runN = m_runN;
51 }
52 int lb_nr = 200;
53 if (!m_lumiBlockCoolSvc->GetRunEventNumber(m_timeStamp, runN, lb_nr).isSuccess()) {
54 ATH_MSG_FATAL("Failed to get run event number!");
55 return;
56 }
57 if (m_run_number_from_cool) { m_fake_runN = runN; }
59 }
60 return;
61}
const boost::regex re(r_e)
#define ATH_MSG_FATAL(x)

◆ timeStamp()

int MuonCalibStreamDataProviderSvc::timeStamp ( )

Definition at line 87 of file MuonCalibStreamDataProviderSvc.cxx.

87 {
88 return m_timeStamp;
89}

Member Data Documentation

◆ m_event

const LVL2_MUON_CALIBRATION::CalibEvent* MuonCalibStreamDataProviderSvc::m_event
private

Definition at line 35 of file MuonCalibStreamDataProviderSvc.h.

◆ m_evtN

int MuonCalibStreamDataProviderSvc::m_evtN
private

Definition at line 36 of file MuonCalibStreamDataProviderSvc.h.

◆ m_fake_evtN

int MuonCalibStreamDataProviderSvc::m_fake_evtN
private

Definition at line 38 of file MuonCalibStreamDataProviderSvc.h.

◆ m_fake_lumiB

int MuonCalibStreamDataProviderSvc::m_fake_lumiB
private

Definition at line 40 of file MuonCalibStreamDataProviderSvc.h.

◆ m_fake_runN

int MuonCalibStreamDataProviderSvc::m_fake_runN
private

Definition at line 39 of file MuonCalibStreamDataProviderSvc.h.

◆ m_lumi_block_number_from_cool

bool MuonCalibStreamDataProviderSvc::m_lumi_block_number_from_cool
private

Definition at line 34 of file MuonCalibStreamDataProviderSvc.h.

◆ m_lumiBlockCoolSvc

ServiceHandle<MuonCalibRunLumiBlockCoolSvc> MuonCalibStreamDataProviderSvc::m_lumiBlockCoolSvc
private

Definition at line 32 of file MuonCalibStreamDataProviderSvc.h.

◆ m_pt

float MuonCalibStreamDataProviderSvc::m_pt
private

Definition at line 41 of file MuonCalibStreamDataProviderSvc.h.

◆ m_run_number_from_cool

bool MuonCalibStreamDataProviderSvc::m_run_number_from_cool
private

Definition at line 33 of file MuonCalibStreamDataProviderSvc.h.

◆ m_runN

int MuonCalibStreamDataProviderSvc::m_runN
private

Definition at line 37 of file MuonCalibStreamDataProviderSvc.h.

◆ m_timeStamp

int MuonCalibStreamDataProviderSvc::m_timeStamp
private

Definition at line 42 of file MuonCalibStreamDataProviderSvc.h.


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