![]() |
ATLAS Offline Software
|
#include <iostream>#include <string>#include <vector>#include <cstdio>#include <cstdlib>#include <exception>#include "label.h"#include "utils.h"#include "DrawLabel.h"#include "TStyle.h"#include "TPad.h"#include "TH1D.h"#include "TFile.h"#include "TH1.h"#include "TGraphAsymmErrors.h"#include "TLegend.h"#include <cmath>Go to the source code of this file.
Classes | |
| class | data_mismatch |
| class | true_mean |
| class | AxisInfo |
| class to store information about axes, limits, whether it is log or linear scale etc More... | |
| class | Legend |
| slightly more convenient legend class More... | |
| class | tPlotter< T > |
| generic plotter class - better to have one of these - make sure it can be configured however you like, line styles, marker types, legends etc now a template so can be used for TH1D and TH2D etc More... | |
| class | Plots |
| set of generic plots More... | |
| class | HistDetails |
| details of the histogram axes etc More... | |
| class | Panel |
Typedefs | |
| typedef tPlotter< TH1F > | Plotter |
Functions | |
| void | ATLASFORAPP_LABEL (double x, double y, int color, double size=0.06) |
| void | myText (Double_t x, Double_t y, Color_t color, const std::string &text, Double_t tsize) |
| std::string | stime () |
| return the current data and time | |
| double | integral (TH1 *h) |
| void | Norm (TH1 *h, double scale=1) |
| double | Entries (TH1 *h) |
| bool | contains (const std::string &s, const std::string &p) |
| does a string contain the substring | |
| bool | contains (const std::string &s, char p) noexcept |
| bool | fcontains (const std::string &s, const std::string &p) |
| does a string contain the substring at the beginning of the string | |
| bool | exists (const std::string &filename) |
| does a file exist | |
| std::string | tail (std::string s, const std::string &pattern) |
| tail of a string | |
| std::string | head (std::string s, const std::string &pattern) |
| head of a string | |
| std::string | globbed (const std::string &s) |
| match a file name | |
| void | contents (std::vector< std::string > &keys, TDirectory *td, const std::string &directory="", const std::string &pattern="", const std::string &path="") |
| void | contents (std::vector< std::string > &keys, TDirectory *td, const std::string &directory="", const std::vector< std::string > &patterns=std::vector< std::string >(), const std::string &path="") |
| double | realmax (TH1 *h, bool include_error=true, double lo=0, double hi=0) |
| double | realmin (TH1 *h, bool include_error=true, double lo=0, double hi=0) |
| std::string | findcell (std::string name, const std::string ®ex, const std::string &splitex="/") |
| std::string | findrun (TFile *f) |
| double | plotable (TH1 *h) |
| template<typename T> | |
| std::ostream & | operator<< (std::ostream &s, std::vector< T > &v) |
| std::vector< int > | findxrange (TH1 *h, bool symmetric=false) |
| automatically set the xrange on a histogram | |
| std::vector< double > | findxrangeuser (TH1 *h, bool symmetric=false) |
| void | trim_tgraph (TH1 *h, TGraphAsymmErrors *t) |
| void | xrange (TH1 *h, bool symmetric=true) |
| void | copyReleaseInfo (TFile *finput, TFile *foutdir) |
| copy the TTree of release info from one directory to another | |
| std::ostream & | operator<< (std::ostream &s, const AxisInfo &a) |
| template<typename T> | |
| void | setParameters (T *h, TGraphAsymmErrors *tg) |
| template<typename T> | |
| void | zeroErrors (T *h) |
| bool | empty (TH1 *h) |
| void | hminus (TH1 *h) |
| std::ostream & | operator<< (std::ostream &s, const HistDetails &h) |
| std::ostream & | operator<< (std::ostream &s, const Panel &p) |
Variables | |
| bool | LINEF |
| bool | LINES |
| static std::string | release |
| int | colours [6] |
| int | markers [6] |
| double | msizes [6] |
| template<typename T> | |
| bool | tPlotter< T >::s_plotref = true |
| use non c++17 format for improved external compatability | |
| template<typename T> | |
| bool | tPlotter< T >::s_meanplotref = true |
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
Definition in file computils.h.
Definition at line 886 of file computils.h.
| void ATLASFORAPP_LABEL | ( | double | x, |
| double | y, | ||
| int | color, | ||
| double | size = 0.06 ) |
Definition at line 188 of file computils.cxx.
|
noexcept |
Definition at line 39 of file chainparser.cxx.
| void contents | ( | std::vector< std::string > & | keys, |
| TDirectory * | td, | ||
| const std::string & | directory = "", | ||
| const std::string & | pattern = "", | ||
| const std::string & | path = "" ) |
Definition at line 321 of file computils.cxx.
| void contents | ( | std::vector< std::string > & | keys, |
| TDirectory * | td, | ||
| const std::string & | directory = "", | ||
| const std::vector< std::string > & | patterns = std::vector< std::string >(), | ||
| const std::string & | path = "" ) |
directory, cd to it ...
test to see whether we are searhing for a specific directory name not a directory so include this ...
Definition at line 331 of file computils.cxx.
| void copyReleaseInfo | ( | TFile * | finput, |
| TFile * | foutdir ) |
copy the TTree of release info from one directory to another
copy the release info TTree
copy the TTree of release info from one directory to another
Definition at line 621 of file computils.cxx.
| bool empty | ( | TH1 * | h | ) |
Definition at line 296 of file computils.cxx.
| double Entries | ( | TH1 * | h | ) |
Definition at line 52 of file computils.cxx.
| bool exists | ( | const std::string & | filename | ) |
does a string contain the substring at the beginning of the string
contains a string at the beginning of the string
does a string contain the substring at the beginning of the string
Definition at line 234 of file computils.cxx.
| std::string findcell | ( | std::string | name, |
| const std::string & | regex, | ||
| const std::string & | splitex = "/" ) |
Definition at line 548 of file computils.cxx.
| std::string findrun | ( | TFile * | f | ) |
go through sub directories
Definition at line 576 of file computils.cxx.
| std::vector< int > findxrange | ( | TH1 * | h, |
| bool | symmetric = false ) |
automatically set the xrange on a histogram
zoom on non-empty bins
Definition at line 449 of file computils.cxx.
| std::vector< double > findxrangeuser | ( | TH1 * | h, |
| bool | symmetric = false ) |
Definition at line 526 of file computils.cxx.
| std::string globbed | ( | const std::string & | s | ) |
match a file name
glob for a file based on the pattern, then return the name of the first matching file
Definition at line 264 of file computils.cxx.
| std::string head | ( | std::string | s, |
| const std::string & | pattern ) |
|
inline |
| double integral | ( | TH1 * | h | ) |
| void myText | ( | Double_t | x, |
| Double_t | y, | ||
| Color_t | color, | ||
| const std::string & | text, | ||
| Double_t | tsize ) |
Definition at line 205 of file computils.cxx.
| void Norm | ( | TH1 * | h, |
| double | scale = 1 ) |
Definition at line 67 of file computils.cxx.
Definition at line 322 of file computils.h.
|
inline |
Definition at line 1375 of file computils.h.
| std::ostream & operator<< | ( | std::ostream & | s, |
| std::vector< T > & | v ) |
Definition at line 109 of file computils.h.
| double plotable | ( | TH1 * | h | ) |
Definition at line 239 of file computils.cxx.
| double realmax | ( | TH1 * | h, |
| bool | include_error = true, | ||
| double | lo = 0, | ||
| double | hi = 0 ) |
Definition at line 382 of file computils.cxx.
| double realmin | ( | TH1 * | h, |
| bool | include_error = true, | ||
| double | lo = 0, | ||
| double | hi = 0 ) |
Definition at line 409 of file computils.cxx.
| void setParameters | ( | T * | h, |
| TGraphAsymmErrors * | tg ) |
Definition at line 436 of file computils.h.
| std::string stime | ( | ) |
return the current data and time
Definition at line 215 of file computils.cxx.
| std::string tail | ( | std::string | s, |
| const std::string & | pattern ) |
| void trim_tgraph | ( | TH1 * | h, |
| TGraphAsymmErrors * | t ) |
Definition at line 153 of file computils.cxx.
| void xrange | ( | TH1 * | h, |
| bool | symmetric = true ) |
Definition at line 518 of file computils.cxx.
| void zeroErrors | ( | T * | h | ) |
|
extern |
Definition at line 46 of file computils.cxx.
|
extern |
Definition at line 40 of file computils.cxx.
|
extern |
Definition at line 41 of file computils.cxx.
|
extern |
Definition at line 47 of file computils.cxx.
|
extern |
Definition at line 48 of file computils.cxx.
|
static |
Definition at line 50 of file computils.h.
| bool tPlotter< T >::s_meanplotref = true |
Definition at line 895 of file computils.h.
| bool tPlotter< T >::s_plotref = true |
use non c++17 format for improved external compatability
Definition at line 891 of file computils.h.