The Gaudi Framework  v30r3 (a5ef0a68)
Google::AuditorBase Class Referenceabstract

Base for Google Auditors. More...

#include <GoogleAuditor.cpp>

Inheritance diagram for Google::AuditorBase:
Collaboration diagram for Google::AuditorBase:

Public Member Functions

StatusCode initialize () override
 Initialize the auditor base. More...
 
StatusCode finalize () override
 Finalize the auditor base. More...
 
void handle (const Incident &incident) override
 Implement the handle method for the Incident service. More...
 
void before (StandardEventType type, INamedInterface *i) override
 
void before (CustomEventTypeRef type, INamedInterface *i) override
 
void before (StandardEventType type, const std::string &s) override
 
void before (CustomEventTypeRef type, const std::string &s) override
 
void after (StandardEventType type, INamedInterface *i, const StatusCode &sc) override
 
void after (CustomEventTypeRef type, INamedInterface *i, const StatusCode &sc) override
 
void after (StandardEventType type, const std::string &s, const StatusCode &sc) override
 
void after (CustomEventTypeRef type, const std::string &s, const StatusCode &) override
 
void beforeInitialize (INamedInterface *i) override
 
void beforeReinitialize (INamedInterface *i) override
 
void beforeExecute (INamedInterface *i) override
 
void beforeBeginRun (INamedInterface *i) override
 
void beforeEndRun (INamedInterface *i) override
 
void beforeFinalize (INamedInterface *i) override
 
void afterInitialize (INamedInterface *i) override
 
void afterReinitialize (INamedInterface *i) override
 
void afterExecute (INamedInterface *i, const StatusCode &s) override
 
void afterBeginRun (INamedInterface *i) override
 
void afterEndRun (INamedInterface *i) override
 
void afterFinalize (INamedInterface *i) override
 
- Public Member Functions inherited from extends< Auditor, IIncidentListener >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Auditor
 Auditor (const std::string &name, ISvcLocator *svcloc)
 Constructor. More...
 
 Auditor (const Auditor &a)=delete
 
Auditoroperator= (const Auditor &rhs)=delete
 
StatusCode sysInitialize () override
 Initialization method invoked by the framework. More...
 
StatusCode sysFinalize () override
 Finalization method invoked by the framework. More...
 
void before (StandardEventType, INamedInterface *) override
 The following methods are meant to be implemented by the child class... More...
 
void before (StandardEventType, const std::string &) override
 
void before (CustomEventTypeRef, INamedInterface *) override
 
void before (CustomEventTypeRef, const std::string &) override
 
void after (StandardEventType, INamedInterface *, const StatusCode &) override
 
void after (StandardEventType, const std::string &, const StatusCode &) override
 
void after (CustomEventTypeRef, INamedInterface *, const StatusCode &) override
 
void after (CustomEventTypeRef, const std::string &, const StatusCode &) override
 
void beforeInitialize (INamedInterface *) override
 
void afterInitialize (INamedInterface *) override
 
void beforeReinitialize (INamedInterface *) override
 
void afterReinitialize (INamedInterface *) override
 
void beforeExecute (INamedInterface *) override
 
void afterExecute (INamedInterface *, const StatusCode &) override
 
void beforeFinalize (INamedInterface *) override
 
void afterFinalize (INamedInterface *) override
 
void beforeBeginRun (INamedInterface *) override
 
void afterBeginRun (INamedInterface *) override
 
void beforeEndRun (INamedInterface *) override
 
void afterEndRun (INamedInterface *) override
 
const std::stringname () const override
 
bool isEnabled () const override
 
SmartIF< ISvcLocator > & serviceLocator () const override
 The standard service locator. More...
 
template<class T >
StatusCode service (const std::string &name, T *&svc, bool createIf=false) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T = IService>
SmartIF< T > service (const std::string &name, bool createIf=false) const
 
StatusCode setProperties ()
 Set the auditor's properties. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAuditor, IProperty > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p) override
 set the property form another property More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 set the property from name and the value More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (const std::string &name) const override
 get the property by name More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (const std::string &name) const override
 Return true if we have a property with the given name. More...
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IAuditor, IProperty > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
MSG::Level outputLevel () const
 Backward compatibility function for getting the output level. More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 

