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