The Gaudi Framework  master (37c0b60a)
Application.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
13 #include <Gaudi/PluginService.h>
14 #include <GaudiKernel/IStateful.h>
15 #include <GaudiKernel/SmartIF.h>
16 #include <map>
17 #include <string>
18 #include <string_view>
19 
20 namespace Gaudi {
27  class Application {
28  public:
30  using Factory = Gaudi::PluginService::Factory<Application( Options )>;
31 
34  virtual ~Application();
35 
37  static Factory::ReturnType create( std::string_view type, Options opts );
38 
43  virtual int run();
44 
46  int run( std::function<int( SmartIF<IStateful>& )> action ) { return action( app ); }
47 
48  protected:
51  };
52 } // namespace Gaudi
Gaudi.Application.create
def create(cls, appType, opts)
Definition: __init__.py:127
Gaudi.Application::Application
Application(Options opts)
Construct and configure the application from the provided options.
Definition: Application.cpp:52
std::function
Gaudi.Application::run
int run(std::function< int(SmartIF< IStateful > &)> action)
Run a user provided implementation of the application main logic.
Definition: Application.h:46
Gaudi.Application::~Application
virtual ~Application()
Definition: Application.cpp:73
SmartIF.h
PluginService.h
gaudirun.opts
opts
Definition: gaudirun.py:336
IStateful.h
SmartIF< IStateful >
Gaudi.Application::run
virtual int run()
Implement the application main logic:
Definition: Application.cpp:75
std::map< std::string, std::string >
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
gaudirun.type
type
Definition: gaudirun.py:160
Gaudi.Application::Factory
Gaudi::PluginService::Factory< Application(Options)> Factory
Definition: Application.h:30
Gaudi.Application::app
SmartIF< IStateful > app
Handle to the ApplicationMgr instance.
Definition: Application.h:50
gaudirun.action
action
Definition: gaudirun.py:153