ATLAS Offline Software
Public Member Functions | Static 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 (void)
 
virtual StatusCode initialize ()
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Query interface. More...
 
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 ()
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Retrieve interface ID. More...
 

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  AthService(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 ( void  )
virtual

Definition at line 29 of file MuonCalibStreamDataProviderSvc.cxx.

29 {}

Member Function Documentation

◆ fakeEventN()

int MuonCalibStreamDataProviderSvc::fakeEventN ( )

Definition at line 77 of file MuonCalibStreamDataProviderSvc.cxx.

77  {
78  if (m_fake_runN < 0) {
79  return m_evtN;
80  } else {
81  return m_fake_evtN;
82  }
83 }

◆ fakeLumiBlock()

int MuonCalibStreamDataProviderSvc::fakeLumiBlock ( )

Definition at line 93 of file MuonCalibStreamDataProviderSvc.cxx.

93 { return m_fake_lumiB; }

◆ fakeRunN()

int MuonCalibStreamDataProviderSvc::fakeRunN ( )

Definition at line 85 of file MuonCalibStreamDataProviderSvc.cxx.

85  {
86  if (m_fake_runN < 0) {
87  return m_runN;
88  } else {
89  return m_fake_runN;
90  }
91 }

◆ getEvent()

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

Implements IMuonCalibStreamDataProviderSvc.

Definition at line 75 of file MuonCalibStreamDataProviderSvc.cxx.

75 { return m_event; }

◆ initialize()

StatusCode MuonCalibStreamDataProviderSvc::initialize ( )
virtual

Definition at line 32 of file MuonCalibStreamDataProviderSvc.cxx.

32  {
34  return StatusCode::SUCCESS;
35 }

◆ interfaceID()

static const InterfaceID& IMuonCalibStreamDataProviderSvc::interfaceID ( )
inlinestaticinherited

Retrieve interface ID.

Definition at line 16 of file IMuonCalibStreamDataProviderSvc.h.

16  {
17  // Declaration of the interface ID ( interface id, major version, minor version)
18 
19  static const InterfaceID IID_IMuonCalibStreamDataProviderSvc("IMuonCalibStreamDataProviderSvc", 1, 0);
20 
21  return IID_IMuonCalibStreamDataProviderSvc;
22  }

◆ LVL2_pt()

float MuonCalibStreamDataProviderSvc::LVL2_pt ( )

Definition at line 95 of file MuonCalibStreamDataProviderSvc.cxx.

95  {
96  return m_pt;
97 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ queryInterface()

StatusCode MuonCalibStreamDataProviderSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
virtual

Query interface.

Definition at line 38 of file MuonCalibStreamDataProviderSvc.cxx.

38  {
39  if (IMuonCalibStreamDataProviderSvc::interfaceID().versionMatch(riid)) {
40  *ppvInterface = (IMuonCalibStreamDataProviderSvc *)this;
41  } else {
42  return AthService::queryInterface(riid, ppvInterface);
43  }
44 
45  addRef();
46  return StatusCode::SUCCESS;
47 }

◆ setNextEvent()

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

Implements IMuonCalibStreamDataProviderSvc.

Definition at line 49 of file MuonCalibStreamDataProviderSvc.cxx.

49  {
50  m_event = re;
51  m_evtN = m_event->lvl1_id();
52  m_runN = m_event->run_number();
53  m_pt = m_event->pt();
54  m_timeStamp = m_event->timestamp();
55  m_fake_evtN++;
57  int runN(-1);
59  if (m_fake_runN >= 0)
60  runN = m_fake_runN;
61  else
62  runN = m_runN;
63  }
64  int lb_nr = 200;
65  if (!m_lumiBlockCoolSvc->GetRunEventNumber(m_timeStamp, runN, lb_nr).isSuccess()) {
66  ATH_MSG_FATAL("Failed to get run event number!");
67  return;
68  }
69  if (m_run_number_from_cool) { m_fake_runN = runN; }
71  }
72  return;
73 }

◆ timeStamp()

int MuonCalibStreamDataProviderSvc::timeStamp ( )

Definition at line 99 of file MuonCalibStreamDataProviderSvc.cxx.

99  {
100  return m_timeStamp;
101 }

