ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCalib
MdtCalib
MdtCalibEventLoop
src
MdtCalibEventLoop.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MdtCalibEventLoop/MdtCalibEventLoop.h
"
6
7
#include <algorithm>
8
#include <iostream>
9
10
#include "
AthenaKernel/getMessageSvc.h
"
11
#include "GaudiKernel/MsgStream.h"
12
#include "
MdtCalibInterfaces/IMdtCalibrationOutput.h
"
13
#include "
MuonCalibEventBase/MuonCalibSegment.h
"
14
15
namespace
MuonCalib
{
16
17
MdtCalibEventLoop::MdtCalibEventLoop
(
const
std::string& regionKey) :
18
m_calibrationImp
(nullptr),
m_calibrationResult
(nullptr),
m_regionKey
(regionKey) {
19
m_printLevel
= 1;
20
}
21
22
MdtCalibEventLoop::~MdtCalibEventLoop
() =
default
;
23
24
void
MdtCalibEventLoop::performAnalysis
() {
25
if
(
m_printLevel
>= 1) {
26
MsgStream log(
Athena::getMessageSvc
(),
"MdtCalibEventLoop"
);
27
log << MSG::VERBOSE <<
"MdtCalibEventLoop::performAnalysis for region "
<<
m_regionKey
<<
endmsg
;
28
}
29
30
// perform rt-calibration
31
m_calibrationResult
=
m_calibrationImp
->analyseSegments(
m_segments
);
32
33
if
(
m_printLevel
>= 2) {
34
MsgStream log(
Athena::getMessageSvc
(),
"MdtCalibEventLoop"
);
35
log << MSG::DEBUG <<
"new rtOutput "
<<
m_calibrationResult
<<
endmsg
;
36
}
37
}
38
39
bool
MdtCalibEventLoop::handleSegment
(
const
MuonCalibSegment
* cseg) {
40
if
(
m_printLevel
>= 4) {
41
MsgStream log(
Athena::getMessageSvc
(),
"MdtCalibEventLoop"
);
42
log << MSG::WARNING <<
"MdtCalibEventLoop::handleSegment "
<< cseg <<
endmsg
;
43
}
44
45
if
(cseg) {
46
// eventloop owns the segments so it should make a copy
47
MuonCalibSegment
* seg =
new
MuonCalibSegment
(*cseg);
48
49
// add segment to vector
50
m_segments
.emplace_back(seg);
51
52
}
else
{
53
MsgStream log(
Athena::getMessageSvc
(),
"MdtCalibEventLoop"
);
54
log << MSG::WARNING <<
"MdtCalibEventLoop::handleSegment: got nullptr "
<<
endmsg
;
55
return
false
;
56
}
57
return
true
;
58
}
59
60
void
MdtCalibEventLoop::setCalibImp
(
IMdtCalibration
* calibImp) {
61
if
(
m_printLevel
>= 2) {
62
MsgStream log(
Athena::getMessageSvc
(),
"MdtCalibEventLoop"
);
63
log << MSG::DEBUG <<
"MdtCalibEventLoop::setRtCalibTool >> new tool "
<< calibImp <<
endmsg
;
64
}
65
if
(calibImp) {
66
m_calibrationImp
= calibImp;
67
}
else
{
68
MsgStream log(
Athena::getMessageSvc
(),
"MdtCalibEventLoop"
);
69
log << MSG::WARNING <<
"MdtCalibEventLoop::setCalibImp: got nullptr "
<<
endmsg
;
70
m_calibrationImp
=
nullptr
;
71
}
72
}
73
74
}
// namespace MuonCalib
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
IMdtCalibrationOutput.h
MdtCalibEventLoop.h
MuonCalibSegment.h
MuonCalib::IMdtCalibration
Interface to Mdt calibration algortihms.
Definition
IMdtCalibration.h:25
MuonCalib::MdtCalibEventLoop::m_regionKey
std::string m_regionKey
region key
Definition
MdtCalibEventLoop.h:68
MuonCalib::MdtCalibEventLoop::~MdtCalibEventLoop
~MdtCalibEventLoop()
destructor
MuonCalib::MdtCalibEventLoop::m_calibrationResult
IMdtCalibration::MdtCalibOutputPtr m_calibrationResult
results calibration
Definition
MdtCalibEventLoop.h:62
MuonCalib::MdtCalibEventLoop::m_calibrationImp
IMdtCalibration * m_calibrationImp
pointer to calibration implementation
Definition
MdtCalibEventLoop.h:59
MuonCalib::MdtCalibEventLoop::m_segments
MuonSegVec m_segments
segment collection
Definition
MdtCalibEventLoop.h:60
MuonCalib::MdtCalibEventLoop::performAnalysis
void performAnalysis()
analyse segments using IRtCalibration
Definition
MdtCalibEventLoop.cxx:24
MuonCalib::MdtCalibEventLoop::setCalibImp
void setCalibImp(IMdtCalibration *calibImp)
set pointer to RtCalibration
Definition
MdtCalibEventLoop.cxx:60
MuonCalib::MdtCalibEventLoop::MdtCalibEventLoop
MdtCalibEventLoop(const std::string ®ionKey)
constructor
Definition
MdtCalibEventLoop.cxx:17
MuonCalib::MdtCalibEventLoop::handleSegment
bool handleSegment(const MuonCalibSegment *seg)
handle segment (for now store)
Definition
MdtCalibEventLoop.cxx:39
MuonCalib::MdtCalibEventLoop::m_printLevel
int m_printLevel
print level
Definition
MdtCalibEventLoop.h:65
MuonCalib::MuonCalibSegment
A MuonCalibSegment is a reconstructed three dimensional track segment in the MuonSpectrometer.
Definition
MuonCalibSegment.h:39
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition
CscCalcPed.cxx:21
Generated on
for ATLAS Offline Software by
1.17.0