Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
Persistency
Provenance
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
string
std::string string
Definition:
nybbler.cc:12
art::errors::LogicError
Definition:
Exception.h:33
art::ModuleThreadingType::illegal
Exception.h
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:
BasicOptionsHandler.h:9
art::ModuleType::producer
art::is_observer
bool is_observer(ModuleType const mt)
Definition:
ModuleType.h:28
art::to_string
std::string to_string(ModuleType const mt)
Definition:
ModuleType.h:34
art::ModuleType
ModuleType
Definition:
ModuleType.h:11
Generated by
1.8.11