musrfit  1.9.2
PMusrT0 Class Reference

#include <PMusrT0.h>

Inheritance diagram for PMusrT0:
Collaboration diagram for PMusrT0:

Public Member Functions

 PMusrT0 ()
 
 PMusrT0 (PMusrT0Data &data)
 
virtual Bool_t IsValid ()
 
virtual void Done (Int_t status=0)
 
virtual void HandleCmdKey (Int_t event, Int_t x, Int_t y, TObject *selected)
 
virtual void Quit ()
 
virtual void SetTimeout (Int_t timeout)
 
virtual void SetMsrHandler (PMsrHandler *msrHandler)
 
virtual void InitT0 ()
 
virtual void InitDataAndBkg ()
 
virtual Int_t GetStatus ()
 

Private Member Functions

void ShowDataFileT0Channel ()
 
void HideDataFileT0Channel ()
 
void SetT0Channel ()
 
void SetEstimatedT0Channel ()
 
void SetDataFirstChannel ()
 
void SetDataLastChannel ()
 
void SetBkgFirstChannel ()
 
void SetBkgLastChannel ()
 
void UnZoom ()
 
void ZoomT0 ()
 

Private Attributes

PMsrHandlerfMsrHandler
 msr-file handler More...
 
Int_t fTimeout
 timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place More...
 
Bool_t fValid
 true if raw data set are available, otherwise false More...
 
Int_t fStatus
 0=quit locally, i.e. only a single musrt0 raw data canvas will terminate but not the application, 1=quit the application More...
 
PMusrT0Data fMusrT0Data
 raw muSR run data sets. More...
 
Bool_t fDataAndBkgEnabled
 enable/disable data and background range handling (necessary in connection with grouping and addrun) More...
 
Bool_t fT0Enabled
 enable/disable t0 handling (necessary in connection with grouping and addrun) More...
 
Int_t fT0Estimated
 estimated t0 value (in bins) More...
 
Bool_t fShowT0DataChannel
 
std::unique_ptr< TTimer > fTimeoutTimer
 timeout timer in order to terminate if no action is taking place for too long More...
 
std::unique_ptr< TCanvas > fMainCanvas
 main canvas for the graphical user interface More...
 
std::unique_ptr< TH1F > fHisto
 full raw data histogram More...
 
std::unique_ptr< TH1F > fData
 ranged raw data histogram (first good bin, last good bin) More...
 
std::unique_ptr< TH1F > fBkg
 histogram starting from 'bkg start' up to 'bkg end' More...
 
std::unique_ptr< TLatex > fToDoInfo
 clear text user instruction string More...
 
std::unique_ptr< TLine > fT0Line
 line showing the position of t0 More...
 
std::unique_ptr< TLine > fT0DataLine
 line showing the position of t0 found in the data file More...
 
std::unique_ptr< TLine > fFirstBkgLine
 line showing the start of the background More...
 
std::unique_ptr< TLine > fLastBkgLine
 line showing the end of the background More...
 
std::unique_ptr< TLine > fFirstDataLine
 line showing the start of the data (first good data bin) More...
 
std::unique_ptr< TLine > fLastDataLine
 line showing the end of the data (last good data bin) More...
 
Int_t fPx
 x-position of the cursor More...
 
Int_t fPy
 y-position of the cursor More...
 
Int_t fDataRange [2]
 data range (first good bin, last good bin) More...
 
Int_t fBkgRange [2]
 background range (first bkg bin, last bkg bin) More...
 

Detailed Description

Handles the musrt0 graphical user interface.

The preprocessor tag MAKECLING is used to hide away from rootcling the overly complex spirit header files.

Definition at line 121 of file PMusrT0.h.

Constructor & Destructor Documentation

◆ PMusrT0() [1/2]

PMusrT0::PMusrT0 ( )

◆ PMusrT0() [2/2]

Member Function Documentation

◆ Done()

void PMusrT0::Done ( Int_t  status = 0)
virtual

Signal emitted if the user wants to terminate the application.

Definition at line 540 of file PMusrT0.cpp.

References status.

Referenced by HandleCmdKey(), and Quit().

◆ GetStatus()

virtual Int_t PMusrT0::GetStatus ( )
inlinevirtual