Member Data Documentation

◆ m_event

const LVL2_MUON_CALIBRATION::CalibEvent* MuonCalibStreamDataProviderSvc::m_event
private

Definition at line 36 of file MuonCalibStreamDataProviderSvc.h.

◆ m_evtN

int MuonCalibStreamDataProviderSvc::m_evtN
private

Definition at line 37 of file MuonCalibStreamDataProviderSvc.h.

◆ m_fake_evtN

int MuonCalibStreamDataProviderSvc::m_fake_evtN
private

Definition at line 39 of file MuonCalibStreamDataProviderSvc.h.

◆ m_fake_lumiB

int MuonCalibStreamDataProviderSvc::m_fake_lumiB
private

Definition at line 41 of file MuonCalibStreamDataProviderSvc.h.

◆ m_fake_runN

int MuonCalibStreamDataProviderSvc::m_fake_runN
private

Definition at line 40 of file MuonCalibStreamDataProviderSvc.h.

◆ m_lumi_block_number_from_cool

bool MuonCalibStreamDataProviderSvc::m_lumi_block_number_from_cool
private

Definition at line 35 of file MuonCalibStreamDataProviderSvc.h.

◆ m_lumiBlockCoolSvc

ServiceHandle<MuonCalibRunLumiBlockCoolSvc> MuonCalibStreamDataProviderSvc::m_lumiBlockCoolSvc
private

Definition at line 33 of file MuonCalibStreamDataProviderSvc.h.

◆ m_pt

float MuonCalibStreamDataProviderSvc::m_pt
private

Definition at line 42 of file MuonCalibStreamDataProviderSvc.h.

◆ m_run_number_from_cool

bool MuonCalibStreamDataProviderSvc::m_run_number_from_cool
private

Definition at line 34 of file MuonCalibStreamDataProviderSvc.h.

◆ m_runN

int MuonCalibStreamDataProviderSvc::m_runN
private

Definition at line 38 of file MuonCalibStreamDataProviderSvc.h.

◆ m_timeStamp

int MuonCalibStreamDataProviderSvc::m_timeStamp
private

Definition at line 43 of file MuonCalibStreamDataProviderSvc.h.


The documentation for this class was generated from the following files:
AthService::AthService
AthService()
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:36
MuonCalibStreamDataProviderSvc::m_timeStamp
int m_timeStamp
Definition: MuonCalibStreamDataProviderSvc.h:43
MuonCalibStreamDataProviderSvc::m_lumi_block_number_from_cool
bool m_lumi_block_number_from_cool
Definition: MuonCalibStreamDataProviderSvc.h:35
MuonCalibStreamDataProviderSvc::m_runN
int m_runN
Definition: MuonCalibStreamDataProviderSvc.h:38
MuonCalibStreamDataProviderSvc::m_evtN
int m_evtN
Definition: MuonCalibStreamDataProviderSvc.h:37
MuonCalibStreamDataProviderSvc::m_fake_lumiB
int m_fake_lumiB
Definition: MuonCalibStreamDataProviderSvc.h:41
MuonCalibStreamDataProviderSvc::m_fake_evtN
int m_fake_evtN
Definition: MuonCalibStreamDataProviderSvc.h:39
IMuonCalibStreamDataProviderSvc::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: IMuonCalibStreamDataProviderSvc.h:16
MuonCalibStreamDataProviderSvc::m_fake_runN
int m_fake_runN
Definition: MuonCalibStreamDataProviderSvc.h:40
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCalibStreamDataProviderSvc::m_run_number_from_cool
bool m_run_number_from_cool
Definition: MuonCalibStreamDataProviderSvc.h:34
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
re
const boost::regex re(r_e)
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
MuonCalibStreamDataProviderSvc::m_lumiBlockCoolSvc
ServiceHandle< MuonCalibRunLumiBlockCoolSvc > m_lumiBlockCoolSvc
Definition: MuonCalibStreamDataProviderSvc.h:33
MuonCalibStreamDataProviderSvc::m_pt
float m_pt
Definition: MuonCalibStreamDataProviderSvc.h:42
IMuonCalibStreamDataProviderSvc
Definition: IMuonCalibStreamDataProviderSvc.h:13