]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1Decoder.h
Reading MUONtracks from new ESD object tree
[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
ba030c0e 21#include <string>
1eb40170 22#include <utility>
23#include <vector>
24
25#ifndef __HP_aCC
26 using std::string;
27 using std::pair;
28 using std::vector;
29#endif
5f91c9e8 30
1eb40170 31#include <Rtypes.h>
32
33typedef vector<string> StringVector;
34typedef vector<Int_t> IntVector;
35typedef pair<Int_t, Int_t> IntPair;
36typedef vector<IntPair> IntPairVector;
37typedef pair<Double_t, Double_t> DoublePair;
38typedef vector<DoublePair> DoublePairVector;
ba030c0e 39
40namespace decoder
41{
1eb40170 42 StringVector SplitNtuples(const string& s,
43 const string& leftSep ="({[\"'/",
44 const string& rightSep=")}]\"'/");
45 StringVector SplitList(const string& s, const string& sep=";,");
46
47 IntVector DecodeListRanges(const string& s, const string& sep=";,",
48 const string& rangeSep="/");
49 IntPairVector DecodeListOfIntRanges(const string& s, const string& sep=";,",
50 const string& rangeSep="/");
51 DoublePairVector DecodeListOfFloatRanges(const string& s, const string& sep=";,",
52 const string& rangeSep="/");
ba030c0e 53}
54
55#endif //ALI_MUON_ST1_DECODER_H