Protected Member Functions

virtual void google_before (const std::string &s)=0
 Start the google tool. More...
 
virtual void google_after (const std::string &s)=0
 stop the google tool More...
 
virtual bool alreadyRunning ()=0
 check if we are already running the tool More...
 
- Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAuditor, IProperty > > >
Gaudi::Details::PropertyBaseproperty (const std::string &name) const
 
- Protected Member Functions inherited from CommonMessaging< implements< IAuditor, IProperty > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Private Member Functions

void startAudit ()
 Start a full event audit. More...
 
void stopAudit ()
 stop a full event audit More...
 
bool isSequencer (INamedInterface *i) const
 Check if the component in question is a GaudiSequencer or a Sequencer. More...
 
bool isPhaseEnabled (CustomEventTypeRef type) const
 Check if auditing is enabled for the current processing phase. More...
 
bool isComponentEnabled (const std::string &name) const
 Check if auditing is enabled for the given component. More...
 
std::string getDumpName (CustomEventTypeRef type, const std::string &name) const
 

Private Attributes

Gaudi::Property< std::vector< std::string > > m_when
 
Gaudi::Property< std::vector< std::string > > m_veto
 
Gaudi::Property< std::vector< std::string > > m_list
 
Gaudi::Property< int > m_freq {this, "ProfileFreq", -1, "The frequence to audit events. -1 means all events"}
 
Gaudi::Property< bool > m_fullEventAudit
 
Gaudi::Property< unsigned long long > m_nSampleEvents
 
Gaudi::Property< unsigned long long > m_eventsToSkip
 
Gaudi::Property< bool > m_skipSequencers
 
bool m_audit = true
 Internal flag to say if auditing is enabled or not for the current event. More...
 
unsigned long long m_nEvts = 0
 Number of events processed. More...
 
unsigned long long m_sampleEventCount
 Internal count of the number of events currently processed during an audit. More...
 
bool m_inFullAudit = false
 Internal flag to indicate if we are current in a full event audit. More...
 
std::string m_startedBy
 Name of the component we are currently auditing. More...
 

Additional Inherited Members

- Public Types inherited from extends< Auditor, IIncidentListener >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from Auditor
using Factory = Gaudi::PluginService::Factory< IAuditor *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IAuditor, IProperty > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IAuditor, IProperty > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IAuditor, IProperty > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 

Detailed Description

Base for Google Auditors.

Author
Chris Jones
Date
18/04/2011

Definition at line 40 of file GoogleAuditor.cpp.

Member Function Documentation

void Google::AuditorBase::after ( StandardEventType  type,
INamedInterface i,
const StatusCode sc 
)
inlineoverride

Definition at line 186 of file GoogleAuditor.cpp.

187  {
188  if ( !m_skipSequencers || !isSequencer( i ) ) {
190  t << type;
191  after( t.str(), i, sc );
192  }
193  }
Gaudi::Property< bool > m_skipSequencers
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
bool isSequencer(INamedInterface *i) const
Check if the component in question is a GaudiSequencer or a Sequencer.
void Google::AuditorBase::after ( CustomEventTypeRef  type,
INamedInterface i,
const StatusCode sc 
)
inlineoverride

Definition at line 195 of file GoogleAuditor.cpp.

196  {
197  if ( !m_skipSequencers || !isSequencer( i ) ) {
198  after( type, i->name(), sc );
199  }
200  }
Gaudi::Property< bool > m_skipSequencers
virtual const std::string & name() const =0
Retrieve the name of the instance.
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
bool isSequencer(INamedInterface *i) const
Check if the component in question is a GaudiSequencer or a Sequencer.
void Google::AuditorBase::after ( StandardEventType  type,
const std::string s,
const StatusCode sc 
)
inlineoverride

Definition at line 202 of file GoogleAuditor.cpp.

203  {
205  t << type;
206  after( t.str(), s, sc );
207  }
string s
Definition: gaudirun.py:253
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
void Google::AuditorBase::after ( CustomEventTypeRef  type,
const std::string s,
const StatusCode  
)
inlineoverride

