ATLAS Offline Software
CscCalibReportSlope.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include "GaudiKernel/MsgStream.h"
9 
10 #include "TGraphErrors.h"
11 #include "TH1I.h"
12 #include "TProfile.h"
13 #include <map>
14 #include <set>
15 #include <string>
16 #include <utility>
17 
18 /* default constructor */
20  m_calGraphs(nullptr),
21  m_bitHists(nullptr),
22  m_ampProfs(nullptr),
23  m_pulsedChambers(nullptr),
24  m_fitResults(nullptr)
25 { }
26 
27 /* full constructor */
30  m_calGraphs(nullptr),
31  m_bitHists(nullptr),
32  m_ampProfs(nullptr),
33  m_pulsedChambers(nullptr),
34  m_fitResults(nullptr)
35 { }
36 
38 {
39  //Datavector, so it will delete its own contents
40  delete m_calGraphs;
41  delete m_bitHists;
42  delete m_ampProfs;
43  delete m_pulsedChambers;
44  delete m_fitResults;
45 }
46 
47 
49 {
50  m_bitHists = someBitHists;
51 }
52 
54 {
55  return m_bitHists;
56 }
57 
59 {
60  if(m_calGraphs) {
61  MsgStream log(Athena::getMessageSvc(),"CscCalibReportSlope");
62  log<<MSG::WARNING<<"Writing over already existing calGraphs in report!"<<endmsg;
63  }
64 
65  m_calGraphs = someCalGraphs;
66 }
67 
69 {
70  return m_calGraphs;
71 }
72 
73 void CscCalibReportSlope::setAmpProfs( std::map<int,TProfile *> * someAmpProfs )
74 {
75  if(m_ampProfs) {
76  MsgStream log(Athena::getMessageSvc(),"CscCalibReportSlope");
77  log<<MSG::WARNING<<"writing over already existing dead changes in report!"<<endmsg;
78  }
79  m_ampProfs = someAmpProfs;
80 }
81 
82 void CscCalibReportSlope::setFitResults( std::vector<float> * someFitResults){
83  m_fitResults = someFitResults;
84 }
85 
86 const std::map<int,TProfile*> * CscCalibReportSlope::getAmpProfs() const
87 {
88  return m_ampProfs;
89 }
90 
91 void CscCalibReportSlope::setPulsedChambers( std::set<int> * somePulsedChambers)
92 {
93  if(m_pulsedChambers) {
94  MsgStream log(Athena::getMessageSvc(),"CscCalibReportSlope");
95  log<<MSG::WARNING<<"Writing over previously existing pulsed chambers!"<<endmsg;
96  }
97  m_pulsedChambers = somePulsedChambers;
98 }
99 
100 
101 const std::set<int> * CscCalibReportSlope::getPulsedChambers() const
102 {
103  return m_pulsedChambers;
104 }
105 
106 const std::vector<float> * CscCalibReportSlope::getFitResults() const{
107  return m_fitResults;
108 }
109 
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
CscCalibReportSlope::setPulsedChambers
void setPulsedChambers(std::set< int > *somePulsedChambers)
setPulsedChambers - set the pulsed chambers
Definition: CscCalibReportSlope.cxx:91
CscCalibReportSlope::getBitHists
const DataVector< TH1I > * getBitHists() const
Retrive bit histogram vector.
Definition: CscCalibReportSlope.cxx:53
CscCalibReportSlope::setFitResults
void setFitResults(std::vector< float > *fitResults)
Definition: CscCalibReportSlope.cxx:82
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
CscCalibReportSlope::getPulsedChambers
const std::set< int > * getPulsedChambers() const
getPulsedChambers - Contains the chambers that were pulsed.
Definition: CscCalibReportSlope.cxx:101
CscCalibReportSlope::m_fitResults
std::vector< float > * m_fitResults
Definition: CscCalibReportSlope.h:119
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CscCalibReportSlope::CscCalibReportSlope
CscCalibReportSlope()
Definition: CscCalibReportSlope.cxx:19
CscCalibReportSlope.h
DataVector< TH1I >
CscCalibReportSlope::getFitResults
const std::vector< float > * getFitResults() const
getFitReturns - Contains slope fit results.
Definition: CscCalibReportSlope.cxx:106
CscCalibReportSlope::setAmpProfs
void setAmpProfs(std::map< int, TProfile * > *someAmpProfs)
setAmpProfs - set the changed dead channels
Definition: CscCalibReportSlope.cxx:73
CscCalibReportSlope::m_calGraphs
DataVector< TGraphErrors > * m_calGraphs
Definition: CscCalibReportSlope.h:108
CscCalibReportSlope::m_ampProfs
std::map< int, TProfile * > * m_ampProfs
Definition: CscCalibReportSlope.h:115
CscCalibReportSlope::getAmpProfs
const std::map< int, TProfile * > * getAmpProfs() const
getAmpProfs - get the map of ampProfs stored.
Definition: CscCalibReportSlope.cxx:86
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CscCalibReportSlope::setBitHists
void setBitHists(DataVector< TH1I > *somePedAmpHists)
Definition: CscCalibReportSlope.cxx:48
CscCalibReportSlope::~CscCalibReportSlope
~CscCalibReportSlope()
Definition: CscCalibReportSlope.cxx:37
CscCalibReportSlope::m_bitHists
DataVector< TH1I > * m_bitHists
Definition: CscCalibReportSlope.h:110
CscCalibReportBase
Definition: CscCalibReportBase.h:20
CscCalibReportSlope::setCalGraphs
void setCalGraphs(DataVector< TGraphErrors > *someCalGraphs)
setCalGraphs - Set the pedAmpHist vector.
Definition: CscCalibReportSlope.cxx:58
CscCalibReportSlope::m_pulsedChambers
std::set< int > * m_pulsedChambers
Definition: CscCalibReportSlope.h:117
CscCalibReportSlope::getCalGraphs
const DataVector< TGraphErrors > * getCalGraphs() const
Retrieve pedestal amplitude histogram vector.
Definition: CscCalibReportSlope.cxx:68