Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
Framework
IO
Root
DropMetaData.cc
Go to the documentation of this file.
1
#include "
art/Framework/IO/Root/DropMetaData.h
"
2
#include "
canvas/Utilities/Exception.h
"
3
4
using
art::DropMetaData
;
5
6
DropMetaData::DropMetaData(
enum_t
const
e
) : value_{e} {}
7
8
DropMetaData::DropMetaData
(
std::string
const
&
config
)
9
:
value_
{
strToValue_
(config)}
10
{}
11
12
DropMetaData::enum_t
13
DropMetaData::strToValue_
(
std::string
const
& dropMetaData)
14
{
15
enum_t
result{
DropNone
};
16
if
(dropMetaData ==
"NONE"
) {
17
result =
DropNone
;
18
}
else
if
(dropMetaData ==
"PRIOR"
) {
19
result =
DropPrior
;
20
}
else
if
(dropMetaData ==
"ALL"
) {
21
result =
DropAll
;
22
}
else
{
23
throw
art::Exception
(
errors::Configuration
,
24
"Illegal dropMetaData parameter value: "
)
25
<< dropMetaData <<
".\n"
26
<<
"Legal values are 'NONE', 'PRIOR', and 'ALL'.\n"
;
27
}
28
return
result;
29
}
string
std::string string
Definition:
nybbler.cc:12
art::DropMetaData::DropMetaData
DropMetaData(enum_t e)
Definition:
DropMetaData.cc:6
Exception.h
art::errors::Configuration
Definition:
Exception.h:32
art::DropMetaData::enum_t
enum_t
Definition:
DropMetaData.h:10
e
const double e
Definition:
gUpMuFluxGen.cxx:165
art::DropMetaData::DropPrior
Definition:
DropMetaData.h:10
art::DropMetaData::DropNone
Definition:
DropMetaData.h:10
DropMetaData.h
art::DropMetaData::DropAll
Definition:
DropMetaData.h:10
art::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:66
generate_config.config
config
Definition:
generate_config.py:3
art::DropMetaData::strToValue_
enum_t strToValue_(std::string const &dropMetaData)
Definition:
DropMetaData.cc:13
art::DropMetaData::value_
enum_t value_
Definition:
DropMetaData.h:29
art::DropMetaData
Definition:
DropMetaData.h:8
Generated by
1.8.11