Definition at line 209 of file GoogleAuditor.cpp.

210  {
212  if ( s == m_startedBy ) {
213  google_after( getDumpName( type, s ) );
214  }
215  }
216  }
std::string m_startedBy
Name of the component we are currently auditing.
bool m_audit
Internal flag to say if auditing is enabled or not for the current event.
Gaudi::Property< bool > m_fullEventAudit
bool isPhaseEnabled(CustomEventTypeRef type) const
Check if auditing is enabled for the current processing phase.
std::string getDumpName(CustomEventTypeRef type, const std::string &name) const
virtual void google_after(const std::string &s)=0
stop the google tool
bool isComponentEnabled(const std::string &name) const
Check if auditing is enabled for the given component.
void Google::AuditorBase::afterBeginRun ( INamedInterface i)
inlineoverride

Definition at line 235 of file GoogleAuditor.cpp.

constexpr static const auto SUCCESS
Definition: StatusCode.h:87
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
void Google::AuditorBase::afterEndRun ( INamedInterface i)
inlineoverride

Definition at line 236 of file GoogleAuditor.cpp.

236 { return after( IAuditor::EndRun, i, StatusCode::SUCCESS ); }
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
void Google::AuditorBase::afterExecute ( INamedInterface i,
const StatusCode s 
)
inlineoverride

Definition at line 234 of file GoogleAuditor.cpp.

234 { return after( IAuditor::Execute, i, s ); }
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
void Google::AuditorBase::afterFinalize ( INamedInterface i)
inlineoverride

Definition at line 237 of file GoogleAuditor.cpp.

constexpr static const auto SUCCESS
Definition: StatusCode.h:87
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
void Google::AuditorBase::afterInitialize ( INamedInterface i)
inlineoverride

Definition at line 226 of file GoogleAuditor.cpp.

