propagate fourier default settings to the application
This commit is contained in:
parent
acc5d663ef
commit
2fdbe96401
@ -92,8 +92,10 @@ PMusrCanvas::PMusrCanvas(const int number, const char* title,
|
|||||||
*/
|
*/
|
||||||
PMusrCanvas::PMusrCanvas(const int number, const char* title,
|
PMusrCanvas::PMusrCanvas(const int number, const char* title,
|
||||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
||||||
|
PMsrFourierStructure* fourierDefault,
|
||||||
const PIntVector markerList, const PIntVector colorList) :
|
const PIntVector markerList, const PIntVector colorList) :
|
||||||
fPlotNumber(number), fMarkerList(markerList), fColorList(colorList)
|
fPlotNumber(number), fFourier(fourierDefault),
|
||||||
|
fMarkerList(markerList), fColorList(colorList)
|
||||||
{
|
{
|
||||||
CreateStyle();
|
CreateStyle();
|
||||||
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
||||||
@ -352,23 +354,23 @@ void PMusrCanvas::HandleMenuPopup(Int_t id)
|
|||||||
if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL) {
|
if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL) {
|
||||||
fPopupFourier->UnCheckEntries();
|
fPopupFourier->UnCheckEntries();
|
||||||
fPopupFourier->CheckEntry(id);
|
fPopupFourier->CheckEntry(id);
|
||||||
cout << endl << ">> will handle Real Part Fourier ..." << endl;
|
HandleFourier(FOURIER_PLOT_REAL);
|
||||||
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_IMAG) {
|
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_IMAG) {
|
||||||
fPopupFourier->UnCheckEntries();
|
fPopupFourier->UnCheckEntries();
|
||||||
fPopupFourier->CheckEntry(id);
|
fPopupFourier->CheckEntry(id);
|
||||||
cout << endl << ">> will handle Imaginary Part Fourier ..." << endl;
|
HandleFourier(FOURIER_PLOT_IMAG);
|
||||||
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL_AND_IMAG) {
|
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL_AND_IMAG) {
|
||||||
fPopupFourier->UnCheckEntries();
|
fPopupFourier->UnCheckEntries();
|
||||||
fPopupFourier->CheckEntry(id);
|
fPopupFourier->CheckEntry(id);
|
||||||
cout << endl << ">> will handle Real+Imaginary Part Fourier ..." << endl;
|
HandleFourier(FOURIER_PLOT_REAL_AND_IMAG);
|
||||||
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PWR) {
|
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PWR) {
|
||||||
fPopupFourier->UnCheckEntries();
|
fPopupFourier->UnCheckEntries();
|
||||||
fPopupFourier->CheckEntry(id);
|
fPopupFourier->CheckEntry(id);
|
||||||
cout << endl << ">> will handle Power Fourier ..." << endl;
|
HandleFourier(FOURIER_PLOT_POWER);
|
||||||
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PHASE) {
|
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PHASE) {
|
||||||
fPopupFourier->UnCheckEntries();
|
fPopupFourier->UnCheckEntries();
|
||||||
fPopupFourier->CheckEntry(id);
|
fPopupFourier->CheckEntry(id);
|
||||||
cout << endl << ">> will handle Phase Fourier ..." << endl;
|
HandleFourier(FOURIER_PLOT_PHASE);
|
||||||
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PHASE_PLUS) {
|
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PHASE_PLUS) {
|
||||||
cout << endl << ">> will add +1° Phase to the Fourier ..." << endl;
|
cout << endl << ">> will add +1° Phase to the Fourier ..." << endl;
|
||||||
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PHASE_MINUS) {
|
} else if (id == P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_PHASE_MINUS) {
|
||||||
@ -2001,7 +2003,27 @@ void PMusrCanvas::SaveDataDb()
|
|||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
|
* \param tag
|
||||||
*/
|
*/
|
||||||
void PMusrCanvas::HandleFourier()
|
void PMusrCanvas::HandleFourier(int tag)
|
||||||
{
|
{
|
||||||
|
switch (tag) {
|
||||||
|
case FOURIER_PLOT_REAL:
|
||||||
|
cout << endl << ">> will handle Real Part Fourier ..." << endl;
|
||||||
|
break;
|
||||||
|
case FOURIER_PLOT_IMAG:
|
||||||
|
cout << endl << ">> will handle Imaginary Part Fourier ..." << endl;
|
||||||
|
break;
|
||||||
|
case FOURIER_PLOT_REAL_AND_IMAG:
|
||||||
|
cout << endl << ">> will handle Real+Imaginary Part Fourier ..." << endl;
|
||||||
|
break;
|
||||||
|
case FOURIER_PLOT_POWER:
|
||||||
|
cout << endl << ">> will handle Power Fourier ..." << endl;
|
||||||
|
break;
|
||||||
|
case FOURIER_PLOT_PHASE:
|
||||||
|
cout << endl << ">> will handle Phase Fourier ..." << endl;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,7 @@ class PMusrCanvas : public TObject, public TQObject
|
|||||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
|
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
|
||||||
PMusrCanvas(const int number, const char* title,
|
PMusrCanvas(const int number, const char* title,
|
||||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
||||||
|
PMsrFourierStructure *fourierDefault,
|
||||||
const PIntVector markerList, const PIntVector colorList);
|
const PIntVector markerList, const PIntVector colorList);
|
||||||
virtual ~PMusrCanvas();
|
virtual ~PMusrCanvas();
|
||||||
|
|
||||||
@ -199,6 +200,7 @@ class PMusrCanvas : public TObject, public TQObject
|
|||||||
PMusrCanvasDataList fData;
|
PMusrCanvasDataList fData;
|
||||||
PMusrCanvasNonMusrDataList fNonMusrData;
|
PMusrCanvasNonMusrDataList fNonMusrData;
|
||||||
|
|
||||||
|
PMsrFourierStructure *fFourier;
|
||||||
PIntVector fMarkerList;
|
PIntVector fMarkerList;
|
||||||
PIntVector fColorList;
|
PIntVector fColorList;
|
||||||
|
|
||||||
@ -211,7 +213,7 @@ class PMusrCanvas : public TObject, public TQObject
|
|||||||
virtual void HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunData *data);
|
virtual void HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunData *data);
|
||||||
virtual void HandleNonMusrDataSet(unsigned int plotNo, unsigned int runNo, PRunData *data);
|
virtual void HandleNonMusrDataSet(unsigned int plotNo, unsigned int runNo, PRunData *data);
|
||||||
virtual void HandleDifference();
|
virtual void HandleDifference();
|
||||||
virtual void HandleFourier();
|
virtual void HandleFourier(int tag);
|
||||||
|
|
||||||
virtual double CalculateDiff(const double x, const double y, TH1F *theo);
|
virtual double CalculateDiff(const double x, const double y, TH1F *theo);
|
||||||
virtual double CalculateDiff(const double x, const double y, TGraphErrors *theo);
|
virtual double CalculateDiff(const double x, const double y, TGraphErrors *theo);
|
||||||
|
@ -58,7 +58,7 @@ class PStartupHandler : public TObject, public TQObject
|
|||||||
|
|
||||||
virtual void CheckLists();
|
virtual void CheckLists();
|
||||||
|
|
||||||
virtual const PMsrFourierStructure* GetFourierDefaults() const { return &fFourierDefaults; }
|
virtual PMsrFourierStructure* GetFourierDefaults() { return &fFourierDefaults; }
|
||||||
virtual const PStringVector GetDataPathList() const { return fDataPathList; }
|
virtual const PStringVector GetDataPathList() const { return fDataPathList; }
|
||||||
virtual const PIntVector GetMarkerList() const { return fMarkerList; }
|
virtual const PIntVector GetMarkerList() const { return fMarkerList; }
|
||||||
virtual const PIntVector GetColorList() const { return fColorList; }
|
virtual const PIntVector GetColorList() const { return fColorList; }
|
||||||
|
@ -229,6 +229,7 @@ cout << endl;
|
|||||||
if (startupHandler)
|
if (startupHandler)
|
||||||
musrCanvas = new PMusrCanvas(i, msrHandler->GetMsrTitle()->Data(),
|
musrCanvas = new PMusrCanvas(i, msrHandler->GetMsrTitle()->Data(),
|
||||||
10+i*100, 10+i*100, 800, 600,
|
10+i*100, 10+i*100, 800, 600,
|
||||||
|
startupHandler->GetFourierDefaults(),
|
||||||
startupHandler->GetMarkerList(),
|
startupHandler->GetMarkerList(),
|
||||||
startupHandler->GetColorList());
|
startupHandler->GetColorList());
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user