#include "km3net-dataformat/offline/Vec.hh"
#include "km3net-dataformat/offline/Exception.hh"
#include "TObject.h"
#include <string>
#include <sstream>
#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
Go to the source code of this file.
|
struct | Head |
| The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred to as "tags") and values. More...
|
|
struct | Head::tags |
|
Trim a string in place.
- Parameters
-
- Returns
- list of tokens
Definition at line 23 of file Head.hh.
26 s.erase( s.begin(), std::find_if(s.begin(), s.end(), [](
int ch) {
27 return !std::isspace(ch);
31 s.erase(std::find_if(s.rbegin(), s.rend(), [](
int ch) {
32 return !std::isspace(ch);
Split string at delimiter.
Trailing and leading whitespace is removed from each token. Empty tokens are not put in the output list.
- Parameters
-
str | input string |
delim | token delimiter |
- Returns
- list of tokens
Definition at line 44 of file Head.hh.
52 while (
getline(ss, token, delim))
55 if (token !=
"")
r.push_back(token);
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
static void trimstring(std::string &s)
Trim a string in place.
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const Head & |
h |
|
) |
| |
|
inline |
Print header.
- Parameters
-
- Returns
- output stream
Definition at line 442 of file Head.hh.
void print(std::ostream &out=std::cout) const
Print header.