![]() |
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 More... | |
| 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 More... | |
| 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 More... | |
| bool | exists (const std::string &filename) |
| does a file exist More... | |
| std::string | tail (std::string s, const std::string &pattern) |
| tail of a string More... | |
| std::string | head (std::string s, const std::string &pattern) |
| head of a string More... | |
| std::string | globbed (const std::string &s) |
| match a file name More... | |
| 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 More... | |
| 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 More... | |
| 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 |
| int | colours [6] |
| int | markers [6] |
| double | msizes [6] |
Copyright (C) 2002-2025 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::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 TTree of release info from one directory to another
Definition at line 620 of file computils.cxx.
| bool empty | ( | TH1 * | h | ) |
| double Entries | ( | TH1 * | h | ) |
| bool exists | ( | const std::string & | filename | ) |
does a string contain the substring 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 547 of file computils.cxx.
| std::string findrun | ( | TFile * | f | ) |
| std::vector<int> findxrange | ( | TH1 * | h, |
| bool | symmetric = false |
||
| ) |
automatically set the xrange on a histogram
zoom on non-empty bins
Definition at line 448 of file computils.cxx.
| std::vector<double> findxrangeuser | ( | TH1 * | h, |
| bool | symmetric = false |
||
| ) |
Definition at line 525 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 | ||
| ) |
| void Norm | ( | TH1 * | h, |
| double | scale = 1 |
||
| ) |
Definition at line 67 of file computils.cxx.
|
inline |
| std::ostream& operator<< | ( | std::ostream & | s, |
| std::vector< T > & | v | ||
| ) |
| 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 381 of file computils.cxx.
| double realmin | ( | TH1 * | h, |
| bool | include_error = true, |
||
| double | lo = 0, |
||
| double | hi = 0 |
||
| ) |
Definition at line 408 of file computils.cxx.
| void setParameters | ( | T * | h, |
| TGraphAsymmErrors * | tg | ||
| ) |
Definition at line 436 of file computils.h.
| std::string stime | ( | ) |
| 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 517 of file computils.cxx.
| void zeroErrors | ( | T * | h | ) |
| int colours[6] |
Definition at line 46 of file computils.cxx.
| bool LINEF |
Definition at line 40 of file computils.cxx.
| bool LINES |
Definition at line 41 of file computils.cxx.
| int markers[6] |
Definition at line 47 of file computils.cxx.
| double msizes[6] |
Definition at line 48 of file computils.cxx.
1.8.18