Gaudi Framework, version v25r1
Home
Generated: Mon Mar 24 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiCoreSvc
src
ApplicationMgr
AppMgrRunable.cpp
Go to the documentation of this file.
1
#define GAUDISVC_APPMGRRUNABLE_CPP
2
3
#include "
GaudiKernel/SmartIF.h
"
4
#include "
GaudiKernel/IAppMgrUI.h
"
5
#include "
GaudiKernel/ISvcLocator.h
"
6
7
#include "
AppMgrRunable.h
"
8
9
// Instantiation of a static factory class used by clients to create instances of this service
10
11
DECLARE_COMPONENT
(
AppMgrRunable
)
12
13
// Standard Constructor
14
AppMgrRunable
::
AppMgrRunable
(const
std
::
string
& nam,
ISvcLocator
* svcLoc)
15
:
base_class
(nam, svcLoc), m_appMgrUI(0)
16
{
17
declareProperty(
"EvtMax"
, m_evtMax=0xFEEDBABE);
18
}
19
20
// Standard Destructor
21
AppMgrRunable::~AppMgrRunable
()
22
{
23
}
24
25
// IService implementation: initialize the service
26
StatusCode
AppMgrRunable::initialize
() {
27
StatusCode
sc
=
Service::initialize
();
28
if
( sc.
isSuccess
() ) {
29
sc =
serviceLocator
()->queryInterface(
IAppMgrUI::interfaceID
(), pp_cast<void>(&
m_appMgrUI
));
30
// get property from application manager
31
if
(
m_evtMax
== (
int
)0xFEEDBABE ) {
32
SmartIF<IProperty>
props(
serviceLocator
());
33
setProperty
(props->getProperty(
"EvtMax"
)).ignore();
34
}
35
}
36
return
sc
;
37
}
38
39
// IService implementation: initialize the service
40
StatusCode
AppMgrRunable::start
() {
41
StatusCode
sc
=
Service::start
();
42
return
sc
;
43
}
44
45
// IService implementation: initialize the service
46
StatusCode
AppMgrRunable::stop
() {
47
StatusCode
sc
=
Service::stop
();
48
return
sc
;
49
}
50
51
// IService implementation: finalize the service
52
StatusCode
AppMgrRunable::finalize
() {
53
StatusCode
sc
=
Service::finalize
();
54
if
( 0 !=
m_appMgrUI
)
m_appMgrUI
->
release
();
55
m_appMgrUI
= 0;
56
return
sc
;
57
}
58
59
// IRunable implementation : Run the class implementation
60
StatusCode
AppMgrRunable::run
() {
61
if
( 0 !=
m_appMgrUI
) {
62
// loop over the events
63
return
m_appMgrUI
->
nextEvent
(
m_evtMax
);
64
}
65
return
StatusCode::FAILURE
;
66
}
Generated at Mon Mar 24 2014 18:27:43 for Gaudi Framework, version v25r1 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004