|
ATLAS Offline Software
|
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>
|
std::string | m_nm |
| Message source name. More...
|
|
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More...
|
|
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More...
|
|
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More...
|
|
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More...
|
|
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.
17 m_rateVsMu = std::make_unique<TH1D>(
"",TString(
name +
";#mu;Rate / Unit #mu [Hz]"),226,-.5,225.5);
22 m_rateVsTrain = std::make_unique<TH1D>(
"",TString(
name +
";Distance Into Train;Rate / BCID [Hz]"),100,-0.5,99.5);
31 m_data->GetXaxis()->SetBinLabel(1,
"Actve Raw");
32 m_data->GetXaxis()->SetBinLabel(2,
"Active Weighted");
33 m_data->GetXaxis()->SetBinLabel(3,
"Pass Raw");
34 m_data->GetXaxis()->SetBinLabel(4,
"Pass Weighted OR");
35 m_data->GetXaxis()->SetBinLabel(5,
"Pass Weighted AND");
36 m_data->GetXaxis()->SetBinLabel(6,
"Express");
37 m_data->GetXaxis()->SetBinLabel(7,
"Unique");
◆ ~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 78 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 84 of file RatesHistoBase.cxx.
◆ getExtrapolationFactor()
◆ getExtrapolationFactorString()
const std::string & RatesHistoBase::getExtrapolationFactorString |
( |
ExtrapStrat_t |
strat | ) |
const |
Definition at line 89 of file RatesHistoBase.cxx.
90 static const std::vector<std::string>
values{
"LINEAR_L",
"LINEAR_BUNCH_EXPO_MU",
"LINEAR_BUNCHES",
"LINEAR_MU",
"NONE"};
91 return values.at(
static_cast<size_t>(strat));
◆ giveDataHist()
Definition at line 68 of file RatesHistoBase.cxx.
70 ATH_MSG_ERROR(
"RatesHistoBase::giveDataHist Warning requested histograms when histograming is OFF here.");
71 return StatusCode::FAILURE;
74 return StatusCode::SUCCESS;
◆ giveMuHist()
Definition at line 47 of file RatesHistoBase.cxx.
49 ATH_MSG_ERROR(
"RatesHistoBase::giveMuHist Warning requested histograms when histograming is OFF here.");
50 return StatusCode::FAILURE;
54 return StatusCode::SUCCESS;
◆ giveTrainHist()
Definition at line 58 of file RatesHistoBase.cxx.
60 ATH_MSG_ERROR(
"RatesHistoBase::giveTrainHist Warning requested histograms when histograming is OFF here.");
61 return StatusCode::FAILURE;
64 return StatusCode::SUCCESS;
◆ 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.
◆ isNotPositive()
static bool RatesHistoBase::isNotPositive |
( |
double |
v | ) |
|
|
inlinestatic |
◆ isZero()
static bool RatesHistoBase::isZero |
( |
double |
v | ) |
|
|
inlinestatic |
◆ 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 164 of file AthMessaging.h.
◆ 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 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ 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.
◆ operator=()
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ 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 112 of file RatesHistoBase.h.
◆ m_dataCachedPtr
TH1* RatesHistoBase::m_dataCachedPtr |
|
protected |
◆ m_doHistograms
bool RatesHistoBase::m_doHistograms |
|
protected |
◆ m_givenData
bool RatesHistoBase::m_givenData |
|
protected |
m_data has been given to the THistSvc and should not be deleted
Definition at line 118 of file RatesHistoBase.h.
◆ m_givenRateVsMu
bool RatesHistoBase::m_givenRateVsMu |
|
protected |
m_rateVsMu has been given to the THistSvc and should not be deleted
Definition at line 116 of file RatesHistoBase.h.
◆ m_givenRateVsTrain
bool RatesHistoBase::m_givenRateVsTrain |
|
protected |
m_rateVsTrain has been given to the THistSvc and should not be deleted
Definition at line 117 of file RatesHistoBase.h.
◆ 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 110 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 111 of file RatesHistoBase.h.
◆ m_rateVsTrainCachedPtr
TH1* RatesHistoBase::m_rateVsTrainCachedPtr |
|
protected |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
TH1 * m_dataCachedPtr
Cached, non-owning pointer.
double m_linearLumiFactor
What weight needs to be applied to extrapolate rates linear in mu and bunches.
@ kMU_SCALING
Scale trigger linearly but only in the change in <mu>
bool m_doHistograms
If histogramming is switched on.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
AthMessaging()
Default constructor:
@ kLINEAR
Scale trigger linearly with luminosity.
msgSvc
Provide convenience handles for various services.
std::unique_ptr< TH1 > m_data
Histogram of raw rates quantites, for when we need to normalise offline (e.g.
@ kEXPO_MU
Scale trigger linearly in bunches and exponentially in mu.
std::unique_ptr< TH1 > m_rateVsMu
Histogram of rate as a fn.
std::unique_ptr< TH1 > m_rateVsTrain
Histogram of rate as a fn.
@ kBUNCH_SCALING
Scale trigger linearly but only in the number of bunches.
double m_expoMuFactor
What weight needs to be applied to extrapolate rates linear in bunches and exponential in mu.
AthROOTErrorHandlerSvc * svc
TH1 * m_rateVsTrainCachedPtr
Cached, non-owning pointer.
MsgStream & msg() const
The standard message stream.
TH1 * m_rateVsMuCachedPtr
Cached, non-owning pointer.
double m_bunchFactor
What weight needs to be applied to extrapolate rates linear in number of bunches.
std::string m_name
My name.
bool doHistograms() const
If histogramming was enabled in this rates object.
@ kNRATES_BINS
Must always come last.
std::string m_nm
Message source name.
double m_muFactor
What weight needs to be applied to extrapolate rates linear in mu.
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
@ kNONE
Do not scale this trigger for changes in luminosity.
const double m_noScaling
Weight for no scaling.