Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Package2HTML.h
1/*
2 * HalPackage2HTML.h
3 *
4 * Created on: 30-04-2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#ifndef HALPACKAGE2HTML_H_
11#define HALPACKAGE2HTML_H_
12
13#include "Std.h"
14
15#include <TObject.h>
16#include <TString.h>
17#include <initializer_list>
18#include <map>
19#include <vector>
20
21
22class TH1;
23class TH2;
24class TH3;
25class TFile;
26class TGraph;
27class TObjString;
32namespace Hal {
33 class HtmlFile;
34 class HtmlObject;
35 class Package;
36 class HtmlCell;
37 class PicTree;
38 class Package2HTML : public TObject {
39 friend class AnaFile;
40 struct containerInfo {
41 std::vector<int> sLinks;
42 int sColId;
43 double sFraction;
44 };
45
46 protected:
47 enum class eTableStyle { kStandard, kMetaData };
48 Double_t GetDouble(const Package* pack, TString name) const;
49 TString GetString(const Package* pack, TString name) const;
50 ULong64_t GetULong(const Package* pack, TString name) const;
51
52 private:
53 TString AddToUrl(TString add_dir, TString url) const;
54 void GetCollectionsNumbers();
55 void CreateImagePage(TString filename, TString image_flag, Int_t no, TString path = "") const;
56 TString GetLinkCutMon(TH1* h1, TH1* h2, Int_t no, TString path = "") const;
57 TString GetLink1D(TH1* h1, TH1* h2, Int_t no, TString path = "") const;
58 TString GetLink2D(TH2* h1, TH2* h2, Int_t no, TString path = "") const;
59 TString GetLink3D(TH3* h1, TH3* h2, Int_t no, TString path = "") const;
60 TString GetLinkToCut(Hal::ECutUpdate update, Int_t collection_no, Int_t cut_no, Bool_t fast) const;
61 TString GetLinkToCutMonitor(Hal::ECutUpdate udpate, Int_t collection_no, Int_t cut_mon_no) const;
62 void CreatePackageList(HtmlObject& table,
63 Package* pack,
64 eTableStyle style,
65 TString path,
66 Int_t depth,
67 Option_t* opt = "drawcomment+drawclassname");
68 void CreateCutAndMonitorList(HtmlObject& table, TString path);
69 void ExportCollections(HtmlObject& object, TString path);
70 void CreateCutHTML(HtmlObject& table, Hal::ECutUpdate cut_upd, Int_t collection_no);
71 void CreateCutLink(HtmlObject& table, Hal::ECutUpdate cut_update, Package* obj, Int_t no, Bool_t fast);
72 void CreateCutMonitorLink(HtmlObject& table, Hal::ECutUpdate update, Package* obj, Int_t no, Int_t counter, TString path);
73 void CreateCutMonitorHTML(HtmlObject& table, Hal::ECutUpdate cut_upd, Int_t collection_no, Int_t& counter, TString path);
74 void CreateListTable(HtmlObject& table, TList* list, Int_t no, TString path_data, TString path_url, TString drawClass);
75 containerInfo GetContainerInfo(Package* Pack, Bool_t rev = kFALSE) const;
76 TString GetGroupListName(Hal::ECutUpdate update) const;
77 HtmlFile* fHTML;
78 TFile* fFile;
79 TString fDir;
80 std::map<TString, Int_t> fTObjectCounter;
81 Int_t fDynamicTableCounter, fTaskTableCounter;
82
83 Int_t fCutContainerPosition, fPackageID;
84 Int_t fCollectionsNo[4];
85 Package* fCurrentCutContainer;
86 Int_t fListDeep;
87 Int_t fSoftVer;
88 void TryExtractAnaResult(HtmlObject& table, Package* pack, TString path);
89
90 protected:
95 Bool_t ExtractRunInfo();
107 Package2HTML(Package* ana_pack, Package* global_metadata, const TString dir, Int_t task_id);
113 Bool_t IsHalPackage(const TObject* obj) const { return obj->InheritsFrom("Hal::Package"); };
119 Bool_t IsExacltyHalPackage(const TObject* obj) const {
120 TString className = obj->ClassName();
121 return className.EqualTo("Hal::Package");
122 }
123
124 public:
130 Package2HTML(TString filename, const TString dir);
137 // Package2HTML(TString filename, const TString dir, TString packname);
145 Package2HTML(Package* pack, const TString dir, Bool_t mainDir = kTRUE);
146 virtual ~Package2HTML();
147 ClassDef(Package2HTML, 1)
148 };
149} // namespace Hal
150
151#endif /* HALPACKAGE2HTML_H_ */
Bool_t IsExacltyHalPackage(const TObject *obj) const
Bool_t IsHalPackage(const TObject *obj) const