31#ifndef G4PlotManager_h
32#define G4PlotManager_h 1
38#include "tools/viewplot"
58 template <
typename HT>
60 const std::vector<G4HnInformation*>& hnVector);
69 static constexpr std::string_view
fkClass {
"G4PlotManager" };
88 const std::vector<G4HnInformation*>& hnVector)
90 if ( ! htVector.size() )
return true;
95 fViewer->plots().set_current_plotter(0);
98 auto isWriteNeeded =
false;
100 for (
G4int i=0; i<
G4int(htVector.size()); ++i ) {
107 if ( ( ! plotting ) ||
110 HT* ht = htVector[i];
117 tools::sg::plotter& plotter =
fViewer->plots().current_plotter();
119 plotter.bins_style(0).color = tools::colorf_blue();
123 if ( ht->annotation(tools::histo::key_axis_x_title(), title) ) {
124 plotter.x_axis().title = title;
126 if ( ht->annotation(tools::histo::key_axis_y_title(), title) ) {
127 plotter.y_axis().title = title;
129 if ( ht->annotation(tools::histo::key_axis_z_title(), title) ) {
130 plotter.z_axis().title = title;
133#ifndef TOOLS_USE_FREETYPE
134 plotter.set_encoding_none();
139 plotter.x_axis().labels_style().encoding =
"PAW";
140 plotter.x_axis_is_log =
true;
143 plotter.y_axis().labels_style().encoding =
"PAW";
144 plotter.y_axis_is_log =
true;
147 plotter.z_axis().labels_style().encoding =
"PAW";
148 plotter.z_axis_is_log =
true;
150 isWriteNeeded =
true;
157 isWriteNeeded =
false;
165 if ( isWriteNeeded ) {
void Message(G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
G4bool GetIsActivation() const
const G4AnalysisManagerState & fState
std::unique_ptr< tools::viewplot > fViewer
G4bool OpenFile(const G4String &fileName)
G4PlotParameters fPlotParameters
G4PlotManager & operator=(const G4PlotManager &rhs)=delete
G4int GetNofPlotsPerPage() const
static constexpr std::string_view fkClass
G4PlotManager(const G4PlotManager &rhs)=delete
G4bool PlotAndWrite(const std::vector< HT * > &htVector, const std::vector< G4HnInformation * > &hnVector)
G4String GetStyle() const
const char * name(G4int ptype)