Fork me on GitHub

Ignore:
Timestamp:
Feb 12, 2019, 9:29:17 PM (5 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, llp, master
Children:
6455202
Parents:
45e58be
Message:

apply .clang-format to all .h, .cc and .cpp files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/ExRootAnalysis/ExRootResult.cc

    r45e58be r341014c  
    1212#include "ExRootAnalysis/ExRootUtilities.h"
    1313
    14 #include "TROOT.h"
     14#include "TCanvas.h"
     15#include "TClass.h"
    1516#include "TFile.h"
    16 #include "TClass.h"
    17 #include "TStyle.h"
    18 #include "TCanvas.h"
    19 #include "TLegend.h"
    20 #include "TPaveText.h"
    21 #include "TPaveStats.h"
    22 #include "TList.h"
     17#include "TFolder.h"
    2318#include "TH2.h"
    2419#include "THStack.h"
     20#include "TLegend.h"
     21#include "TList.h"
     22#include "TObjArray.h"
     23#include "TPaveStats.h"
     24#include "TPaveText.h"
    2525#include "TProfile.h"
    26 #include "TObjArray.h"
    27 #include "TFolder.h"
     26#include "TROOT.h"
     27#include "TStyle.h"
    2828
    2929#include <iostream>
     
    3737//------------------------------------------------------------------------------
    3838
    39 ExRootResult::ExRootResult() : fCanvas(0), fFolder(0)
     39ExRootResult::ExRootResult() :
     40  fCanvas(0), fFolder(0)
    4041{
    4142}
     
    4546ExRootResult::~ExRootResult()
    4647{
    47   set<TObject*>::iterator itPool;
     48  set<TObject *>::iterator itPool;
    4849  for(itPool = fPool.begin(); itPool != fPool.end(); ++itPool)
    4950  {
     
    6869  TFile *file = new TFile(fileName, "RECREATE");
    6970  file->cd();
    70   std::map<TObject*, PlotSettings>::iterator itPlotMap;
     71  std::map<TObject *, PlotSettings>::iterator itPlotMap;
    7172  for(itPlotMap = fPlotMap.begin(); itPlotMap != fPlotMap.end(); ++itPlotMap)
    7273  {
     
    123124  // gStyle->SetOptFit(101);
    124125
    125   fCanvas = static_cast<TCanvas*>(gROOT->FindObject("c1"));
     126  fCanvas = static_cast<TCanvas *>(gROOT->FindObject("c1"));
    126127  if(fCanvas)
    127128  {
     
    154155  if(!plot) return;
    155156
    156   std::map<TObject*, PlotSettings>::iterator itPlotMap = fPlotMap.find(plot);
     157  std::map<TObject *, PlotSettings>::iterator itPlotMap = fPlotMap.find(plot);
    157158  if(itPlotMap != fPlotMap.end())
    158159  {
     
    178179  if(plot->IsA()->InheritsFrom(TH1::Class()))
    179180  {
    180     histogram = static_cast<TH1*>(plot);
    181   }
    182 
    183   map<TObject*, PlotSettings>::iterator itPlotMap = fPlotMap.find(plot);
     181    histogram = static_cast<TH1 *>(plot);
     182  }
     183
     184  map<TObject *, PlotSettings>::iterator itPlotMap = fPlotMap.find(plot);
    184185  if(itPlotMap != fPlotMap.end())
    185186  {
     
    224225  TCanvas *canvas = GetCanvas();
    225226
    226   map<TObject*, PlotSettings>::iterator itPlotMap;
     227  map<TObject *, PlotSettings>::iterator itPlotMap;
    227228
    228229  for(itPlotMap = fPlotMap.begin(); itPlotMap != fPlotMap.end(); ++itPlotMap)
     
    236237    if(object->IsA()->InheritsFrom(TH1::Class()))
    237238    {
    238       histogram = static_cast<TH1*>(object);
     239      histogram = static_cast<TH1 *>(object);
    239240    }
    240241    else if(object->IsA()->InheritsFrom(THStack::Class()))
    241242    {
    242       stack = static_cast<THStack*>(object);
    243       histogram = static_cast<TH1*>(stack->GetHists()->First());
     243      stack = static_cast<THStack *>(object);
     244      histogram = static_cast<TH1 *>(stack->GetHists()->First());
    244245    }
    245246
     
    271272    if(histogram)
    272273    {
    273       stats = static_cast<TPaveStats*>(histogram->FindObject("stats"));
     274      stats = static_cast<TPaveStats *>(histogram->FindObject("stats"));
    274275      if(stats)
    275276      {
     
    300301
    301302TH1 *ExRootResult::AddHist1D(const char *name, const char *title,
    302                              const char *xlabel, const char *ylabel,
    303                              Int_t nxbins, Axis_t xmin, Axis_t xmax,
    304                              Int_t logx, Int_t logy)
     303  const char *xlabel, const char *ylabel,
     304  Int_t nxbins, Axis_t xmin, Axis_t xmax,
     305  Int_t logx, Int_t logy)
    305306{
    306307  TH1F *hist = new TH1F(name, title, nxbins, xmin, xmax);
     
    324325
    325326TH1 *ExRootResult::AddHist1D(const char *name, const char *title,
    326                              const char *xlabel, const char *ylabel,
    327                              Int_t nxbins, const Float_t *bins,
    328                              Int_t logx, Int_t logy)
     327  const char *xlabel, const char *ylabel,
     328  Int_t nxbins, const Float_t *bins,
     329  Int_t logx, Int_t logy)
    329330{
    330331  TH1F *hist = new TH1F(name, title, nxbins, bins);
     
    348349
    349350TProfile *ExRootResult::AddProfile(const char *name, const char *title,
    350                                    const char *xlabel, const char *ylabel,
    351                                    Int_t nxbins, Axis_t xmin, Axis_t xmax,
    352                                    Int_t logx, Int_t logy)
     351  const char *xlabel, const char *ylabel,
     352  Int_t nxbins, Axis_t xmin, Axis_t xmax,
     353  Int_t logx, Int_t logy)
    353354{
    354355  TProfile *profile = new TProfile(name, title, nxbins, xmin, xmax);
     
    372373
    373374TH2 *ExRootResult::AddHist2D(const char *name, const char *title,
    374                              const char *xlabel, const char *ylabel,
    375                              Int_t nxbins, Axis_t xmin, Axis_t xmax,
    376                              Int_t nybins, Axis_t ymin, Axis_t ymax,
    377                              Int_t logx, Int_t logy)
     375  const char *xlabel, const char *ylabel,
     376  Int_t nxbins, Axis_t xmin, Axis_t xmax,
     377  Int_t nybins, Axis_t ymin, Axis_t ymax,
     378  Int_t logx, Int_t logy)
    378379{
    379380  TH2F *hist = new TH2F(name, title, nxbins, xmin, xmax, nybins, ymin, ymax);
Note: See TracChangeset for help on using the changeset viewer.