some more steps toward musrview

This commit is contained in:
nemu
2008-04-04 14:29:56 +00:00
parent 0652495a3f
commit f4f6fcb058
13 changed files with 385 additions and 172 deletions

View File

@@ -251,6 +251,7 @@ typedef vector<PMsrPlotStructure> PMsrPlotList;
*/
typedef struct {
PMsrLines fStatLines;
TString fDate; ///< string holding fitting date and time
bool fChisq; ///< flag telling if min = chi2 or min = max.likelyhood
double fMin; ///< chi2 or max. likelyhood
unsigned int fNdf; ///< number of degrees of freedom

View File

@@ -36,9 +36,15 @@
#include <TQObject.h>
#include <TCanvas.h>
#include <TPaveText.h>
#include <TLegend.h>
#include <TPad.h>
#include <TH1F.h>
#include "PMusr.h"
#ifndef __MAKECINT__
#include "PMsrHandler.h"
#include "PRunListCollection.h"
#endif
#define YINFO 0.1
#define YTITLE 0.95
@@ -46,23 +52,27 @@
//--------------------------------------------------------------------------
/**
* <p>
* <p>The preprocessor tag __MAKECINT__ is used to hide away from rootcint
* the overly complex spirit header files.
*/
class PMusrCanvas : public TObject, public TQObject
{
public:
PMusrCanvas();
PMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
PMusrCanvas(const int number, const char* title,
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
const PIntVector markerList, const PIntVector colorList);
virtual ~PMusrCanvas();
virtual Bool_t IsValid() { return fValid; }
virtual void SetParameterList(PMsrParamList &paramList);
virtual void SetTheoryList(PMsrLines &theoryList);
virtual void SetFunctionList(PMsrLines &functionList);
#ifndef __MAKECINT__
virtual void SetMsrHandler(PMsrHandler *msrHandler) { fMsrHandler = msrHandler; }
virtual void SetRunListCollection(PRunListCollection *runList) { fRunList = runList; }
#endif
virtual void UpdateParamTheoryPad();
virtual void UpdateDataTheoryPad();
virtual void UpdateInfoPad();
virtual void Done(Int_t status=0); // *SIGNAL*
@@ -70,21 +80,25 @@ class PMusrCanvas : public TObject, public TQObject
private:
Bool_t fValid;
Int_t fPlotNumber;
TCanvas *fMainCanvas;
TPaveText *fTitlePad;
TPad *fDataTheoryPad;
TPaveText *fParameterTheoryPad;
TPaveText *fInfoPad;
TLegend *fInfoPad;
TPaveText *fKeyboardHandlerText;
PMsrParamList fParamList;
PMsrLines fTheoryList;
PMsrLines fFunctionList;
#ifndef __MAKECINT__
PMsrHandler *fMsrHandler;
PRunListCollection *fRunList;
#endif
PIntVector fMarkerList;
PIntVector fColorList;
vector<TH1F*> fData;
PIntVector fMarkerList;
PIntVector fColorList;
ClassDef(PMusrCanvas, 1)
};

View File

@@ -41,7 +41,6 @@ using namespace std;
#include "PMsrHandler.h"
#include "PRunDataHandler.h"
#include "PTheory.h"
//#include "PFunctions.h"
//------------------------------------------------------------------------------------------
/**
@@ -70,6 +69,7 @@ class PRunBase
virtual void CalcTheory() = 0; // pure virtual, i.e. needs to be implemented by the deriving class!!
virtual unsigned int GetRunNo() { return fRunNo; }
virtual PRunData* GetData() { return &fData; }
virtual void CleanUp();
virtual bool IsValid() { return fValid; }
@@ -77,7 +77,7 @@ class PRunBase
protected:
bool fValid;
int fRunNo; ///< number of the run within the msr file
unsigned int fRunNo; ///< number of the run within the msr file
PMsrHandler *fMsrInfo; ///< msr-file handler
PMsrRunStructure *fRunInfo; ///< run info used to filter out needed infos for the run
PRunDataHandler *fRawData; ///< holds the raw run data

View File

@@ -49,6 +49,8 @@ class PRunListCollection
PRunListCollection(PMsrHandler *msrInfo, PRunDataHandler *data);
virtual ~PRunListCollection();
enum EDataSwitch { kIndex, kRunNo };
virtual bool Add(int runNo);
virtual double GetSingleHistoChisq(const std::vector<double>& par);
@@ -68,10 +70,10 @@ class PRunListCollection
virtual unsigned int GetNoOfRRF() { return fRunRRFList.size(); }
virtual unsigned int GetNoOfNonMusr() { return fRunNonMusrList.size(); }
virtual PRunData* GetSingleHisto(unsigned int index);
virtual PRunData* GetAsymmetry(unsigned int index);
virtual PRunData* GetRRF(unsigned int index);
virtual PRunData* GetNonMusr(unsigned int index);
virtual PRunData* GetSingleHisto(unsigned int index, EDataSwitch tag=kIndex);
virtual PRunData* GetAsymmetry(unsigned int index, EDataSwitch tag=kIndex);
virtual PRunData* GetRRF(unsigned int index, EDataSwitch tag=kIndex);
virtual PRunData* GetNonMusr(unsigned int index, EDataSwitch tag=kIndex);
private:
PMsrHandler *fMsrInfo; ///< keeps all msr file info

View File

@@ -39,11 +39,11 @@
#include "PMsrHandler.h"
#include <gsl_sf_hyperg.h>
extern "C" {
double gsl_sf_hyperg_1F1(double a, double b, double x);
}
// #include <gsl_sf_hyperg.h>
//
// extern "C" {
// double gsl_sf_hyperg_1F1(double a, double b, double x);
// }
// --------------------------------------------------------
// function handling tags