32 #ifndef G4PlotManager_h
33 #define G4PlotManager_h 1
38 #include <tools/viewplot>
60 const std::vector<G4HnInformation*>& hnVector);
65 G4int GetNofPlotsPerPage()
const;
73 std::unique_ptr<tools::viewplot> fViewer;
80 inline G4int G4PlotManager::GetNofPlotsPerPage()
const
87 const std::vector<G4HnInformation*>& hnVector)
89 if ( ! htVector.size() )
return true;
91 fViewer->plots().init_sg();
93 fViewer->set_cols_rows(fgPlotParameters.
GetColumns(), fgPlotParameters.
GetRows());
94 fViewer->plots().set_current_plotter(0);
97 G4bool isWriteNeeded =
false;
99 for (
G4int i=0; i<
G4int(htVector.size()); ++i ) {
106 if ( ( ! plotting ) ||
113 fViewer->set_current_plotter_style(fgPlotParameters.
GetStyle());
116 tools::sg::plotter& plotter = fViewer->plots().current_plotter();
118 plotter.bins_style(0).color = tools::colorf_blue();
120 isWriteNeeded =
true;
128 if (
G4int(fViewer->plots().current_index()) == (GetNofPlotsPerPage() - 1) ) {
130 finalResult = result && finalResult;
131 isWriteNeeded =
false;
135 fViewer->plots().next();
139 if ( isWriteNeeded ) {
141 finalResult = result && finalResult;
G4double G4ParticleHPJENDLHEData::G4double result
const XML_Char XML_Encoding * info
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
G4PlotManager(const G4AnalysisManagerState &state)
G4bool PlotAndWrite(const std::vector< T * > &htVector, const std::vector< G4HnInformation * > &hnVector)
G4String GetStyle() const
const G4AnalysisVerbose * GetVerboseL3() const
G4PlotManager & operator=(const G4PlotManager &rhs)=delete
G4bool OpenFile(const G4String &fileName)
G4bool GetIsActivation() const