Fork me on GitHub

source: git/display/DelphesHtmlSummary.h@ 83ee320

Timing
Last change on this file since 83ee320 was 341014c, checked in by Pavel Demin <pavel-demin@…>, 5 years ago

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

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[37deb3b]1/*
2 * Delphes: a framework for fast simulation of a generic collider experiment
3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
[1fa50c2]4 *
[37deb3b]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.
[1fa50c2]9 *
[37deb3b]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.
[1fa50c2]14 *
[37deb3b]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/>.
17 */
18
[341014c]19// Delphes HTML table for the event display.
[5fbcfe8]20// Based on the ROOT example "alice_esd_html_summary.C"
21
22#ifndef DelphesHtmlSummary_h
[341014c]23#define DelphesHtmlSummary_h
[5fbcfe8]24
25#include "TArrayF.h"
26#include "TOrdCollection.h"
27
[341014c]28class DelphesHtmlObjTable: public TObject
[5fbcfe8]29{
[341014c]30public: // make them public for shorter code
31 TString fName;
32 Int_t fNValues; // number of values
33 Int_t fNFields; // number of fields
34 TArrayF *fValues;
35 TString *fLabels;
36 Bool_t fExpand;
[5fbcfe8]37
[341014c]38 TString fHtml; // HTML output code
[5fbcfe8]39
[341014c]40 void Build();
41 void BuildTitle();
42 void BuildLabels();
43 void BuildTable();
[5fbcfe8]44
45public:
[341014c]46 DelphesHtmlObjTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp = kTRUE);
47 virtual ~DelphesHtmlObjTable();
[5fbcfe8]48
[341014c]49 void SetLabel(Int_t col, const char *label) { fLabels[col] = label; }
50 void SetValue(Int_t col, Int_t row, Float_t val) { fValues[col].SetAt(val, row); }
51 TString Html() const { return fHtml; }
[5fbcfe8]52
[341014c]53 ClassDef(DelphesHtmlObjTable, 0);
[5fbcfe8]54};
55
56//==============================================================================
57
58class DelphesHtmlSummary
59{
[341014c]60public: // make them public for shorter code
61 Int_t fNTables;
62 TOrdCollection *fObjTables; // ->array of object tables
63 TString fHtml; // output HTML string
64 TString fTitle; // page title
65 TString fHeader; // HTML header
66 TString fFooter; // HTML footer
[5fbcfe8]67
[341014c]68 void MakeHeader();
69 void MakeFooter();
[5fbcfe8]70
71public:
[341014c]72 DelphesHtmlSummary(const char *title);
73 virtual ~DelphesHtmlSummary();
74
75 DelphesHtmlObjTable *AddTable(const char *name, Int_t nfields, Int_t nvals,
76 Bool_t exp = kTRUE, Option_t *opt = "");
77 DelphesHtmlObjTable *GetTable(Int_t at) const { return (DelphesHtmlObjTable *)fObjTables->At(at); }
78 void Build();
79 void Clear(Option_t *option = "");
80 void Reset(Option_t *option = "");
81 TString Html() const { return fHtml; }
82
83 ClassDef(DelphesHtmlSummary, 0);
[5fbcfe8]84};
85
86#endif // DelphesHtmlSummary_h
Note: See TracBrowser for help on using the repository browser.