The Gaudi Framework  v33r1 (b1225454)
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
virtual int run()
Implement the application main logic:
Definition: Application.cpp:81
Gaudi::PluginService::Factory< Application(Options)> Factory
Definition: Application.h:30
SmartIF< IStateful > app
Handle to the ApplicationMgr instance.
Definition: Application.h:50
def create(cls, appType, opts)
Definition: __init__.py:105
Application(Options opts)
Construct and configure the application from the provided options.
Definition: Application.cpp:51
virtual ~Application()
Definition: Application.cpp:79
int run(std::function< int(SmartIF< IStateful > &)> action)
Run a user provided implementation of the application main logic.
Definition: Application.h:46
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1