|
ATLAS Offline Software
|
Go to the documentation of this file.
18 m_head(
""), m_tail(
""), m_roi(
""), m_vtx(
""), m_element(
""), m_extra(
""),
19 m_passed(true),
m_raw(
""), m_post(
""), m_postcount(0) {
20 if (
s.find(
":post")!=std::string::npos )
m_post =
s.substr(
s.find(
":post")+6,
s.size() );
27 m_head(
s.m_head), m_tail(
s.m_tail), m_roi(
s.m_roi), m_vtx(
s.m_vtx),
28 m_element(
s.m_element), m_extra(
s.m_extra),
32 m_values(
s.m_values) {
40 std::vector<std::string>
fields;
44 bool postkeys =
false;
50 for (
size_t i=1 ;
i<
fields.size() ;
i++ ) {
52 if ( !postkeys && dte==
"DTE" )
m_passed =
false;
54 else if (
fields[
i]==
"post" ) postkeys =
true;
69 std::string
tags[5] = {
"key",
"roi",
"vtx",
"te",
"extra" };
70 bool tagged[5] = {
false,
false,
false,
false,
false };
74 for (
size_t i=0 ;
i<keycount &&
i<5 ;
i++ ) {
76 if ( tagged[
i] ) std::cerr <<
"tag already allocated : " <<
tags[
i] <<
" with value " << *
values[
i] << std::endl;
81 for (
int j=0 ; j<5 ; j++ ) {
83 if ( tagged[j] ) std::cerr <<
"tag already allocated : " <<
tags[j] <<
" with value " << *
values[j] << std::endl;
91 if ( unset ) std::cerr <<
"no such tag: " <<
m_keys[
i] << std::endl;
96 std::cout <<
"head: " <<
m_head << std::endl;
97 std::cout <<
"key: " <<
m_tail << std::endl;
98 std::cout <<
"roi: " <<
m_roi << std::endl;
99 std::cout <<
"vtx: " <<
m_vtx << std::endl;
100 std::cout <<
"te: " <<
m_element << std::endl;
101 std::cout <<
"ind: " <<
m_extra << std::endl;
102 std::cout <<
"pass: " <<
m_passed << std::endl;
112 *(std::string*)(
this) =
raw;
129 std::string
tags[5] = {
"key=",
"roi=",
"vtx=",
"te=",
"extra=" };
void parse(std::string s)
parse the full specification string
std::string subs(std::string s) const
ChainString(const std::string &s)
std::vector< std::string > tags
static std::string chop(std::string &s1, const std::string &s2)
std::vector< std::string > m_values
std::string_view m_raw
the raw input string
const std::vector< std::string > & values() const
static std::string chomp(std::string &s1, const std::string &s2)
std::vector< std::string > m_keys
static char tolower(char c)
convert to lower case