227  {
229  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
void Google::AuditorBase::afterReinitialize ( INamedInterface i)
inlineoverride

Definition at line 230 of file GoogleAuditor.cpp.

231  {
233  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
virtual bool Google::AuditorBase::alreadyRunning ( )
protectedpure virtual

check if we are already running the tool

Implemented in Google::CPUProfiler, Google::HeapChecker, and Google::HeapProfiler.

void Google::AuditorBase::before ( StandardEventType  type,
INamedInterface i 
)
inlineoverride

Definition at line 152 of file GoogleAuditor.cpp.

153  {
154  if ( !m_skipSequencers || !isSequencer( i ) ) {
155  before( type, i->name() );
156  }
157  }
void before(StandardEventType type, INamedInterface *i) override
Gaudi::Property< bool > m_skipSequencers
virtual const std::string & name() const =0
Retrieve the name of the instance.
bool isSequencer(INamedInterface *i) const
Check if the component in question is a GaudiSequencer or a Sequencer.
void Google::AuditorBase::before ( CustomEventTypeRef  type,
INamedInterface i 
)
inlineoverride

Definition at line 159 of file GoogleAuditor.cpp.

160  {
161  if ( !m_skipSequencers || !isSequencer( i ) ) {
162  before( type, i->name() );
163  }
164  }
void before(StandardEventType type, INamedInterface *i) override
Gaudi::Property< bool > m_skipSequencers
virtual const std::string & name() const =0
Retrieve the name of the instance.
bool isSequencer(INamedInterface *i) const
Check if the component in question is a GaudiSequencer or a Sequencer.
void Google::AuditorBase::before ( StandardEventType  type,
const std::string s 
)
inlineoverride

Definition at line 166 of file GoogleAuditor.cpp.

167  {
169  t << type;
170  before( t.str(), s );
171  }
void before(StandardEventType type, INamedInterface *i) override
string s
Definition: gaudirun.py:253
void Google::AuditorBase::before ( CustomEventTypeRef  type,
const std::string s 
)
inlineoverride

Definition at line 173 of file GoogleAuditor.cpp.

174  {
176  if ( !alreadyRunning() ) {
177  info() << "Starting Auditor for " << s << ":" << type << endmsg;
178  m_startedBy = s;
179  google_before( getDumpName( type, s ) );
180  } else {
181  warning() << "Auditor already running. Cannot be started for " << s << endmsg;
182  }
183  }
184  }
std::string m_startedBy
Name of the component we are currently auditing.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
virtual void google_before(const std::string &s)=0
Start the google tool.
bool m_audit
Internal flag to say if auditing is enabled or not for the current event.
Gaudi::Property< bool > m_fullEventAudit
virtual bool alreadyRunning()=0
check if we are already running the tool
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
bool isPhaseEnabled(CustomEventTypeRef type) const
Check if auditing is enabled for the current processing phase.
std::string getDumpName(CustomEventTypeRef type, const std::string &name) const
string s
Definition: gaudirun.py:253
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
bool isComponentEnabled(const std::string &name) const
Check if auditing is enabled for the given component.
void Google::AuditorBase::beforeBeginRun ( INamedInterface i)
inlineoverride

Definition at line 222 of file GoogleAuditor.cpp.

222 { return before( IAuditor::BeginRun, i ); }
void before(StandardEventType type, INamedInterface *i) override
void Google::AuditorBase::beforeEndRun ( INamedInterface i)
inlineoverride

Definition at line 223 of file GoogleAuditor.cpp.

223 { return before( IAuditor::EndRun, i ); }
void before(StandardEventType type, INamedInterface *i) override
void Google::AuditorBase::beforeExecute ( INamedInterface i)
inlineoverride

Definition at line 221 of file GoogleAuditor.cpp.

221 { return before( IAuditor::Execute, i ); }
void before(StandardEventType type, INamedInterface *i) override
void Google::AuditorBase::beforeFinalize ( INamedInterface i)
inlineoverride

Definition at line 224 of file GoogleAuditor.cpp.

224 { return before( IAuditor::Finalize, i ); }
void before(StandardEventType type, INamedInterface *i) override
void Google::AuditorBase::beforeInitialize ( INamedInterface i)
inlineoverride

Definition at line 219 of file GoogleAuditor.cpp.

219 { return before( IAuditor::Initialize, i ); }
void before(StandardEventType type, INamedInterface *i) override
void Google::AuditorBase::beforeReinitialize ( INamedInterface i)
inlineoverride

Definition at line 220 of file GoogleAuditor.cpp.

220 { return before( IAuditor::ReInitialize, i ); }
void before(StandardEventType type, INamedInterface *i) override
StatusCode Google::AuditorBase::finalize ( )
inlineoverridevirtual

Finalize the auditor base.

Reimplemented from Auditor.

Definition at line 66 of file GoogleAuditor.cpp.

67  {
68  if ( alreadyRunning() ) stopAudit();
69  return StatusCode::SUCCESS;
70  }
void stopAudit()
stop a full event audit
virtual bool alreadyRunning()=0
check if we are already running the tool
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
std::string Google::AuditorBase::getDumpName ( CustomEventTypeRef  type,
const std::string name 
) const
inlineprivate

Definition at line 116 of file GoogleAuditor.cpp.

117  {
119  t << name << "-" << type;
120  if ( type == "Execute" ) t << "-Event" << m_nEvts;
121  return t.str();
122  }
unsigned long long m_nEvts
Number of events processed.
virtual void Google::AuditorBase::google_after ( const std::string s)
protectedpure virtual

stop the google tool

Implemented in Google::CPUProfiler, Google::HeapChecker, and Google::HeapProfiler.

virtual void Google::AuditorBase::google_before ( const std::string s)
protectedpure virtual

Start the google tool.

Implemented in Google::CPUProfiler, Google::HeapChecker, and Google::HeapProfiler.

void Google::AuditorBase::handle ( const Incident incident)
inlineoverride

Implement the handle method for the Incident service.

This is used to inform the tool of software incidents.

Parameters
incidentThe incident identifier

Definition at line 130 of file GoogleAuditor.cpp.

131  {
132  if ( IncidentType::BeginEvent == incident.type() ) {
133  ++m_nEvts;
134  m_audit = ( m_nEvts > m_eventsToSkip && ( m_freq < 0 || m_nEvts == 1 || m_nEvts % m_freq == 0 ) );
135  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) debug() << "Event " << m_nEvts << " Audit=" << m_audit << endmsg;
136  if ( m_fullEventAudit ) {
137  if ( m_inFullAudit ) {
139  stopAudit();
140  } else {
142  }
143  }
144  if ( m_audit && !m_inFullAudit && !alreadyRunning() ) {
145  startAudit();
146  }
147  }
148  }
149  }
#define UNLIKELY(x)
Definition: Kernel.h:122
void stopAudit()
stop a full event audit
const std::string & type() const
Access to the incident type.
Definition: Incident.h:41
bool m_audit
Internal flag to say if auditing is enabled or not for the current event.
void startAudit()
Start a full event audit.
Gaudi::Property< int > m_freq
Gaudi::Property< bool > m_fullEventAudit
virtual bool alreadyRunning()=0
check if we are already running the tool
bool m_inFullAudit
Internal flag to indicate if we are current in a full event audit.
unsigned long long m_sampleEventCount
Internal count of the number of events currently processed during an audit.
unsigned long long m_nEvts
Number of events processed.
Gaudi::Property< unsigned long long > m_nSampleEvents
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Gaudi::Property< unsigned long long > m_eventsToSkip
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
StatusCode Google::AuditorBase::initialize ( )
inlineoverridevirtual

