Basic base class for any common functionality between RatesTrigger and RatesGroup This means that everyone has access to the same histograms.
More...
#include <RatesHistoBase.h>
|
| void | initMessaging () const |
| | Initialize our message level and MessageSvc.
|
|
| std::string | m_nm |
| | Message source name.
|
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| | MsgStream instance (a std::cout like with print-out levels)
|
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| | MessageSvc pointer.
|
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| | Current logging level.
|
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| | Messaging initialized (initMessaging)
|
Basic base class for any common functionality between RatesTrigger and RatesGroup This means that everyone has access to the same histograms.
Definition at line 84 of file RatesHistoBase.h.
◆ RatesHistoBase() [1/2]
| RatesHistoBase::RatesHistoBase |
( |
const std::string & | name, |
|
|
IMessageSvc * | msgSvc, |
|
|
const bool | doHistograms = true ) |
Definition at line 10 of file RatesHistoBase.cxx.
10 :
14{
16 m_rateVsMu = std::make_unique<TH1D>(
"",TString(name +
";#mu;Rate / Unit #mu [Hz]"),226,-.5,225.5);
20
21 m_rateVsTrain = std::make_unique<TH1D>(
"",TString(name +
";Distance Into Train;Rate / BCID [Hz]"),100,-0.5,99.5);
25
29
30 m_data->GetXaxis()->SetBinLabel(1,
"Actve Raw");
31 m_data->GetXaxis()->SetBinLabel(2,
"Active Weighted");
32 m_data->GetXaxis()->SetBinLabel(3,
"Pass Raw");
33 m_data->GetXaxis()->SetBinLabel(4,
"Pass Weighted OR");
34 m_data->GetXaxis()->SetBinLabel(5,
"Pass Weighted AND");
35 m_data->GetXaxis()->SetBinLabel(6,
"Express");
36 m_data->GetXaxis()->SetBinLabel(7,
"Unique");
38
39 }
40}
@ kNRATES_BINS
Must always come last.
AthMessaging()
Default constructor:
std::unique_ptr< TH1 > m_rateVsMu
Histogram of rate as a fn.
bool doHistograms() const
If histogramming was enabled in this rates object.
TH1 * m_rateVsTrainCachedPtr
Cached, non-owning pointer.
TH1 * m_rateVsMuCachedPtr
Cached, non-owning pointer.
std::unique_ptr< TH1 > m_data
Histogram of raw rates quantites, for when we need to normalise offline (e.g.
std::unique_ptr< TH1 > m_rateVsTrain
Histogram of rate as a fn.
bool m_doHistograms
If histogramming is switched on.
TH1 * m_dataCachedPtr
Cached, non-owning pointer.
std::string m_name
My name.
◆ ~RatesHistoBase()
| RatesHistoBase::~RatesHistoBase |
( |
| ) |
|
|
virtual |
◆ RatesHistoBase() [2/2]
◆ clearTrainHist()
| void RatesHistoBase::clearTrainHist |
( |
| ) |
|
In some jobs we don't want to do the rates vs.
position in train
Definition at line 76 of file RatesHistoBase.cxx.
◆ doHistograms()
| bool RatesHistoBase::doHistograms |
( |
| ) |
const |
|
inline |
If histogramming was enabled in this rates object.
Definition at line 99 of file RatesHistoBase.h.
◆ getDataHist()
| TH1 * RatesHistoBase::getDataHist |
( |
| ) |
|
- Returns
- cached, non-owning, histogram pointer or nullptr. Does not cause error
Definition at line 82 of file RatesHistoBase.cxx.
◆ getExtrapolationFactor()
Definition at line 96 of file RatesHistoBase.cxx.
96 {
97 switch (strat) {
103 default:
ATH_MSG_ERROR(
"Error in getExtrapolationFactor. Unknown ExtrapStrat_t ENUM supplied " << strat);
104 }
105 return 0.;
106}
@ kMU_SCALING
Scale trigger linearly but only in the change in <mu>
@ kBUNCH_SCALING
Scale trigger linearly but only in the number of bunches.
@ kLINEAR
Scale trigger linearly with luminosity.
@ kNONE
Do not scale this trigger for changes in luminosity.
@ kEXPO_MU
Scale trigger linearly in bunches and exponentially in mu.
const double m_noScaling
Weight for no scaling.
double m_muFactor
What weight needs to be applied to extrapolate rates linear in mu.
double m_expoMuFactor
What weight needs to be applied to extrapolate rates linear in bunches and exponential in mu.
double m_linearLumiFactor
What weight needs to be applied to extrapolate rates linear in mu and bunches.
double m_bunchFactor
What weight needs to be applied to extrapolate rates linear in number of bunches.
◆ getExtrapolationFactorString()
| const std::string & RatesHistoBase::getExtrapolationFactorString |
( |
ExtrapStrat_t | strat | ) |
const |
Definition at line 87 of file RatesHistoBase.cxx.
87 {
88 static const std::vector<std::string>
values{
"LINEAR_L",
"LINEAR_BUNCH_EXPO_MU",
"LINEAR_BUNCHES",
"LINEAR_MU",
"NONE"};
89 return values.at(
static_cast<size_t>(strat));
90}
◆ giveDataHist()
| StatusCode RatesHistoBase::giveDataHist |
( |
const ServiceHandle< ITHistSvc > & | svc, |
|
|
const std::string & | name ) |
Definition at line 66 of file RatesHistoBase.cxx.
66 {
68 ATH_MSG_ERROR(
"RatesHistoBase::giveDataHist Warning requested histograms when histograming is OFF here.");
69 return StatusCode::FAILURE;
70 }
72 return StatusCode::SUCCESS;
73}
#define ATH_CHECK
Evaluate an expression and check for errors.
AthROOTErrorHandlerSvc * svc
◆ giveMuHist()
| StatusCode RatesHistoBase::giveMuHist |
( |
const ServiceHandle< ITHistSvc > & | svc, |
|
|
const std::string & | name ) |
Definition at line 46 of file RatesHistoBase.cxx.
46 {
48 ATH_MSG_ERROR(
"RatesHistoBase::giveMuHist Warning requested histograms when histograming is OFF here.");
49 return StatusCode::FAILURE;
50 }
52 return StatusCode::SUCCESS;
53}
◆ giveTrainHist()
| StatusCode RatesHistoBase::giveTrainHist |
( |
const ServiceHandle< ITHistSvc > & | svc, |
|
|
const std::string & | name ) |
Definition at line 56 of file RatesHistoBase.cxx.
56 {
58 ATH_MSG_ERROR(
"RatesHistoBase::giveTrainHist Warning requested histograms when histograming is OFF here.");
59 return StatusCode::FAILURE;
60 }
62 return StatusCode::SUCCESS;
63}
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
40{
42
43 if (
m_lvl == MSG::NIL) {
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ isNotPositive()
| bool RatesHistoBase::isNotPositive |
( |
double | v | ) |
|
|
inlinestatic |
Definition at line 104 of file RatesHistoBase.h.
104{ return v < std::numeric_limits<double>::min(); }
◆ isZero()
| bool RatesHistoBase::isZero |
( |
double | v | ) |
|
|
inlinestatic |
Definition at line 103 of file RatesHistoBase.h.
103{ return abs(v) < std::numeric_limits<double>::min(); }
◆ msg() [1/2]
| MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 163 of file AthMessaging.h.
164{
166 if (!ms) {
170 }
171
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.
◆ msg() [2/2]
| MsgStream & AthMessaging::msg |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 178 of file AthMessaging.h.
179{
return msg() << lvl; }
MsgStream & msg() const
The standard message stream.
◆ msgLvl()
| bool AthMessaging::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
152{
155 return true;
156 } else {
157 return false;
158 }
159}
◆ operator=()
◆ setDataName()
| void RatesHistoBase::setDataName |
( |
const std::string & | newName | ) |
|
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
|
inherited |
◆ setRateVsMuName()
| void RatesHistoBase::setRateVsMuName |
( |
const std::string & | newName | ) |
|
◆ setRateVsTrainName()
| void RatesHistoBase::setRateVsTrainName |
( |
const std::string & | newName | ) |
|
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_data
| std::unique_ptr<TH1> RatesHistoBase::m_data |
|
protected |
Histogram of raw rates quantites, for when we need to normalise offline (e.g.
grid processing)
Definition at line 115 of file RatesHistoBase.h.
◆ m_dataCachedPtr
| TH1* RatesHistoBase::m_dataCachedPtr {} |
|
protected |
◆ m_doHistograms
| bool RatesHistoBase::m_doHistograms |
|
protected |
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_name
| std::string RatesHistoBase::m_name |
|
protected |
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_rateVsMu
| std::unique_ptr<TH1> RatesHistoBase::m_rateVsMu |
|
protected |
Histogram of rate as a fn.
of the input event's mu
Definition at line 113 of file RatesHistoBase.h.
◆ m_rateVsMuCachedPtr
| TH1* RatesHistoBase::m_rateVsMuCachedPtr {} |
|
protected |
◆ m_rateVsTrain
| std::unique_ptr<TH1> RatesHistoBase::m_rateVsTrain |
|
protected |
Histogram of rate as a fn.
of position in bunch train
Definition at line 114 of file RatesHistoBase.h.
◆ m_rateVsTrainCachedPtr
| TH1* RatesHistoBase::m_rateVsTrainCachedPtr {} |
|
protected |
The documentation for this class was generated from the following files: