Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/analysis/management/src/G4HnManager.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /analysis/management/src/G4HnManager.cc (Version 11.3.0) and /analysis/management/src/G4HnManager.cc (Version 11.2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26                                                    26 
 27 // Author: Ivana Hrivnacova, 18/06/2013  (ivan     27 // Author: Ivana Hrivnacova, 18/06/2013  (ivana@ipno.in2p3.fr)
 28                                                    28 
 29 #include "G4HnManager.hh"                          29 #include "G4HnManager.hh"
 30 #include "G4HnMessenger.hh"                        30 #include "G4HnMessenger.hh"
 31                                                    31 
 32 #include "G4AnalysisUtilities.hh"                  32 #include "G4AnalysisUtilities.hh"
 33 #include "G4VFileManager.hh"                       33 #include "G4VFileManager.hh"
 34                                                    34 
 35 #include <utility>                                 35 #include <utility>
 36                                                    36 
 37 using namespace G4Analysis;                        37 using namespace G4Analysis;
 38 using std::to_string;                              38 using std::to_string;
 39                                                    39 
 40 //____________________________________________     40 //_____________________________________________________________________________
 41 G4HnManager::G4HnManager(G4String hnType, cons     41 G4HnManager::G4HnManager(G4String hnType, const G4AnalysisManagerState& state)
 42   : G4BaseAnalysisManager(state), fHnType(std:     42   : G4BaseAnalysisManager(state), fHnType(std::move(hnType))
 43 {}                                                 43 {}
 44                                                    44 
 45 //____________________________________________     45 //_____________________________________________________________________________
 46 G4HnManager::~G4HnManager()                        46 G4HnManager::~G4HnManager()
 47 {                                                  47 {
 48   for ( auto info : fHnVector ) {                  48   for ( auto info : fHnVector ) {
 49     delete info;                                   49     delete info;
 50   }                                                50   }
 51 }                                                  51 }
 52                                                    52 
 53 //                                                 53 //
 54 // private methods                                 54 // private methods
 55 //                                                 55 //
 56                                                    56 
 57 //____________________________________________     57 //_____________________________________________________________________________
 58 void  G4HnManager::SetActivation(G4HnInformati     58 void  G4HnManager::SetActivation(G4HnInformation* info, G4bool activation)
 59 {                                                  59 {
 60 // Set activation to a given object                60 // Set activation to a given object
 61                                                    61 
 62   // Do nothing if activation does not change      62   // Do nothing if activation does not change
 63   if ( info->GetActivation() == activation ) r     63   if ( info->GetActivation() == activation ) return;
 64                                                    64 
 65   // Change activation and account it in fNofA     65   // Change activation and account it in fNofActiveObjects
 66   info->SetActivation(activation);                 66   info->SetActivation(activation);
 67   if (activation) {                                67   if (activation) {
 68     fNofActiveObjects++;                           68     fNofActiveObjects++;
 69   }                                                69   }
 70   else {                                           70   else {
 71     fNofActiveObjects--;                           71     fNofActiveObjects--;
 72   }                                                72   }
 73 }                                                  73 }
 74                                                    74 
 75 //____________________________________________     75 //_____________________________________________________________________________
 76 void  G4HnManager::SetPlotting(G4HnInformation     76 void  G4HnManager::SetPlotting(G4HnInformation* info, G4bool plotting)
 77 {                                                  77 {
 78   // Do nothing if ascii does not change           78   // Do nothing if ascii does not change
 79   if ( info->GetPlotting() == plotting ) retur     79   if ( info->GetPlotting() == plotting ) return;
 80                                                    80 
 81   // Change Plotting and account it in fNofPlo     81   // Change Plotting and account it in fNofPlottingObjects
 82   info->SetPlotting(plotting);                     82   info->SetPlotting(plotting);
 83   if (plotting) {                                  83   if (plotting) {
 84     fNofPlottingObjects++;                         84     fNofPlottingObjects++;
 85   }                                                85   }
 86   else {                                           86   else {
 87     fNofPlottingObjects--;                         87     fNofPlottingObjects--;
 88   }                                                88   }
 89 }                                                  89 }
 90                                                    90 
 91 //____________________________________________     91 //_____________________________________________________________________________
 92 void  G4HnManager::SetFileName(G4HnInformation     92 void  G4HnManager::SetFileName(G4HnInformation* info, const G4String& fileName)
 93 {                                                  93 {
 94   // Do nothing if file name does not change       94   // Do nothing if file name does not change
 95   if ( info->GetFileName() == fileName ) retur     95   if ( info->GetFileName() == fileName ) return;
 96                                                    96 
 97   auto hnFileName = fileName;                      97   auto hnFileName = fileName;
 98   auto extension = GetExtension(fileName);         98   auto extension = GetExtension(fileName);
 99   if (extension.size() != 0u) {                    99   if (extension.size() != 0u) {
100     // Check if valid extension (if present)      100     // Check if valid extension (if present)
101     auto output = G4Analysis::GetOutput(extens    101     auto output = G4Analysis::GetOutput(extension);
102     if ( output == G4AnalysisOutput::kNone ) {    102     if ( output == G4AnalysisOutput::kNone ) {
103       Warn("The file extension " + extension +    103       Warn("The file extension " + extension + " is not supported.",
104         fkClass, "SetFileName");                  104         fkClass, "SetFileName");
105       return;                                     105       return;
106     }                                             106     }
107   }                                               107   }
108   else {                                          108   else {
109     if (fDefaultFileType.size() != 0u) {          109     if (fDefaultFileType.size() != 0u) {
110       //add extension if missing and file type    110       //add extension if missing and file type is defined
111       hnFileName = fileName + "." + fDefaultFi    111       hnFileName = fileName + "." + fDefaultFileType;
112     }                                             112     }
113   }                                               113   }
114                                                   114 
115   // Save the info and account a new file name    115   // Save the info and account a new file name if file manager
116   info->SetFileName(hnFileName);                  116   info->SetFileName(hnFileName);
117   if (fFileManager) {                             117   if (fFileManager) {
118     fFileManager->AddFileName(hnFileName);        118     fFileManager->AddFileName(hnFileName);
119   } else {                                        119   } else {
120     Warn("Failed to set fileName " + fileName     120     Warn("Failed to set fileName " + fileName +
121          " for object " + info->GetName() + ".    121          " for object " + info->GetName() + ".\nFile manager is not set.",
122          fkClass, "SetFileName");                 122          fkClass, "SetFileName");
123     return;                                       123     return;
124   }                                               124   }
125                                                   125 
126   if ( hnFileName != "" ) {                       126   if ( hnFileName != "" ) {
127     fNofFileNameObjects++;                        127     fNofFileNameObjects++;
128   } else {                                        128   } else {
129     fNofFileNameObjects--;                        129     fNofFileNameObjects--;
130   }                                               130   }
131 }                                                 131 }
132                                                   132 
133 //                                                133 //
134 // public methods                                 134 // public methods
135 //                                                135 //
136                                                   136 
137 //____________________________________________    137 //_____________________________________________________________________________
138 void G4HnManager::CreateMessenger()               138 void G4HnManager::CreateMessenger()
139 {                                                 139 {
140   fMessenger = std::make_unique<G4HnMessenger>    140   fMessenger = std::make_unique<G4HnMessenger>(*this);
141 }                                                 141 }
142                                                   142 
143 //____________________________________________    143 //_____________________________________________________________________________
144 void G4HnManager::AddHnInformation(G4HnInforma    144 void G4HnManager::AddHnInformation(G4HnInformation* info)
145 {                                                 145 {
146   // Add new information                          146   // Add new information
147                                                   147 
148   fHnVector.push_back(info);                      148   fHnVector.push_back(info);
149   ++fNofActiveObjects;                            149   ++fNofActiveObjects;
150 }                                                 150 }
151                                                   151 
152 //____________________________________________    152 //_____________________________________________________________________________
153 void G4HnManager::AddHnInformation(G4HnInforma    153 void G4HnManager::AddHnInformation(G4HnInformation* info, G4int index)
154 {                                                 154 {
155   // Replace the information at 'index' positi    155   // Replace the information at 'index' position with new one.
156   // Update new information with the previous     156   // Update new information with the previous one settings if the
157   // previous histogram was deleted with 'keep    157   // previous histogram was deleted with 'keepSetting' set true.
158                                                   158 
159   auto previousInfo = fHnVector[index];           159   auto previousInfo = fHnVector[index];
160   if (previousInfo->GetDeletedPair().second) {    160   if (previousInfo->GetDeletedPair().second) {
161     info->Update(*previousInfo);                  161     info->Update(*previousInfo);
162   }                                               162   }
163   delete previousInfo;                            163   delete previousInfo;
164                                                   164 
165   fHnVector[index] = info;                        165   fHnVector[index] = info;
166                                                   166 
167   if (info->GetActivation()) { ++fNofActiveObj    167   if (info->GetActivation()) { ++fNofActiveObjects; }
168   if (info->GetAscii())      { ++fNofAsciiObje    168   if (info->GetAscii())      { ++fNofAsciiObjects; }
169   if (info->GetPlotting())   { ++fNofPlottingO    169   if (info->GetPlotting())   { ++fNofPlottingObjects; }
170   if (! info->GetFileName().empty()) { ++fNofF    170   if (! info->GetFileName().empty()) { ++fNofFileNameObjects; }
171 }                                                 171 }
172                                                   172 
173 //____________________________________________    173 //_____________________________________________________________________________
174 void G4HnManager::SetHnDeleted(G4HnInformation    174 void G4HnManager::SetHnDeleted(G4HnInformation* info, G4bool keepSetting)
175 {                                                 175 {
176   info->SetDeleted(true, keepSetting);            176   info->SetDeleted(true, keepSetting);
177                                                   177 
178   if (info->GetActivation()) { --fNofActiveObj    178   if (info->GetActivation()) { --fNofActiveObjects; }
179   if (info->GetAscii())      { --fNofAsciiObje    179   if (info->GetAscii())      { --fNofAsciiObjects; }
180   if (info->GetPlotting())   { --fNofPlottingO    180   if (info->GetPlotting())   { --fNofPlottingObjects; }
181   if (! info->GetFileName().empty()) { --fNofF    181   if (! info->GetFileName().empty()) { --fNofFileNameObjects; }
182 }                                                 182 }
183                                                   183 
184 //____________________________________________    184 //_____________________________________________________________________________
185 void G4HnManager::ClearData()                     185 void G4HnManager::ClearData()
186 {                                                 186 {
187   for ( auto info : fHnVector ) {                 187   for ( auto info : fHnVector ) {
188     delete info;                                  188     delete info;
189   }                                               189   }
190   fHnVector.clear();                              190   fHnVector.clear();
191   SetLockFirstId(false);                          191   SetLockFirstId(false);
192 }                                                 192 }
193                                                   193 
194 //____________________________________________    194 //_____________________________________________________________________________
195 G4HnInformation* G4HnManager::GetHnInformation    195 G4HnInformation* G4HnManager::GetHnInformation(G4int id,
196                                  std::string_v    196                                  std::string_view functionName, G4bool warn) const
197 {                                                 197 {
198   G4int index = id - fFirstId;                    198   G4int index = id - fFirstId;
199   if ( index < 0 || index >= G4int(fHnVector.s    199   if ( index < 0 || index >= G4int(fHnVector.size()) ) {
200     if ( warn ) {                                 200     if ( warn ) {
201       Warn(fHnType + " histogram " + to_string    201       Warn(fHnType + " histogram " + to_string(id) + " does not exist.",
202         fkClass, functionName);                   202         fkClass, functionName);
203     }                                             203     }
204     return nullptr;                               204     return nullptr;
205   }                                               205   }
206   return fHnVector[index];                        206   return fHnVector[index];
207 }                                                 207 }
208                                                   208 
209 //____________________________________________    209 //_____________________________________________________________________________
210 G4HnDimensionInformation* G4HnManager::GetHnDi    210 G4HnDimensionInformation* G4HnManager::GetHnDimensionInformation(G4int id,
211                                 G4int dimensio    211                                 G4int dimension,
212                                 std::string_vi    212                                 std::string_view functionName, G4bool warn) const
213 {                                                 213 {
214   auto info = GetHnInformation(id, functionNam    214   auto info = GetHnInformation(id, functionName, warn);
215   if (info == nullptr) return nullptr;            215   if (info == nullptr) return nullptr;
216                                                   216 
217   return info->GetHnDimensionInformation(dimen    217   return info->GetHnDimensionInformation(dimension);
218 }                                                 218 }
219                                                   219 
220 //____________________________________________    220 //_____________________________________________________________________________
221 G4bool G4HnManager::IsActive() const              221 G4bool G4HnManager::IsActive() const
222 {                                                 222 {
223   return ( fNofActiveObjects > 0 );               223   return ( fNofActiveObjects > 0 );
224 }                                                 224 }
225                                                   225 
226 //____________________________________________    226 //_____________________________________________________________________________
227 G4bool G4HnManager::IsAscii() const               227 G4bool G4HnManager::IsAscii() const
228 {                                                 228 {
229   return ( fNofAsciiObjects > 0 );                229   return ( fNofAsciiObjects > 0 );
230 }                                                 230 }
231                                                   231 
232 //____________________________________________    232 //_____________________________________________________________________________
233 G4bool G4HnManager::IsPlotting() const            233 G4bool G4HnManager::IsPlotting() const
234 {                                                 234 {
235   return ( fNofPlottingObjects > 0 );             235   return ( fNofPlottingObjects > 0 );
236 }                                                 236 }
237                                                   237 
238 //____________________________________________    238 //_____________________________________________________________________________
239 G4bool G4HnManager::IsFileName() const            239 G4bool G4HnManager::IsFileName() const
240 {                                                 240 {
241   return ( fNofFileNameObjects > 0 );             241   return ( fNofFileNameObjects > 0 );
242 }                                                 242 }
243                                                   243 
244 //____________________________________________    244 //_____________________________________________________________________________
245 void  G4HnManager::SetActivation(G4int id, G4b    245 void  G4HnManager::SetActivation(G4int id, G4bool activation)
246 {                                                 246 {
247 // Set activation to a given object               247 // Set activation to a given object
248                                                   248 
249   auto info = GetHnInformation(id, "SetActivat    249   auto info = GetHnInformation(id, "SetActivation");
250                                                   250 
251   if (info == nullptr) return;                    251   if (info == nullptr) return;
252                                                   252 
253   SetActivation(info, activation);                253   SetActivation(info, activation);
254 }                                                 254 }
255                                                   255 
256 //____________________________________________    256 //_____________________________________________________________________________
257 void  G4HnManager::SetActivation(G4bool activa    257 void  G4HnManager::SetActivation(G4bool activation)
258 {                                                 258 {
259 // Set activation to all objects of the given     259 // Set activation to all objects of the given type
260                                                   260 
261   //std::vector<G4HnInformation*>::iterator it    261   //std::vector<G4HnInformation*>::iterator it;
262   //for ( it = fHnVector.begin(); it != fHnVec    262   //for ( it = fHnVector.begin(); it != fHnVector.end(); it++ ) {
263   //   G4HnInformation* info = *it;               263   //   G4HnInformation* info = *it;
264                                                   264 
265   for ( auto info : fHnVector )  {                265   for ( auto info : fHnVector )  {
266     SetActivation(info, activation);              266     SetActivation(info, activation);
267   }                                               267   }
268 }                                                 268 }
269                                                   269 
270 //____________________________________________    270 //_____________________________________________________________________________
271 void  G4HnManager::SetAscii(G4int id, G4bool a    271 void  G4HnManager::SetAscii(G4int id, G4bool ascii)
272 {                                                 272 {
273   auto info = GetHnInformation(id, "SetAscii")    273   auto info = GetHnInformation(id, "SetAscii");
274                                                   274 
275   if (info == nullptr) return;                    275   if (info == nullptr) return;
276                                                   276 
277   // Do nothing if ascii does not change          277   // Do nothing if ascii does not change
278   if ( info->GetAscii() == ascii ) return;        278   if ( info->GetAscii() == ascii ) return;
279                                                   279 
280   // Change ascii and account it in fNofAsciiO    280   // Change ascii and account it in fNofAsciiObjects
281   info->SetAscii(ascii);                          281   info->SetAscii(ascii);
282   if (ascii) {                                    282   if (ascii) {
283     fNofAsciiObjects++;                           283     fNofAsciiObjects++;
284   }                                               284   }
285   else {                                          285   else {
286     fNofAsciiObjects--;                           286     fNofAsciiObjects--;
287   }                                               287   }
288 }                                                 288 }
289                                                   289 
290 //____________________________________________    290 //_____________________________________________________________________________
291 void  G4HnManager::SetPlotting(G4int id, G4boo    291 void  G4HnManager::SetPlotting(G4int id, G4bool plotting)
292 {                                                 292 {
293   auto info = GetHnInformation(id, "SetPlottin    293   auto info = GetHnInformation(id, "SetPlotting");
294                                                   294 
295   if (info == nullptr) return;                    295   if (info == nullptr) return;
296                                                   296 
297   SetPlotting(info, plotting);                    297   SetPlotting(info, plotting);
298 }                                                 298 }
299                                                   299 
300 //____________________________________________    300 //_____________________________________________________________________________
301 void  G4HnManager::SetPlotting(G4bool plotting    301 void  G4HnManager::SetPlotting(G4bool plotting)
302 {                                                 302 {
303 // Set plotting to all objects of the given ty    303 // Set plotting to all objects of the given type
304                                                   304 
305   for ( auto info : fHnVector )  {                305   for ( auto info : fHnVector )  {
306     SetPlotting(info, plotting);                  306     SetPlotting(info, plotting);
307   }                                               307   }
308 }                                                 308 }
309                                                   309 
310 //____________________________________________    310 //_____________________________________________________________________________
311 void  G4HnManager::SetFileName(G4int id, const    311 void  G4HnManager::SetFileName(G4int id, const G4String& fileName)
312 {                                                 312 {
313   auto info = GetHnInformation(id, "SetFileNam    313   auto info = GetHnInformation(id, "SetFileName");
314                                                   314 
315   if (info == nullptr) return;                    315   if (info == nullptr) return;
316                                                   316 
317   SetFileName(info, fileName);                    317   SetFileName(info, fileName);
318 }                                                 318 }
319                                                   319 
320 //____________________________________________    320 //_____________________________________________________________________________
321 void  G4HnManager::SetFileName(const G4String&    321 void  G4HnManager::SetFileName(const G4String& fileName)
322 {                                                 322 {
323 // Set plotting to all objects of the given ty    323 // Set plotting to all objects of the given type
324                                                   324 
325   for ( auto info : fHnVector )  {                325   for ( auto info : fHnVector )  {
326     SetFileName(info, fileName);                  326     SetFileName(info, fileName);
327   }                                               327   }
328 }                                                 328 }
329                                                   329 
330 //____________________________________________    330 //_____________________________________________________________________________
331 G4bool G4HnManager::SetAxisIsLog(unsigned int     331 G4bool G4HnManager::SetAxisIsLog(unsigned int idim, G4int id, G4bool isLog)
332 {                                                 332 {
333   auto info = GetHnInformation(id, "SetAxisIsL    333   auto info = GetHnInformation(id, "SetAxisIsLog");
334                                                   334 
335   if (info == nullptr) return false;              335   if (info == nullptr) return false;
336                                                   336 
337   info->SetIsLogAxis(idim, isLog);                337   info->SetIsLogAxis(idim, isLog);
338   return true;                                    338   return true;
339 }                                                 339 }
340                                                   340 
341 //____________________________________________    341 //_____________________________________________________________________________
342 G4String G4HnManager::GetName(G4int id) const     342 G4String G4HnManager::GetName(G4int id) const
343 {                                                 343 {
344   auto info = GetHnInformation(id, "GetName");    344   auto info = GetHnInformation(id, "GetName");
345                                                   345 
346   if (info == nullptr) return "";                 346   if (info == nullptr) return "";
347                                                   347 
348   return info->GetName();                         348   return info->GetName();
349 }                                                 349 }
350                                                   350 
351 //____________________________________________    351 //_____________________________________________________________________________
352 G4double G4HnManager::GetUnit(unsigned int idi    352 G4double G4HnManager::GetUnit(unsigned int idim, G4int id) const
353 {                                                 353 {
354   auto info = GetHnDimensionInformation(id, id    354   auto info = GetHnDimensionInformation(id, idim, "GetXUnit");
355                                                   355 
356   if (info == nullptr) return 1.0;                356   if (info == nullptr) return 1.0;
357                                                   357 
358   return info->fUnit;                             358   return info->fUnit;
359 }                                                 359 }
360                                                   360 
361 //____________________________________________    361 //_____________________________________________________________________________
362 G4bool G4HnManager::GetAxisIsLog(unsigned int     362 G4bool G4HnManager::GetAxisIsLog(unsigned int idim, G4int id) const
363 {                                                 363 {
364   auto info = GetHnInformation(id, "GetXAxisIs    364   auto info = GetHnInformation(id, "GetXAxisIsLog");
365                                                   365 
366   if (info == nullptr) return false;              366   if (info == nullptr) return false;
367                                                   367 
368   return info->GetIsLogAxis(idim);                368   return info->GetIsLogAxis(idim);
369 }                                                 369 }
370                                                   370 
371 //____________________________________________    371 //_____________________________________________________________________________
372 G4bool G4HnManager::GetActivation(G4int id) co    372 G4bool G4HnManager::GetActivation(G4int id) const
373 {                                                 373 {
374   auto info = GetHnInformation(id, "GetActivat    374   auto info = GetHnInformation(id, "GetActivation");
375                                                   375 
376   if (info == nullptr) return true;               376   if (info == nullptr) return true;
377                                                   377 
378   return info->GetActivation();                   378   return info->GetActivation();
379 }                                                 379 }
380                                                   380 
381 //____________________________________________    381 //_____________________________________________________________________________
382 G4bool G4HnManager::GetAscii(G4int id) const      382 G4bool G4HnManager::GetAscii(G4int id) const
383 {                                                 383 {
384   auto info = GetHnInformation(id, "GetAscii")    384   auto info = GetHnInformation(id, "GetAscii");
385                                                   385 
386   if (info == nullptr) return false;              386   if (info == nullptr) return false;
387                                                   387 
388   return info->GetAscii();                        388   return info->GetAscii();
389 }                                                 389 }
390                                                   390 
391 //____________________________________________    391 //_____________________________________________________________________________
392 G4bool G4HnManager::GetPlotting(G4int id) cons    392 G4bool G4HnManager::GetPlotting(G4int id) const
393 {                                                 393 {
394   auto info = GetHnInformation(id, "GetPlottin    394   auto info = GetHnInformation(id, "GetPlotting");
395                                                   395 
396   if (info == nullptr) return false;              396   if (info == nullptr) return false;
397                                                   397 
398   return info->GetPlotting();                     398   return info->GetPlotting();
399 }                                                 399 }
400                                                   400 
401 //____________________________________________    401 //_____________________________________________________________________________
402 G4String G4HnManager::GetFileName(G4int id) co    402 G4String G4HnManager::GetFileName(G4int id) const
403 {                                                 403 {
404   auto info = GetHnInformation(id, "GetFileNam    404   auto info = GetHnInformation(id, "GetFileName");
405                                                   405 
406   if (info == nullptr) return "";                 406   if (info == nullptr) return "";
407                                                   407 
408   return info->GetFileName();                     408   return info->GetFileName();
409 }                                                 409 }
410                                                   410