#ifndef ROOT_VSPlot #define ROOT_VSPlot //*-- Modified : v0r51 07/11/00 by Damir Buskulic //*-- Modified : v0r49 21/06/00 by Damir Buskulic //*-- Modified : v0r48 30/05/00 by Damir Buskulic //*-- Modified : v0r47 14/04/00 by Damir Buskulic //*-- Modified : v0r45 11/11/99 by Damir Buskulic //*-- Modified : dev version 10/12/98 by Damir Buskulic //*-- Author : Damir Buskulic 15/09/98 ////////////////////////////////////////////////////////////////////////// // // // VSPlot // // // // class describing a plot (representation) of a series // // // ////////////////////////////////////////////////////////////////////////// #include "TNamed.h" #include "TH1.h" #include "TF1.h" #include "TArray.h" #include "VManager.h" #include "VGPSTime.h" class TObject; class VManager; class VSPlot : public TH1D { private : VManager* mManager; // Manager maintaining this plot VGPSTime mGPSStart; // Start time of the series for this plot Double_t mStep; // Step (sample) size of the series for this plot Int_t mLeapS; // leap seconds for calculating UTC time Int_t mLocalTime; // offset factor for calculating local time Int_t fStartTimeDisplay; //on/off Flag to display start time below axis // call it fStart... and not mStart... because of // a bug in handling of popup menus (TOGGLE option) Double_t mStartTimeXOffset; // X offset for start time display Double_t mStartTimeYOffset; // Y offset for start time display TString mUnitX; // units on the X axis TString mUnitY; // units on the Y axis void BuildVSP(); public : VSPlot(); VSPlot(Text_t* name, Text_t* title, Int_t nbinsx, Axis_t xlow, Axis_t xup, VManager* serie); VSPlot(Text_t* name, Text_t* title, Int_t nbinsx, Axis_t xlow, Axis_t xup); VSPlot(Text_t* name, Text_t* title, Text_t* asciifilename); VSPlot(Text_t* name, Text_t* title, Int_t nbinsx, Axis_t* xbins); VSPlot(VSPlot& vsplot); ~VSPlot(); void Copy(TObject& newvsp); void AdoptManager(VManager* mgr); // Adopt the manager as the maintainer of this plot void AbandonManager(); // Removes this plot from the maintenance of this manager Int_t DistancetoPrimitive(Int_t px, Int_t py); // Distance to the plot in pixels TH1* DrawCopy(Option_t *option); VManager* GetManager() const {return mManager;} // Origin object of this VSPlot VGPSTime GetGPSStart() {return mGPSStart;} // True gps time start for this plot Double_t GetStep() {return mStep;} // offset for this plot Int_t GetLocalTime() {return mLocalTime;} // local time for this plot Int_t GetLeapS() {return mLeapS;} // Leap seconds for this plot Stat_t GetAverageLevel(); // Average level of the signal for this plot char* GetObjectInfo(Int_t px, Int_t py) const; Stat_t GetPlotRMS(); Int_t GetStartTimeDisplay() {return fStartTimeDisplay;} Double_t GetStartTimeXOffset() {return mStartTimeXOffset;} Double_t GetStartTimeYOffset() {return mStartTimeYOffset;} void GetStats(Stat_t *stats); void SetStep(Double_t step) {mStep = step;} void SetGPSStart(Double_t gpsstart); void SetGPSStart(UInt_t gpsstartS, UInt_t gpsstartNS); void SetLocalTime(Int_t localtime) {mLocalTime = localtime;} void SetLeapS(Int_t leaps) {mLeapS = leaps;} void SetStartTimeDisplay(Int_t mode) {fStartTimeDisplay = mode;} //*TOGGLE* void SetStartTimeXOffset(Double_t offset) {mStartTimeXOffset = offset;} //*MENU* *ARGS={offset=>mStartTimeXOffset} void SetStartTimeYOffset(Double_t offset) {mStartTimeYOffset = offset;} //*MENU* *ARGS={offset=>mStartTimeYOffset} Int_t ShiftAppend(Int_t nval, Double_t* values); void Paint(Option_t* option); void PaintStatVS(Int_t dostat, TF1 *fit); ClassDef(VSPlot,2) // Description of a plot-representation of a series }; #endif