KaliVeda
Toolkit for HIC analysis
KVUserAnalysisOptionList.h
1 #ifndef __KVUSERANALYSISOPTIONLIST_H
2 #define __KVUSERANALYSISOPTIONLIST_H
3 
4 #include "KVBase.h"
5 #include "KVNameValueList.h"
6 
18 
19 public:
20  void SetOpt(const Char_t* option, const Char_t* value)
21  {
23  KVString tmp(value);
25  }
26  Bool_t IsOptGiven(const Char_t* opt)
27  {
29 
30  return fOptionList.HasParameter(opt);
31  }
32  TString GetOpt(const Char_t* opt) const
33  {
37 
38  return fOptionList.GetTStringValue(opt);
39  }
40  void UnsetOpt(const Char_t* opt)
41  {
43 
45  }
46  void ParseOptions(const KVString& optlist)
47  {
51 
52  fOptionList.Clear(); // clear list
53  optlist.Begin(",");
54  while (!optlist.End()) {
55 
56  KVString opt = optlist.Next();
57  opt.Begin("=");
58  KVString param = opt.Next();
59  KVString val = opt.Next();
60  while (!opt.End()) {
61  val += "=";
62  val += opt.Next();
63  }
64 
65  SetOpt(param.Data(), val.Data());
66  }
68  }
69 
70  ClassDef(KVUserAnalysisOptionList, 1) //Handle list of options and input parameters for user analyis
71 };
72 
73 #endif
bool Bool_t
char Char_t
#define ClassDef(name, id)
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Base class for KaliVeda framework.
Definition: KVBase.h:142
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void Print(Option_t *opt="") const
void SetValue(const Char_t *name, value_type value)
void RemoveParameter(const Char_t *name)
virtual void Clear(Option_t *opt="")
Bool_t HasParameter(const Char_t *name) const
TString GetTStringValue(const Char_t *name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
void Begin(TString delim) const
Definition: KVString.cpp:565
Bool_t End() const
Definition: KVString.cpp:634
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:695
Handle list of options and input parameters for user analyis .
void SetOpt(const Char_t *option, const Char_t *value)
TString GetOpt(const Char_t *opt) const
void ParseOptions(const KVString &optlist)
Bool_t IsOptGiven(const Char_t *opt)
void UnsetOpt(const Char_t *opt)
const char * Data() const