]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1Decoder.h
New methods and data member added by M. Horner.
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1Decoder.h
CommitLineData
ba030c0e 1#ifndef ALI_MUON_ST1_DECODER_H
2#define ALI_MUON_ST1_DECODER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
9//
10// Class AliMUONSt1Decoder
11// -----------------------
12// A generic set of functions (defined in the <decoder> namespace).
13// Used to decode formatted strings, eg. a list of integer ranges,
14// or a list of sub-strings separated by delimiters such as '(','{','[', ... .
15// Example:
16// (string 1) (string 2) [string3] {string4} [ (string5.1) (string5.2) ]
17// note : |_____________________|
18// |
19// this is just ONE substring.
20
21
22#include <vector>
23#include <utility>
24#include <string>
25#include <cstdlib>
26
27namespace decoder
28{
29 using std::vector;
30 using std::pair;
31 using std::string;
32 vector<string> SplitNtuples(const string& s,
33 const string& leftSep ="({[\"'/",
34 const string& rightSep=")}]\"'/");
35 vector<string> SplitList(const string& s,const string& sep=";,");
36 vector<int> DecodeListRanges(const string& s,const string& sep=";,",const string& rangeSep="/");
37 vector< pair<int,int> > DecodeListOfIntRanges(const string& s,const string& sep=";,",const string& rangeSep="/");
38 vector< pair<double,double> > DecodeListOfFloatRanges(const string& s,const string& sep=";,",const string& rangeSep="/");
39}
40
41#endif //ALI_MUON_ST1_DECODER_H