Belle II Software development
Utilities.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <calibration/Utilities.h>
9
10#include <vector>
11#include <boost/algorithm/string/split.hpp>
12#include <boost/algorithm/string/classification.hpp>
13
14using namespace std;
15
16namespace Belle2 {
21 namespace Calibration {
22 string encodeExpRun(const ExpRun& expRun)
23 {
24 return to_string(expRun.first) + "." + to_string(expRun.second);
25 }
26
27 ExpRun decodeExpRun(const string& expRunString)
28 {
29 vector<string> strs;
30 boost::split(strs, expRunString, boost::is_any_of("."));
31 return make_pair(stoi(strs[0]), stoi(strs[1]));
32 }
33 }
35}
Abstract base class for different kinds of events.
STL namespace.