![]() |
ATLAS Offline Software
|
navigates through the directory structure of a file copying the histograms or recalculating efficiencies, or refitting Resplots if it finds any More...
#include <iostream>#include <vector>#include <string>#include <stdio.h>#include "TKey.h"#include "TH1D.h"#include "TH2D.h"#include "TFile.h"#include "TClass.h"#include "simpletimer.h"#include "dataset.h"#include "TrigInDetAnalysis/Efficiency1D.h"#include "Resplot.h"#include <cstdlib>Go to the source code of this file.
Functions | |
| bool | contains (const std::string &s, const std::string ®ex) |
| does a string contain the substring | |
| bool | handleEfficiency (TDirectory *tnd) |
| bool | isResplot (TDirectory *tnd) |
| void | search (TDirectory *td=0, const std::string &s="") |
| recursive directory search for TH1 and TH2 | |
| bool | file_exists (const std::string &s) |
| void | cost (const std::string &inputfile, const std::string &outputfile) |
| int | usage (std::ostream &s, int argc, char **argv) |
| int | main (int argc, char **argv) |
Variables | |
| std::vector< TFile * > | fptr |
| file names and file pointers | |
| struct timeval | global_timer |
| glabal timer - how long have I taken so far? | |
| std::string | depth = "" |
| tag string for intendation | |
| int | ir =0 |
| counter of the current depth | |
navigates through the directory structure of a file copying the histograms or recalculating efficiencies, or refitting Resplots if it finds any
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
Definition in file refit.cxx.
| bool contains | ( | const std::string & | s, |
| const std::string & | regex ) |
| void cost | ( | const std::string & | inputfile, |
| const std::string & | outputfile ) |
no point doing anything if there is only 1 input file because there would be nothing to add to it
don't over write esisting files
copy the first file so we add to this copy
don't bother to open the first file - we've copied it to the output and will update the contents
open the output file
recursively look through the directory structure
don't need to write the histogram again - writing them as we go along
Definition at line 293 of file refit.cxx.
| bool file_exists | ( | const std::string & | s | ) |
| bool handleEfficiency | ( | TDirectory * | tnd | ) |
hooray !!!
Definition at line 58 of file refit.cxx.
| bool isResplot | ( | TDirectory * | tnd | ) |
Definition at line 122 of file refit.cxx.
| int main | ( | int | argc, |
| char ** | argv ) |
if output file is not defined
check som input files
Definition at line 368 of file refit.cxx.
| void search | ( | TDirectory * | td = 0, |
| const std::string & | s = "" ) |
recursive directory search for TH1 and TH2
don;t go more than 10 directories deep
Definition at line 166 of file refit.cxx.
| int usage | ( | std::ostream & | s, |
| int | argc, | ||
| char ** | argv ) |
| struct timeval global_timer |