Fork me on GitHub

source: git/display/DelphesHtmlSummary.h@ aa3c287

ImprovedOutputFile Timing dual_readout llp 3.4.2pre16
Last change on this file since aa3c287 was 1fa50c2, checked in by Pavel Demin <pavel.demin@…>, 10 years ago

fix GPLv3 header

  • Property mode set to 100644
File size: 2.9 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
[5fbcfe8]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
28
29class DelphesHtmlObjTable : public TObject
30{
31public: // make them public for shorter code
32
33 TString fName;
34 Int_t fNValues; // number of values
35 Int_t fNFields; // number of fields
36 TArrayF *fValues;
37 TString *fLabels;
38 Bool_t fExpand;
39
40 TString fHtml; // HTML output code
41
42 void Build();
43 void BuildTitle();
44 void BuildLabels();
45 void BuildTable();
46
47public:
48 DelphesHtmlObjTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp=kTRUE);
49 virtual ~DelphesHtmlObjTable();
50
51 void SetLabel(Int_t col, const char *label) { fLabels[col] = label; }
52 void SetValue(Int_t col, Int_t row, Float_t val) { fValues[col].SetAt(val, row); }
53 TString Html() const { return fHtml; }
54
55 ClassDef(DelphesHtmlObjTable, 0);
56};
57
58//==============================================================================
59
60class DelphesHtmlSummary
61{
62public: // make them public for shorter code
63 Int_t fNTables;
64 TOrdCollection *fObjTables; // ->array of object tables
65 TString fHtml; // output HTML string
66 TString fTitle; // page title
67 TString fHeader; // HTML header
68 TString fFooter; // HTML footer
69
70 void MakeHeader();
71 void MakeFooter();
72
73public:
74 DelphesHtmlSummary(const char *title);
75 virtual ~DelphesHtmlSummary();
76
77 DelphesHtmlObjTable *AddTable(const char *name, Int_t nfields, Int_t nvals,
78 Bool_t exp=kTRUE, Option_t *opt="");
79 DelphesHtmlObjTable *GetTable(Int_t at) const { return (DelphesHtmlObjTable *)fObjTables->At(at); }
80 void Build();
81 void Clear(Option_t *option="");
82 void Reset(Option_t *option="");
83 TString Html() const { return fHtml; }
84
85 ClassDef(DelphesHtmlSummary, 0);
86};
87
88#endif // DelphesHtmlSummary_h
Note: See TracBrowser for help on using the repository browser.