Fork me on GitHub

source: git/display/DelphesHtmlSummary.h@ 49234af

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 49234af was 5fbcfe8, checked in by Christophe Delaere <christophe.delaere@…>, 10 years ago

First introduction of the HTML summary tab

At this stage, I did the bare minimum required to add one tab after
copy/pasting the ROOT example. Right now, it just adds a white page.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1// Delphes HTML table for the event display.
2// Based on the ROOT example "alice_esd_html_summary.C"
3
4#ifndef DelphesHtmlSummary_h
5#define DelphesHtmlSummary_h
6
7#include "TArrayF.h"
8#include "TOrdCollection.h"
9
10
11class DelphesHtmlObjTable : public TObject
12{
13public: // make them public for shorter code
14
15 TString fName;
16 Int_t fNValues; // number of values
17 Int_t fNFields; // number of fields
18 TArrayF *fValues;
19 TString *fLabels;
20 Bool_t fExpand;
21
22 TString fHtml; // HTML output code
23
24 void Build();
25 void BuildTitle();
26 void BuildLabels();
27 void BuildTable();
28
29public:
30 DelphesHtmlObjTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp=kTRUE);
31 virtual ~DelphesHtmlObjTable();
32
33 void SetLabel(Int_t col, const char *label) { fLabels[col] = label; }
34 void SetValue(Int_t col, Int_t row, Float_t val) { fValues[col].SetAt(val, row); }
35 TString Html() const { return fHtml; }
36
37 ClassDef(DelphesHtmlObjTable, 0);
38};
39
40//==============================================================================
41
42class DelphesHtmlSummary
43{
44public: // make them public for shorter code
45 Int_t fNTables;
46 TOrdCollection *fObjTables; // ->array of object tables
47 TString fHtml; // output HTML string
48 TString fTitle; // page title
49 TString fHeader; // HTML header
50 TString fFooter; // HTML footer
51
52 void MakeHeader();
53 void MakeFooter();
54
55public:
56 DelphesHtmlSummary(const char *title);
57 virtual ~DelphesHtmlSummary();
58
59 DelphesHtmlObjTable *AddTable(const char *name, Int_t nfields, Int_t nvals,
60 Bool_t exp=kTRUE, Option_t *opt="");
61 DelphesHtmlObjTable *GetTable(Int_t at) const { return (DelphesHtmlObjTable *)fObjTables->At(at); }
62 void Build();
63 void Clear(Option_t *option="");
64 void Reset(Option_t *option="");
65 TString Html() const { return fHtml; }
66
67 ClassDef(DelphesHtmlSummary, 0);
68};
69
70#endif // DelphesHtmlSummary_h
Note: See TracBrowser for help on using the repository browser.