Diana Software
MVariableOperation.hh
Go to the documentation of this file.
1 #ifndef _M_VARIABLEOPERATION_HH_
2 #define _M_VARIABLEOPERATION_HH_
3 
46 #include "QModule.hh"
47 #include "TF1.h"
48 #include "TString.h"
49 #include "QEventLabel.hh"
50 #include <vector>
51 #include "QBaselineData.hh"
52 #include "QEvent.hh"
53 
54 class MVariableOperation : public Diana::QModule {
55 
56  public:
57 
59  void Init(Diana::QEvent& ev);
60 
62  void Do(Diana::QEvent& ev);
63  //void Do(Diana::QEvent& ev, const Diana::QEventList& neighbours);
64 
66  void Done();
67  private:
68  std::vector<Int_t> FindVars(TString instring);
69  void FindParameters(TString instring);
70  std::vector<Diana::QEventLabel> FindQuantities(TString instring);
71  void SetReq(Diana::QEventLabel EvLab,Diana::QEvent& ev);
72  double GetValue(Diana::QEventLabel EvLab,Diana::QEvent& ev);
73  Diana::QEventLabel fInputVar;
74  std::vector<Diana::QEventLabel> fOtherVars;
75  TString fOutputVar;
76  TString fFunction;
77  TF1 fFunc;
78 
79 
80  struct ChInfo{
82  std::vector<double> fParameters;
83  };
84  std::vector<ChInfo> channelparams;
85  std::vector<Int_t> fParamNames;
86  std::vector<Int_t> fChannels;
87  TString StringParams;
88 
89 };
90 
91 #endif
92 
Perform function on variable.
std::vector< Int_t > fChannels
double GetValue(Diana::QEventLabel EvLab, Diana::QEvent &ev)
std::vector< Int_t > FindVars(TString instring)
void SetReq(Diana::QEventLabel EvLab, Diana::QEvent &ev)
Diana::QEventLabel fInputVar
void FindParameters(TString instring)
void Do(Diana::QEvent &ev)
Do method. Declare and implement only one of the two versions.
std::vector< Int_t > fParamNames
void Done()
Done method.
std::vector< ChInfo > channelparams
std::vector< Diana::QEventLabel > FindQuantities(TString instring)
void Init(Diana::QEvent &ev)
Init method.
std::vector< Diana::QEventLabel > fOtherVars
std::vector< double > fParameters