Definition at line 140 of file PMusrT0.h.

References fStatus.

◆ HandleCmdKey()

void PMusrT0::HandleCmdKey ( Int_t  event,
Int_t  x,
Int_t  y,
TObject *  selected 
)
virtual

Filters keyboard and mouse events, and if they are a command key (see below) carries out the necessary actions.

Currently implemented command keys:

  • 'q' close the currently shown canvas
  • 'Q' quite the application
  • 'u' unzoom to the original range
  • 'z' zoom to the region aroung t0
  • 's' show/hide (toggle) the t0 of the data file (if present)
  • 'T' set t0 channel to the estimated t0
  • 't' set t0 channel to the current cursor position
  • 'b' set first background channel
  • 'B' set last background channel
  • 'd' set first good bin channel
  • 'D' set last good bin channel
Parameters
eventevent type
xkeyboard event: character key; mouse event: x-position
ymouse event: y-position
selectednot used

Definition at line 569 of file PMusrT0.cpp.

References Done(), fPx, fPy, fShowT0DataChannel, fStatus, HideDataFileT0Channel(), SetBkgFirstChannel(), SetBkgLastChannel(), SetDataFirstChannel(), SetDataLastChannel(), SetEstimatedT0Channel(), SetT0Channel(), ShowDataFileT0Channel(), UnZoom(), and ZoomT0().

◆ HideDataFileT0Channel()

void PMusrT0::HideDataFileT0Channel ( )
private

Hide the t0 channel from the data file (if currently displayed).

Definition at line 823 of file PMusrT0.cpp.

References fMainCanvas, and fT0DataLine.

Referenced by HandleCmdKey().

◆ InitDataAndBkg()

◆ InitT0()

◆ IsValid()

virtual Bool_t PMusrT0::IsValid ( )
inlinevirtual

Definition at line 127 of file PMusrT0.h.

References fValid.

◆ Quit()

void PMusrT0::Quit ( )
virtual

Slot called when the canvas is closed via the close icon (cross top right corner). It is emitting a global quit singal.

Definition at line 616 of file PMusrT0.cpp.

References Done(), and fStatus.

◆ SetBkgFirstChannel()

void PMusrT0::SetBkgFirstChannel ( )
private

Set the first background channel to the current cursor position and keep the x-position as new first background bin.

Definition at line 1013 of file PMusrT0.cpp.

References fBkg, fBkgRange, fDataAndBkgEnabled, fFirstBkgLine, fHisto, fMainCanvas, fMsrHandler, fMusrT0Data, fPx, fPy, PMusrT0Data::GetDetectorTag(), PMusrT0Data::GetRunNo(), PMUSRT0_BACKWARD, and PMsrHandler::SetMsrBkgRangeEntry().

Referenced by HandleCmdKey().

◆ SetBkgLastChannel()

void PMusrT0::SetBkgLastChannel ( )
private

Set the last background channel to the current cursor position and keep the x-position as new last background bin.

Definition at line 1059 of file PMusrT0.cpp.

References fBkg, fBkgRange, fDataAndBkgEnabled, fHisto, fLastBkgLine, fMainCanvas, fMsrHandler, fMusrT0Data, fPx, fPy, PMusrT0Data::GetDetectorTag(), PMusrT0Data::GetRunNo(), PMUSRT0_BACKWARD, and PMsrHandler::SetMsrBkgRangeEntry().

Referenced by HandleCmdKey().

◆ SetDataFirstChannel()

void PMusrT0::SetDataFirstChannel ( )
private

Set the first good data channel to the current cursor position and keep the x-position as new first good data bin.

Definition at line 921 of file PMusrT0.cpp.

References fData, fDataAndBkgEnabled, fDataRange, fFirstDataLine, fHisto, fMainCanvas, fMsrHandler, fMusrT0Data, fPx, fPy, PMusrT0Data::GetDetectorTag(), PMusrT0Data::GetRunNo(), PMUSRT0_BACKWARD, and PMsrHandler::SetMsrDataRangeEntry().

Referenced by HandleCmdKey().

◆ SetDataLastChannel()

void PMusrT0::SetDataLastChannel ( )
private

Set the last good data channel to the current cursor position and keep the x-position as new last good data bin.

