ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaServices
src
AthenaSummarySvc.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENASERVICES_ATHENASUMSVC_H
6
#define ATHENASERVICES_ATHENASUMSVC_H
7
8
/*****************************************************************************
9
*
10
* AthenaSummarySvc.h
11
* AthenaSummarySvc
12
*
13
* Author: Charles Leggett
14
*
15
* Provides summary at end of athena job
16
*
17
*****************************************************************************/
18
19
#include "
AthenaBaseComps/AthService.h
"
20
#include "
AthenaKernel/IAthenaSummarySvc.h
"
21
#include "
AthenaKernel/ILoggedMessageSvc.h
"
22
#include "
CxxUtils/checker_macros.h
"
23
24
#include "GaudiKernel/StatusCode.h"
25
#include "GaudiKernel/ServiceHandle.h"
26
#include "GaudiKernel/IIncidentSvc.h"
27
#include "GaudiKernel/IIncidentListener.h"
28
29
#include <list>
30
#include <map>
31
#include <vector>
32
#include <string>
33
#include <iosfwd>
//ofstream
34
35
36
class
AthenaSummarySvc
:
37
public
extends<AthService, IIncidentListener, IAthenaSummarySvc> {
38
39
public
:
40
41
AthenaSummarySvc
(
const
std::string& name, ISvcLocator* svc );
42
43
virtual
StatusCode
initialize
()
override
;
44
virtual
StatusCode
reinitialize
()
override
;
45
virtual
StatusCode
finalize
()
override
;
46
47
virtual
StatusCode
createSummary
()
override
;
48
virtual
void
setStatus
(
int
s)
override
{
m_status
= s;}
49
virtual
void
addListener
(
const
std::string& incident_name)
override
;
50
virtual
void
addSummary
(
const
std::string& dict_key,
const
std::string& data)
override
;
51
virtual
const
std::string&
getOutputFile
()
const override
{
return
m_summaryFile
; }
52
53
private
:
54
55
void
createDict
(std::ofstream& );
56
void
createASCII
(std::ofstream& );
57
virtual
void
handle
(
const
Incident &inc)
override
;
58
static
void
newHandler
();
59
60
// properties
61
StringProperty
m_summaryFile
{
this
,
"SummaryFile"
,
"AthSummary.txt"
,
62
"Output File"
};
63
StringProperty
m_summaryFormat
{
this
,
"SummaryFileFormat"
,
"both"
,
64
"output format: one of 'ascii', 'python', 'both'"
};
65
StringArrayProperty
m_extraInc
{
this
,
"ExtraIncidents"
, {},
66
"user incidets to monitor"
};
67
StringArrayProperty
m_keywords
{
this
,
"keywords"
, {},
68
"kewords to scan for in MessageSvc. WARNING: THIS IS VERY SLOW!!!"
};
69
70
// member data
71
ServiceHandle<IIncidentSvc>
p_incSvc
;
72
ILoggedMessageSvc
*
p_logMsg
{
nullptr
};
73
74
static
char
* s_block
ATLAS_THREAD_SAFE
;
// used during initialize
75
static
bool
s_badalloc
ATLAS_THREAD_SAFE
;
// flag set after bad-alloc
76
77
std::list<std::string>
m_inputFilesRead
;
78
std::list<std::string>
m_outputFiles
;
79
std::list<std::string>
m_outputFilesError
;
80
81
std::map< std::string, std::map<std::string, int> >
m_extraIncidents
;
82
std::vector< std::pair<std::string, std::string> >
m_extraInfo
;
83
84
std::new_handler
m_new
{
nullptr
};
85
int
m_status
{0};
86
unsigned
int
m_eventsRead
{0};
87
unsigned
int
m_eventsWritten
{0};
88
unsigned
int
m_eventsSkipped
{0};
89
unsigned
int
m_runs
{0};
90
};
91
92
#endif
AthService.h
IAthenaSummarySvc.h
ILoggedMessageSvc.h
checker_macros.h
Define macros for attributes used to control the static checker.
AthenaSummarySvc::m_status
int m_status
Definition
AthenaSummarySvc.h:85
AthenaSummarySvc::m_outputFilesError
std::list< std::string > m_outputFilesError
Definition
AthenaSummarySvc.h:79
AthenaSummarySvc::m_extraInc
StringArrayProperty m_extraInc
Definition
AthenaSummarySvc.h:65
AthenaSummarySvc::createSummary
virtual StatusCode createSummary() override
Definition
AthenaSummarySvc.cxx:334
AthenaSummarySvc::m_extraInfo
std::vector< std::pair< std::string, std::string > > m_extraInfo
Definition
AthenaSummarySvc.h:82
AthenaSummarySvc::m_keywords
StringArrayProperty m_keywords
Definition
AthenaSummarySvc.h:67
AthenaSummarySvc::createASCII
void createASCII(std::ofstream &)
Definition
AthenaSummarySvc.cxx:365
AthenaSummarySvc::getOutputFile
virtual const std::string & getOutputFile() const override
Definition
AthenaSummarySvc.h:51
AthenaSummarySvc::m_eventsWritten
unsigned int m_eventsWritten
Definition
AthenaSummarySvc.h:87
AthenaSummarySvc::p_incSvc
ServiceHandle< IIncidentSvc > p_incSvc
Definition
AthenaSummarySvc.h:71
AthenaSummarySvc::m_inputFilesRead
std::list< std::string > m_inputFilesRead
Definition
AthenaSummarySvc.h:77
AthenaSummarySvc::m_runs
unsigned int m_runs
Definition
AthenaSummarySvc.h:89
AthenaSummarySvc::addListener
virtual void addListener(const std::string &incident_name) override
Definition
AthenaSummarySvc.cxx:216
AthenaSummarySvc::setStatus
virtual void setStatus(int s) override
Definition
AthenaSummarySvc.h:48
AthenaSummarySvc::m_new
std::new_handler m_new
Definition
AthenaSummarySvc.h:84
AthenaSummarySvc::m_extraIncidents
std::map< std::string, std::map< std::string, int > > m_extraIncidents
Definition
AthenaSummarySvc.h:81
AthenaSummarySvc::ATLAS_THREAD_SAFE
static char *s_block ATLAS_THREAD_SAFE
Definition
AthenaSummarySvc.h:74
AthenaSummarySvc::m_summaryFile
StringProperty m_summaryFile
Definition
AthenaSummarySvc.h:61
AthenaSummarySvc::m_outputFiles
std::list< std::string > m_outputFiles
Definition
AthenaSummarySvc.h:78
AthenaSummarySvc::createDict
void createDict(std::ofstream &)
Definition
AthenaSummarySvc.cxx:472
AthenaSummarySvc::AthenaSummarySvc
AthenaSummarySvc(const std::string &name, ISvcLocator *svc)
Definition
AthenaSummarySvc.cxx:111
AthenaSummarySvc::initialize
virtual StatusCode initialize() override
Definition
AthenaSummarySvc.cxx:120
AthenaSummarySvc::reinitialize
virtual StatusCode reinitialize() override
Definition
AthenaSummarySvc.cxx:188
AthenaSummarySvc::m_summaryFormat
StringProperty m_summaryFormat
Definition
AthenaSummarySvc.h:63
AthenaSummarySvc::finalize
virtual StatusCode finalize() override
Definition
AthenaSummarySvc.cxx:202
AthenaSummarySvc::handle
virtual void handle(const Incident &inc) override
Definition
AthenaSummarySvc.cxx:284
AthenaSummarySvc::addSummary
virtual void addSummary(const std::string &dict_key, const std::string &data) override
Definition
AthenaSummarySvc.cxx:232
AthenaSummarySvc::newHandler
static void newHandler()
Definition
AthenaSummarySvc.cxx:244
AthenaSummarySvc::p_logMsg
ILoggedMessageSvc * p_logMsg
Definition
AthenaSummarySvc.h:72
AthenaSummarySvc::m_eventsRead
unsigned int m_eventsRead
Definition
AthenaSummarySvc.h:86
AthenaSummarySvc::m_eventsSkipped
unsigned int m_eventsSkipped
Definition
AthenaSummarySvc.h:88
ILoggedMessageSvc
Extends IMessageSvc to get logged messages.
Definition
ILoggedMessageSvc.h:21
ServiceHandle
Definition
ClusterMakerTool.h:36
Generated on
for ATLAS Offline Software by
1.17.0