The Gaudi Framework  master (37c0b60a)
ModuleIncident.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 #ifndef GAUDIKERNEL_MODULEINCIDENT_H
12 #define GAUDIKERNEL_MODULEINCIDENT_H
13 
14 // Include files
15 #include <GaudiKernel/Incident.h>
16 #include <string>
17 
23 class ModuleIncident : public Incident {
24 protected:
26 
27  ModuleIncident( std::string source, // Source(service or alg) name)
28  std::string type, // Type (load, unload, ...)
29  std::string module // module(DLL) in question
30  )
31  : Incident( std::move( source ), std::move( type ) ), m_module( std::move( module ) ) {}
32  virtual ~ModuleIncident() = default;
34 
35 public:
37 
38  using Incident::source;
39  using Incident::type;
41  const std::string& module() const { return m_module; }
43 private:
46 };
47 
54 public:
55  static std::string TYPE() { return "ModuleLoaded"; }
56  ModuleLoadedIncident( std::string source, // Source(service or alg) name)
57  std::string module // module(DLL) in question
58  )
59  : ModuleIncident( std::move( source ), TYPE(), std::move( module ) ) {}
60 };
61 
62 #endif // GAUDIKERNEL_MODULEINCIDENT_H
ModuleLoadedIncident::ModuleLoadedIncident
ModuleLoadedIncident(std::string source, std::string module)
Definition: ModuleIncident.h:56
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:54
std::string
STL class.
ModuleIncident::module
const std::string & module() const
the model (DLL) being worked on
Definition: ModuleIncident.h:41
ModuleIncident::~ModuleIncident
virtual ~ModuleIncident()=default
ModuleLoadedIncident
fired when a module (DLL) is loaded
Definition: ModuleIncident.h:53
ModuleIncident
base class for Module-related incident
Definition: ModuleIncident.h:23
ModuleIncident::ModuleIncident
ModuleIncident(std::string source, std::string type, std::string module)
Definition: ModuleIncident.h:27
std
STL namespace.
ModuleLoadedIncident::TYPE
static std::string TYPE()
Definition: ModuleIncident.h:55
Incident::type
const std::string & type() const
Access to the incident type.
Definition: Incident.h:48
ModuleIncident::m_module
std::string m_module
the model (DLL) being worked on
Definition: ModuleIncident.h:45
Incident.h
Incident
Definition: Incident.h:27