GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
GRootCommands.h
Go to the documentation of this file.
1#ifndef GROOTCOMMANDS__H
2#define GROOTCOMMANDS__H
3
4#include <string>
5class TTree;
6class TH1;
7class TH2;
8class GH2I;
9class GH2D;
10class GH1D;
11class GMarker;
12class TF1;
13class GPeak;
14class TPeak;
15class GGaus;
16class TFile;
17
18#include "TDirectory.h"
19
21 kGRSIArrowUp = 0x1013,
23 kGRSIArrowDown = 0x1015 };
24
25int LabelPeaks(TH1*, double, double, Option_t* opt = "");
26bool ShowPeaks(TH1**, unsigned int, double sigma = 2.0, double thresh = 0.02);
27bool RemovePeaks(TH1**, unsigned int);
28
29bool Move1DHistogram(const Int_t& key, TH1* histogram = nullptr);
30bool Move2DHistogram(const Int_t& key, TH2* histogram = nullptr);
31
32GPeak* PhotoPeakFit(TH1*, double, double, Option_t* opt = "");
33TPeak* AltPhotoPeakFit(TH1*, double, double, Option_t* opt = "");
34GGaus* GausFit(TH1*, double, double, Option_t* opt = "");
35TF1* DoubleGausFit(TH1*, double, double, double, double, Option_t* opt = "");
36
37std::string MergeStrings(const std::vector<std::string>& strings, char split = '\n');
38
39bool GetProjection(GH2D* hist, double low, double high, double bg_low = 0, double bg_high = 0);
40
41// bool PeakFit(TH1*,Double_t,Double_t,Option_t *opt="");
42
43//
44// Below are in the interpretur commands. (added to the linkdef!)
45//
46
47void Prompt();
48void Help();
49void Commands();
50void Version();
51TH1* GrabHist(int i = 0); // return the ith histogram from the current canvas.
52TF1* GrabFit(int i = 0); // return the ith fit from the current canvas.
53
54void StartGUI();
55bool GUIIsRunning();
56void AddFileToGUI(TFile* file);
57
58enum class EAxis { kXAxis = 1,
59 kYAxis = 2 };
60EAxis operator&(EAxis lhs, EAxis rhs);
61
62TH2* AddOffset(TH2* mat, double offset, EAxis axis = EAxis::kXAxis);
63
64#endif
bool Move2DHistogram(const Int_t &key, TH2 *histogram=nullptr)
EAxis
bool ShowPeaks(TH1 **, unsigned int, double sigma=2.0, double thresh=0.02)
void AddFileToGUI(TFile *file)
void Help()
EAxis operator&(EAxis lhs, EAxis rhs)
TH1 * GrabHist(int i=0)
GRSIArrowPress
@ kGRSIArrowLeft
@ kGRSIArrowRight
@ kGRSIArrowDown
@ kGRSIArrowUp
bool Move1DHistogram(const Int_t &key, TH1 *histogram=nullptr)
TF1 * DoubleGausFit(TH1 *, double, double, double, double, Option_t *opt="")
TH2 * AddOffset(TH2 *mat, double offset, EAxis axis=EAxis::kXAxis)
GGaus * GausFit(TH1 *, double, double, Option_t *opt="")
void Prompt()
void Commands()
GPeak * PhotoPeakFit(TH1 *, double, double, Option_t *opt="")
TPeak * AltPhotoPeakFit(TH1 *, double, double, Option_t *opt="")
std::string MergeStrings(const std::vector< std::string > &strings, char split='\n')
bool GUIIsRunning()
void StartGUI()
bool GetProjection(GH2D *hist, double low, double high, double bg_low=0, double bg_high=0)
int LabelPeaks(TH1 *, double, double, Option_t *opt="")
void Version()
bool RemovePeaks(TH1 **, unsigned int)
TF1 * GrabFit(int i=0)
TH2D * mat
Definition UserFillObj.h:12
TH1D * hist
Definition UserFillObj.h:3
Definition GGaus.h:9
Definition GH1D.h:17
Definition GH2D.h:18
Definition GH2I.h:17
Definition GPeak.h:11
Definition TPeak.h:28