Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Options.h
1/*
2 * HalOptions.h
3 *
4 * Created on: 30-04-2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HALOPTIONS_H_
10#define HALOPTIONS_H_
11
12#include "Cout.h"
13
14#include <TClonesArray.h>
15#include <TObject.h>
16
17// array that recognize labels
19namespace Hal {
20 class OptionArray : public TObject {
21 std::vector<std::vector<TString>> fParameters;
22 std::vector<TString> fLabels;
23 TString GetLabel(Int_t i) const;
24
25 public:
30 void RegisterLabel(TString label);
34 Bool_t Add(TString option);
39 TString GetByLabel(TString label, Int_t no = 0) const;
44 Int_t GetByLabelNo(TString label) const;
46 void Print(Option_t* /*opt*/ = "") const;
47 virtual ~OptionArray();
48 ClassDef(OptionArray, 1)
49 };
53 class OptionConverter : public TObject {
54 std::vector<TString> fNames;
55 std::vector<Int_t> fValues;
56
57 public:
65 Bool_t GetOptionInt(Int_t& val, TString option) const;
72 Bool_t GetString(TString& val, Int_t value) const;
77 void RegisterOption(TString option);
83 void RegisterOption(TString option, Int_t no);
84 virtual ~OptionConverter();
85 ClassDef(OptionConverter, 1)
86 };
87} // namespace Hal
88
89#endif /* HALOPTIONS_H_ */
Int_t GetByLabelNo(TString label) const
Definition Options.cxx:115
void RegisterLabel(TString label)
Definition Options.cxx:61
TString GetByLabel(TString label, Int_t no=0) const
Definition Options.cxx:100
Bool_t Add(TString option)
Definition Options.cxx:78
void Print(Option_t *="") const
Definition Options.cxx:124
void RegisterOption(TString option)
Definition Options.cxx:36
Bool_t GetOptionInt(Int_t &val, TString option) const
Definition Options.cxx:16
Bool_t GetString(TString &val, Int_t value) const
Definition Options.cxx:46