Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
makehtml.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file makehtml.C
1 #include <onlmon/bbc/BbcMonDraw.h>
2 #include <onlmon/cemc/CemcMonDraw.h>
3 #include <onlmon/hcal/HcalMonDraw.h>
4 #include <onlmon/intt/InttMonDraw.h>
5 #include <onlmon/ll1/LL1MonDraw.h>
6 #include <onlmon/mvtx/MvtxMonDraw.h>
7 #include <onlmon/tpc/TpcMonDraw.h>
8 #include <onlmon/tpot/TpotMonDraw.h>
9 
10 #include <onlmon/OnlMonClient.h>
11 
12 // cppcheck-suppress unknownMacro
13 R__LOAD_LIBRARY(libonlbbcmon_client.so)
14 // cppcheck-suppress unknownMacro
15 R__LOAD_LIBRARY(libonlcemcmon_client.so)
16 // cppcheck-suppress unknownMacro
17 R__LOAD_LIBRARY(libonlhcalmon_client.so)
18 // cppcheck-suppress unknownMacro
19 R__LOAD_LIBRARY(libonlinttmon_client.so)
20 // cppcheck-suppress unknownMacro
21 R__LOAD_LIBRARY(libonlll1mon_client.so)
22 // cppcheck-suppress unknownMacro
23 R__LOAD_LIBRARY(libonlmvtxmon_client.so)
24 // cppcheck-suppress unknownMacro
25 R__LOAD_LIBRARY(libonltpcmon_client.so)
26 // cppcheck-suppress unknownMacro
27 R__LOAD_LIBRARY(libonltpotmon_client.so)
28 
29 void makehtml(const std::string &filelist, const std::string &subsystem)
30 {
32  OnlMonDraw *drawer = nullptr;
33  if (subsystem == "BBCMON")
34  {
35  drawer = new BbcMonDraw("BBCMONDRAW");
36  }
37  else if (subsystem == "CEMCMON")
38  {
39  drawer = new CemcMonDraw("CEMCMONDRAW");
40  }
41  else if (subsystem == "IHCALMON")
42  {
43  drawer = new HcalMonDraw("IHCALMONDRAW");
44  }
45  else if (subsystem == "INTTMON")
46  {
47  drawer = new InttMonDraw("INTTMONDRAW");
48  }
49  else if (subsystem == "LL1MON")
50  {
51  drawer = new LL1MonDraw("LL1MONDRAW");
52  }
53  else if (subsystem == "MVTXMON")
54  {
55  drawer = new MvtxMonDraw("MVTXMONDRAW");
56  }
57  else if (subsystem == "OHCALMON")
58  {
59  drawer = new HcalMonDraw("OHCALMONDRAW");
60  }
61  else if (subsystem == "TPCMON")
62  {
63  drawer = new TpcMonDraw("TPCMONDRAW");
64  }
65  else if (subsystem == "TPOTMON")
66  {
67  drawer = new TpotMonDraw("TPOTMONDRAW");
68  }
69  else
70  {
71  std::cout << "Invalid Subsystem " << subsystem << std::endl;
72  gSystem->Exit(1);
73  }
74  cl->registerDrawer(drawer);
75  ifstream listfile(filelist);
76  if (listfile.is_open())
77  {
79  while (std::getline(listfile, line))
80  {
81  cl->ReadHistogramsFromFile(line);
82  }
83  listfile.close();
84  }
85  else
86  {
87  std::cout << "Could not open " << filelist << std::endl;
88  gSystem->Exit(1);
89  }
90  cl->Verbosity(1);
91  cl->MakeHtml();
92  delete cl;
93  gSystem->Exit(0);
94 }