Fork me on GitHub

Changeset f53a4d2 in git


Ignore:
Timestamp:
Jun 26, 2015, 11:17:38 AM (9 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
28027d5, d38348d
Parents:
c9803f7
Message:

adapt EventDisplay to ROOT 6.04

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • display/Delphes3DGeometry.cc

    rc9803f7 rf53a4d2  
    1717 */
    1818
    19 #include "display/Delphes3DGeometry.h"
    2019#include <set>
    2120#include <map>
    22 #include <string>
    2321#include <utility>
    2422#include <vector>
     
    2624#include <sstream>
    2725#include <cassert>
     26
     27#include "TAxis.h"
    2828#include "TGeoManager.h"
    2929#include "TGeoVolume.h"
     
    3535#include "TGeoCone.h"
    3636#include "TGeoArb8.h"
    37 #include "external/ExRootAnalysis/ExRootConfReader.h"
    38 #include "classes/DelphesClasses.h"
    3937#include "TF2.h"
    4038#include "TFormula.h"
    4139#include "TH1F.h"
    4240#include "TMath.h"
     41#include "TString.h"
     42
     43#include "display/Delphes3DGeometry.h"
     44
     45#include "classes/DelphesClasses.h"
     46#include "external/ExRootAnalysis/ExRootConfReader.h"
    4347
    4448using namespace std;
     
    9397   tk_Bz_     = confReader->GetDouble("ParticlePropagator::Bz", 0.0);                           // tk_Bz
    9498   
    95    string buffer;
     99   TString buffer;
    96100   const char *it;
    97101 
     
    103107   tkEffFormula.ReplaceAll("phi","0.");
    104108 
     109   buffer.Clear();
    105110   for(it = tkEffFormula.Data(); *it; ++it)
    106111   {
    107112     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
    108      buffer.push_back(*it);
    109    }
    110 
    111    TF2* tkEffFunction = new TF2("tkEff",buffer.c_str(),0,1000,-10,10);
     113     buffer.Append(*it);
     114   }
     115
     116   TF2* tkEffFunction = new TF2("tkEff",buffer,0,1000,-10,10);
    112117   TH1F etaHisto("eta","eta",100,5.,-5.);
    113118   Double_t pt,eta;
     
    132137   muonEffFormula.ReplaceAll("phi","0.");
    133138   
    134    buffer.clear();
     139   buffer.Clear();
    135140   for(it = muonEffFormula.Data(); *it; ++it)
    136141   {
    137142     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
    138      buffer.push_back(*it);
    139    }
    140 
    141    TF2* muEffFunction = new TF2("muEff",buffer.c_str(),0,1000,-10,10);
     143     buffer.Append(*it);
     144   }
     145
     146   TF2* muEffFunction = new TF2("muEff",buffer,0,1000,-10,10);
    142147   TH1F etaHisto("eta2","eta2",100,5.,-5.);
    143148   Double_t pt,eta;
  • display/Delphes3DGeometry.h

    rc9803f7 rf53a4d2  
    11/*
    2  * Delphes: a framework for fast simulation of a generic collider experiment
    3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     2  * Delphes: a framework for fast simulation of a generic collider experiment
     3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    44 *
    5  * This program is free software: you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation, either version 3 of the License, or
    8  * (at your option) any later version.
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, either version 3 of the License, or
     8  * (at your option) any later version.
    99 *
    10  * This program is distributed in the hope that it will be useful,
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  * GNU General Public License for more details.
     10  * This program is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  * GNU General Public License for more details.
    1414 *
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  * You should have received a copy of the GNU General Public License
     16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    1818
     
    2222#include <set>
    2323#include <map>
    24 #include <utility>
    2524#include <vector>
    26 #include <algorithm>
    27 #include <sstream>
    28 #include "TAxis.h"
    29 #include "TGeoManager.h"
    30 #include "TGeoVolume.h"
    31 #include "TGeoMedium.h"
     25
     26#include "Rtypes.h"
     27
     28class TAxis;
     29class TGeoManager;
     30class TGeoVolume;
     31class TGeoMedium;
    3232
    3333// TODO: asymmetric detector
     
    3838     ~Delphes3DGeometry() {}
    3939
    40      void readFile(const char* filename, const char* ParticlePropagator="ParticlePropagator",
    41                                          const char* TrackingEfficiency="ChargedHadronTrackingEfficiency",
    42                                          const char* MuonEfficiency="MuonEfficiency",
    43                                          const char* Calorimeters="Calorimeter");
     40     void readFile(const char *filename, const char *ParticlePropagator="ParticlePropagator",
     41                                         const char *TrackingEfficiency="ChargedHadronTrackingEfficiency",
     42                                         const char *MuonEfficiency="MuonEfficiency",
     43                                         const char *Calorimeters="Calorimeter");
    4444
    4545     void setContingency(Double_t contingency) { contingency_ = contingency; }
     
    4848     void setMuonSystemThickness(Double_t thickness) { muonSystem_thickn_ = thickness; }
    4949
    50      TGeoVolume* getDetector(bool withTowers = true);
     50     TGeoVolume *getDetector(bool withTowers = true);
    5151
    5252     Double_t getTrackerRadius() const { return tk_radius_; }
     
    5959   private:
    6060     std::pair<Double_t, Double_t> addTracker(TGeoVolume *top);
    61      std::pair<Double_t, Double_t> addCalorimeter(TGeoVolume *top, const char* name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
    62      std::pair<Double_t, Double_t> addMuonDets(TGeoVolume *top, const char* name, Double_t innerBarrelRadius, Double_t innerBarrelLength);
    63      void addCaloTowers(TGeoVolume *top, const char* name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
     61     std::pair<Double_t, Double_t> addCalorimeter(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
     62     std::pair<Double_t, Double_t> addMuonDets(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength);
     63     void addCaloTowers(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
    6464
    6565   private:
     
    7272     TGeoMedium *mudetmed_;
    7373
    74      TAxis* etaAxis_;
    75      TAxis* phiAxis_;
     74     TAxis *etaAxis_;
     75     TAxis *phiAxis_;
    7676
    7777     Double_t contingency_;
     
    9191     std::map<std::string, Double_t> muonSystem_etamax_;
    9292     std::map<std::string, std::set< std::pair<Double_t, Int_t> > > caloBinning_;
    93      
     93
    9494};
    9595
  • display/DelphesEventDisplay.cc

    rc9803f7 rf53a4d2  
    11/*
    2  * Delphes: a framework for fast simulation of a generic collider experiment
    3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     2  * Delphes: a framework for fast simulation of a generic collider experiment
     3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    44 *
    5  * This program is free software: you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation, either version 3 of the License, or
    8  * (at your option) any later version.
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, either version 3 of the License, or
     8  * (at your option) any later version.
    99 *
    10  * This program is distributed in the hope that it will be useful,
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  * GNU General Public License for more details.
     10  * This program is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  * GNU General Public License for more details.
    1414 *
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  * You should have received a copy of the GNU General Public License
     16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    1818
     
    2121#include <utility>
    2222#include <algorithm>
     23
    2324#include "TGeoManager.h"
    2425#include "TGeoVolume.h"
    25 #include "external/ExRootAnalysis/ExRootConfReader.h"
    26 #include "external/ExRootAnalysis/ExRootTreeReader.h"
    27 #include "display/DelphesCaloData.h"
    28 #include "display/DelphesBranchElement.h"
    29 #include "display/Delphes3DGeometry.h"
    30 #include "display/DelphesEventDisplay.h"
    31 #include "classes/DelphesClasses.h"
    3226#include "TEveElement.h"
    3327#include "TEveJetCone.h"
     
    5347#include "TCanvas.h"
    5448#include "TH1F.h"
     49#include "TAxis.h"
     50#include "TChain.h"
     51#include "TGHtml.h"
     52#include "TGStatusBar.h"
     53
     54#include "display/DelphesCaloData.h"
     55#include "display/DelphesBranchElement.h"
     56#include "display/Delphes3DGeometry.h"
     57#include "display/DelphesEventDisplay.h"
     58#include "display/DelphesDisplay.h"
     59#include "display/Delphes3DGeometry.h"
     60#include "display/DelphesHtmlSummary.h"
     61#include "display/DelphesPlotSummary.h"
     62
     63#include "classes/DelphesClasses.h"
     64#include "external/ExRootAnalysis/ExRootConfReader.h"
     65#include "external/ExRootAnalysis/ExRootTreeReader.h"
    5566
    5667DelphesEventDisplay::DelphesEventDisplay()
     
    98109   TEveManager::Create(kTRUE, "IV");
    99110   fStatusBar_ = gEve->GetBrowser()->GetStatusBar();
    100    TGeoManager* geom = gGeoManager;
     111   TGeoManager *geom = gGeoManager;
    101112
    102113   // build the detector
     
    108119   etaAxis_ = det3D.getCaloAxes().first;
    109120   phiAxis_ = det3D.getCaloAxes().second;
    110    TGeoVolume* top = det3D.getDetector(false);
     121   TGeoVolume *top = det3D.getDetector(false);
    111122   geom->SetTopVolume(top);
    112123   TEveElementList *geometry = new TEveElementList("Geometry");
    113    TObjArray* nodes = top->GetNodes();
     124   TObjArray *nodes = top->GetNodes();
    114125   TIter itNodes(nodes);
    115    TGeoNode* nodeobj;
    116    TEveGeoTopNode* node;
     126   TGeoNode *nodeobj;
     127   TEveGeoTopNode *node;
    117128   while((nodeobj = (TGeoNode*)itNodes.Next())) {
    118129     node = new TEveGeoTopNode(gGeoManager,nodeobj);
     
    131142   // prepare data collections
    132143   readConfig(configFile, elements_);
    133    for(std::vector<DelphesBranchBase*>::iterator element = elements_.begin(); element<elements_.end(); ++element) {
    134      DelphesBranchElement<TEveTrackList>*   item_v1 = dynamic_cast<DelphesBranchElement<TEveTrackList>*>(*element);
    135      DelphesBranchElement<TEveElementList>* item_v2 = dynamic_cast<DelphesBranchElement<TEveElementList>*>(*element);
     144   for(std::vector<DelphesBranchBase *>::iterator element = elements_.begin(); element<elements_.end(); ++element) {
     145     DelphesBranchElement<TEveTrackList> *item_v1 = dynamic_cast<DelphesBranchElement<TEveTrackList>*>(*element);
     146     DelphesBranchElement<TEveElementList> *item_v2 = dynamic_cast<DelphesBranchElement<TEveElementList>*>(*element);
    136147     if(item_v1) gEve->AddElement(item_v1->GetContainer());
    137148     if(item_v2) gEve->AddElement(item_v2->GetContainer());
     
    144155   delphesDisplay_->ImportGeomRhoZ(geometry);
    145156   // find the first calo data and use that to initialize the calo display
    146    for(std::vector<DelphesBranchBase*>::iterator data=elements_.begin();data<elements_.end();++data) {
     157   for(std::vector<DelphesBranchBase *>::iterator data=elements_.begin();data<elements_.end();++data) {
    147158     if(TString((*data)->GetType())=="Tower") { // we could also use GetClassName()=="DelphesCaloData"
    148        DelphesCaloData* container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer();
     159       DelphesCaloData *container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer();
    149160       assert(container);
    150161       TEveCalo3D *calo3d = new TEveCalo3D(container);
     
    182193   ExRootConfParam branches = confReader->GetParam("TreeWriter::Branch");
    183194   Int_t nBranches = branches.GetSize()/3;
    184    DelphesBranchElement<TEveTrackList>* tlist;
    185    DelphesBranchElement<DelphesCaloData>* clist;
    186    DelphesBranchElement<TEveElementList>* elist;
     195   DelphesBranchElement<TEveTrackList> *tlist;
     196   DelphesBranchElement<DelphesCaloData> *clist;
     197   DelphesBranchElement<TEveElementList> *elist;
    187198   // first loop with all but tracks
    188199   for(Int_t b = 0; b<nBranches; ++b) {
     
    273284
    274285   // update display
    275    TEveElement* top = (TEveElement*)gEve->GetCurrentEvent();
     286   TEveElement *top = (TEveElement*)gEve->GetCurrentEvent();
    276287   delphesDisplay_->DestroyEventRPhi();
    277288   delphesDisplay_->ImportEventRPhi(top);
     
    356367
    357368   // add a tab on the left
    358    TEveBrowser* browser = gEve->GetBrowser();
     369   TEveBrowser *browser = gEve->GetBrowser();
    359370   browser->SetWindowName("Delphes Event Display");
    360371   browser->StartEmbedding(TRootBrowser::kLeft);
    361372
    362373   // set the main title
    363    TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
     374   TGMainFrame *frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
    364375   frmMain->SetWindowName("Delphes Event Display");
    365376   frmMain->SetCleanup(kDeepCleanup);
     
    371382   if(!gSystem->OpenDirectory(icondir))
    372383     icondir = Form("%s/icons/", (const char*)gSystem->GetFromPipe("root-config --etcdir") );
    373    TGGroupFrame* vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth );
     384   TGGroupFrame *vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth );
    374385   {
    375      TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain);
     386     TGHorizontalFrame *hf = new TGHorizontalFrame(frmMain);
    376387     {
    377         TGPictureButton* b = 0;
     388        TGPictureButton *b = 0;
    378389
    379390        b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoBack.gif"));
     
    381392        b->Connect("Clicked()", "DelphesEventDisplay", this, "Bck()");
    382393
    383         TGNumberEntry* numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries());
     394        TGNumberEntry *numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries());
    384395        hf->AddFrame(numberEntry, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 2, 0, 10, 10));
    385396        this->Connect("EventChanged(Int_t)","TGNumberEntry",numberEntry,"SetIntNumber(Long_t)");
     
    394405     vf->AddFrame(hf, new TGLayoutHints(kLHintsExpandX , 2, 2, 2, 2));
    395406
    396      TGHProgressBar* progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
     407     TGHProgressBar *progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
    397408     progress->SetMax( treeReader_->GetEntries());
    398409     progress->ShowPosition(kTRUE, kFALSE, "Event %.0f");
     
    418429   // the summary tab
    419430   htmlSummary_ = new DelphesHtmlSummary("Delphes Event Display Summary Table");
    420    TEveWindowSlot* slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
     431   TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    421432   gHtml_ = new TGHtml(0, 100, 100);
    422433   TEveWindowFrame *wf = slot->MakeFrame(gHtml_);
     
    426437   // plot tab
    427438   slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    428    TEveWindowTab* tab = slot->MakeTab();
     439   TEveWindowTab *tab = slot->MakeTab();
    429440   tab->SetElementName("Summary plots");
    430441   tab->SetShowTitleBar(kFALSE);
     
    435446}
    436447
    437 
     448void DelphesEventDisplay::Fwd() { 
     449  if (event_id_ < treeReader_->GetEntries() - 2) {
     450     EventChanged(event_id_+1);
     451  } else {
     452     printf("Already at last event.\n");
     453  }
     454}
     455
     456void DelphesEventDisplay::Bck() {
     457  if (event_id_ > 0) {
     458     EventChanged(event_id_-1);
     459  } else {
     460     printf("Already at first event.\n");
     461  }
     462}
     463
     464void DelphesEventDisplay::PreSetEv(char *ev) {
     465  event_id_tmp_ = Int_t(atoi(ev));
     466}
     467
     468void DelphesEventDisplay::GoTo() {
     469  if (event_id_tmp_>=0 && event_id_tmp_ < treeReader_->GetEntries()-1) {
     470    EventChanged(event_id_tmp_);
     471  } else {
     472    printf("Error: no such event.\n");
     473  }
     474}
     475
     476void DelphesEventDisplay::InitSummaryPlots() {
     477  plotSummary_->FillSample(treeReader_, event_id_);
     478  plotSummary_->FillEvent();
     479  plotSummary_->Draw();
     480}
     481
     482void DelphesEventDisplay::DisplayProgress(Int_t p) {
     483  fStatusBar_->SetText(Form("Processing... %d %%",p), 1);
     484  gSystem->ProcessEvents();
     485}
  • display/DelphesEventDisplay.h

    rc9803f7 rf53a4d2  
    11/*
    2  * Delphes: a framework for fast simulation of a generic collider experiment
    3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     2  * Delphes: a framework for fast simulation of a generic collider experiment
     3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    44 *
    5  * This program is free software: you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation, either version 3 of the License, or
    8  * (at your option) any later version.
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, either version 3 of the License, or
     8  * (at your option) any later version.
    99 *
    10  * This program is distributed in the hope that it will be useful,
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  * GNU General Public License for more details.
     10  * This program is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  * GNU General Public License for more details.
    1414 *
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  * You should have received a copy of the GNU General Public License
     16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    1818
     
    2121
    2222#include <vector>
    23 #include <iostream>
    24 #include "external/ExRootAnalysis/ExRootTreeReader.h"
    25 #include "display/DelphesDisplay.h"
    26 #include "display/Delphes3DGeometry.h"
    27 #include "display/DelphesHtmlSummary.h"
    28 #include "display/DelphesPlotSummary.h"
    29 #include "TSystem.h"
    30 #include "TChain.h"
    31 #include "TAxis.h"
    32 #include "TGHtml.h"
    33 #include "TClonesArray.h"
    34 #include "TGStatusBar.h"
    35 #include "TGNumberEntry.h"
    36 #include "TGProgressBar.h"
    37 #include <RQ_OBJECT.h>
    3823
     24#include "Rtypes.h"
     25#include "RQ_OBJECT.h"
    3926
     27class TAxis;
     28class TChain;
     29class TGHtml;
     30class TGStatusBar;
     31class DelphesDisplay;
     32class Delphes3DGeometry;
     33class DelphesBranchBase;
     34class DelphesHtmlSummary;
     35class DelphesPlotSummary;
     36class ExRootTreeReader;
    4037
    4138/*
    42  * assembly.C: sauvegarde as shape-extract -> implement in the geometry class (read/write)
    43  * histobrowser.C: intégration d'histogrammes dans le display (on pourrait avoir Pt, eta, phi pour les principales collections)
    44  * also from alice_esd: summary html table
    45  *
     39  *assembly.C: sauvegarde as shape-extract -> implement in the geometry class (read/write)
     40  *histobrowser.C: intégration d'histogrammes dans le display (on pourrait avoir Pt, eta, phi pour les principales collections)
     41  *also from alice_esd: summary html table
     42  *
    4643 */
    4744
     
    5956    void make_gui();
    6057    void load_event();
    61     void readConfig(const char *configFile, std::vector<DelphesBranchBase*>& elements);
     58    void readConfig(const char *configFile, std::vector<DelphesBranchBase *>& elements);
    6259
    6360    // Configuration and global variables.
     
    6764    Double_t tkRadius_, totRadius_, tkHalfLength_, muHalfLength_, bz_;
    6865    TAxis *etaAxis_, *phiAxis_;
    69     TChain* chain_;
    70     std::vector<DelphesBranchBase*> elements_;
     66    TChain *chain_;
     67    std::vector<DelphesBranchBase *> elements_;
    7168    DelphesDisplay *delphesDisplay_;
    7269    DelphesHtmlSummary *htmlSummary_;
    7370    TGHtml *gHtml_;
    7471    DelphesPlotSummary *plotSummary_;
    75     TGStatusBar* fStatusBar_;
     72    TGStatusBar *fStatusBar_;
    7673   
    7774    // gui controls
    7875  public:
    79      void Fwd() { 
    80         if (event_id_ < treeReader_->GetEntries() - 2) {
    81            EventChanged(event_id_+1);
    82         } else {
    83            printf("Already at last event.\n");
    84         }
    85      }
     76     void Fwd();
    8677
    87      void Bck() {
    88         if (event_id_ > 0) {
    89            EventChanged(event_id_-1);
    90         } else {
    91            printf("Already at first event.\n");
    92         }
    93      }
     78     void Bck();
    9479
    95     void PreSetEv(char* ev) {
    96       event_id_tmp_ = Int_t(atoi(ev));
    97     }
     80    void PreSetEv(char *ev);
    9881
    99     void GoTo() {
    100       if (event_id_tmp_>=0 && event_id_tmp_ < treeReader_->GetEntries()-1) {
    101         EventChanged(event_id_tmp_);
    102       } else {
    103         printf("Error: no such event.\n");
    104       }
    105     }
     82    void GoTo();
    10683
    107     void InitSummaryPlots() {
    108       plotSummary_->FillSample(treeReader_, event_id_);
    109       plotSummary_->FillEvent();
    110       plotSummary_->Draw();
    111     }
     84    void InitSummaryPlots();
    11285
    113     void DisplayProgress(Int_t p) {
    114          fStatusBar_->SetText(Form("Processing... %d %%",p), 1);
    115          gSystem->ProcessEvents();
    116     }
     86    void DisplayProgress(Int_t p);
    11787};
    11888
  • examples/EventDisplay.C

    rc9803f7 rf53a4d2  
    33 * root -l examples/EventDisplay.C'("cards/delphes_card_FCC_basic.tcl","delphes_output.root","ParticlePropagator","ChargedHadronTrackingEfficiency","MuonTrackingEfficiency","Ecal,Hcal")'
    44 */
     5
     6#ifdef __CLING__
     7R__LOAD_LIBRARY(libEve)
     8R__LOAD_LIBRARY(libDelphesDisplay)
     9#include "display/DelphesEventDisplay.h"
     10#include "display/Delphes3DGeometry.h"
     11#endif
    512
    613void EventDisplay(const char *configfile = "delphes_card_CMS.tcl",
     
    3340
    3441    // create the application
    35     DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
     42    DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D);
    3643  }
    3744}
Note: See TracChangeset for help on using the changeset viewer.