implemented an average-per-data-set option for musrFT.
This commit is contained in:
@ -38,9 +38,10 @@
|
||||
#include "PFourier.h"
|
||||
|
||||
// Canvas menu id's
|
||||
#define P_MENU_ID_FOURIER 10001
|
||||
#define P_MENU_ID_AVERAGE 10002
|
||||
#define P_MENU_ID_EXPORT_DATA 10003
|
||||
#define P_MENU_ID_FOURIER 10001
|
||||
#define P_MENU_ID_AVERAGE 10002
|
||||
#define P_MENU_ID_AVERAGE_PER_DATA_SET 10003
|
||||
#define P_MENU_ID_EXPORT_DATA 10004
|
||||
|
||||
#define P_MENU_ID_FOURIER_REAL 100
|
||||
#define P_MENU_ID_FOURIER_IMAG 101
|
||||
@ -75,10 +76,12 @@ class PFourierCanvas : public TObject, public TQObject
|
||||
{
|
||||
public:
|
||||
PFourierCanvas();
|
||||
PFourierCanvas(vector<PFourier*> &fourier, const Char_t* title, const Bool_t showAverage,
|
||||
PFourierCanvas(vector<PFourier*> &fourier, PIntVector dataSetTag, const Char_t* title,
|
||||
const Bool_t showAverage, const Bool_t showAveragePerDataSet,
|
||||
const Int_t fourierPlotOpt, Double_t fourierXrange[2], Double_t phase,
|
||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh, const Bool_t batch);
|
||||
PFourierCanvas(vector<PFourier*> &fourier, const Char_t* title, const Bool_t showAverage,
|
||||
PFourierCanvas(vector<PFourier*> &fourier, PIntVector dataSetTag, const Char_t* title,
|
||||
const Bool_t showAverage, const Bool_t showAveragePerDataSet,
|
||||
const Int_t fourierPlotOpt, Double_t fourierXrange[2], Double_t phase,
|
||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
||||
const PIntVector markerList, const PIntVector colorList, const Bool_t batch);
|
||||
@ -103,7 +106,9 @@ class PFourierCanvas : public TObject, public TQObject
|
||||
Int_t fTimeout; ///< timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place
|
||||
Bool_t fBatchMode; ///< musrview in ROOT batch mode
|
||||
Bool_t fValid; ///< if true, everything looks OK
|
||||
Bool_t fAveragedView; ///< tag showing that the averaged view or normal view should be presented.
|
||||
Bool_t fAveragedView; ///< tag showing that the averaged view for ALL data or normal view should be presented.
|
||||
Bool_t fAveragedViewPerDataSet; ///< tag showing that the averaged view for individual data sets or normal view should be presented.
|
||||
PIntVector fDataSetTag; ///< vector holding the data set tags
|
||||
Int_t fCurrentPlotView; ///< tag showing what the current plot view is: real, imag, power, phase, ...
|
||||
Double_t fInitialXRange[2]; ///< keeps the initial x-range
|
||||
Double_t fInitialYRange[2]; ///< keeps the initial y-range
|
||||
@ -112,7 +117,7 @@ class PFourierCanvas : public TObject, public TQObject
|
||||
TString fXaxisTitle;
|
||||
vector<PFourier*> fFourier; ///< keeps all the Fourier data, ownership is with the caller
|
||||
PFourierCanvasDataList fFourierHistos; ///< keeps all the Fourier histos
|
||||
PFourierCanvasDataSet fFourierAverage; ///< keeps the average of the Fourier histos
|
||||
PFourierCanvasDataList fFourierAverage; ///< keeps the average of the Fourier histos
|
||||
Double_t fCurrentFourierPhase; ///< keeps the current Fourier phase (real/imag)
|
||||
TLatex *fCurrentFourierPhaseText; ///< used in Re/Im Fourier to show the current phase in the pad
|
||||
|
||||
@ -134,6 +139,7 @@ class PFourierCanvas : public TObject, public TQObject
|
||||
TPaveText *fTitlePad; ///< title pad used to display a title
|
||||
TPad *fFourierPad; ///< fourier pad used to display the fourier
|
||||
TLegend *fInfoPad; ///< info pad used to display a legend of the data plotted
|
||||
TLegend *fLegAvgPerDataSet; ///< legend used for averaged per data set view
|
||||
|
||||
virtual void CreateXaxisTitle();
|
||||
virtual void CreateStyle();
|
||||
@ -151,6 +157,7 @@ class PFourierCanvas : public TObject, public TQObject
|
||||
virtual Double_t GetMaximum(TH1F* histo, Double_t xmin=-1.0, Double_t xmax=-1.0);
|
||||
virtual Double_t GetMinimum(TH1F* histo, Double_t xmin=-1.0, Double_t xmax=-1.0);
|
||||
virtual Double_t GetInterpolatedValue(TH1F* histo, Double_t xVal);
|
||||
virtual TString GetDataSetName(TString title);
|
||||
|
||||
ClassDef(PFourierCanvas, 1)
|
||||
};
|
||||
|
@ -45,11 +45,12 @@ using namespace std;
|
||||
* necessary meta information.
|
||||
*/
|
||||
typedef struct {
|
||||
TString info; ///< keeps all the meta information
|
||||
double timeResolution; ///< time resolution in (usec)
|
||||
int t0; ///< keep the t0 bin
|
||||
Double_t timeRange[2]; ///< time range to be used, given in (usec).
|
||||
PDoubleVector rawData; ///< a single time domain data vector
|
||||
Int_t dataSetTag; ///< tag to label the data set. Needed for average-per-data-set
|
||||
TString info; ///< keeps all the meta information
|
||||
Double_t timeResolution; ///< time resolution in (usec)
|
||||
Int_t t0; ///< keep the t0 bin
|
||||
Double_t timeRange[2]; ///< time range to be used, given in (usec).
|
||||
PDoubleVector rawData; ///< a single time domain data vector
|
||||
} musrFT_data;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -72,6 +73,7 @@ class PPrepFourier {
|
||||
virtual void DoLifeTimeCorrection(Double_t fudge);
|
||||
|
||||
TString GetInfo(const UInt_t idx);
|
||||
Int_t GetDataSetTag(const UInt_t idx);
|
||||
UInt_t GetNoOfData() { return fRawData.size(); }
|
||||
vector<TH1F*> GetData();
|
||||
TH1F *GetData(const UInt_t idx);
|
||||
|
Reference in New Issue
Block a user