Initialize the auditor base.

Reimplemented from Auditor.

Reimplemented in Google::HeapChecker.

Definition at line 48 of file GoogleAuditor.cpp.

49  {
50  info() << "Initialised" << endmsg;
51 
52  // add a listener for begin event
53  auto inSvc = serviceLocator()->service<IIncidentSvc>( "IncidentSvc" );
54  if ( !inSvc ) return StatusCode::FAILURE;
55  inSvc->addListener( this, IncidentType::BeginEvent );
56 
57  // sort various lists for speed when searching
58  std::sort( m_when.begin(), m_when.end() );
59  std::sort( m_veto.begin(), m_veto.end() );
60  std::sort( m_list.begin(), m_list.end() );
61 
62  return StatusCode::SUCCESS;
63  }
Gaudi::Property< std::vector< std::string > > m_list
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Gaudi::Property< std::vector< std::string > > m_when
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Auditor.cpp:206
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
T sort(T...args)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23
Gaudi::Property< std::vector< std::string > > m_veto
bool Google::AuditorBase::isComponentEnabled ( const std::string name) const
inlineprivate

Check if auditing is enabled for the given component.

Definition at line 109 of file GoogleAuditor.cpp.

110  {
111  return ( std::find( m_veto.begin(), m_veto.end(), name ) == m_veto.end() &&
112  ( m_list.empty() || std::find( m_list.begin(), m_list.end(), name ) != m_list.end() ) );
113  }
Gaudi::Property< std::vector< std::string > > m_list
T find(T...args)
const std::string & name() const override
Definition: Auditor.cpp:202
Gaudi::Property< std::vector< std::string > > m_veto
bool Google::AuditorBase::isPhaseEnabled ( CustomEventTypeRef  type) const
inlineprivate

Check if auditing is enabled for the current processing phase.

Definition at line 103 of file GoogleAuditor.cpp.

104  {
105  return ( std::find( m_when.begin(), m_when.end(), type ) != m_when.end() );
106  }
Gaudi::Property< std::vector< std::string > > m_when
T find(T...args)
bool Google::AuditorBase::isSequencer ( INamedInterface i) const
inlineprivate

Check if the component in question is a GaudiSequencer or a Sequencer.

Definition at line 97 of file GoogleAuditor.cpp.

98  {
99  return ( dynamic_cast<GaudiSequencer*>( i ) != NULL || dynamic_cast<Sequencer*>( i ) != NULL );
100  }
void Google::AuditorBase::startAudit ( )
inlineprivate

Start a full event audit.

Definition at line 74 of file GoogleAuditor.cpp.

