Gaudi Framework, version v24r2
Home
Generated: Wed Dec 4 2013
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
// $Id: AppMgrRunable.cpp,v 1.8 2008/06/02 14:21:35 marcocle Exp $
2
#define GAUDISVC_APPMGRRUNABLE_CPP
3
4
#include "
GaudiKernel/SmartIF.h
"
5
#include "
GaudiKernel/SvcFactory.h
"
6
#include "
GaudiKernel/IAppMgrUI.h
"
7
#include "
GaudiKernel/ISvcLocator.h
"
8
9
#include "
AppMgrRunable.h
"
10
11
// Instantiation of a static factory class used by clients to create instances of this service
12
13
DECLARE_SERVICE_FACTORY
(
AppMgrRunable
)
14
15
// Standard Constructor
16
AppMgrRunable
::
AppMgrRunable
(const
std
::
string
& nam,
ISvcLocator
* svcLoc)
17
:
base_class
(nam, svcLoc), m_appMgrUI(0)
18
{
19
declareProperty(
"EvtMax"
, m_evtMax=0xFEEDBABE);
20
}
21
22
// Standard Destructor
23
AppMgrRunable::~AppMgrRunable
()
24
{
25
}
26
27
// IService implementation: initialize the service
28
StatusCode
AppMgrRunable::initialize
() {
29
StatusCode
sc
=
Service::initialize
();
30
if
( sc.
isSuccess
() ) {
31
sc =
serviceLocator
()->queryInterface(
IAppMgrUI::interfaceID
(), pp_cast<void>(&
m_appMgrUI
));
32
// get property from application manager
33
if
(
m_evtMax
== (
int
)0xFEEDBABE ) {
34
SmartIF<IProperty>
props(
serviceLocator
());
35
setProperty
(props->getProperty(
"EvtMax"
)).ignore();
36
}
37
}
38
return
sc
;
39
}
40
41
// IService implementation: initialize the service
42
StatusCode
AppMgrRunable::start
() {
43
StatusCode
sc
=
Service::start
();
44
return
sc
;
45
}
46
47
// IService implementation: initialize the service
48
StatusCode
AppMgrRunable::stop
() {
49
StatusCode
sc
=
Service::stop
();
50
return
sc
;
51
}
52
53
// IService implementation: finalize the service
54
StatusCode
AppMgrRunable::finalize
() {
55
StatusCode
sc
=
Service::finalize
();
56
if
( 0 !=
m_appMgrUI
)
m_appMgrUI
->
release
();
57
m_appMgrUI
= 0;
58
return
sc
;
59
}
60
61
// IRunable implementation : Run the class implementation
62
StatusCode
AppMgrRunable::run
() {
63
if
( 0 !=
m_appMgrUI
) {
64
// loop over the events
65
return
m_appMgrUI
->
nextEvent
(
m_evtMax
);
66
}
67
return
StatusCode::FAILURE
;
68
}
Generated at Wed Dec 4 2013 14:33:07 for Gaudi Framework, version v24r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004