ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
jet::UncertaintyGroup Class Reference

#include <UncertaintyGroup.h>

Inheritance diagram for jet::UncertaintyGroup:
Collaboration diagram for jet::UncertaintyGroup:

Public Member Functions

 UncertaintyGroup (const GroupHelper &group)
 
 UncertaintyGroup (const UncertaintyGroup &toCopy)
 
virtual ~UncertaintyGroup ()
 
virtual StatusCode addComponent (UncertaintyComponent *component)
 
virtual StatusCode addSubgroup (UncertaintyGroup *subgroup)
 
virtual StatusCode initialize (TFile *histFile)
 
virtual TString getName () const
 
virtual TString getDesc () const
 
virtual int getGroupNum () const
 
virtual int getSubgroupNum () const
 
virtual CompCategory::TypeEnum getCategory () const
 
virtual CompCorrelation::TypeEnum getCorrType () const
 
virtual bool getIsReducible () const
 
virtual size_t getNumRawComps () const
 
virtual size_t getNumSubgroups () const
 
virtual size_t getNumComponents () const
 
virtual std::vector< UncertaintyComponent * > getComponents () const
 
virtual std::vector< UncertaintyGroup * > getSubgroups () const
 
virtual std::set< CompScaleVar::TypeEnumgetScaleVars () const
 
virtual JetTopology::TypeEnum getTopology (const CompScaleVar::TypeEnum scaleVar=CompScaleVar::UNKNOWN) const
 
virtual bool isAlwaysZero () const
 
virtual bool getValidity (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
 
virtual double getUncertainty (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
 
virtual bool getValidUncertainty (double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Protected Attributes

bool m_isInit
 
const TString m_name
 
const TString m_desc
 
const int m_groupNum
 
const int m_subgroupNum
 
const CompCategory::TypeEnum m_category
 
const CompCorrelation::TypeEnum m_corrType
 
const bool m_isReducible
 
std::vector< UncertaintyComponent * > m_components
 
std::vector< UncertaintyGroup * > m_subgroups
 
std::map< CompScaleVar::TypeEnum, std::vector< UncertaintyComponent * > * > m_compScaleMap
 

Private Member Functions

 UncertaintyGroup (const std::string &name="")
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

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...
 

Detailed Description

Definition at line 27 of file UncertaintyGroup.h.

Constructor & Destructor Documentation

◆ UncertaintyGroup() [1/3]

jet::UncertaintyGroup::UncertaintyGroup ( const GroupHelper group)

Definition at line 46 of file UncertaintyGroup.cxx.

47  : asg::AsgMessaging(group.name.Data())
48  , m_isInit(false)
49  , m_name(group.name)
50  , m_desc(group.desc)
51  , m_groupNum(group.groupNum)
52  , m_subgroupNum(group.subgroupNum)
53  , m_category(group.category)
54  , m_corrType(group.correlation)
55  , m_isReducible(group.reducible)
56  , m_components()
57  , m_subgroups()
58  , m_compScaleMap()
59 {
60  ATH_MSG_DEBUG(Form("Creating UncertaintyGroup named %s",m_name.Data()));
61  //if (m_category == CompCategory::UNKNOWN)
62  // ATH_MSG_FATAL("UNKNOWN category for UncertaintyGroup named " << m_name.Data());
63  // Acceptible to not exist if it's only one component, check during initialize()
64  //if (m_corrType == CompCorrelation::UNKNOWN)
65  // ATH_MSG_FATAL(Form("UNKNOWN correlation for UncertaintyGroup named %s",m_name.Data()));
66 }

◆ UncertaintyGroup() [2/3]

jet::UncertaintyGroup::UncertaintyGroup ( const UncertaintyGroup toCopy)

Definition at line 68 of file UncertaintyGroup.cxx.

69  : asg::AsgMessaging(Form("%s_copy",toCopy.m_name.Data()))
70  , m_isInit(toCopy.m_isInit)
71  , m_name(toCopy.m_name)
72  , m_desc(toCopy.m_desc)
73  , m_groupNum(toCopy.m_groupNum)
74  , m_subgroupNum(toCopy.m_subgroupNum)
75  , m_category(toCopy.m_category)
76  , m_corrType(toCopy.m_corrType)
77  , m_isReducible(toCopy.m_isReducible)
78  , m_components()
79  , m_subgroups()
80  , m_compScaleMap()
81 {
82  for (size_t iComp = 0; iComp < toCopy.m_components.size(); ++iComp)
83  if (toCopy.m_components.at(iComp))
84  m_components.push_back(toCopy.m_components.at(iComp)->clone());
85 }

◆ ~UncertaintyGroup()

jet::UncertaintyGroup::~UncertaintyGroup ( )
virtual

Definition at line 87 of file UncertaintyGroup.cxx.

88 {
89  ATH_MSG_DEBUG(Form("Deleting UncertaintyGroup named %s",m_name.Data()));
90 
91  std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*>::iterator iter;
92  for (iter = m_compScaleMap.begin(); iter != m_compScaleMap.end(); ++iter)
93  JESUNC_SAFE_DELETE(iter->second);
94  m_compScaleMap.clear();
95 
96  for (size_t iComp = 0; iComp < m_components.size(); ++iComp)
98  m_components.clear();
99 
100  for (size_t iSubGroup = 0; iSubGroup < m_subgroups.size(); ++iSubGroup)
101  JESUNC_SAFE_DELETE(m_subgroups.at(iSubGroup));
102  m_subgroups.clear();
103 }

◆ UncertaintyGroup() [3/3]

jet::UncertaintyGroup::UncertaintyGroup ( const std::string &  name = "")
private

Definition at line 29 of file UncertaintyGroup.cxx.

31  , m_isInit(false)
32  , m_name(name.c_str())
33  , m_desc("")
34  , m_groupNum(0)
35  , m_subgroupNum(0)
38  , m_isReducible(false)
39  , m_components()
40  , m_subgroups()
41  , m_compScaleMap()
42 {
44 }

Member Function Documentation

◆ addComponent()

StatusCode jet::UncertaintyGroup::addComponent ( UncertaintyComponent component)
virtual

Definition at line 105 of file UncertaintyGroup.cxx.

106 {
107  if (m_isInit)
108  {
109  ATH_MSG_ERROR("Cannot add components to a group after initialization: " << getName().Data());
110  return StatusCode::FAILURE;
111  }
112 
113  // Ensure the component is not NULL
114  if (!component)
115  {
116  ATH_MSG_ERROR("Component specified for addition to the group is NULL: " << getName().Data());
117  return StatusCode::FAILURE;
118  }
119 
120  // Add it to the vector of components
121  m_components.push_back(component);
122 
123  // Now add it to the map with its scale variable
124  std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*>::iterator iter = m_compScaleMap.find(component->getScaleVar());
125  if (iter != m_compScaleMap.end())
126  iter->second->push_back(component);
127  else
128  {
129  std::vector<UncertaintyComponent*>* newScaleVarVec = new std::vector<UncertaintyComponent*>();
130  newScaleVarVec->push_back(component);
131  m_compScaleMap.insert(std::make_pair(component->getScaleVar(),newScaleVarVec));
132  }
133 
134  return StatusCode::SUCCESS;
135 }

◆ addSubgroup()

StatusCode jet::UncertaintyGroup::addSubgroup ( UncertaintyGroup subgroup)
virtual

Definition at line 137 of file UncertaintyGroup.cxx.

138 {
139  if (m_isInit)
140  {
141  ATH_MSG_ERROR("Cannot add subgroups to a group after initialization: " << getName().Data());
142  return StatusCode::FAILURE;
143  }
144 
145  // Ensure the subgroup is not NULL
146  if (!subgroup)
147  {
148  ATH_MSG_ERROR("Subgroup specified for addition to the group is NULL: " << getName().Data());
149  return StatusCode::FAILURE;
150  }
151 
152  // Add it to the vector of subgroups
153  m_subgroups.push_back(subgroup);
154 
155  return StatusCode::SUCCESS;
156 }

◆ getCategory()

virtual CompCategory::TypeEnum jet::UncertaintyGroup::getCategory ( ) const
inlinevirtual

Definition at line 44 of file UncertaintyGroup.h.

44 { return m_category; }

◆ getComponents()

virtual std::vector<UncertaintyComponent*> jet::UncertaintyGroup::getComponents ( ) const
inlinevirtual

Definition at line 51 of file UncertaintyGroup.h.

51 { return m_components; }

◆ getCorrType()

virtual CompCorrelation::TypeEnum jet::UncertaintyGroup::getCorrType ( ) const
inlinevirtual

Definition at line 45 of file UncertaintyGroup.h.

45 { return m_corrType; }

◆ getDesc()

virtual TString jet::UncertaintyGroup::getDesc ( ) const
inlinevirtual

Definition at line 41 of file UncertaintyGroup.h.

41 { return m_desc; }

◆ getGroupNum()

virtual int jet::UncertaintyGroup::getGroupNum ( ) const
inlinevirtual

Definition at line 42 of file UncertaintyGroup.h.

42 { return m_groupNum; }

◆ getIsReducible()

virtual bool jet::UncertaintyGroup::getIsReducible ( ) const
inlinevirtual

Definition at line 46 of file UncertaintyGroup.h.

46 { return m_isReducible; }

◆ getName()

virtual TString jet::UncertaintyGroup::getName ( ) const
inlinevirtual

Definition at line 40 of file UncertaintyGroup.h.

40 { return m_name; }

◆ getNumComponents()

size_t jet::UncertaintyGroup::getNumComponents ( ) const
virtual

Definition at line 238 of file UncertaintyGroup.cxx.

239 {
240  size_t numComps = m_components.size();
241  for (size_t iSubgroup = 0; iSubgroup < m_subgroups.size(); ++iSubgroup)
242  numComps += m_subgroups.at(iSubgroup)->getNumComponents();
243 
244  return numComps;
245 }

◆ getNumRawComps()

virtual size_t jet::UncertaintyGroup::getNumRawComps ( ) const
inlinevirtual

Definition at line 47 of file UncertaintyGroup.h.

47 { return m_subgroups.size(); }

◆ getNumSubgroups()

virtual size_t jet::UncertaintyGroup::getNumSubgroups ( ) const
inlinevirtual

Definition at line 48 of file UncertaintyGroup.h.

48 { return m_subgroups.size(); }

◆ getScaleVars()

std::set< CompScaleVar::TypeEnum > jet::UncertaintyGroup::getScaleVars ( ) const
virtual

Definition at line 247 of file UncertaintyGroup.cxx.

248 {
249  std::set<CompScaleVar::TypeEnum> vars;
250  if (!m_isInit)
251  {
252  ATH_MSG_ERROR("Cannot call method before initialization, group: " << getName().Data());
253  return vars;
254  }
255 
256  for (size_t iComp = 0; iComp < m_components.size(); ++iComp)
257  vars.insert(m_components.at(iComp)->getScaleVar());
258 
259  for (size_t iSubgroup = 0; iSubgroup < m_subgroups.size(); ++iSubgroup)
260  {
261  const std::set<CompScaleVar::TypeEnum> subVars = m_subgroups.at(iSubgroup)->getScaleVars();
262  vars.insert(subVars.begin(),subVars.end());
263  }
264 
265  return vars;
266 }

◆ getSubgroupNum()

virtual int jet::UncertaintyGroup::getSubgroupNum ( ) const
inlinevirtual

Definition at line 43 of file UncertaintyGroup.h.

43 { return m_subgroupNum; }

◆ getSubgroups()

virtual std::vector<UncertaintyGroup*> jet::UncertaintyGroup::getSubgroups ( ) const
inlinevirtual

Definition at line 52 of file UncertaintyGroup.h.

52 { return m_subgroups; }

◆ getTopology()

JetTopology::TypeEnum jet::UncertaintyGroup::getTopology ( const CompScaleVar::TypeEnum  scaleVar = CompScaleVar::UNKNOWN) const
virtual

Definition at line 275 of file UncertaintyGroup.cxx.

276 {
277  // The topology is not normally needed
278  // Most variables are topology-independent, and thus are listed as "UNKNOWN"
279  // Mixing topology-agnostic and topology-specific variables is expected
280  // Mixing topology-specific variables of different topologies is not expected
281 
282  // Furthermore, the user can specify either a specific scale variable or not
283  // If the user doesn't specify (or specifies UNKNOWN, the default), then it checks all
284 
286 
287  // First check subgroups
288  for (const UncertaintyGroup* subgroup : m_subgroups)
289  {
290  if (subgroup->getTopology() != JetTopology::UNKNOWN)
291  {
293  result = subgroup->getTopology();
294  else if (result != subgroup->getTopology(scaleVar))
296  }
297  if (result == JetTopology::MIXED)
298  return result; // If it's mixed, it won't change any further
299  }
300 
301  // Now check direct components
302  for (const UncertaintyComponent* component : m_components)
303  {
304  // Skip components that don't match our desired scale var (if appropriate)
305  if (scaleVar != CompScaleVar::UNKNOWN && scaleVar != component->getScaleVar())
306  continue;
307 
308  if (component->getTopology() != JetTopology::UNKNOWN)
309  {
311  result = component->getTopology();
312  else if (result != component->getTopology())
314  }
315  if (result == JetTopology::MIXED)
316  return result; // If it's mixed, it won't change any further
317  }
318 
319  return result; // If we got here, it's not a mixed topology, so return what it is
320 }

◆ getUncertainty()

double jet::UncertaintyGroup::getUncertainty ( const xAOD::Jet jet,
const xAOD::EventInfo eInfo,
const CompScaleVar::TypeEnum  scaleVar 
) const
virtual

Definition at line 386 of file UncertaintyGroup.cxx.

387 {
388  // Search for the component in question
389  std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*>::const_iterator iter = m_compScaleMap.find(scaleVar);
390  const std::vector<UncertaintyComponent*>* relevantComponents = (iter != m_compScaleMap.end()) ? iter->second : NULL;
391 
392  // Also check if any subgroup(s) are affected
393  std::vector<UncertaintyGroup*> relevantGroups;
394  for (size_t iSubgroup = 0; iSubgroup < m_subgroups.size(); ++iSubgroup)
395  if (m_subgroups.at(iSubgroup)->getScaleVars().count(scaleVar))
396  relevantGroups.push_back(m_subgroups.at(iSubgroup));
397 
398  // Simple if it neither affects components nor subgroups
399  if ((!relevantComponents || relevantComponents->empty()) && relevantGroups.empty()) return 0;
400 
401  // Simple if it's one component and doesn't affect subgroups
402  if ((relevantComponents && relevantComponents->size() == 1) && relevantGroups.empty())
403  return relevantComponents->at(0)->getUncertainty(jet,eInfo);
404 
405  // Simple if it's one subgroup and doesn't affect components
406  if (relevantGroups.size() == 1 && (!relevantComponents || relevantComponents->empty()))
407  return relevantGroups.at(0)->getUncertainty(jet,eInfo,scaleVar);
408 
409 
410  // More complicated case where there are multiple component(s) and/or group(s)
411  // Quad sum or linear sum depending on correlation type specified
412  double unc = 0;
414  {
415  if (relevantComponents)
416  for (size_t iComp = 0; iComp < relevantComponents->size(); ++iComp)
417  unc += pow(relevantComponents->at(iComp)->getUncertainty(jet,eInfo),2);
418  for (size_t iGroup = 0; iGroup < relevantGroups.size(); ++iGroup)
419  unc += pow(relevantGroups.at(iGroup)->getUncertainty(jet,eInfo,scaleVar),2);
420  unc = sqrt(unc);
421  }
423  {
424  if (relevantComponents)
425  for (size_t iComp = 0; iComp < relevantComponents->size(); ++iComp)
426  unc += relevantComponents->at(iComp)->getUncertainty(jet,eInfo);
427  for (size_t iGroup = 0; iGroup < relevantGroups.size(); ++iGroup)
428  unc += relevantGroups.at(iGroup)->getUncertainty(jet,eInfo,scaleVar);
429  }
430  else
431  {
432  ATH_MSG_ERROR(Form("Unexpected correlation type for %s",m_name.Data()));
433  return JESUNC_ERROR_CODE;
434  }
435 
436  return unc;
437 }

◆ getValidity()

bool jet::UncertaintyGroup::getValidity ( const xAOD::Jet jet,
const xAOD::EventInfo eInfo,
const CompScaleVar::TypeEnum  scaleVar 
) const
virtual

Definition at line 359 of file UncertaintyGroup.cxx.

360 {
361  // Search for the component in question
362  std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*>::const_iterator iter = m_compScaleMap.find(scaleVar);
363  if (iter == m_compScaleMap.end())
364  return true;
365  const std::vector<UncertaintyComponent*>* relevantComponents = iter->second;
366 
367  // Valid only if all component(s) are valid
368  if (!m_isInit)
369  {
370  ATH_MSG_ERROR("Group hasn't been initialized: " << getName().Data());
371  return false;
372  }
373  for (size_t iComp = 0; iComp < relevantComponents->size(); ++iComp)
374  if (!relevantComponents->at(iComp)->getValidity(jet,eInfo))
375  return false;
376 
377  // Valid only if all subgroup(s) are valid
378  for (size_t iSubgroup = 0; iSubgroup < m_subgroups.size(); ++iSubgroup)
379  if (!m_subgroups.at(iSubgroup)->getValidity(jet,eInfo,scaleVar))
380  return false;
381 
382  return true;
383 }

◆ getValidUncertainty()

bool jet::UncertaintyGroup::getValidUncertainty ( double &  unc,
const xAOD::Jet jet,
const xAOD::EventInfo eInfo,
const CompScaleVar::TypeEnum  scaleVar 
) const
virtual

Definition at line 439 of file UncertaintyGroup.cxx.

440 {
441  if (getValidity(jet,eInfo,scaleVar))
442  {
443  unc = getUncertainty(jet,eInfo,scaleVar);
444  return true;
445  }
446  return false;
447 }

◆ initialize()

StatusCode jet::UncertaintyGroup::initialize ( TFile *  histFile)
virtual

Definition at line 158 of file UncertaintyGroup.cxx.

159 {
160  // Prevent double-initialization
161  if (m_isInit)
162  {
163  ATH_MSG_ERROR("Group is already initialized: " << getName().Data());
164  return StatusCode::FAILURE;
165  }
166 
167  // Ensure the group has component(s) and/or subgroup(s)
168  if (m_components.empty() && m_subgroups.empty())
169  {
170  ATH_MSG_ERROR("Group is empty: " << getName().Data());
171  return StatusCode::FAILURE;
172  }
173 
174  // Initialize the subgroups (has to happen before we check parametrizations below)
175  for (size_t iSubgroup = 0; iSubgroup < m_subgroups.size(); ++iSubgroup)
176  if(m_subgroups.at(iSubgroup)->initialize(histFile).isFailure())
177  return StatusCode::FAILURE;
178 
179  // If the group has multiple components of the same parametrization, ensure there is a correlation type specified
180  if (m_corrType == CompCorrelation::UNKNOWN && !m_components.empty() && !m_subgroups.empty())
181  {
182  // First check the raw components
183  std::set<CompScaleVar::TypeEnum> vars;
184  for (size_t iComp = 0; iComp < m_components.size(); ++iComp)
185  vars.insert(m_components.at(iComp)->getScaleVar());
186  if (vars.size() != m_components.size())
187  {
188  ATH_MSG_ERROR("Correlation type is set to UNKNOWN for multiple components scaling the same variable: " << getName().Data());
189  return StatusCode::FAILURE;
190  }
191 
192  // Now check the subgroup components
193  std::set<CompScaleVar::TypeEnum> groupVars;
194  size_t numSubComps = 0;
195  for (size_t iSubgroup = 0; iSubgroup < m_subgroups.size(); ++iSubgroup)
196  {
197  const std::set<CompScaleVar::TypeEnum> subVars = m_subgroups.at(iSubgroup)->getScaleVars();
198  groupVars.insert(subVars.begin(),subVars.end());
199  numSubComps += m_subgroups.at(iSubgroup)->getNumComponents();
200  }
201  if (groupVars.size() != numSubComps)
202  {
203  ATH_MSG_ERROR("Correlation type is set to UNKNOWN for multiple subgroups scaling the same variable: " << getName().Data());
204  return StatusCode::FAILURE;
205  }
206 
207  // Now check if any of the raw component scales overlap with subgroup scales
208  for (std::set<CompScaleVar::TypeEnum>::const_iterator iter = vars.begin(); iter != vars.end(); ++iter)
209  {
210  if (groupVars.count(*iter))
211  {
212  ATH_MSG_ERROR("Correlation type is set to UNKNOWN for a component and subgroup scaling the same variable: " << getName().Data());
213  return StatusCode::FAILURE;
214  }
215  }
216  }
217 
218 
219  // Initialize the components
220  for (size_t iComp = 0; iComp < m_components.size(); ++iComp)
221  if (m_components.at(iComp)->initialize(histFile).isFailure())
222  return StatusCode::FAILURE;
223 
224  // Print a summary
225  ATH_MSG_DEBUG("Successfully initialized UncertaintyGroup named " << getName().Data());
226 
227  m_isInit = true;
228  return StatusCode::SUCCESS;
229 }

◆ 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  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ isAlwaysZero()

bool jet::UncertaintyGroup::isAlwaysZero ( ) const
virtual

Definition at line 329 of file UncertaintyGroup.cxx.

330 {
331  if (!m_isInit)
332  {
333  ATH_MSG_ERROR("Cannot call method before initialization, group: "<<getName().Data());
334  return false;
335  }
336 
337  for (size_t iComp = 0; iComp < m_components.size(); ++iComp)
338  {
339  if (!m_components.at(iComp)->isAlwaysZero())
340  return false;
341  }
342 
343  for (size_t iSubgroup = 0; iSubgroup < m_subgroups.size(); ++iSubgroup)
344  {
345  if (!m_subgroups.at(iSubgroup)->isAlwaysZero())
346  return false;
347  }
348 
349  return true;
350 }

◆ 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.

49  {
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
53  return m_msg;
54 #endif // not XAOD_STANDALONE
55  }

◆ msg() [2/2]

MsgStream & asg::AsgMessaging::msg ( const MSG::Level  lvl) const
inherited

The standard message stream.

Parameters
lvlThe 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.

57  {
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
61  m_msg << lvl;
62  return m_msg;
63 #endif // not XAOD_STANDALONE
64  }

◆ msgLvl()

bool asg::AsgMessaging::msgLvl ( const MSG::Level  lvl) const
inherited

Test the output level of the object.

Parameters
lvlThe 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.

41  {
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
47  }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_category

const CompCategory::TypeEnum jet::UncertaintyGroup::m_category
protected

Definition at line 76 of file UncertaintyGroup.h.

◆ m_components

std::vector<UncertaintyComponent*> jet::UncertaintyGroup::m_components
protected

Definition at line 79 of file UncertaintyGroup.h.

◆ m_compScaleMap

std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*> jet::UncertaintyGroup::m_compScaleMap
protected

Definition at line 81 of file UncertaintyGroup.h.

◆ m_corrType

const CompCorrelation::TypeEnum jet::UncertaintyGroup::m_corrType
protected

Definition at line 77 of file UncertaintyGroup.h.

◆ m_desc

const TString jet::UncertaintyGroup::m_desc
protected

Definition at line 73 of file UncertaintyGroup.h.

◆ m_groupNum

const int jet::UncertaintyGroup::m_groupNum
protected

Definition at line 74 of file UncertaintyGroup.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_isInit

bool jet::UncertaintyGroup::m_isInit
protected

Definition at line 71 of file UncertaintyGroup.h.

◆ m_isReducible

const bool jet::UncertaintyGroup::m_isReducible
protected

Definition at line 78 of file UncertaintyGroup.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ 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

const TString jet::UncertaintyGroup::m_name
protected

Definition at line 72 of file UncertaintyGroup.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_subgroupNum

const int jet::UncertaintyGroup::m_subgroupNum
protected

Definition at line 75 of file UncertaintyGroup.h.

◆ m_subgroups

std::vector<UncertaintyGroup*> jet::UncertaintyGroup::m_subgroups
protected

Definition at line 80 of file UncertaintyGroup.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
jet::JetTopology::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:209
get_generator_info.result
result
Definition: get_generator_info.py:21
jet::UncertaintyGroup::m_category
const CompCategory::TypeEnum m_category
Definition: UncertaintyGroup.h:76
Data
@ Data
Definition: BaseObject.h:11
jet::UncertaintyGroup::m_groupNum
const int m_groupNum
Definition: UncertaintyGroup.h:74
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
jet::UncertaintyGroup::UncertaintyGroup
UncertaintyGroup(const GroupHelper &group)
Definition: UncertaintyGroup.cxx:46
jet::CompCorrelation::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:33
jet::UncertaintyGroup::m_name
const TString m_name
Definition: UncertaintyGroup.h:72
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
jet::UncertaintyGroup::getName
virtual TString getName() const
Definition: UncertaintyGroup.h:40
jet::CompCorrelation::Correlated
@ Correlated
Definition: UncertaintyEnum.h:35
JESUNC_ERROR_CODE
#define JESUNC_ERROR_CODE
Definition: Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:23
jet::UncertaintyGroup::getUncertainty
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
Definition: UncertaintyGroup.cxx:386
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
JESUNC_SAFE_DELETE
#define JESUNC_SAFE_DELETE(T)
Definition: Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:25
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
jet::UncertaintyGroup::m_corrType
const CompCorrelation::TypeEnum m_corrType
Definition: UncertaintyGroup.h:77
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
jet::CompScaleVar::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:93
jet::JetTopology::MIXED
@ MIXED
Definition: UncertaintyEnum.h:214
jet::CompCategory::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:17
jet::UncertaintyGroup::m_subgroupNum
const int m_subgroupNum
Definition: UncertaintyGroup.h:75
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
jet::UncertaintyGroup::m_desc
const TString m_desc
Definition: UncertaintyGroup.h:73
jet::CompCorrelation::Uncorrelated
@ Uncorrelated
Definition: UncertaintyEnum.h:34
JESUNC_NO_DEFAULT_CONSTRUCTOR
#define JESUNC_NO_DEFAULT_CONSTRUCTOR
Definition: Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:24
jet::UncertaintyGroup::m_subgroups
std::vector< UncertaintyGroup * > m_subgroups
Definition: UncertaintyGroup.h:80
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
jet::UncertaintyGroup::getValidity
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
Definition: UncertaintyGroup.cxx:359
jet::UncertaintyGroup::m_components
std::vector< UncertaintyComponent * > m_components
Definition: UncertaintyGroup.h:79
jet::JetTopology::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:208
jet::UncertaintyGroup::m_isReducible
const bool m_isReducible
Definition: UncertaintyGroup.h:78
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
jet::UncertaintyGroup::m_compScaleMap
std::map< CompScaleVar::TypeEnum, std::vector< UncertaintyComponent * > * > m_compScaleMap
Definition: UncertaintyGroup.h:81
jet::UncertaintyGroup::m_isInit
bool m_isInit
Definition: UncertaintyGroup.h:71