AliRoot Core  3dc7879 (3dc7879)
AliParser.h
Go to the documentation of this file.
1 #ifndef ALIROOT_ALIPARSER_H
2 #define ALIROOT_ALIPARSER_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 
9 
15 #include "TObject.h"
16 #include "TString.h"
17 #include "TMatrixD.h"
18 #include <map>
19 #include <vector>
20 
21 class AliParser {
22  public:
23  static std::vector<TString> ExtractBetween(const char *inputString, const char *startStr, const char *endStr, Int_t verbose=0);
24  static std::vector<TString> Split(const char *inputString, const char delimiter=',', Int_t verbose=0);
25  static std::vector<TString> ExtractSurroundingBy(const char *inputString, const char begin='(', const char end = ')', Int_t verbose=0);
26  static std::map<TString, TString> Parse(const char *inputString, Int_t verbose=0, std::vector<TString> defKeys = std::vector<TString>{});
27  static std::vector<Int_t> Slice2IArray(const char *inputString);
28  static TMatrixD Slice2Matrix(const char *inputString, Int_t verbose=0);
29  //private:
30  static void Map2Array (std::vector<Double_t> &array, std::map<Int_t, std::vector<Double_t> > iRanges, Int_t *indexes, Int_t cnt);
31  static void FillFloatFlagArray(std::vector<Double_t> &, TString);
32  ClassDef(AliParser,1);
33 };
34 #endif
static void FillFloatFlagArray(std::vector< Double_t > &, TString)
Definition: AliParser.cxx:381
static std::vector< TString > ExtractBetween(const char *inputString, const char *startStr, const char *endStr, Int_t verbose=0)
Extracts content between specified patterns (startStr, endStr).
Definition: AliParser.cxx:40
static std::vector< TString > Split(const char *inputString, const char delimiter=',', Int_t verbose=0)
Splits input string to array according to specified char delimiter.
Definition: AliParser.cxx:81
static std::vector< TString > ExtractSurroundingBy(const char *inputString, const char begin='(', const char end= ')', Int_t verbose=0)
Extracts content from specified parentheses.
Definition: AliParser.cxx:132
TObjArray * array
Definition: AnalyzeLaser.C:12
static std::map< TString, TString > Parse(const char *inputString, Int_t verbose=0, std::vector< TString > defKeys=std::vector< TString >{})
Parses string with named arguments.
Definition: AliParser.cxx:190
static void Map2Array(std::vector< Double_t > &array, std::map< Int_t, std::vector< Double_t > > iRanges, Int_t *indexes, Int_t cnt)
Definition: AliParser.cxx:354
static TMatrixD Slice2Matrix(const char *inputString, Int_t verbose=0)
Returns TMatrixD from input string.
Definition: AliParser.cxx:300
static std::vector< Int_t > Slice2IArray(const char *inputString)
Returns array according with python-like interface.
Definition: AliParser.cxx:228
Class provides flexibility static methods for tokenizing strings. You can find explanation, details and examples in description of each function.
Definition: AliParser.h:21