 |
ATLAS Offline Software
|
#include <CheckConfig.h>
|
template<class CPTool > |
static ToolHandle< CPTool > * | findToolByName (ToolHandleArray< CPTool > &suppliedTools, const std::string &name) |
|
Definition at line 18 of file CheckConfig.h.
◆ CheckConfig()
◆ advancedConfigChecks()
bool CheckConfig::advancedConfigChecks |
( |
| ) |
|
This method requires all (most) of TrigGlobalEfficiencyCorrectionTool internal variables to have been properly initialized already -> to be called as the last step of TrigGlobalEfficiencyCorrectionTool::initialize()
Check that for each electron/photon efficiency tool there is an associated scale factor tool with the same associated legs and tags. And vice versa.
A suitable CP tool must be available for each entry of 'ListOfLegsPerTag'
Periods don't overlap
Definition at line 244 of file CheckConfig.cxx.
255 auto checkConsistency = [
this](
auto& effToolIndex,
auto& sfToolIndex,
257 bool mismatch = (effToolIndex.size() != sfToolIndex.size());
259 for (
auto& kv : sfToolIndex) {
260 auto itr = effToolIndex.find(kv.first);
261 if (itr != effToolIndex.end()) {
264 for (
auto& kv : sfToolIndex)
266 pairs1.insert(kv.first);
267 for (
auto& kv : effToolIndex)
269 pairs2.insert(kv.first);
270 if (pairs1 != pairs2)
278 "There must be a one-to-one correspondence between the "
280 <<
" efficiency and scale factor tools "
281 "(including their associated trigger legs and selection tags)");
296 for (std::size_t
leg :
304 "No electron tool provided for the combination of trigger leg '"
306 << kv.first <<
"' mentioned in the property 'ListOfLegsPerTag'");
313 "No muon tool provided for the combination of trigger leg '"
315 << kv.first <<
"' mentioned in the property 'ListOfLegsPerTag'");
322 "No photon tool provided for the combination of trigger leg '"
324 << kv.first <<
"' mentioned in the property 'ListOfLegsPerTag'");
329 "Unable to determine which lepton flavour is associated to the "
332 <<
"' in the property 'ListOfLegsPerTag'");
342 const auto periods_end = periods.end();
343 for (
auto itr1 = periods.begin(); itr1 != periods_end; ++itr1) {
344 auto&
x = itr1->m_boundaries;
345 if (
x.second <
x.first) {
347 "One of the periods specified in TriggerCombination has runMin ("
348 <<
x.first <<
") > runMax (" <<
x.second <<
")");
351 for (
auto itr2 = itr1 + 1; itr2 != periods_end; ++itr2) {
352 auto&
y = itr2->m_boundaries;
353 if ((
x.first >=
y.first &&
x.first <=
y.second) ||
354 (
x.second >=
y.first &&
x.second <=
y.second)) {
355 ATH_MSG_ERROR(
"The periods specified in TriggerCombination overlap");
◆ basicConfigChecks()
bool CheckConfig::basicConfigChecks |
( |
| ) |
|
All tools mentioned in 'ListOfLegsPerTool' must be in 'ElectronEfficiencyTools' or 'ElectronScaleFactorTools' (or equivalent photon tools)
All electron/photon tools must be associated to trigger legs (except when there's only one tool)
Additional checks when tags are used
All tools mentioned in 'ListOfTagsPerTool' must be known
Either all muon tools are associated to tags, either none
Either all electron tools are associated to tags, either none
Either all photon tools are associated to tags, either none
Definition at line 39 of file CheckConfig.cxx.
45 "The numbers of electron tools supplied via the "
46 "'ElectronEfficiencyTools' and 'ElectronScaleFactorTools' properties "
47 "should be identical");
54 "The numbers of photon tools supplied via the 'PhotonEfficiencyTools' "
55 "and 'PhotonScaleFactorTools' properties should be identical");
63 auto&
name = kv.first;
76 <<
" mentioned in property 'ListOfLegsPerTool', which is "
77 "only aimed at electron and photon tools");
79 std::string known_tools =
"; the known tools are";
81 known_tools +=
" " +
tool.name();
83 known_tools +=
" " +
tool.name();
85 known_tools +=
" " +
tool.name();
87 known_tools +=
" " +
tool.name();
89 <<
name <<
" mentioned in property 'ListOfLegsPerTool'"
98 auto toolsHaveLegInfo = [
this](
auto& effTools,
auto& sfTools,
100 if (effTools.size() < 2)
103 for (
int i = 0;
i < 2; ++
i) {
104 for (
auto&
tool : (
i ? effTools : sfTools)) {
105 const std::string&
name =
tool.name();
109 <<
" associated trigger legs are not indicated in "
110 "'ListOfLegsPerTool', "
111 "doing so is mandatory when several tools are used");
136 "the property 'LeptonTagDecorations' must be filled when any of "
137 "'ListOfTagsPerTool'"
138 " / 'ListOfLegsPerTag' / 'MuonLegsPerTag' / 'ElectronLegsPerTag' "
146 unsigned nElectronToolsWithTags = 0, nMuonToolsWithTags = 0,
147 nPhotonToolsWithTags = 0;
149 auto&
name = kv.first;
152 ++nElectronToolsWithTags;
154 ++nMuonToolsWithTags;
157 ++nPhotonToolsWithTags;
160 std::string all_tools =
"; the known tools are";
162 all_tools +=
" " +
tool.name();
164 all_tools +=
" " +
tool.name();
166 all_tools +=
" " +
tool.name();
168 all_tools +=
" " +
tool.name();
170 <<
name <<
" mentioned in property 'ListOfTagsPerTool'");
174 if (nMuonToolsWithTags &&
177 "Not all muon tools have been associated with tags in the "
178 "'ListOfTagsPerTool' property");
184 if (nElectronToolsWithTags && (nElectronToolsWithTags != nSupplied)) {
186 "Not all electron tools have been associated with tags in the "
187 "'ListOfTagsPerTool' property");
195 if (nPhotonToolsWithTags && (nPhotonToolsWithTags != nSupplied)) {
197 "Not all photon tools have been associated with tags in the "
198 "'ListOfTagsPerTool' property");
◆ findToolByName()
template<class CPTool >
ToolHandle< CPTool > * CheckConfig::findToolByName |
( |
ToolHandleArray< CPTool > & |
suppliedTools, |
|
|
const std::string & |
name |
|
) |
| |
|
staticprivate |
◆ 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.
◆ 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 |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ 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_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_parent
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
Electron_v1 Electron
Definition of the current "egamma version".
static ToolHandle< CPTool > * findToolByName(ToolHandleArray< CPTool > &suppliedTools, const std::string &name)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
TrigGlobalEfficiencyCorrectionTool & m_parent
IMessageSvc * getMessageSvc(bool quiet=false)
boost::container::flat_set< Key > flat_set
xAOD::Type::ObjectType associatedLeptonFlavour(std::size_t leg, bool &success)
MsgStream & msg() const
The standard message stream.
Class mimicking the AthMessaging class from the offline software.
Photon_v1 Photon
Definition of the current "egamma version".
struct TBPatternUnitContext Muon
std::string m_nm
Message source name.