|
ATLAS Offline Software
|
#include <OptionHelper.h>
Definition at line 22 of file OptionHelper.h.
◆ OptionHelper()
jet::OptionHelper::OptionHelper |
( |
const std::string & |
name = "OptionHelper" | ) |
|
◆ ~OptionHelper()
jet::OptionHelper::~OptionHelper |
( |
| ) |
|
|
inline |
◆ AbsValue()
bool jet::OptionHelper::AbsValue |
( |
| ) |
const |
|
inline |
◆ AxisMax()
double jet::OptionHelper::AxisMax |
( |
| ) |
const |
|
inline |
◆ AxisMin()
double jet::OptionHelper::AxisMin |
( |
| ) |
const |
|
inline |
◆ checkInit()
void jet::OptionHelper::checkInit |
( |
| ) |
const |
|
private |
Definition at line 431 of file OptionHelper.h.
435 ATH_MSG_FATAL(
"Asked for a value before initializing the tool");
436 throw std::runtime_error(
"Initialization failure");
◆ CompareOnly()
bool jet::OptionHelper::CompareOnly |
( |
| ) |
const |
|
inline |
◆ DoATLASLabel()
bool jet::OptionHelper::DoATLASLabel |
( |
| ) |
const |
|
inline |
◆ DoCompare()
TString jet::OptionHelper::DoCompare |
( |
| ) |
const |
|
inline |
◆ DrawTotal()
bool jet::OptionHelper::DrawTotal |
( |
| ) |
const |
|
inline |
◆ fillShift()
std::pair<double,double> jet::OptionHelper::fillShift |
( |
| ) |
const |
|
inline |
◆ FixedLargeRJetTagAccept()
int jet::OptionHelper::FixedLargeRJetTagAccept |
( |
| ) |
const |
|
inline |
◆ FixedLargeRJetTagResultName()
TString jet::OptionHelper::FixedLargeRJetTagResultName |
( |
| ) |
const |
|
inline |
◆ FixedLargeRJetTruthLabel()
◆ FixedTruthLabel()
int jet::OptionHelper::FixedTruthLabel |
( |
| ) |
const |
|
inline |
◆ GetATLASLabel()
TString jet::OptionHelper::GetATLASLabel |
( |
| ) |
const |
|
inline |
◆ getBins()
std::vector< double > jet::OptionHelper::getBins |
( |
const TString & |
toParse | ) |
const |
|
private |
Definition at line 444 of file OptionHelper.h.
449 std::vector<TString>
tokens = jet::utils::vectorize<TString>(toParse,
"&");
454 ATH_MSG_FATAL(
"Unexpected format for bins: " << toParse.Data());
455 throw std::runtime_error(
"Parse failure");
459 const bool isUniform = (
tokens.at(0) ==
"U") || (
tokens.at(0) ==
"u");
460 const bool isLog = (
tokens.at(0) ==
"L") || (
tokens.at(0) ==
"l");
461 if (!isUniform && !isLog)
463 ATH_MSG_FATAL(
"Unexpected binning type (token 0), only U/u and L/l are currently supported: " << toParse.Data());
464 throw std::runtime_error(
"Parse failure");
468 unsigned numBins = 0;
471 ATH_MSG_FATAL(
"Number of bins (token 1) was not an unsigned int: " << toParse.Data());
472 throw std::runtime_error(
"Parse failure");
476 double minVal = 0, maxVal = 0;
479 ATH_MSG_FATAL(
"Number of bins (token 2) was not a double: " << toParse.Data());
480 throw std::runtime_error(
"Parse failure");
484 ATH_MSG_FATAL(
"Number of bins (token 3) was not a double: " << toParse.Data());
485 throw std::runtime_error(
"Parse failure");
489 ATH_MSG_FATAL(
"The maximum value is smaller than the minimum: " << toParse.Data());
490 throw std::runtime_error(
"Parse failure");
◆ GetBunchSpacing()
TString jet::OptionHelper::GetBunchSpacing |
( |
| ) |
const |
|
inline |
◆ GetCalibArea()
TString jet::OptionHelper::GetCalibArea |
( |
| ) |
const |
|
inline |
◆ GetCompareVals()
std::vector<TString> jet::OptionHelper::GetCompareVals |
( |
| ) |
const |
|
inline |
◆ getCompareVals()
std::vector< TString > jet::OptionHelper::getCompareVals |
( |
const std::vector< TString > & |
options | ) |
const |
|
private |
Definition at line 418 of file OptionHelper.h.
420 std::vector<TString> returnVal;
421 for (
int i=1;
i> 0;
i++) {
424 if (thisname !=
"") returnVal.push_back(thisname);
◆ GetCompositionName()
TString jet::OptionHelper::GetCompositionName |
( |
| ) |
const |
Definition at line 627 of file OptionHelper.h.
633 return "unknown composition";
637 return "custom composition";
642 if (!
m_composition.CompareTo(
"Unknown",TString::kIgnoreCase))
643 return "unknown composition";
645 return "inclusive jets";
647 return "Gino's composition";
652 throw std::runtime_error(
"Composition name failure");
◆ GetCompositionPath()
TString jet::OptionHelper::GetCompositionPath |
( |
| ) |
const |
Definition at line 601 of file OptionHelper.h.
614 if (!
m_composition.CompareTo(
"Unknown",TString::kIgnoreCase))
623 throw std::runtime_error(
"Composition path failure");
◆ GetDumpFile()
TString jet::OptionHelper::GetDumpFile |
( |
| ) |
const |
|
inline |
◆ GetEtaBins()
std::vector< double > jet::OptionHelper::GetEtaBins |
( |
| ) |
const |
◆ GetFixedEtaVals()
std::vector< double > jet::OptionHelper::GetFixedEtaVals |
( |
| ) |
const |
Definition at line 550 of file OptionHelper.h.
553 std::vector<double>
bins;
561 bins = jet::utils::vectorize<double>(
"0",
",");
563 bins = jet::utils::vectorize<double>(
"0,0.8,1.2,2.1,2.8,3.2,3.6",
",");
565 bins = jet::utils::vectorize<double>(
"0,0.5,1,2,2.5,3,4",
",");
◆ GetFixedMassVals()
std::vector< double > jet::OptionHelper::GetFixedMassVals |
( |
| ) |
const |
◆ GetFixedMoverPtVals()
std::vector< double > jet::OptionHelper::GetFixedMoverPtVals |
( |
| ) |
const |
Definition at line 570 of file OptionHelper.h.
573 std::vector<double>
bins;
581 bins = jet::utils::vectorize<double>(
"0",
",");
583 bins = jet::utils::vectorize<double>(
"0.101",
",");
585 bins = jet::utils::vectorize<double>(
"0.001,0.05,0.101,0.15,0.201,0.25,0.301,0.35,0.401,0.45,0.501,0.55,0.601,0.65,0.701,0.75,0.801,0.85,0.901,0.95,1.001",
",");
◆ GetFixedPtVals()
std::vector< double > jet::OptionHelper::GetFixedPtVals |
( |
| ) |
const |
Definition at line 534 of file OptionHelper.h.
537 std::vector<double>
bins;
545 bins = jet::utils::vectorize<double>(
"25,40,60,80,120",
",");
◆ GetInputsDir()
TString jet::OptionHelper::GetInputsDir |
( |
| ) |
const |
|
inline |
◆ GetIsData()
bool jet::OptionHelper::GetIsData |
( |
| ) |
const |
|
inline |
◆ getMassType()
TString jet::OptionHelper::getMassType |
( |
| ) |
const |
|
inline |
◆ GetNamePrefix()
TString jet::OptionHelper::GetNamePrefix |
( |
| ) |
const |
|
inline |
◆ GetNjetFlavour()
int jet::OptionHelper::GetNjetFlavour |
( |
| ) |
const |
|
inline |
◆ getOptionValue()
TString jet::OptionHelper::getOptionValue |
( |
const std::vector< TString > & |
options, |
|
|
const TString |
optionName |
|
) |
| const |
|
private |
Definition at line 393 of file OptionHelper.h.
395 for (
size_t iOpt = 0; iOpt <
options.size(); ++iOpt)
397 std::vector<TString> option = jet::utils::vectorize<TString>(
options.at(iOpt),
"=");
398 if (option.size() != 2)
400 printf(
"Bad option, check formatting: %s\n",
options.at(iOpt).Data());
403 if (!option.at(0).CompareTo(optionName,TString::kIgnoreCase))
◆ getOptionValueWithDefault()
template<typename T >
T jet::OptionHelper::getOptionValueWithDefault |
( |
const std::vector< TString > & |
options, |
|
|
const TString |
optionName, |
|
|
const T |
defaultVal |
|
) |
| |
|
private |
Definition at line 410 of file OptionHelper.h.
415 return jet::utils::getTypeObjFromString<T>(optionVal);
◆ GetPath()
TString jet::OptionHelper::GetPath |
( |
| ) |
const |
|
inline |
◆ GetPtBins()
std::vector< double > jet::OptionHelper::GetPtBins |
( |
| ) |
const |
◆ GetScaleVars()
◆ GetTopology()
◆ IgnoreNoMatch()
bool jet::OptionHelper::IgnoreNoMatch |
( |
| ) |
const |
|
inline |
◆ IgnorePT()
bool jet::OptionHelper::IgnorePT |
( |
| ) |
const |
|
inline |
◆ Initialize()
bool jet::OptionHelper::Initialize |
( |
const std::vector< TString > & |
options | ) |
|
Definition at line 242 of file OptionHelper.h.
246 ATH_MSG_ERROR(
"The tool has already been initialized, blocking re-initialization");
252 if (!
options.size())
return true;
276 std::vector<double>
range = jet::utils::vectorize<double>(
xAxisRange,
"&");
277 if (
range.size() != 2)
278 ATH_MSG_WARNING(
"xAxisRange doesn't match expected format of \"val1&val2\". Skipping.");
281 const double lowX =
range.at(0);
282 const double highX =
range.at(1);
292 std::vector<double> shift = jet::utils::vectorize<double>(
fillShift,
"&");
293 if (shift.size() != 2)
294 ATH_MSG_WARNING(
"FillLabelShift doesn't match expected format of \"val1&val2\". Skipping.");
297 const double lowShift = shift.at(0);
298 const double highShift = shift.at(1);
320 if (largeRJetTruthLabelStr !=
"")
325 ATH_MSG_WARNING(
"LargeRJetTruthLabel is UNKNOWN value, skipping usage: " << largeRJetTruthLabelStr.Data());
336 ATH_MSG_ERROR(
"The composition was double-specified, please check that you don't specify both \"Composition\" and \"isDijet\"");
337 throw std::runtime_error(
"Double composition failure");
363 if (localScaleVar ==
"")
370 std::vector<TString> localScaleVarVec = jet::utils::vectorize<TString>(localScaleVar,
"&");
371 for (
size_t iVar = 0; iVar < localScaleVarVec.size(); ++iVar)
375 if (jetTopology !=
"")
380 ATH_MSG_ERROR(
"The topology specified is invalid: " << jetTopology.Data());
381 throw std::runtime_error(
"Topology failure");
386 if (systFilterString !=
"")
387 m_systFilters = jet::utils::vectorize<std::string>(systFilterString,
",");
◆ 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.
◆ IsEtaDepPileup()
bool jet::OptionHelper::IsEtaDepPileup |
( |
| ) |
const |
|
inline |
◆ IsJER()
bool jet::OptionHelper::IsJER |
( |
| ) |
const |
|
inline |
◆ IsLargeR()
bool jet::OptionHelper::IsLargeR |
( |
| ) |
const |
|
inline |
◆ IsPublicFormat()
bool jet::OptionHelper::IsPublicFormat |
( |
| ) |
const |
|
inline |
◆ IsSmallR()
bool jet::OptionHelper::IsSmallR |
( |
| ) |
const |
|
inline |
◆ IsSpecialComposition()
bool jet::OptionHelper::IsSpecialComposition |
( |
| ) |
const |
|
inline |
◆ IsTLA()
bool jet::OptionHelper::IsTLA |
( |
| ) |
const |
|
inline |
◆ LogPt()
bool jet::OptionHelper::LogPt |
( |
| ) |
const |
|
inline |
◆ msg() [1/2]
MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true
If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ SpecifyTagger()
bool jet::OptionHelper::SpecifyTagger |
( |
| ) |
const |
|
inline |
◆ TagScaleFactorName()
TString jet::OptionHelper::TagScaleFactorName |
( |
| ) |
const |
|
inline |
◆ TotalUncName()
TString jet::OptionHelper::TotalUncName |
( |
| ) |
const |
|
inline |
◆ TruthLabelMoment()
TString jet::OptionHelper::TruthLabelMoment |
( |
| ) |
const |
|
inline |
◆ TwoColumnLegend()
bool jet::OptionHelper::TwoColumnLegend |
( |
| ) |
const |
|
inline |
◆ VariablesToShift()
const std::vector<std::string> jet::OptionHelper::VariablesToShift |
( |
| ) |
const |
|
inline |
◆ xAxisRange()
std::pair<double,double> jet::OptionHelper::xAxisRange |
( |
| ) |
const |
|
inline |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_absVal
bool jet::OptionHelper::m_absVal |
|
private |
◆ m_ATLASLabel
TString jet::OptionHelper::m_ATLASLabel |
|
private |
◆ m_axisMax
double jet::OptionHelper::m_axisMax |
|
private |
◆ m_axisMin
double jet::OptionHelper::m_axisMin |
|
private |
◆ m_bunchSpacing
TString jet::OptionHelper::m_bunchSpacing |
|
private |
◆ m_calibArea
TString jet::OptionHelper::m_calibArea |
|
private |
◆ m_compareVals
std::vector<TString> jet::OptionHelper::m_compareVals |
|
private |
◆ m_compNamePrefix
TString jet::OptionHelper::m_compNamePrefix |
|
private |
◆ m_composition
TString jet::OptionHelper::m_composition |
|
private |
◆ m_doATLASLabel
bool jet::OptionHelper::m_doATLASLabel |
|
private |
◆ m_doCompare
TString jet::OptionHelper::m_doCompare |
|
private |
◆ m_doTotalUnc
bool jet::OptionHelper::m_doTotalUnc |
|
private |
◆ m_dumpFile
TString jet::OptionHelper::m_dumpFile |
|
private |
◆ m_etaBins
TString jet::OptionHelper::m_etaBins |
|
private |
◆ m_fillShift
std::pair<double,double> jet::OptionHelper::m_fillShift |
|
private |
◆ m_fixedEtaVals
TString jet::OptionHelper::m_fixedEtaVals |
|
private |
◆ m_fixedMassVals
TString jet::OptionHelper::m_fixedMassVals |
|
private |
◆ m_fixedMoverPtVals
TString jet::OptionHelper::m_fixedMoverPtVals |
|
private |
◆ m_fixedPtVals
TString jet::OptionHelper::m_fixedPtVals |
|
private |
◆ m_ignoreNoMatch
bool jet::OptionHelper::m_ignoreNoMatch |
|
private |
◆ m_ignorePT
bool jet::OptionHelper::m_ignorePT |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_inputsDir
TString jet::OptionHelper::m_inputsDir |
|
private |
◆ m_isData
bool jet::OptionHelper::m_isData |
|
private |
◆ m_isDijet
bool jet::OptionHelper::m_isDijet |
|
private |
◆ m_isEtaDepPU
bool jet::OptionHelper::m_isEtaDepPU |
|
private |
◆ m_isInit
bool jet::OptionHelper::m_isInit |
|
private |
◆ m_isJER
bool jet::OptionHelper::m_isJER |
|
private |
◆ m_isLargeR
bool jet::OptionHelper::m_isLargeR |
|
private |
◆ m_isPublic
bool jet::OptionHelper::m_isPublic |
|
private |
◆ m_isSmallR
bool jet::OptionHelper::m_isSmallR |
|
private |
◆ m_isTLA
bool jet::OptionHelper::m_isTLA |
|
private |
◆ m_largeRjetTagAccept
int jet::OptionHelper::m_largeRjetTagAccept |
|
private |
◆ m_largeRjetTagResultName
TString jet::OptionHelper::m_largeRjetTagResultName |
|
private |
◆ m_largeRJetTruthLabel
◆ m_logPt
bool jet::OptionHelper::m_logPt |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_massType
TString jet::OptionHelper::m_massType |
|
private |
◆ 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_nJetFlavour
int jet::OptionHelper::m_nJetFlavour |
|
private |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_onlyCompare
bool jet::OptionHelper::m_onlyCompare |
|
private |
◆ m_path
TString jet::OptionHelper::m_path |
|
private |
◆ m_ptBins
TString jet::OptionHelper::m_ptBins |
|
private |
◆ m_scaleVars
◆ m_specifyTagger
bool jet::OptionHelper::m_specifyTagger |
|
private |
◆ m_systFilters
std::vector<std::string> jet::OptionHelper::m_systFilters |
|
private |
◆ m_tagSFname
TString jet::OptionHelper::m_tagSFname |
|
private |
◆ m_topology
◆ m_totalUncName
TString jet::OptionHelper::m_totalUncName |
|
private |
◆ m_truthLabel
int jet::OptionHelper::m_truthLabel |
|
private |
◆ m_truthLabelMoment
TString jet::OptionHelper::m_truthLabelMoment |
|
private |
◆ m_twoColumnLegend
bool jet::OptionHelper::m_twoColumnLegend |
|
private |
◆ m_xAxisRange
std::pair<double,double> jet::OptionHelper::m_xAxisRange |
|
private |
The documentation for this class was generated from the following file:
std::atomic< MSG::Level > m_lvl
Current logging level.
std::vector< std::string > m_systFilters
std::vector< TString > getCompareVals(const std::vector< TString > &options) const
std::vector< double > getUniformBins(const size_t numBins, const double minVal, const double maxVal)
LargeRJetTruthLabel::TypeEnum m_largeRJetTruthLabel
TString m_largeRjetTagResultName
std::vector< double > getLogBins(const size_t numBins, const double minVal, const double maxVal)
TypeEnum stringToEnum(const TString &name)
T getOptionValueWithDefault(const std::vector< TString > &options, const TString optionName, const T defaultVal)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
TypeEnum stringToEnum(const TString &type)
TString m_fixedMoverPtVals
std::pair< double, double > xAxisRange() const
std::pair< double, double > fillShift() const
std::vector< double > getBins(const TString &toParse) const
TString m_truthLabelMoment
std::pair< double, double > m_xAxisRange
bool IsPublicFormat() const
std::vector< TString > m_compareVals
TString GetInputsDir() const
TString getOptionValue(const std::vector< TString > &options, const TString optionName) const
Class mimicking the AthMessaging class from the offline software.
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
TypeEnum stringToEnum(const TString &type)
std::vector< CompScaleVar::TypeEnum > m_scaleVars
bool getTypeObjFromString(const std::string &str, T &obj)
JetTopology::TypeEnum m_topology
std::pair< double, double > m_fillShift