LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ModuleType.h
Go to the documentation of this file.
1
#ifndef art_Persistency_Provenance_ModuleType_h
2
#define art_Persistency_Provenance_ModuleType_h
3
// vim: set sw=2 expandtab :
4
5
#include "
canvas/Utilities/Exception.h
"
6
7
#include <string>
8
9
namespace
art
{
10
11
enum class
ModuleType
{
12
non_art
,
13
producer
,
14
filter
,
15
analyzer
,
16
output_module
,
17
producing_service
18
};
19
enum class
ModuleThreadingType
{
illegal
,
legacy
,
shared
,
replicated
};
20
21
inline
bool
22
is_modifier
(
ModuleType
const
mt)
23
{
24
return
(mt ==
ModuleType::producer
) || (mt ==
ModuleType::filter
);
25
}
26
27
inline
bool
28
is_observer
(
ModuleType
const
mt)
29
{
30
return
(mt ==
ModuleType::analyzer
) || (mt ==
ModuleType::output_module
);
31
}
32
33
inline
std::string
34
to_string
(
ModuleType
const
mt)
35
{
36
switch
(mt) {
37
case
ModuleType::non_art
:
38
return
"non-art"
;
39
case
ModuleType::producer
:
40
return
"producer"
;
41
case
ModuleType::filter
:
42
return
"filter"
;
43
case
ModuleType::analyzer
:
44
return
"analyzer"
;
45
case
ModuleType::output_module
:
46
return
"output module"
;
47
default
:
48
throw
Exception
(
errors::LogicError
)
49
<<
"Unable to find string for unrecognized ModuleType value "
50
<<
static_cast<
int
>
(mt) <<
".\n"
;
51
}
52
}
53
54
}
// namespace art
55
56
#endif
/* art_Persistency_Provenance_ModuleType_h */
57
58
// Local Variables:
59
// mode: c++
60
// End:
art::ModuleType::producing_service
art::errors::LogicError
Definition:
Exception.h:33
art::ModuleThreadingType::illegal
art::ModuleType::analyzer
art::ModuleType::output_module
art::ModuleThreadingType::legacy
art::ModuleThreadingType::shared
art::ModuleType::non_art
art::ModuleType::filter
art::is_modifier
bool is_modifier(ModuleType const mt)
Definition:
ModuleType.h:22
art::ModuleThreadingType::replicated
art::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:66
art::ModuleThreadingType
ModuleThreadingType
Definition:
ModuleType.h:19
art
Definition:
MVAAlg.h:12
art::ModuleType::producer
art::is_observer
bool is_observer(ModuleType const mt)
Definition:
ModuleType.h:28
Exception.h
art::to_string
std::string to_string(ModuleType const mt)
Definition:
ModuleType.h:34
art::ModuleType
ModuleType
Definition:
ModuleType.h:11
art
Persistency
Provenance
ModuleType.h
Generated on Thu May 2 2024 20:59:30 for LArSoft by
1.8.11