75  {
76  info() << " -> Starting full audit from event " << m_nEvts << " to " << m_nEvts + m_nSampleEvents << endmsg;
77  m_inFullAudit = true;
80  t << "FULL-Events" << m_nEvts << "To" << m_nEvts + m_nSampleEvents;
81  google_before( t.str() );
82  }
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
virtual void google_before(const std::string &s)=0
Start the google tool.
bool m_inFullAudit
Internal flag to indicate if we are current in a full event audit.
unsigned long long m_sampleEventCount
Internal count of the number of events currently processed during an audit.
unsigned long long m_nEvts
Number of events processed.
Gaudi::Property< unsigned long long > m_nSampleEvents
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
void Google::AuditorBase::stopAudit ( )
inlineprivate

stop a full event audit

Definition at line 85 of file GoogleAuditor.cpp.

86  {
87  info() << " -> Stopping full audit" << endmsg;
89  t << "FULL-Events" << m_nEvts << "To" << m_nEvts + m_nSampleEvents;
90  google_after( t.str() );
91  m_inFullAudit = false;
93  }
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
bool m_inFullAudit
Internal flag to indicate if we are current in a full event audit.
unsigned long long m_sampleEventCount
Internal count of the number of events currently processed during an audit.
unsigned long long m_nEvts
Number of events processed.
Gaudi::Property< unsigned long long > m_nSampleEvents
virtual void google_after(const std::string &s)=0
stop the google tool
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

Member Data Documentation

bool Google::AuditorBase::m_audit = true
private

Internal flag to say if auditing is enabled or not for the current event.

Definition at line 270 of file GoogleAuditor.cpp.

Gaudi::Property<unsigned long long> Google::AuditorBase::m_eventsToSkip
private
Initial value:
{this, "SkipEvents", 0,
"Number of events to skip before activating the auditing"}

Definition at line 265 of file GoogleAuditor.cpp.

Gaudi::Property<int> Google::AuditorBase::m_freq {this, "ProfileFreq", -1, "The frequence to audit events. -1 means all events"}
private

Definition at line 259 of file GoogleAuditor.cpp.

Gaudi::Property<bool> Google::AuditorBase::m_fullEventAudit
private
Initial value:
{
this, "DoFullEventProfile", false,
"If true, instead of individually auditing components, the full event (or events) will be audited in one go"}

Definition at line 260 of file GoogleAuditor.cpp.

bool Google::AuditorBase::m_inFullAudit = false
private

Internal flag to indicate if we are current in a full event audit.

Definition at line 274 of file GoogleAuditor.cpp.

Gaudi::Property<std::vector<std::string> > Google::AuditorBase::m_list
private
Initial value:
{
this, "EnableFor", {}, "Any component in this list will be audited. If empty, all will be done."}

Definition at line 257 of file GoogleAuditor.cpp.

unsigned long long Google::AuditorBase::m_nEvts = 0
private

Number of events processed.

Definition at line 271 of file GoogleAuditor.cpp.

Gaudi::Property<unsigned long long> Google::AuditorBase::m_nSampleEvents
private
Initial value:
{
this, "FullEventNSampleEvents", 1, "The number of events to include in a full event audit, if enabled"}

Definition at line 263 of file GoogleAuditor.cpp.

unsigned long long Google::AuditorBase::m_sampleEventCount
private
Initial value:
=
0

Internal count of the number of events currently processed during an audit.

Definition at line 272 of file GoogleAuditor.cpp.

Gaudi::Property<bool> Google::AuditorBase::m_skipSequencers
private
Initial value:
{this, "SkipSequencers", true,
"If true, auditing will be skipped for Sequencer objects."}

Definition at line 267 of file GoogleAuditor.cpp.

std::string Google::AuditorBase::m_startedBy
private

Name of the component we are currently auditing.

Definition at line 275 of file GoogleAuditor.cpp.

Gaudi::Property<std::vector<std::string> > Google::AuditorBase::m_veto
private
Initial value:
{
this, "DisableFor", {}, "List of component names to disable the auditing for"}

Definition at line 255 of file GoogleAuditor.cpp.

Gaudi::Property<std::vector<std::string> > Google::AuditorBase::m_when
private
Initial value:
{
this,
"ActivateAt",
{"Initialize", "ReInitialize", "Execute", "BeginRun", "EndRun", "Finalize"},
"List of phases to activate the Auditoring during"}

Definition at line 250 of file GoogleAuditor.cpp.


The documentation for this class was generated from the following file: