ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7#include <algorithm>
8#include <iostream>
9
11#include "GaudiKernel/MsgStream.h"
14
15namespace 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
23
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
32
33 if (m_printLevel >= 2) {
34 MsgStream log(Athena::getMessageSvc(), "MdtCalibEventLoop");
35 log << MSG::DEBUG << "new rtOutput " << m_calibrationResult << endmsg;
36 }
37 }
38
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
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
#define endmsg
Interface to Mdt calibration algortihms.
std::string m_regionKey
region key
IMdtCalibration::MdtCalibOutputPtr m_calibrationResult
results calibration
IMdtCalibration * m_calibrationImp
pointer to calibration implementation
MuonSegVec m_segments
segment collection
void performAnalysis()
analyse segments using IRtCalibration
void setCalibImp(IMdtCalibration *calibImp)
set pointer to RtCalibration
MdtCalibEventLoop(const std::string &regionKey)
constructor
bool handleSegment(const MuonCalibSegment *seg)
handle segment (for now store)
A MuonCalibSegment is a reconstructed three dimensional track segment in the MuonSpectrometer.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.