ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 }

◆ ~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 }

◆ 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();
43  m_fake_evtN++;
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 }

◆ 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:
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonCalibStreamDataProviderSvc::m_event
const LVL2_MUON_CALIBRATION::CalibEvent * m_event
Definition: MuonCalibStreamDataProviderSvc.h:35
MuonCalibStreamDataProviderSvc::m_timeStamp
int m_timeStamp
Definition: MuonCalibStreamDataProviderSvc.h:42
MuonCalibStreamDataProviderSvc::m_lumi_block_number_from_cool
bool m_lumi_block_number_from_cool
Definition: MuonCalibStreamDataProviderSvc.h:34
MuonCalibStreamDataProviderSvc::m_runN
int m_runN
Definition: MuonCalibStreamDataProviderSvc.h:37
MuonCalibStreamDataProviderSvc::m_evtN
int m_evtN
Definition: MuonCalibStreamDataProviderSvc.h:36
MuonCalibStreamDataProviderSvc::m_fake_lumiB
int m_fake_lumiB
Definition: MuonCalibStreamDataProviderSvc.h:40
MuonCalibStreamDataProviderSvc::m_fake_evtN
int m_fake_evtN
Definition: MuonCalibStreamDataProviderSvc.h:38
MuonCalibStreamDataProviderSvc::m_fake_runN
int m_fake_runN
Definition: MuonCalibStreamDataProviderSvc.h:39
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCalibStreamDataProviderSvc::m_run_number_from_cool
bool m_run_number_from_cool
Definition: MuonCalibStreamDataProviderSvc.h:33
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
re
const boost::regex re(r_e)
MuonCalibStreamDataProviderSvc::m_lumiBlockCoolSvc
ServiceHandle< MuonCalibRunLumiBlockCoolSvc > m_lumiBlockCoolSvc
Definition: MuonCalibStreamDataProviderSvc.h:32
MuonCalibStreamDataProviderSvc::m_pt
float m_pt
Definition: MuonCalibStreamDataProviderSvc.h:41