Fork me on GitHub

source: git/display/DelphesHtmlSummary.h@ 7d790c1

ImprovedOutputFile
Last change on this file since 7d790c1 was 341014c, checked in by Pavel Demin <pavel-demin@…>, 6 years ago

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

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 * Delphes: a framework for fast simulation of a generic collider experiment
3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
4 *
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.
9 *
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.
14 *
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
19// Delphes HTML table for the event display.
20// Based on the ROOT example "alice_esd_html_summary.C"
21
22#ifndef DelphesHtmlSummary_h
23#define DelphesHtmlSummary_h
24
25#include "TArrayF.h"
26#include "TOrdCollection.h"
27
28class DelphesHtmlObjTable: public TObject
29{
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;
37
38 TString fHtml; // HTML output code
39
40 void Build();
41 void BuildTitle();
42 void BuildLabels();
43 void BuildTable();
44
45public:
46 DelphesHtmlObjTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp = kTRUE);
47 virtual ~DelphesHtmlObjTable();
48
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; }
52
53 ClassDef(DelphesHtmlObjTable, 0);
54};
55
56//==============================================================================
57
58class DelphesHtmlSummary
59{
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
67
68 void MakeHeader();
69 void MakeFooter();
70
71public:
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);
84};
85
86#endif // DelphesHtmlSummary_h
Note: See TracBrowser for help on using the repository browser.