Definition at line 967 of file PMusrT0.cpp.

References fData, fDataAndBkgEnabled, fDataRange, fHisto, fLastDataLine, fMainCanvas, fMsrHandler, fMusrT0Data, fPx, fPy, PMusrT0Data::GetDetectorTag(), PMusrT0Data::GetRunNo(), PMUSRT0_BACKWARD, and PMsrHandler::SetMsrDataRangeEntry().

Referenced by HandleCmdKey().

◆ SetEstimatedT0Channel()

void PMusrT0::SetEstimatedT0Channel ( )
private

◆ SetMsrHandler()

void PMusrT0::SetMsrHandler ( PMsrHandler msrHandler)
virtual

Set the msr-file handler

Parameters
msrHandlermsr-file handler pointer

Definition at line 652 of file PMusrT0.cpp.

References fMsrHandler.

◆ SetT0Channel()

void PMusrT0::SetT0Channel ( )
private

◆ SetTimeout()

void PMusrT0::SetTimeout ( Int_t  timeout)
virtual
Parameters
timeoutafter which the done signal shall be emitted. Given in seconds

Definition at line 630 of file PMusrT0.cpp.

References fTimeout, fTimeoutTimer, and timeout.

◆ ShowDataFileT0Channel()

void PMusrT0::ShowDataFileT0Channel ( )
private

Show the t0 channel from the data file (if present).

Definition at line 800 of file PMusrT0.cpp.

References fHisto, fMainCanvas, fMusrT0Data, fT0DataLine, and PMusrT0Data::GetT0BinData().

Referenced by HandleCmdKey().

◆ UnZoom()

void PMusrT0::UnZoom ( )
private

Unzoom the current histogram

Definition at line 1105 of file PMusrT0.cpp.

References fHisto, and fMainCanvas.

Referenced by HandleCmdKey().

◆ ZoomT0()

void PMusrT0::ZoomT0 ( )
private

Zoom into the histogram region of the t0, and/or estimated t0 range.

Definition at line 1120 of file PMusrT0.cpp.

References fHisto, fMainCanvas, fT0Enabled, fT0Estimated, and fT0Line.

Referenced by HandleCmdKey().

Member Data Documentation

◆ fBkg

std::unique_ptr<TH1F> PMusrT0::fBkg
private

histogram starting from 'bkg start' up to 'bkg end'

Definition at line 166 of file PMusrT0.h.

Referenced by InitDataAndBkg(), SetBkgFirstChannel(), and SetBkgLastChannel().

◆ fBkgRange

Int_t PMusrT0::fBkgRange[2]
private

background range (first bkg bin, last bkg bin)

Definition at line 181 of file PMusrT0.h.

Referenced by ClassImpQ(), InitDataAndBkg(), PMusrT0(), SetBkgFirstChannel(), and SetBkgLastChannel().

◆ fData

std::unique_ptr<TH1F> PMusrT0::fData
private

ranged raw data histogram (first good bin, last good bin)

Definition at line 165 of file PMusrT0.h.

Referenced by InitDataAndBkg(), SetDataFirstChannel(), and SetDataLastChannel().

◆ fDataAndBkgEnabled

Bool_t PMusrT0::fDataAndBkgEnabled
private

enable/disable data and background range handling (necessary in connection with grouping and addrun)

Definition at line 154 of file PMusrT0.h.

Referenced by ClassImpQ(), PMusrT0(), SetBkgFirstChannel(), SetBkgLastChannel(), SetDataFirstChannel(), and SetDataLastChannel().

◆ fDataRange

Int_t PMusrT0::fDataRange[2]
private

data range (first good bin, last good bin)

Definition at line 180 of file PMusrT0.h.

Referenced by ClassImpQ(), InitDataAndBkg(), PMusrT0(), SetDataFirstChannel(), and SetDataLastChannel().

◆ fFirstBkgLine

std::unique_ptr<TLine> PMusrT0::fFirstBkgLine
private

line showing the start of the background

Definition at line 172 of file PMusrT0.h.

Referenced by InitDataAndBkg(), and SetBkgFirstChannel().

◆ fFirstDataLine

std::unique_ptr<TLine> PMusrT0::fFirstDataLine
private

