Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
messagefacility
messagefacility
MessageService
ELdestConfigCheck.h
Go to the documentation of this file.
1
#ifndef messagefacility_MessageService_ELdestConfigCheck_h
2
#define messagefacility_MessageService_ELdestConfigCheck_h
3
4
#include "
cetlib/container_algorithms.h
"
5
#include "
fhiclcpp/ParameterSet.h
"
6
#include "
messagefacility/Utilities/exception.h
"
7
8
#include <set>
9
#include <string>
10
11
namespace
mf
{
12
namespace
service
{
13
namespace
ELdestConfig {
14
15
enum
dest_config
{
ORDINARY
,
STATISTICS
};
16
17
inline
void
18
checkType
(
std::string
const
&
type
,
dest_config
const
configuration
)
19
{
20
if
(configuration != STATISTICS)
21
return
;
22
23
// Check for ostream-supported types for statistics
24
if
(!
cet::search_all
(std::set<std::string>{
"cout"
,
"cerr"
,
"file"
},
25
type
)) {
26
throw
mf::Exception
{
mf::errors::Configuration
}
27
<<
"\n"
28
<<
"Unsupported type [ "
<< type
29
<<
" ] chosen for statistics printout.\n"
30
<<
"Must choose ostream type: \"cout\", \"cerr\", or \"file\""
31
<<
"\n"
;
32
}
33
}
34
35
}
// end of namespace ELdestConfig
36
}
// end of namespace service
37
}
// namespace mf
38
39
#endif
/* messagefacility_MessageService_ELdestConfigCheck_h */
40
41
// Local Variables:
42
// mode: c++
43
// End:
container_algorithms.h
string
std::string string
Definition:
nybbler.cc:12
mf::service::ELdestConfig::checkType
void checkType(std::string const &type, dest_config const configuration)
Definition:
ELdestConfigCheck.h:18
mf::errors::Configuration
Definition:
exception.h:9
mf
Definition:
MessageLogger.cc:14
mf::service::ELdestConfig::dest_config
dest_config
Definition:
ELdestConfigCheck.h:15
ParameterSet.h
mf::Exception
cet::coded_exception< errors::error, detail::translate > Exception
Definition:
exception.h:16
cet::search_all
bool search_all(FwdCont const &, Datum const &)
Definition:
container_algorithms.h:189
bestFitnesses.configuration
configuration
Definition:
bestFitnesses.py:41
exception.h
mf::service::ELdestConfig::STATISTICS
Definition:
ELdestConfigCheck.h:15
art::suffix_type::service
submit_mcc.type
type
Definition:
submit_mcc.py:89
mf::service::ELdestConfig::ORDINARY
Definition:
ELdestConfigCheck.h:15
Generated by
1.8.11