ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
CP::IsolationCondition Class Referenceabstract

#include <IsolationCondition.h>

Inheritance diagram for CP::IsolationCondition:
Collaboration diagram for CP::IsolationCondition:

Public Member Functions

 IsolationCondition (const std::string &name, xAOD::Iso::IsolationType isoType, const std::string &isoDecSuffix="")
 
 IsolationCondition (const std::string &name, const std::vector< xAOD::Iso::IsolationType > &isoTypes, const std::string &isoDecSuffix="")
 
 IsolationCondition (const std::string &name, const std::string &isoType, const std::string &isoDecSuffix="")
 
 IsolationCondition (const std::string &name, const std::vector< std::string > &isoTypes, const std::string &isoDecSuffix="")
 
 IsolationCondition (const IsolationCondition &rhs)=delete
 
IsolationConditionoperator= (const IsolationCondition &rhs)=delete
 
virtual ~IsolationCondition ()=default
 
const std::string & name () const
 
unsigned int num_types () const
 
xAOD::Iso::IsolationType type (unsigned int n=0) const
 
const FloatAccessoraccessor (unsigned int n=0) const
 
virtual bool accept (const xAOD::IParticle &x) const =0
 
virtual bool accept (const strObj &x) const =0
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Protected Attributes

std::string m_isoDecSuffix {}
 

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

std::string m_name
 
std::vector< xAOD::Iso::IsolationTypem_isolationType
 
std::vector< FloatAccessorm_acc
 
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 30 of file IsolationCondition.h.

Constructor & Destructor Documentation

◆ IsolationCondition() [1/5]

CP::IsolationCondition::IsolationCondition ( const std::string &  name,
xAOD::Iso::IsolationType  isoType,
const std::string &  isoDecSuffix = "" 
)

Definition at line 30 of file IsolationCondition.cxx.

30  :
31  IsolationCondition(name, std::vector<xAOD::Iso::IsolationType>{isoType}, isoDecSuffix) {}

◆ IsolationCondition() [2/5]

CP::IsolationCondition::IsolationCondition ( const std::string &  name,
const std::vector< xAOD::Iso::IsolationType > &  isoTypes,
const std::string &  isoDecSuffix = "" 
)

Definition at line 11 of file IsolationCondition.cxx.

13  :
14  asg::AsgMessaging{"IsolationCondition_"+name},
15  m_name(name), m_isolationType(isoTypes), m_isoDecSuffix(isoDecSuffix) {
16  for (const xAOD::Iso::IsolationType& iso_type : m_isolationType) {
17  std::string accName = std::string(toCString(iso_type)) + (isoDecSuffix.empty() ? "" : "_") + isoDecSuffix;
18  m_acc.emplace_back(accName);
19  }
20  }

◆ IsolationCondition() [3/5]

CP::IsolationCondition::IsolationCondition ( const std::string &  name,
const std::string &  isoType,
const std::string &  isoDecSuffix = "" 
)

Definition at line 32 of file IsolationCondition.cxx.

32  :
33  IsolationCondition(name, std::vector<std::string>{isoType}, isoDecSuffix) {}

◆ IsolationCondition() [4/5]

CP::IsolationCondition::IsolationCondition ( const std::string &  name,
const std::vector< std::string > &  isoTypes,
const std::string &  isoDecSuffix = "" 
)

Definition at line 21 of file IsolationCondition.cxx.

21  :
22  asg::AsgMessaging{"IsolationCondition_"+name},
23  m_name(name), m_isoDecSuffix(isoDecSuffix) {
24  for (const std::string& iso_type : isoTypes) {
26  std::string accName = iso_type + (isoDecSuffix.empty() ? "" : "_") + isoDecSuffix;
27  m_acc.emplace_back(accName);
28  }
29  }

◆ IsolationCondition() [5/5]

CP::IsolationCondition::IsolationCondition ( const IsolationCondition rhs)
delete

◆ ~IsolationCondition()

virtual CP::IsolationCondition::~IsolationCondition ( )
virtualdefault

Member Function Documentation

◆ accept() [1/2]

virtual bool CP::IsolationCondition::accept ( const strObj x) const
pure virtual

◆ accept() [2/2]

virtual bool CP::IsolationCondition::accept ( const xAOD::IParticle x) const
pure virtual

◆ accessor()

const SG::AuxElement::ConstAccessor< float > & CP::IsolationCondition::accessor ( unsigned int  n = 0) const

Definition at line 38 of file IsolationCondition.cxx.

38 { return m_acc.at(n); }

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

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

◆ name()

const std::string & CP::IsolationCondition::name ( ) const

Definition at line 36 of file IsolationCondition.cxx.

36 { return m_name; }

◆ num_types()

unsigned int CP::IsolationCondition::num_types ( ) const

Definition at line 35 of file IsolationCondition.cxx.

35 { return m_isolationType.size(); }

◆ operator=()

IsolationCondition& CP::IsolationCondition::operator= ( const IsolationCondition rhs)
delete

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

◆ type()

xAOD::Iso::IsolationType CP::IsolationCondition::type ( unsigned int  n = 0) const

Definition at line 37 of file IsolationCondition.cxx.

37 { return m_isolationType[n]; }

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_acc

std::vector<FloatAccessor> CP::IsolationCondition::m_acc
private

Definition at line 53 of file IsolationCondition.h.

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_isoDecSuffix

std::string CP::IsolationCondition::m_isoDecSuffix {}
protected

Definition at line 56 of file IsolationCondition.h.

◆ m_isolationType

std::vector<xAOD::Iso::IsolationType> CP::IsolationCondition::m_isolationType
private

Definition at line 52 of file IsolationCondition.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

std::string CP::IsolationCondition::m_name
private

Definition at line 51 of file IsolationCondition.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
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
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
beamspotman.n
n
Definition: beamspotman.py:731
xAOD::Iso::IsolationType
IsolationType
Overall enumeration for isolation types in xAOD files.
Definition: IsolationType.h:26
CP::IsolationCondition::IsolationCondition
IsolationCondition(const std::string &name, xAOD::Iso::IsolationType isoType, const std::string &isoDecSuffix="")
Definition: IsolationCondition.cxx:30
CP::IsolationCondition::name
const std::string & name() const
Definition: IsolationCondition.cxx:36
CP::IsolationCondition::m_acc
std::vector< FloatAccessor > m_acc
Definition: IsolationCondition.h:53
CP::IsolationCondition::m_name
std::string m_name
Definition: IsolationCondition.h:51
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
CP::IsolationCondition::m_isolationType
std::vector< xAOD::Iso::IsolationType > m_isolationType
Definition: IsolationCondition.h:52
CP::IsolationCondition::m_isoDecSuffix
std::string m_isoDecSuffix
Definition: IsolationCondition.h:56
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7