line showing the start of the data (first good data bin)

Definition at line 174 of file PMusrT0.h.

Referenced by InitDataAndBkg(), and SetDataFirstChannel().

◆ fHisto

std::unique_ptr<TH1F> PMusrT0::fHisto
private

◆ fLastBkgLine

std::unique_ptr<TLine> PMusrT0::fLastBkgLine
private

line showing the end of the background

Definition at line 173 of file PMusrT0.h.

Referenced by InitDataAndBkg(), and SetBkgLastChannel().

◆ fLastDataLine

std::unique_ptr<TLine> PMusrT0::fLastDataLine
private

line showing the end of the data (last good data bin)

Definition at line 175 of file PMusrT0.h.

Referenced by InitDataAndBkg(), and SetDataLastChannel().

◆ fMainCanvas

std::unique_ptr<TCanvas> PMusrT0::fMainCanvas
private

◆ fMsrHandler

◆ fMusrT0Data

◆ fPx

Int_t PMusrT0::fPx
private

x-position of the cursor

Definition at line 177 of file PMusrT0.h.

Referenced by HandleCmdKey(), SetBkgFirstChannel(), SetBkgLastChannel(), SetDataFirstChannel(), SetDataLastChannel(), and SetT0Channel().

◆ fPy

Int_t PMusrT0::fPy
private

y-position of the cursor

Definition at line 178 of file PMusrT0.h.

Referenced by HandleCmdKey(), SetBkgFirstChannel(), SetBkgLastChannel(), SetDataFirstChannel(), SetDataLastChannel(), and SetT0Channel().

◆ fShowT0DataChannel

Bool_t PMusrT0::fShowT0DataChannel
private

Definition at line 157 of file PMusrT0.h.

Referenced by ClassImpQ(), HandleCmdKey(), and PMusrT0().

◆ fStatus

Int_t PMusrT0::fStatus
private

0=quit locally, i.e. only a single musrt0 raw data canvas will terminate but not the application, 1=quit the application

Definition at line 150 of file PMusrT0.h.

Referenced by ClassImpQ(), GetStatus(), HandleCmdKey(), PMusrT0(), and Quit().

◆ fT0DataLine

std::unique_ptr<TLine> PMusrT0::fT0DataLine
private

line showing the position of t0 found in the data file

Definition at line 171 of file PMusrT0.h.

Referenced by HideDataFileT0Channel(), and ShowDataFileT0Channel().

◆ fT0Enabled

Bool_t PMusrT0::fT0Enabled
private

enable/disable t0 handling (necessary in connection with grouping and addrun)

Definition at line 155 of file PMusrT0.h.

Referenced by ClassImpQ(), PMusrT0(), SetEstimatedT0Channel(), SetT0Channel(), and ZoomT0().

◆ fT0Estimated

Int_t PMusrT0::fT0Estimated
private

estimated t0 value (in bins)

Definition at line 156 of file PMusrT0.h.

Referenced by PMusrT0(), SetEstimatedT0Channel(), and ZoomT0().

◆ fT0Line

std::unique_ptr<TLine> PMusrT0::fT0Line
private

line showing the position of t0

Definition at line 170 of file PMusrT0.h.

Referenced by InitT0(), SetEstimatedT0Channel(), SetT0Channel(), and ZoomT0().

◆ fTimeout

Int_t PMusrT0::fTimeout
private

timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place

Definition at line 146 of file PMusrT0.h.

Referenced by ClassImpQ(), PMusrT0(), and SetTimeout().

◆ fTimeoutTimer

std::unique_ptr<TTimer> PMusrT0::fTimeoutTimer
private

timeout timer in order to terminate if no action is taking place for too long

Definition at line 159 of file PMusrT0.h.

Referenced by SetTimeout().

◆ fToDoInfo

std::unique_ptr<TLatex> PMusrT0::fToDoInfo
private

clear text user instruction string

Definition at line 168 of file PMusrT0.h.

Referenced by PMusrT0().

◆ fValid

Bool_t PMusrT0::fValid
private

true if raw data set are available, otherwise false

Definition at line 148 of file PMusrT0.h.

Referenced by ClassImpQ(), IsValid(), and PMusrT0().


The documentation for this class was generated from the following files: