The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
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>
15#include <GaudiKernel/SmartIF.h>
16#include <map>
17#include <string>
18#include <string_view>
19
20namespace Gaudi {
28 public:
29 using Options = std::map<std::string, std::string>;
30 using Factory = Gaudi::PluginService::Factory<Application( Options )>;
31
33 Application( Options opts );
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
Application(Options opts)
Construct and configure the application from the provided options.
SmartIF< IStateful > app
Handle to the ApplicationMgr instance.
Definition Application.h:50
int run(std::function< int(SmartIF< IStateful > &)> action)
Run a user provided implementation of the application main logic.
Definition Application.h:46
virtual int run()
Implement the application main logic:
create(cls, appType, opts)
Definition __init__.py:129
std::map< std::string, std::string > Options
Definition Application.h:29
Gaudi::PluginService::Factory< Application(Options)> Factory
Definition Application.h:30
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1