Fork me on GitHub

Changeset 341014c in git for converters/lhco2root.cpp


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
  • converters/lhco2root.cpp

    r45e58be r341014c  
    1717 */
    1818
    19 #include <stdexcept>
    2019#include <iostream>
    2120#include <sstream>
    22 
    23 #include <stdlib.h>
     21#include <stdexcept>
     22
    2423#include <signal.h>
    2524#include <stdio.h>
    26 
     25#include <stdlib.h>
     26
     27#include "TApplication.h"
    2728#include "TROOT.h"
    28 #include "TApplication.h"
    29 
     29
     30#include "TDatabasePDG.h"
    3031#include "TFile.h"
     32#include "TLorentzVector.h"
    3133#include "TObjArray.h"
     34#include "TParticlePDG.h"
    3235#include "TStopwatch.h"
    33 #include "TDatabasePDG.h"
    34 #include "TParticlePDG.h"
    35 #include "TLorentzVector.h"
    36 
    37 #include "modules/Delphes.h"
    38 #include "classes/DelphesStream.h"
     36
    3937#include "classes/DelphesClasses.h"
    4038#include "classes/DelphesFactory.h"
    41 
     39#include "classes/DelphesStream.h"
     40#include "modules/Delphes.h"
     41
     42#include "ExRootAnalysis/ExRootProgressBar.h"
     43#include "ExRootAnalysis/ExRootTreeBranch.h"
    4244#include "ExRootAnalysis/ExRootTreeWriter.h"
    43 #include "ExRootAnalysis/ExRootTreeBranch.h"
    44 #include "ExRootAnalysis/ExRootProgressBar.h"
    4545
    4646using namespace std;
    4747
    48 static const int kBufferSize  = 1024;
     48static const int kBufferSize = 1024;
    4949
    5050/*
     
    7474
    7575private:
    76 
    7776  void AddMissingEvents();
    7877
     
    8685  void AnalyseMissingET(ExRootTreeBranch *branch);
    8786
    88   enum {kIntParamSize = 2, kDblParamSize = 7};
     87  enum
     88  {
     89    kIntParamSize = 2,
     90    kDblParamSize = 7
     91  };
    8992  Int_t fIntParam[kIntParamSize];
    9093  Double_t fDblParam[kDblParamSize];
     
    106109  ExRootTreeBranch *fBranchJet;
    107110  ExRootTreeBranch *fBranchMissingET;
    108 
    109111};
    110112
     
    169171    if(!rc)
    170172    {
    171       cerr << "** ERROR: " << "invalid event format" << endl;
     173      cerr << "** ERROR: "
     174           << "invalid event format" << endl;
    172175      return kFALSE;
    173176    }
     
    195198    if(!rc)
    196199    {
    197       cerr << "** ERROR: " << "invalid object format" << endl;
     200      cerr << "** ERROR: "
     201           << "invalid object format" << endl;
    198202      return kFALSE;
    199203    }
     
    201205    switch(fIntParam[1])
    202206    {
    203       case 0: AnalysePhoton(fBranchPhoton); break;
    204       case 1: AnalyseElectron(fBranchElectron); break;
    205       case 2: AnalyseMuon(fBranchMuon); break;
    206       case 3: AnalyseTau(fBranchJet); break;
    207       case 4: AnalyseJet(fBranchJet); break;
    208       case 6: AnalyseMissingET(fBranchMissingET); break;
     207    case 0: AnalysePhoton(fBranchPhoton); break;
     208    case 1: AnalyseElectron(fBranchElectron); break;
     209    case 2: AnalyseMuon(fBranchMuon); break;
     210    case 3: AnalyseTau(fBranchJet); break;
     211    case 4: AnalyseJet(fBranchJet); break;
     212    case 6: AnalyseMissingET(fBranchMissingET); break;
    209213    }
    210214  }
     
    228232  LHCOEvent *element;
    229233
    230   element = static_cast<LHCOEvent*>(branch->NewEntry());
     234  element = static_cast<LHCOEvent *>(branch->NewEntry());
    231235
    232236  element->Number = fEventNumber;
     
    240244  Photon *element;
    241245
    242   element = static_cast<Photon*>(branch->NewEntry());
     246  element = static_cast<Photon *>(branch->NewEntry());
    243247
    244248  element->Eta = fDblParam[0];
     
    254258  Electron *element;
    255259
    256   element = static_cast<Electron*>(branch->NewEntry());
     260  element = static_cast<Electron *>(branch->NewEntry());
    257261
    258262  element->Eta = fDblParam[0];
     
    261265
    262266  element->Charge = fDblParam[4] < 0.0 ? -1 : 1;
    263 /*
     267  /*
    264268  element->Ntrk = TMath::Abs(fDblParam[4]);
    265269*/
     
    273277  Muon *element;
    274278
    275   element = static_cast<Muon*>(branch->NewEntry());
     279  element = static_cast<Muon *>(branch->NewEntry());
    276280
    277281  element->Eta = fDblParam[0];
     
    280284
    281285  element->Charge = fDblParam[4] < 0.0 ? -1 : 1;
    282 /*
     286  /*
    283287  element->Ntrk = TMath::Abs(fDblParam[4]);
    284288
     
    296300  Jet *element;
    297301
    298   element = static_cast<Jet*>(branch->NewEntry());
     302  element = static_cast<Jet *>(branch->NewEntry());
    299303
    300304  element->Eta = fDblParam[0];
     
    308312
    309313  element->Charge = fDblParam[4] < 0 ? -1 : 1;
    310 /*
     314  /*
    311315  element->Ntrk = TMath::Abs(fDblParam[4]);
    312316*/
     
    320324  Jet *element;
    321325
    322   element = static_cast<Jet*>(branch->NewEntry());
     326  element = static_cast<Jet *>(branch->NewEntry());
    323327
    324328  element->Eta = fDblParam[0];
     
    327331
    328332  element->Mass = fDblParam[3];
    329 /*
     333  /*
    330334  element->Ntrk = TMath::Abs(Int_t(fDblParam[4]));
    331335*/
     
    336340
    337341  element->EhadOverEem = fDblParam[6];
    338 /*
     342  /*
    339343  element->Index = fIntParam[0];
    340344*/
     
    347351  MissingET *element;
    348352
    349   element = static_cast<MissingET*>(branch->NewEntry());
     353  element = static_cast<MissingET *>(branch->NewEntry());
    350354
    351355  element->Phi = fDblParam[1];
     
    376380  if(argc < 2)
    377381  {
    378     cout << " Usage: " << appName << " output_file" << " [input_file(s)]" << endl;
     382    cout << " Usage: " << appName << " output_file"
     383         << " [input_file(s)]" << endl;
    379384    cout << " output_file - output file in ROOT format," << endl;
    380385    cout << " input_file(s) - input file(s) in LHCO format," << endl;
     
    456461
    457462      ++i;
    458     }
    459     while(i < argc);
     463    } while(i < argc);
    460464
    461465    cout << "** Exiting..." << endl;
     
    474478  }
    475479}
    476 
    477 
Note: See TracChangeset for help on using the changeset viewer.