ATLAS Offline Software
|
#include <stdlib.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <glob.h>
#include <stdint.h>
#include <iostream>
#include <string>
#include <vector>
#include "label.h"
#include "DrawLabel.h"
#include "TFile.h"
#include "TKey.h"
#include "TTree.h"
#include "TList.h"
#include "TObject.h"
#include "TDirectory.h"
#include "TH1D.h"
#include "TLegend.h"
#include "TColor.h"
#include "computils.h"
Go to the source code of this file.
Classes | |
union | floaty_t |
Functions | |
double | Entries (TH1 *h) |
double | integral (TH1 *h) |
void | Norm (TH1 *h, double scale) |
bool | almost_equal (floaty_t a, floaty_t b, int max_diff) |
bool | almost_equal (float a, float b, int max_diff) |
bool | operator== (floaty_t a, floaty_t b) |
void | trim_tgraph (TH1 *h, TGraphAsymmErrors *t) |
void | ATLASFORAPP_LABEL (double x, double y, int color, double size) |
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... | |
bool | contains (const std::string &s, const std::string &p) |
contains a string More... | |
bool | contains (const std::string &s, char p) noexcept |
bool | fcontains (const std::string &s, const std::string &p) |
contains a string at the beginning of the string More... | |
double | plotable (TH1 *h) |
bool | exists (const std::string &filename) |
does a file exist More... | |
std::string | globbed (const std::string &s) |
match a file name More... | |
bool | empty (TH1 *h) |
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... | |
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, const std::string &path) |
double | realmax (TH1 *h, bool include_error, double lo, double hi) |
double | realmin (TH1 *h, bool, double lo, double hi) |
double | hmean (TH1 *h) |
std::vector< int > | findxrange (TH1 *h, bool symmetric) |
automatically set the xrange on a histogram More... | |
void | xrange (TH1 *h, bool symmetric) |
std::vector< double > | findxrangeuser (TH1 *h, bool symmetric) |
void | xrangeuser (TH1 *h, bool symmetric) |
std::string | findcell (std::string name, const std::string ®ex, const std::string &splitex) |
std::string | findrun (TFile *f) |
void | copyReleaseInfo (TFile *finput, TFile *foutdir) |
copy the release info TTree More... | |
Variables | |
bool | LINEF = true |
bool | LINES = false |
int | colours [6] = { 1, 2, kBlue-4, 6, kCyan-2, kMagenta+2 } |
int | markers [6] = { 20, 24, 25, 26, 25, 22 } |
double | msizes [6] = { 0.85, 1, 1, 1, 1, 1 } |
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Definition in file computils.cxx.
bool almost_equal | ( | float | a, |
float | b, | ||
int | max_diff | ||
) |
Definition at line 140 of file computils.cxx.
Definition at line 124 of file computils.cxx.
void ATLASFORAPP_LABEL | ( | double | x, |
double | y, | ||
int | color, | ||
double | size | ||
) |
Definition at line 186 of file computils.cxx.
|
noexcept |
Definition at line 226 of file computils.cxx.
void contents | ( | std::vector< std::string > & | keys, |
TDirectory * | td, | ||
const std::string & | directory, | ||
const std::vector< std::string > & | patterns, | ||
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 329 of file computils.cxx.
void copyReleaseInfo | ( | TFile * | finput, |
TFile * | foutdir | ||
) |
copy the release info TTree
copy the TTree of release info from one directory to another
Definition at line 618 of file computils.cxx.
bool empty | ( | TH1 * | h | ) |
double Entries | ( | TH1 * | h | ) |
bool exists | ( | const std::string & | filename | ) |
contains a string at the beginning of the string
does a string contain the substring at the beginning of the string
Definition at line 232 of file computils.cxx.
Definition at line 545 of file computils.cxx.
std::string findrun | ( | TFile * | f | ) |
std::vector<int> findxrange | ( | TH1 * | h, |
bool | symmetric | ||
) |
automatically set the xrange on a histogram
zoom on non-empty bins
Definition at line 446 of file computils.cxx.
std::vector<double> findxrangeuser | ( | TH1 * | h, |
bool | symmetric | ||
) |
Definition at line 523 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 262 of file computils.cxx.
std::string head | ( | std::string | s, |
const std::string & | pattern | ||
) |
double hmean | ( | TH1 * | h | ) |
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 | ||
) |
Definition at line 65 of file computils.cxx.
use a maximum 5 float separation between the two - could be more precise
Definition at line 145 of file computils.cxx.
double plotable | ( | TH1 * | h | ) |
Definition at line 237 of file computils.cxx.
double realmax | ( | TH1 * | h, |
bool | include_error, | ||
double | lo, | ||
double | hi | ||
) |
Definition at line 379 of file computils.cxx.
double realmin | ( | TH1 * | h, |
bool | , | ||
double | lo, | ||
double | hi | ||
) |
Definition at line 406 of file computils.cxx.
std::string stime | ( | ) |
std::string tail | ( | std::string | s, |
const std::string & | pattern | ||
) |
void trim_tgraph | ( | TH1 * | h, |
TGraphAsymmErrors * | t | ||
) |
Definition at line 151 of file computils.cxx.
void xrange | ( | TH1 * | h, |
bool | symmetric | ||
) |
Definition at line 515 of file computils.cxx.
void xrangeuser | ( | TH1 * | h, |
bool | symmetric | ||
) |
Definition at line 538 of file computils.cxx.
int colours[6] = { 1, 2, kBlue-4, 6, kCyan-2, kMagenta+2 } |
Definition at line 44 of file computils.cxx.
bool LINEF = true |
Definition at line 38 of file computils.cxx.
bool LINES = false |
Definition at line 39 of file computils.cxx.
int markers[6] = { 20, 24, 25, 26, 25, 22 } |
Definition at line 45 of file computils.cxx.
double msizes[6] = { 0.85, 1, 1, 1, 1, 1 } |
Definition at line 46 of file computils.cxx.