Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/analysis/management/src/G4VAnalysisManager.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/G4VAnalysisManager.cc (Version 11.3.0) and /analysis/management/src/G4VAnalysisManager.cc (Version 10.5.p1)


  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, 09/07/2013  (ivan     27 // Author: Ivana Hrivnacova, 09/07/2013  (ivana@ipno.in2p3.fr)
 28                                                    28 
 29 #include "G4VAnalysisManager.hh"                   29 #include "G4VAnalysisManager.hh"
 30 #include "G4AnalysisMessenger.hh"                  30 #include "G4AnalysisMessenger.hh"
                                                   >>  31 #include "G4AnalysisUtilities.hh"
 31 #include "G4HnManager.hh"                          32 #include "G4HnManager.hh"
                                                   >>  33 #include "G4VH1Manager.hh"
                                                   >>  34 #include "G4VH2Manager.hh"
                                                   >>  35 #include "G4VH3Manager.hh"
                                                   >>  36 #include "G4VP1Manager.hh"
                                                   >>  37 #include "G4VP2Manager.hh"
 32 #include "G4VNtupleManager.hh"                     38 #include "G4VNtupleManager.hh"
 33 #include "G4VNtupleFileManager.hh"             << 
 34 #include "G4VFileManager.hh"                       39 #include "G4VFileManager.hh"
 35 #include "G4NtupleBookingManager.hh"           << 
 36 #include "G4Threading.hh"                      << 
 37 #include "G4AutoLock.hh"                       << 
 38                                                    40 
 39 using namespace G4Analysis;                    <<  41 #include <iostream>
 40                                                << 
 41 namespace {                                    << 
 42   //Mutex to lock master manager when merging  << 
 43   G4Mutex registerWorkerMutex = G4MUTEX_INITIA << 
 44 }                                              << 
 45                                                    42 
 46 namespace {                                    <<  43 using namespace G4Analysis;
 47                                                    44 
 48 //____________________________________________     45 //_____________________________________________________________________________
 49 void NtupleMergingWarning(std::string_view cla <<  46 G4VAnalysisManager::G4VAnalysisManager(const G4String& type, G4bool isMaster)
 50                           std::string_view fun <<  47  : fState(type, isMaster),
 51                           const G4String& outp <<  48    fVFileManager(nullptr),
                                                   >>  49    fPlotManager(nullptr),
                                                   >>  50    fMessenger(G4Analysis::make_unique<G4AnalysisMessenger>(this)),
                                                   >>  51    fH1HnManager(nullptr),
                                                   >>  52    fH2HnManager(nullptr),
                                                   >>  53    fH3HnManager(nullptr),
                                                   >>  54    fP1HnManager(nullptr),
                                                   >>  55    fP2HnManager(nullptr),
                                                   >>  56    fVH1Manager(nullptr),
                                                   >>  57    fVH2Manager(nullptr),
                                                   >>  58    fVH3Manager(nullptr),
                                                   >>  59    fVP1Manager(nullptr),
                                                   >>  60    fVP2Manager(nullptr),
                                                   >>  61    fVNtupleManager(nullptr)
 52 {                                                  62 {
 53   G4Analysis::Warn(                            <<  63   //fMessenger = G4Analysis::make_unique<G4AnalysisMessenger>(this);
 54     "Ntuple merging is not available with " +  << 
 55     "Setting is ignored.", className, function << 
 56 }                                                  64 }
 57                                                    65 
 58 }                                              << 
 59                                                << 
 60 //                                             << 
 61 // ctor/dtor                                   << 
 62 //                                             << 
 63                                                << 
 64 //____________________________________________     66 //_____________________________________________________________________________
 65 G4VAnalysisManager::G4VAnalysisManager(const G <<  67 G4VAnalysisManager::~G4VAnalysisManager()
 66  : fState(type, ! G4Threading::IsWorkerThread( << 
 67 {                                                  68 {
 68   fMessenger = std::make_unique<G4AnalysisMess <<  69   delete fVNtupleManager;
 69   fNtupleBookingManager = std::make_shared<G4N << 
 70                                                << 
 71   // Set master/worker instances               << 
 72   // used only in "FromUI" functions           << 
 73   if ( ! G4Threading::IsWorkerThread() ) {     << 
 74     fgMasterInstance = this;                   << 
 75   }                                            << 
 76   else {                                       << 
 77     if (fgMasterInstance != nullptr) {         << 
 78       G4AutoLock lock(&registerWorkerMutex);   << 
 79       fgMasterInstance->fWorkerManagers.push_b << 
 80       lock.unlock();                           << 
 81     }                                          << 
 82   }                                            << 
 83 }                                              << 
 84                                                << 
 85 //____________________________________________ << 
 86 G4VAnalysisManager::~G4VAnalysisManager() = de << 
 87                                                << 
 88 //                                             << 
 89 // private methods                             << 
 90 //                                             << 
 91                                                << 
 92 //____________________________________________ << 
 93 G4bool G4VAnalysisManager::WriteFromUI()       << 
 94 {                                              << 
 95 // Write is performed on workers first, then o << 
 96                                                << 
 97   if (! fState.GetIsMaster() ) return true;    << 
 98                                                << 
 99   auto result = true;                          << 
100                                                << 
101   // Process first all workers                 << 
102   for (auto workerManger : fWorkerManagers) {  << 
103     // Update G4Threading                      << 
104     auto g4ThreadingValue = G4Threading::G4Get << 
105     G4Threading::G4SetThreadId(workerManger->f << 
106                                                << 
107     result &= workerManger->Write();           << 
108                                                << 
109     // Set G4Threading back                    << 
110     G4Threading::G4SetThreadId(g4ThreadingValu << 
111   }                                            << 
112                                                << 
113   // Process write on master                   << 
114   result &= Write();                           << 
115                                                << 
116   return result;                               << 
117 }                                              << 
118                                                << 
119 //____________________________________________ << 
120 G4bool G4VAnalysisManager::CloseFileFromUI(G4b << 
121 {                                              << 
122 // Close file is performed on workers first, t << 
123                                                << 
124   if (! fState.GetIsMaster() ) return true;    << 
125                                                << 
126   auto result = true;                          << 
127                                                << 
128   // Process first all workers                 << 
129   for (auto workerManger : fWorkerManagers) {  << 
130     // Update G4Threading                      << 
131     auto g4ThreadingValue = G4Threading::G4Get << 
132     G4Threading::G4SetThreadId(workerManger->f << 
133                                                << 
134     result &= workerManger->CloseFile(reset);  << 
135                                                << 
136     // Set G4Threading back                    << 
137     G4Threading::G4SetThreadId(g4ThreadingValu << 
138   }                                            << 
139                                                << 
140   // Process write on master                   << 
141   result &= CloseFile(reset);                  << 
142                                                << 
143   return result;                               << 
144 }                                              << 
145                                                << 
146 //____________________________________________ << 
147 G4bool G4VAnalysisManager::ResetFromUI()       << 
148 {                                              << 
149 // Reset file is performed on workers first, t << 
150                                                << 
151   if (! fState.GetIsMaster() ) return true;    << 
152                                                << 
153   auto result = true;                          << 
154                                                << 
155   // Process first all workers                 << 
156   for (auto workerManger : fWorkerManagers) {  << 
157     // Update G4Threading                      << 
158     auto g4ThreadingValue = G4Threading::G4Get << 
159     G4Threading::G4SetThreadId(workerManger->f << 
160                                                << 
161     result &= workerManger->Reset();           << 
162                                                << 
163     // Set G4Threading back                    << 
164     G4Threading::G4SetThreadId(g4ThreadingValu << 
165   }                                            << 
166                                                << 
167   // Process write on master                   << 
168   result &= Reset();                           << 
169                                                << 
170   return result;                               << 
171 }                                                  70 }
172                                                    71 
173 //                                             <<  72 // 
174 // protected methods                               73 // protected methods
175 //                                                 74 //
176                                                    75 
177 //____________________________________________     76 //_____________________________________________________________________________
178 void G4VAnalysisManager::SetDefaultFileTypeImp <<  77 void G4VAnalysisManager::SetH1Manager(G4VH1Manager* h1Manager)
179 {                                              << 
180   if ( (! GetType().empty()) && (GetFileType() << 
181     // If not generic analysis manager (which  << 
182     // the file type cannot be different from  << 
183     Warn("Cannot set default file type " + val << 
184       " different than the analysis manager ty << 
185       fkClass, "SetDefault");                  << 
186     return;                                    << 
187   }                                            << 
188                                                << 
189   fH1HnManager->SetDefaultFileType(value);     << 
190   fH2HnManager->SetDefaultFileType(value);     << 
191   fH3HnManager->SetDefaultFileType(value);     << 
192   fP1HnManager->SetDefaultFileType(value);     << 
193   fP2HnManager->SetDefaultFileType(value);     << 
194 }                                              << 
195                                                << 
196 //____________________________________________ << 
197 G4String G4VAnalysisManager::GetDefaultFileTyp << 
198 {                                              << 
199   return GetFileType();                        << 
200 }                                              << 
201                                                << 
202 //____________________________________________ << 
203 void G4VAnalysisManager::SetH1Manager(G4VTBase << 
204 {                                                  78 {
205   fVH1Manager.reset(h1Manager);                    79   fVH1Manager.reset(h1Manager);
206   fH1HnManager = h1Manager->GetHnManager();        80   fH1HnManager = h1Manager->GetHnManager();
207   if (fVFileManager != nullptr ) fH1HnManager- <<  81   fMessenger->SetH1HnManager(*fH1HnManager);
208   if (! GetFileType().empty() ) fH1HnManager-> <<  82 } 
209 }                                              << 
210                                                    83 
211 //____________________________________________     84 //_____________________________________________________________________________
212 void G4VAnalysisManager::SetH2Manager(G4VTBase <<  85 void G4VAnalysisManager::SetH2Manager(G4VH2Manager* h2Manager)
213 {                                                  86 {
214   fVH2Manager.reset(h2Manager);                    87   fVH2Manager.reset(h2Manager);
215   fH2HnManager = h2Manager->GetHnManager();        88   fH2HnManager = h2Manager->GetHnManager();
216   if (fVFileManager != nullptr ) fH2HnManager- <<  89   fMessenger->SetH2HnManager(*fH2HnManager);
217   if (! GetFileType().empty() ) fH2HnManager-> <<  90 }  
218 }                                              << 
219                                                    91 
220 //____________________________________________     92 //_____________________________________________________________________________
221 void G4VAnalysisManager::SetH3Manager(G4VTBase <<  93 void G4VAnalysisManager::SetH3Manager(G4VH3Manager* h3Manager)
222 {                                                  94 {
223   fVH3Manager.reset(h3Manager);                    95   fVH3Manager.reset(h3Manager);
224   fH3HnManager = h3Manager->GetHnManager();        96   fH3HnManager = h3Manager->GetHnManager();
225   if (fVFileManager != nullptr ) fH3HnManager- <<  97   fMessenger->SetH3HnManager(*fH3HnManager);
226   if (! GetFileType().empty() ) fH3HnManager-> <<  98 }  
227 }                                              << 
228                                                    99 
229 //____________________________________________    100 //_____________________________________________________________________________
230 void G4VAnalysisManager::SetP1Manager(G4VTBase << 101 void G4VAnalysisManager::SetP1Manager(G4VP1Manager* p1Manager)
231 {                                                 102 {
232   fVP1Manager.reset(p1Manager);                   103   fVP1Manager.reset(p1Manager);
233   fP1HnManager = p1Manager->GetHnManager();       104   fP1HnManager = p1Manager->GetHnManager();
234   if (fVFileManager != nullptr ) fP1HnManager- << 105   fMessenger->SetP1HnManager(*fP1HnManager);
235   if (! GetFileType().empty() ) fP1HnManager-> << 106 } 
236 }                                              << 
237                                                   107 
238 //____________________________________________    108 //_____________________________________________________________________________
239 void G4VAnalysisManager::SetP2Manager(G4VTBase << 109 void G4VAnalysisManager::SetP2Manager(G4VP2Manager* p2Manager)
240 {                                                 110 {
241   fVP2Manager.reset(p2Manager);                   111   fVP2Manager.reset(p2Manager);
242   fP2HnManager = p2Manager->GetHnManager();       112   fP2HnManager = p2Manager->GetHnManager();
243   if (fVFileManager != nullptr ) fP2HnManager- << 113   fMessenger->SetP2HnManager(*fP2HnManager);
244   if (! GetFileType().empty() ) fP2HnManager-> << 114 } 
245 }                                              << 
246                                                << 
247 //____________________________________________ << 
248 void G4VAnalysisManager::SetNtupleManager(std: << 
249 {                                              << 
250   fVNtupleManager = std::move(ntupleManager);  << 
251   fVNtupleManager->SetFirstId(fNtupleBookingMa << 
252   fVNtupleManager->SetFirstNtupleColumnId(fNtu << 
253 }                                              << 
254                                                   115 
255 //____________________________________________    116 //_____________________________________________________________________________
256 void G4VAnalysisManager::SetNtupleFileManager( << 117 void G4VAnalysisManager::SetNtupleManager(G4VNtupleManager* ntupleManager)
257   std::shared_ptr<G4VNtupleFileManager> ntuple << 
258 {                                                 118 {
259   fVNtupleFileManager = std::move(ntupleFileMa << 119   // fVNtupleManager.reset(ntupleManager);
260 }                                              << 120   fVNtupleManager = ntupleManager;
                                                   >> 121 }  
261                                                   122 
262 //____________________________________________    123 //_____________________________________________________________________________
263 void G4VAnalysisManager::SetFileManager(std::s    124 void G4VAnalysisManager::SetFileManager(std::shared_ptr<G4VFileManager> fileManager)
264 {                                                 125 {
265   fVFileManager = fileManager;                    126   fVFileManager = fileManager;
                                                   >> 127 }  
266                                                   128 
267   if ( fH1HnManager != nullptr ) fH1HnManager- << 129 //_____________________________________________________________________________
268   if ( fH2HnManager != nullptr ) fH2HnManager- << 130 void G4VAnalysisManager::SetPlotManager(std::shared_ptr<G4PlotManager> plotManager)
269   if ( fH3HnManager != nullptr ) fH3HnManager- << 131 {
270   if ( fP1HnManager != nullptr ) fP1HnManager- << 132   fPlotManager = plotManager;
271   if ( fP2HnManager != nullptr ) fP2HnManager- << 133 }  
272 }                                              << 
273                                                   134 
274 //____________________________________________    135 //_____________________________________________________________________________
275 G4bool G4VAnalysisManager::WriteAscii(const G4    136 G4bool G4VAnalysisManager::WriteAscii(const G4String& fileName)
276 {                                                 137 {
277   // Do not write on workers                   << 138   G4bool finalResult = true;
278   if ( ! fState.GetIsMaster() ) return true;   << 
279                                                << 
280   auto result = true;                          << 
281                                                   139 
282   // Replace or add file extension .ascii         140   // Replace or add file extension .ascii
283   G4String name(fileName);                        141   G4String name(fileName);
284   if (name.find('.') != std::string::npos) {   << 142   if ( name.find(".") != std::string::npos ) { 
285     name.erase(name.find('.'), name.length()); << 143     name.erase(name.find("."), name.length()); 
286   }                                               144   }
287   name.append(".ascii");                          145   name.append(".ascii");
288                                                   146 
289   Message(kVL3, "write ASCII", "file", name);  << 147 #ifdef G4VERBOSE
290                                                << 148   if ( fState.GetVerboseL3() ) 
                                                   >> 149     fState.GetVerboseL3()->Message("write ASCII", "file", name);
                                                   >> 150 #endif
                                                   >> 151      
291   std::ofstream output(name, std::ios::out);      152   std::ofstream output(name, std::ios::out);
292   if ( ! output ) {                               153   if ( ! output ) {
293     Warn("Cannot open file. File name is not d << 154     G4ExceptionDescription description;
294       fkClass, "WriteAscii");                  << 155     description 
                                                   >> 156       << "Cannot open file. File name is not defined.";
                                                   >> 157     G4Exception("G4VAnalysisManager::WriteAscii()",
                                                   >> 158                 "Analysis_W001", JustWarning, description);
295     return false;                                 159     return false;
296   }                                               160   }
297   output.setf( std::ios::scientific, std::ios:    161   output.setf( std::ios::scientific, std::ios::floatfield );
298                                                   162 
299   result &= fVH1Manager->WriteOnAscii(output); << 163   G4bool result = fVH1Manager->WriteOnAscii(output);
300   result &= fVH2Manager->WriteOnAscii(output); << 164   finalResult = finalResult && result;
301   result &= fVH3Manager->WriteOnAscii(output); << 165   
302   result &= fVP1Manager->WriteOnAscii(output); << 166   result = fVH2Manager->WriteOnAscii(output);
303   result &= fVP2Manager->WriteOnAscii(output); << 167   finalResult = finalResult && result;  
304                                                << 168 
305   Message(kVL1, "write ASCII", "file", name, r << 169   result = fVH3Manager->WriteOnAscii(output);
306                                                << 170   finalResult = finalResult && result;  
307   return result;                               << 171 
308 }                                              << 172   //result = fVP1Manager->WriteOnAscii(output);
309                                                << 173   //finalResult = finalResult && result;  
310 //____________________________________________ << 174 
311 std::shared_ptr<G4VFileManager>                << 175   //result = fVP2Manager->WriteOnAscii(output);
312 G4VAnalysisManager::GetFileManager(const G4Str << 176   //finalResult = finalResult && result;  
313 {                                              << 177 
314   // Check if file type corresponds the manage << 178 #ifdef G4VERBOSE
315   G4String extension = GetExtension(fileName); << 179     if ( fState.GetVerboseL1() ) 
316   if ((extension.size() != 0u) && extension != << 180       fState.GetVerboseL1()->Message("write ASCII", "file",  name, result);
317     Warn(                                      << 181 #endif
318       "The file extension differs from " + Get << 182   
319       GetFileType() + " output type will be us << 183   return finalResult;
320       fkClass, "GetFileManager");              << 184 }     
321   }                                            << 
322                                                << 
323   return fVFileManager;                        << 
324 }                                              << 
325                                                   185 
326 //                                             << 186 // 
327 // public methods                                 187 // public methods
328 //                                                188 //
329                                                   189 
330 //____________________________________________    190 //_____________________________________________________________________________
331 G4bool G4VAnalysisManager::OpenFile(const G4St    191 G4bool G4VAnalysisManager::OpenFile(const G4String& fileName)
332 {                                                 192 {
333   // Protection against opening file twice     << 
334   // (Seems to happen when opening file via UI << 
335   if (IsOpenFile()) {                          << 
336     // G4cout << "Skipping OpenFile. File is a << 
337     return true;                               << 
338   }                                            << 
339                                                << 
340   if ( fileName != "" ) {                         193   if ( fileName != "" ) {
341     return OpenFileImpl(fileName);                194     return OpenFileImpl(fileName);
342   }                                               195   }
343   if (fVFileManager->GetFileName() == "") {    << 196   else {  
344     Warn("Cannot open file. File name is not d << 197     if ( fVFileManager->GetFileName() == "" ) {
345     return false;                              << 198       G4ExceptionDescription description;
346   }                                            << 199       description 
347   return OpenFileImpl(fVFileManager->GetFileNa << 200         << "Cannot open file. File name is not defined.";
348 }                                              << 201       G4Exception("G4VFileManager::OpenFile()",
                                                   >> 202                   "Analysis_W001", JustWarning, description);
                                                   >> 203       return false;
                                                   >> 204     }           
                                                   >> 205     return OpenFileImpl(fVFileManager->GetFileName());
                                                   >> 206   }  
                                                   >> 207 } 
349                                                   208 
350 //____________________________________________    209 //_____________________________________________________________________________
351 G4bool G4VAnalysisManager::Write()                210 G4bool G4VAnalysisManager::Write()
352 {                                                 211 {
353   auto result = true;                          << 212   G4bool finalResult = true;
354                                                   213 
355   result &= WriteImpl();                       << 214   G4bool result = WriteImpl();
                                                   >> 215   finalResult = finalResult && result;
                                                   >> 216  
356   if ( IsPlotting() ) {                           217   if ( IsPlotting() ) {
357     result &= PlotImpl();                      << 218     result = PlotImpl();
                                                   >> 219     finalResult = finalResult && result;
358   }                                               220   }
359                                                   221 
360   // Increment cycle number                    << 222   return finalResult;
361   fState.IncrementCycle();                     << 223 }  
362                                                << 
363   return result;                               << 
364 }                                              << 
365                                                   224 
366 //____________________________________________    225 //_____________________________________________________________________________
367 G4bool G4VAnalysisManager::CloseFile(G4bool re    226 G4bool G4VAnalysisManager::CloseFile(G4bool reset)
368 {                                                 227 {
369   auto result = CloseFileImpl(reset);          << 228   return CloseFileImpl(reset);
370                                                << 229 }  
371   // Notify about new cycle                    << 
372   fState.ResetCycle();                         << 
373   if (fVNtupleManager != nullptr) {            << 
374     fVNtupleManager->SetNewCycle(false);       << 
375   }                                            << 
376                                                << 
377   return result;                               << 
378 }                                              << 
379                                                << 
380 //____________________________________________ << 
381 G4bool G4VAnalysisManager::Reset()             << 
382 {                                              << 
383   // Notify about new cycle                    << 
384   // (as reset causes deleting ntuples)        << 
385   if (fVNtupleManager != nullptr) {            << 
386     fVNtupleManager->SetNewCycle(true);        << 
387   }                                            << 
388                                                << 
389   return ResetImpl();                          << 
390 }                                              << 
391                                                << 
392 //____________________________________________ << 
393 void G4VAnalysisManager::Clear()               << 
394 {                                              << 
395   Message(kVL4, "clear", "all data");          << 
396                                                << 
397   // clear hntools objects                     << 
398   ClearImpl();                                 << 
399                                                << 
400   // clear remaining data                      << 
401   fNtupleBookingManager->ClearData();          << 
402   if ( fVNtupleManager != nullptr ) fVNtupleMa << 
403   if ( fVFileManager != nullptr ) fVFileManage << 
404                                                << 
405   Message(kVL1, "clear", "all data");          << 
406 }                                              << 
407                                                   230 
408 //____________________________________________    231 //_____________________________________________________________________________
409 G4bool G4VAnalysisManager::Merge(tools::histo:    232 G4bool G4VAnalysisManager::Merge(tools::histo::hmpi* hmpi)
410 {                                                 233 {
411   return MergeImpl(hmpi);                         234   return MergeImpl(hmpi);
412 }                                              << 235 }  
413                                                   236 
414 //____________________________________________    237 //_____________________________________________________________________________
415 G4bool G4VAnalysisManager::Plot()                 238 G4bool G4VAnalysisManager::Plot()
416 {                                                 239 {
417   return PlotImpl();                              240   return PlotImpl();
418 }                                              << 241 }  
419                                                   242 
420 //____________________________________________    243 //_____________________________________________________________________________
421 G4bool G4VAnalysisManager::IsOpenFile() const     244 G4bool G4VAnalysisManager::IsOpenFile() const
422 {                                                 245 {
423   return IsOpenFileImpl();                        246   return IsOpenFileImpl();
424 }                                              << 247 }  
425                                                << 
426 //____________________________________________ << 
427 void G4VAnalysisManager::SetDefaultFileType(co << 
428 {                                              << 
429   SetDefaultFileTypeImpl(value);               << 
430 }                                              << 
431                                                << 
432 //____________________________________________ << 
433 G4String G4VAnalysisManager::GetDefaultFileTyp << 
434 {                                              << 
435   return GetDefaultFileTypeImpl();             << 
436 }                                              << 
437                                                   248 
438 //____________________________________________    249 //_____________________________________________________________________________
439 G4bool G4VAnalysisManager::SetFileName(const G    250 G4bool G4VAnalysisManager::SetFileName(const G4String& fileName)
440 {                                              << 251 { 
441   return fVFileManager->SetFileName(fileName); << 252   return fVFileManager->SetFileName(fileName); 
442 }                                                 253 }
443                                                   254 
444 //____________________________________________    255 //_____________________________________________________________________________
445 G4bool G4VAnalysisManager::SetHistoDirectoryNa    256 G4bool G4VAnalysisManager::SetHistoDirectoryName(const G4String& dirName)
446 {                                              << 257 { 
447   return fVFileManager->SetHistoDirectoryName( << 258   return fVFileManager->SetHistoDirectoryName(dirName); 
448 }                                                 259 }
449                                                   260 
450 //____________________________________________    261 //_____________________________________________________________________________
451 G4bool G4VAnalysisManager::SetNtupleDirectoryN    262 G4bool G4VAnalysisManager::SetNtupleDirectoryName(const G4String& dirName)
452 {                                              << 263 { 
453   return fVFileManager->SetNtupleDirectoryName << 264   return fVFileManager->SetNtupleDirectoryName(dirName); 
454 }                                                 265 }
455                                                   266 
456 //____________________________________________    267 //_____________________________________________________________________________
457 void G4VAnalysisManager::SetCompressionLevel(G    268 void G4VAnalysisManager::SetCompressionLevel(G4int level)
458 {                                                 269 {
459   fVFileManager->SetCompressionLevel(level);   << 270   fState.SetCompressionLevel(level);
460 }                                                 271 }
461                                                   272 
462 //____________________________________________    273 //_____________________________________________________________________________
463 G4String G4VAnalysisManager::GetFileName() con << 274 G4String G4VAnalysisManager::GetFileName() const 
464 {                                              << 275 {  
465   return fVFileManager->GetFileName();         << 276   return fVFileManager->GetFileName(); 
466 }                                                 277 }
467                                                   278 
468 //____________________________________________    279 //_____________________________________________________________________________
469 G4String G4VAnalysisManager::GetHistoDirectory << 280 G4String G4VAnalysisManager::GetHistoDirectoryName() const 
470 {                                              << 281 {  
471   return fVFileManager->GetHistoDirectoryName( << 282   return fVFileManager->GetHistoDirectoryName(); 
472 }                                                 283 }
473                                                << 284  
474 //____________________________________________    285 //_____________________________________________________________________________
475 G4String G4VAnalysisManager::GetNtupleDirector    286 G4String G4VAnalysisManager::GetNtupleDirectoryName() const
476 {                                                 287 {
477   return fVFileManager->GetNtupleDirectoryName << 288   return fVFileManager->GetNtupleDirectoryName(); 
478 }                                                 289 }
479                                                   290 
480 //____________________________________________    291 //_____________________________________________________________________________
481 G4int G4VAnalysisManager::GetCompressionLevel(    292 G4int G4VAnalysisManager::GetCompressionLevel() const
482 {                                                 293 {
483   return fVFileManager->GetCompressionLevel(); << 294   return fState.GetCompressionLevel();
484 }                                                 295 }
485                                                   296 
486 //____________________________________________    297 //_____________________________________________________________________________
487 G4int G4VAnalysisManager::CreateH1(const G4Str    298 G4int G4VAnalysisManager::CreateH1(const G4String& name,  const G4String& title,
488                                G4int nbins, G4    299                                G4int nbins, G4double xmin, G4double xmax,
489                                const G4String&    300                                const G4String& unitName, const G4String& fcnName,
490                                const G4String&    301                                const G4String& binSchemeName)
491 {                                                 302 {
492   std::array<G4HnDimension, kDim1> bins = {    << 303   if ( ! CheckName(name, "H1") ) return kInvalidId;
493     G4HnDimension(nbins, xmin, xmax)};         << 304   if ( ! CheckNbins(nbins) ) return kInvalidId;
494   std::array<G4HnDimensionInformation, kDim1>  << 305   if ( ! CheckMinMax(xmin, xmax, fcnName, binSchemeName) ) return kInvalidId;
495     G4HnDimensionInformation(unitName, fcnName << 306 
496                                                << 307   return fVH1Manager->CreateH1(name, title, nbins, xmin, xmax, 
497   return fVH1Manager->Create(name, title, bins << 308                                unitName, fcnName, binSchemeName);
498 }                                              << 309 }                                         
499                                                   310 
500 //____________________________________________    311 //_____________________________________________________________________________
501 G4int G4VAnalysisManager::CreateH1(const G4Str    312 G4int G4VAnalysisManager::CreateH1(const G4String& name,  const G4String& title,
502                                const std::vect    313                                const std::vector<G4double>& edges,
503                                const G4String&    314                                const G4String& unitName, const G4String& fcnName)
504 {                                                 315 {
505   std::array<G4HnDimension, kDim1> bins = {    << 316   if ( ! CheckName(name, "H1") ) return kInvalidId;
506     G4HnDimension(edges)};                     << 317   if ( ! CheckEdges(edges) ) return kInvalidId;
507   std::array<G4HnDimensionInformation, kDim1>  << 
508     G4HnDimensionInformation(unitName, fcnName << 
509                                                   318 
510   return fVH1Manager->Create(name, title, bins << 319   return fVH1Manager->CreateH1(name, title, edges, unitName, fcnName);
511 }                                              << 320 }                                         
512                                                   321 
513 //____________________________________________    322 //_____________________________________________________________________________
514 G4int G4VAnalysisManager::CreateH2(const G4Str    323 G4int G4VAnalysisManager::CreateH2(const G4String& name,  const G4String& title,
515                                G4int nxbins, G    324                                G4int nxbins, G4double xmin, G4double xmax,
516                                G4int nybins, G    325                                G4int nybins, G4double ymin, G4double ymax,
517                                const G4String&    326                                const G4String& xunitName, const G4String& yunitName,
518                                const G4String&    327                                const G4String& xfcnName, const G4String& yfcnName,
519                                const G4String& << 328                                const G4String& xbinSchemeName, 
520                                const G4String&    329                                const G4String& ybinSchemeName)
521                                                << 330                                
522 {                                                 331 {
523   std::array<G4HnDimension, kDim2> bins = {    << 332   if ( ! CheckName(name, "H2") ) return kInvalidId;
524     G4HnDimension(nxbins, xmin, xmax),         << 333   
525     G4HnDimension(nybins, ymin, ymax) };       << 334   if ( ! CheckNbins(nxbins) ) return kInvalidId;
526   std::array<G4HnDimensionInformation, kDim2>  << 335   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
527     G4HnDimensionInformation(xunitName, xfcnNa << 336 
528     G4HnDimensionInformation(yunitName, yfcnNa << 337   if ( ! CheckNbins(nybins) ) return kInvalidId;
529                                                << 338   if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
530   return fVH2Manager->Create(name, title, bins << 339 
531 }                                              << 340   return fVH2Manager->CreateH2(name, title, 
                                                   >> 341                                nxbins, xmin, xmax, nybins, ymin, ymax, 
                                                   >> 342                                xunitName, yunitName, xfcnName, yfcnName, 
                                                   >> 343                                xbinSchemeName, ybinSchemeName);
                                                   >> 344 }                                         
532                                                   345 
533 //____________________________________________    346 //_____________________________________________________________________________
534 G4int G4VAnalysisManager::CreateH2(const G4Str    347 G4int G4VAnalysisManager::CreateH2(const G4String& name,  const G4String& title,
535                                const std::vect    348                                const std::vector<G4double>& xedges,
536                                const std::vect    349                                const std::vector<G4double>& yedges,
537                                const G4String&    350                                const G4String& xunitName, const G4String& yunitName,
538                                const G4String&    351                                const G4String& xfcnName, const G4String& yfcnName)
539                                                << 352                                
540 {                                                 353 {
541   std::array<G4HnDimension, kDim2> bins = {    << 354   if ( ! CheckName(name, "H2") ) return kInvalidId;
542     G4HnDimension(xedges), G4HnDimension(yedge << 355   
543   std::array<G4HnDimensionInformation, kDim2>  << 356   if ( ! CheckEdges(xedges) ) return kInvalidId;
544     G4HnDimensionInformation(xunitName, xfcnNa << 357   if ( ! CheckEdges(yedges) ) return kInvalidId;
545     G4HnDimensionInformation(yunitName, yfcnNa << 358 
546                                                << 359   return fVH2Manager->CreateH2(name, title, 
547   return fVH2Manager->Create(name, title, bins << 360                                xedges, yedges,
548 }                                              << 361                                xunitName, yunitName, xfcnName, yfcnName);
                                                   >> 362 }                                         
549                                                   363 
550 //____________________________________________    364 //_____________________________________________________________________________
551 G4int G4VAnalysisManager::CreateH3(const G4Str    365 G4int G4VAnalysisManager::CreateH3(const G4String& name,  const G4String& title,
552                                G4int nxbins, G    366                                G4int nxbins, G4double xmin, G4double xmax,
553                                G4int nybins, G    367                                G4int nybins, G4double ymin, G4double ymax,
554                                G4int nzbins, G    368                                G4int nzbins, G4double zmin, G4double zmax,
555                                const G4String&    369                                const G4String& xunitName, const G4String& yunitName,
556                                const G4String&    370                                const G4String& zunitName,
557                                const G4String& << 371                                const G4String& xfcnName, const G4String& yfcnName, 
558                                const G4String&    372                                const G4String& zfcnName,
559                                const G4String& << 373                                const G4String& xbinSchemeName, 
560                                const G4String&    374                                const G4String& ybinSchemeName,
561                                const G4String&    375                                const G4String& zbinSchemeName)
562                                                << 376                                
563 {                                                 377 {
564   std::array<G4HnDimension, kDim3> bins = {    << 378   if ( ! CheckName(name, "H3") ) return kInvalidId;
565     G4HnDimension(nxbins, xmin, xmax),         << 379   
566     G4HnDimension(nybins, ymin, ymax),         << 380   if ( ! CheckNbins(nxbins) ) return kInvalidId;
567     G4HnDimension(nzbins, zmin, zmax)};        << 381   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
568   std::array<G4HnDimensionInformation, kDim3>  << 382 
569     G4HnDimensionInformation(xunitName, xfcnNa << 383   if ( ! CheckNbins(nybins) ) return kInvalidId;
570     G4HnDimensionInformation(yunitName, yfcnNa << 384   if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
571     G4HnDimensionInformation(zunitName, zfcnNa << 385 
572                                                << 386   if ( ! CheckNbins(nzbins) ) return kInvalidId;
573   return fVH3Manager->Create(name, title, bins << 387   if ( ! CheckMinMax(zmin, zmax, zfcnName, zbinSchemeName) ) return kInvalidId;
574 }                                              << 388 
                                                   >> 389   return fVH3Manager->CreateH3(name, title, 
                                                   >> 390                                nxbins, xmin, xmax, nybins, ymin, ymax, 
                                                   >> 391                                nzbins, zmin, zmax,
                                                   >> 392                                xunitName, yunitName, zunitName, 
                                                   >> 393                                xfcnName, yfcnName, zfcnName,
                                                   >> 394                                xbinSchemeName, ybinSchemeName, zbinSchemeName);
                                                   >> 395 }                                         
575                                                   396 
576 //____________________________________________    397 //_____________________________________________________________________________
577 G4int G4VAnalysisManager::CreateH3(const G4Str    398 G4int G4VAnalysisManager::CreateH3(const G4String& name,  const G4String& title,
578                                const std::vect    399                                const std::vector<G4double>& xedges,
579                                const std::vect    400                                const std::vector<G4double>& yedges,
580                                const std::vect    401                                const std::vector<G4double>& zedges,
581                                const G4String&    402                                const G4String& xunitName, const G4String& yunitName,
582                                const G4String&    403                                const G4String& zunitName,
583                                const G4String& << 404                                const G4String& xfcnName, const G4String& yfcnName, 
584                                const G4String&    405                                const G4String& zfcnName)
585                                                << 406                                
586 {                                                 407 {
587   std::array<G4HnDimension, kDim3> bins = {    << 408   if ( ! CheckName(name, "H3") ) return kInvalidId;
588     G4HnDimension(xedges),  G4HnDimension(yedg << 409   
589   std::array<G4HnDimensionInformation, kDim3>  << 410   if ( ! CheckEdges(xedges) ) return kInvalidId;
590     G4HnDimensionInformation(xunitName, xfcnNa << 411   if ( ! CheckEdges(yedges) ) return kInvalidId;
591     G4HnDimensionInformation(yunitName, yfcnNa << 412   if ( ! CheckEdges(zedges) ) return kInvalidId;
592     G4HnDimensionInformation(zunitName, zfcnNa << 413 
593                                                << 414   return fVH3Manager->CreateH3(name, title, 
594   return fVH3Manager->Create(name, title, bins << 415                                xedges, yedges, zedges, 
595 }                                              << 416                                xunitName, yunitName, zunitName,
                                                   >> 417                                xfcnName, yfcnName, zfcnName);
                                                   >> 418 }                                         
596                                                   419 
597 //____________________________________________    420 //_____________________________________________________________________________
598 G4bool G4VAnalysisManager::SetH1(G4int id,        421 G4bool G4VAnalysisManager::SetH1(G4int id,
599                                 G4int nbins, G    422                                 G4int nbins, G4double xmin, G4double xmax,
600                                 const G4String    423                                 const G4String& unitName, const G4String& fcnName,
601                                 const G4String    424                                 const G4String& binSchemeName)
602 {                                              << 425 {                                
603   std::array<G4HnDimension, kDim1> bins = {    << 426   if ( ! CheckNbins(nbins) ) return kInvalidId;
604     G4HnDimension(nbins, xmin, xmax)};         << 427   if ( ! CheckMinMax(xmin, xmax, fcnName, binSchemeName) ) return kInvalidId;
605   std::array<G4HnDimensionInformation, kDim1>  << 
606     G4HnDimensionInformation(unitName, fcnName << 
607                                                   428 
608   return fVH1Manager->Set(id, bins, info);     << 429   return fVH1Manager->SetH1(id, nbins, xmin, xmax, unitName, fcnName, binSchemeName); 
609 }                                                 430 }
610                                                << 431   
611 //____________________________________________    432 //_____________________________________________________________________________
612 G4bool G4VAnalysisManager::SetH1(G4int id,        433 G4bool G4VAnalysisManager::SetH1(G4int id,
613                                 const std::vec    434                                 const std::vector<G4double>& edges,
614                                 const G4String    435                                 const G4String& unitName, const G4String& fcnName)
615 {                                              << 436 {                                
616   std::array<G4HnDimension, kDim1> bins = {    << 437   if ( ! CheckEdges(edges) ) return kInvalidId;
617     G4HnDimension(edges)};                     << 
618   std::array<G4HnDimensionInformation, kDim1>  << 
619     G4HnDimensionInformation(unitName, fcnName << 
620                                                   438 
621   return fVH1Manager->Set(id, bins, info);     << 439   return fVH1Manager->SetH1(id, edges, unitName, fcnName); 
622 }                                                 440 }
623                                                << 441   
624 //____________________________________________    442 //_____________________________________________________________________________
625 G4bool G4VAnalysisManager::SetH2(G4int id,        443 G4bool G4VAnalysisManager::SetH2(G4int id,
626                                 G4int nxbins,  << 444                                 G4int nxbins, G4double xmin, G4double xmax, 
627                                 G4int nybins,     445                                 G4int nybins, G4double ymin, G4double ymax,
628                                 const G4String    446                                 const G4String& xunitName, const G4String& yunitName,
629                                 const G4String    447                                 const G4String& xfcnName, const G4String& yfcnName,
630                                 const G4String << 448                                 const G4String& xbinSchemeName, 
631                                 const G4String    449                                 const G4String& ybinSchemeName)
632 {                                              << 450 {                                
633   std::array<G4HnDimension, kDim2> bins = {    << 451   if ( ! CheckNbins(nxbins) ) return kInvalidId;
634     G4HnDimension(nxbins, xmin, xmax),         << 452   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
635     G4HnDimension(nybins, ymin, ymax) };       << 453 
636   std::array<G4HnDimensionInformation, kDim2>  << 454   if ( ! CheckNbins(nybins) ) return kInvalidId;
637     G4HnDimensionInformation(xunitName, xfcnNa << 455   if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
638     G4HnDimensionInformation(yunitName, yfcnNa << 456 
639                                                << 457   return fVH2Manager->SetH2(id, nxbins, xmin, xmax, nybins, ymin, ymax, 
640   return fVH2Manager->Set(id, bins, info);     << 458                             xunitName, yunitName, xfcnName, yfcnName,
                                                   >> 459                             xbinSchemeName, ybinSchemeName);
641 }                                                 460 }
642                                                << 461                                   
643 //____________________________________________    462 //_____________________________________________________________________________
644 G4bool G4VAnalysisManager::SetH2(G4int id,        463 G4bool G4VAnalysisManager::SetH2(G4int id,
645                                 const std::vec    464                                 const std::vector<G4double>& xedges,
646                                 const std::vec    465                                 const std::vector<G4double>& yedges,
647                                 const G4String    466                                 const G4String& xunitName, const G4String& yunitName,
648                                 const G4String    467                                 const G4String& xfcnName, const G4String& yfcnName)
649 {                                              << 468 {                                
650   std::array<G4HnDimension, kDim2> bins = {    << 469   if ( ! CheckEdges(xedges) ) return kInvalidId;
651     G4HnDimension(xedges), G4HnDimension(yedge << 470   if ( ! CheckEdges(yedges) ) return kInvalidId;
652   std::array<G4HnDimensionInformation, kDim2>  << 
653     G4HnDimensionInformation(xunitName, xfcnNa << 
654     G4HnDimensionInformation(yunitName, yfcnNa << 
655                                                   471 
656   return fVH2Manager->Set(id, bins, info);     << 472   return fVH2Manager->SetH2(id, xedges, yedges, 
                                                   >> 473                             xunitName, yunitName, xfcnName, yfcnName);
657 }                                                 474 }
658                                                << 475                                   
659 //____________________________________________    476 //_____________________________________________________________________________
660 G4bool G4VAnalysisManager::SetH3(G4int id,        477 G4bool G4VAnalysisManager::SetH3(G4int id,
661                                 G4int nxbins,  << 478                                 G4int nxbins, G4double xmin, G4double xmax, 
662                                 G4int nybins,     479                                 G4int nybins, G4double ymin, G4double ymax,
663                                 G4int nzbins,     480                                 G4int nzbins, G4double zmin, G4double zmax,
664                                 const G4String    481                                 const G4String& xunitName, const G4String& yunitName,
665                                 const G4String    482                                 const G4String& zunitName,
666                                 const G4String << 483                                 const G4String& xfcnName, const G4String& yfcnName, 
667                                 const G4String    484                                 const G4String& zfcnName,
668                                 const G4String << 485                                 const G4String& xbinSchemeName, 
669                                 const G4String    486                                 const G4String& ybinSchemeName,
670                                 const G4String    487                                 const G4String& zbinSchemeName)
671 {                                              << 488 {                                
672   std::array<G4HnDimension, kDim3> bins = {    << 489   if ( ! CheckNbins(nxbins) ) return kInvalidId;
673     G4HnDimension(nxbins, xmin, xmax),         << 490   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
674     G4HnDimension(nybins, ymin, ymax),         << 491 
675     G4HnDimension(nzbins, zmin, zmax)};        << 492   if ( ! CheckNbins(nybins) ) return kInvalidId;
676   std::array<G4HnDimensionInformation, kDim3>  << 493   if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
677     G4HnDimensionInformation(xunitName, xfcnNa << 494 
678     G4HnDimensionInformation(yunitName, yfcnNa << 495   if ( ! CheckNbins(nzbins) ) return kInvalidId;
679     G4HnDimensionInformation(zunitName, zfcnNa << 496   if ( ! CheckMinMax(zmin, zmax, zfcnName, zbinSchemeName) ) return kInvalidId;
680                                                << 497 
681   return fVH3Manager->Set(id, bins, info);     << 498   return fVH3Manager->SetH3(id, 
                                                   >> 499                             nxbins, xmin, xmax, nybins, ymin, ymax, 
                                                   >> 500                             nzbins, zmin, zmax,
                                                   >> 501                             xunitName, yunitName, zunitName, 
                                                   >> 502                             xfcnName, yfcnName, zfcnName,
                                                   >> 503                             xbinSchemeName, ybinSchemeName, zbinSchemeName);
682 }                                                 504 }
683                                                << 505                                   
684 //____________________________________________    506 //_____________________________________________________________________________
685 G4bool G4VAnalysisManager::SetH3(G4int id,        507 G4bool G4VAnalysisManager::SetH3(G4int id,
686                                 const std::vec    508                                 const std::vector<G4double>& xedges,
687                                 const std::vec    509                                 const std::vector<G4double>& yedges,
688                                 const std::vec    510                                 const std::vector<G4double>& zedges,
689                                 const G4String    511                                 const G4String& xunitName, const G4String& yunitName,
690                                 const G4String    512                                 const G4String& zunitName,
691                                 const G4String << 513                                 const G4String& xfcnName, const G4String& yfcnName, 
692                                 const G4String    514                                 const G4String& zfcnName)
693 {                                              << 515 {                                
694   std::array<G4HnDimension, kDim3> bins = {    << 516   if ( ! CheckEdges(xedges) ) return kInvalidId;
695     G4HnDimension(xedges), G4HnDimension(yedge << 517   if ( ! CheckEdges(yedges) ) return kInvalidId;
696   std::array<G4HnDimensionInformation, kDim3>  << 518   if ( ! CheckEdges(zedges) ) return kInvalidId;
697     G4HnDimensionInformation(xunitName, xfcnNa << 519 
698     G4HnDimensionInformation(yunitName, yfcnNa << 520   return fVH3Manager->SetH3(id, xedges, yedges, zedges,
699     G4HnDimensionInformation(zunitName, zfcnNa << 521                             xunitName, yunitName, zunitName, 
700                                                << 522                             xfcnName, yfcnName, zfcnName);
701   return fVH3Manager->Set(id, bins, info);     << 
702 }                                                 523 }
703                                                << 524                                   
704 //____________________________________________    525 //_____________________________________________________________________________
705 G4bool G4VAnalysisManager::ScaleH1(G4int id, G    526 G4bool G4VAnalysisManager::ScaleH1(G4int id, G4double factor)
706 {                                                 527 {
707   return fVH1Manager->Scale(id, factor);       << 528   return fVH1Manager->ScaleH1(id, factor);
708 }                                              << 529 }  
709                                                   530 
710 //____________________________________________    531 //_____________________________________________________________________________
711 G4bool G4VAnalysisManager::ScaleH2(G4int id, G    532 G4bool G4VAnalysisManager::ScaleH2(G4int id, G4double factor)
712 {                                                 533 {
713   return fVH2Manager->Scale(id, factor);       << 534   return fVH2Manager->ScaleH2(id, factor);
714 }                                              << 535 }  
715                                                << 536                            
716 //____________________________________________    537 //_____________________________________________________________________________
717 G4bool G4VAnalysisManager::ScaleH3(G4int id, G    538 G4bool G4VAnalysisManager::ScaleH3(G4int id, G4double factor)
718 {                                                 539 {
719   return fVH3Manager->Scale(id, factor);       << 540   return fVH3Manager->ScaleH3(id, factor);
720 }                                              << 541 }  
721                                                << 542                            
722 //____________________________________________    543 //_____________________________________________________________________________
723 G4int G4VAnalysisManager::CreateP1(const G4Str    544 G4int G4VAnalysisManager::CreateP1(const G4String& name,  const G4String& title,
724                                G4int nbins, G4    545                                G4int nbins, G4double xmin, G4double xmax,
725                                G4double ymin,     546                                G4double ymin, G4double ymax,
726                                const G4String&    547                                const G4String& xunitName, const G4String& yunitName,
727                                const G4String&    548                                const G4String& xfcnName, const G4String& yfcnName,
728                                const G4String&    549                                const G4String& xbinSchemeName)
729 {                                                 550 {
730   std::array<G4HnDimension, kDim2> bins = {    << 551   if ( ! CheckName(name, "P1") ) return kInvalidId;
731     G4HnDimension(nbins, xmin, xmax),          << 552   if ( ! CheckNbins(nbins) ) return kInvalidId;
732     G4HnDimension(0, ymin, ymax) };            << 553   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
733   std::array<G4HnDimensionInformation, kDim2>  << 554   if ( ymin != 0. || ymax != 0. ) {
734     G4HnDimensionInformation(xunitName, xfcnNa << 555     // Do not check  default values
735     G4HnDimensionInformation(yunitName, yfcnNa << 556     if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
                                                   >> 557   }
736                                                   558 
737   return fVP1Manager->Create(name, title, bins << 559   return fVP1Manager->CreateP1(name, title, nbins, xmin, xmax, ymin, ymax,
738 }                                              << 560                                xunitName, yunitName, xfcnName, yfcnName, 
                                                   >> 561                                xbinSchemeName);
                                                   >> 562 }                                         
739                                                   563 
740 //____________________________________________    564 //_____________________________________________________________________________
741 G4int G4VAnalysisManager::CreateP1(const G4Str    565 G4int G4VAnalysisManager::CreateP1(const G4String& name,  const G4String& title,
742                                const std::vect    566                                const std::vector<G4double>& edges,
743                                G4double ymin,     567                                G4double ymin, G4double ymax,
744                                const G4String&    568                                const G4String& xunitName, const G4String& yunitName,
745                                const G4String&    569                                const G4String& xfcnName, const G4String& yfcnName)
746 {                                                 570 {
747   std::array<G4HnDimension, kDim2> bins = {    << 571   if ( ! CheckName(name, "P1") ) return kInvalidId;
748     G4HnDimension(edges), G4HnDimension(0, ymi << 572   if ( ! CheckEdges(edges) ) return kInvalidId;
749   std::array<G4HnDimensionInformation, kDim2>  << 573   if ( ymin != 0. || ymax != 0. ) {
750     G4HnDimensionInformation(xunitName, xfcnNa << 574     // Do not check  default values
751     G4HnDimensionInformation(yunitName, yfcnNa << 575     if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
                                                   >> 576   }
752                                                   577 
753   return fVP1Manager->Create(name, title, bins << 578   return fVP1Manager->CreateP1(name, title, edges, ymin, ymax, 
754 }                                              << 579                                xunitName, yunitName, xfcnName, yfcnName);
                                                   >> 580 }                                         
755                                                   581 
756 //____________________________________________    582 //_____________________________________________________________________________
757 G4int G4VAnalysisManager::CreateP2(const G4Str    583 G4int G4VAnalysisManager::CreateP2(const G4String& name, const G4String& title,
758                               G4int nxbins, G4    584                               G4int nxbins, G4double xmin, G4double xmax,
759                               G4int nybins, G4 << 585                               G4int nybins, G4double ymin, G4double ymax, 
760                               G4double zmin, G    586                               G4double zmin, G4double zmax,
761                               const G4String&     587                               const G4String& xunitName, const G4String& yunitName,
762                               const G4String&     588                               const G4String& zunitName,
763                               const G4String&     589                               const G4String& xfcnName, const G4String& yfcnName,
764                               const G4String&     590                               const G4String& zfcnName,
765                               const G4String&  << 591                               const G4String& xbinSchemeName, 
766                               const G4String&     592                               const G4String& ybinSchemeName)
767 {                                                 593 {
768   std::array<G4HnDimension, kDim3> bins = {    << 594   if ( ! CheckName(name, "P2") ) return kInvalidId;
769     G4HnDimension(nxbins, xmin, xmax),         << 595   if ( ! CheckNbins(nxbins) ) return kInvalidId;
770     G4HnDimension(nybins, ymin, ymax),         << 596   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
771     G4HnDimension(0, zmin, zmax)};             << 597   if ( ! CheckMinMax(ymin, ymax, yfcnName, xbinSchemeName) ) return kInvalidId;
772   std::array<G4HnDimensionInformation, kDim3>  << 598   if ( zmin != 0. || zmax != 0. ) {
773     G4HnDimensionInformation(xunitName, xfcnNa << 599     // Do not check  default values
774     G4HnDimensionInformation(yunitName, yfcnNa << 600     if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
775     G4HnDimensionInformation(zunitName, zfcnNa << 601   }
776                                                << 602 
777   return fVP2Manager->Create(name, title, bins << 603   return fVP2Manager->CreateP2(name, title, 
778 }                                              << 604                                nxbins, xmin, xmax, nybins, ymin, ymax,
                                                   >> 605                                zmin, zmax,
                                                   >> 606                                xunitName, yunitName, zunitName,
                                                   >> 607                                xfcnName, yfcnName, zfcnName,
                                                   >> 608                                xbinSchemeName, ybinSchemeName);
                                                   >> 609 }                               
779                                                   610 
780 //____________________________________________    611 //_____________________________________________________________________________
781 G4int G4VAnalysisManager::CreateP2(const G4Str    612 G4int G4VAnalysisManager::CreateP2(const G4String& name, const G4String& title,
782                               const std::vecto    613                               const std::vector<G4double>& xedges,
783                               const std::vecto    614                               const std::vector<G4double>& yedges,
784                               G4double zmin, G    615                               G4double zmin, G4double zmax,
785                               const G4String&     616                               const G4String& xunitName, const G4String& yunitName,
786                               const G4String&     617                               const G4String& zunitName,
787                               const G4String&     618                               const G4String& xfcnName, const G4String& yfcnName,
788                               const G4String&     619                               const G4String& zfcnName)
789 {                                                 620 {
790   std::array<G4HnDimension, kDim3> bins = {    << 621   if ( ! CheckName(name, "P2") ) return kInvalidId;
791     G4HnDimension(xedges),  G4HnDimension(yedg << 622   if ( ! CheckEdges(xedges) ) return kInvalidId;
792   std::array<G4HnDimensionInformation, kDim3>  << 623   if ( ! CheckEdges(yedges) ) return kInvalidId;
793     G4HnDimensionInformation(xunitName, xfcnNa << 624   if ( zmin != 0. || zmax != 0. ) {
794     G4HnDimensionInformation(yunitName, yfcnNa << 625     // Do not check  default values
795     G4HnDimensionInformation(zunitName, zfcnNa << 626     if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
                                                   >> 627   }
796                                                   628 
797   return fVP2Manager->Create(name, title, bins << 629   return fVP2Manager->CreateP2(name, title, xedges, yedges, zmin, zmax, 
798 }                                              << 630                                xunitName, yunitName, zunitName,
                                                   >> 631                                xfcnName, yfcnName, zfcnName);
                                                   >> 632 }                                         
799                                                   633 
800 //____________________________________________    634 //_____________________________________________________________________________
801 G4bool G4VAnalysisManager::SetP1(G4int id,        635 G4bool G4VAnalysisManager::SetP1(G4int id,
802                                 G4int nbins, G    636                                 G4int nbins, G4double xmin, G4double xmax,
803                                 G4double ymin,    637                                 G4double ymin, G4double ymax,
804                                 const G4String    638                                 const G4String& xunitName, const G4String& yunitName,
805                                 const G4String    639                                 const G4String& xfcnName, const G4String& yfcnName,
806                                 const G4String    640                                 const G4String& xbinSchemeName)
807 {                                              << 641 {                                
808   std::array<G4HnDimension, kDim2> bins = {    << 642   if ( ! CheckNbins(nbins) ) return kInvalidId;
809     G4HnDimension(nbins, xmin, xmax),          << 643   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
810     G4HnDimension(0, ymin, ymax) };            << 644   if ( ymin != 0. || ymax != 0. ) {
811   std::array<G4HnDimensionInformation, kDim2>  << 645     // Do not check  default values
812     G4HnDimensionInformation(xunitName, xfcnNa << 646     if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
813     G4HnDimensionInformation(yunitName, yfcnNa << 647   }
814                                                   648 
815   return fVP1Manager->Set(id, bins, info);     << 649   return fVP1Manager->SetP1(id, nbins, xmin, xmax, ymin, ymax, 
                                                   >> 650                             xunitName, yunitName, xfcnName, yfcnName, 
                                                   >> 651                             xbinSchemeName);
816 }                                                 652 }
817                                                << 653   
818 //____________________________________________    654 //_____________________________________________________________________________
819 G4bool G4VAnalysisManager::SetP1(G4int id,        655 G4bool G4VAnalysisManager::SetP1(G4int id,
820                                 const std::vec    656                                 const std::vector<G4double>& edges,
821                                 G4double ymin,    657                                 G4double ymin, G4double ymax,
822                                 const G4String    658                                 const G4String& xunitName, const G4String& yunitName,
823                                 const G4String    659                                 const G4String& xfcnName, const G4String& yfcnName)
824 {                                              << 660 {                                
825   std::array<G4HnDimension, kDim2> bins = {    << 661   if ( ! CheckEdges(edges) ) return kInvalidId;
826     G4HnDimension(edges), G4HnDimension(0, ymi << 662   if ( ymin != 0. || ymax != 0. ) {
827   std::array<G4HnDimensionInformation, kDim2>  << 663     // Do not check  default values
828     G4HnDimensionInformation(xunitName, xfcnNa << 664     if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
829     G4HnDimensionInformation(yunitName, yfcnNa << 665   }
830                                                   666 
831   return fVP1Manager->Set(id, bins, info);     << 667   return fVP1Manager->SetP1(id, edges, ymin, ymax, 
                                                   >> 668                             xunitName, yunitName, xfcnName, yfcnName); 
832 }                                                 669 }
833                                                << 670   
834 //____________________________________________    671 //_____________________________________________________________________________
835 G4bool G4VAnalysisManager::SetP2(G4int id,        672 G4bool G4VAnalysisManager::SetP2(G4int id,
836                               G4int nxbins, G4 << 673                               G4int nxbins, G4double xmin, G4double xmax, 
837                               G4int nybins, G4 << 674                               G4int nybins, G4double ymin, G4double ymax, 
838                               G4double zmin, G    675                               G4double zmin, G4double zmax,
839                               const G4String&     676                               const G4String& xunitName, const G4String& yunitName,
840                               const G4String&     677                               const G4String& zunitName,
841                               const G4String&     678                               const G4String& xfcnName, const G4String& yfcnName,
842                               const G4String&     679                               const G4String& zfcnName,
843                               const G4String&  << 680                               const G4String& xbinSchemeName, 
844                               const G4String&     681                               const G4String& ybinSchemeName)
845 {                                                 682 {
846   std::array<G4HnDimension, kDim3> bins = {    << 683   if ( ! CheckNbins(nxbins) ) return kInvalidId;
847     G4HnDimension(nxbins, xmin, xmax),         << 684   if ( ! CheckNbins(nybins) ) return kInvalidId;
848     G4HnDimension(nybins, ymin, ymax),         << 685   if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
849     G4HnDimension(0, zmin, zmax)};             << 686   if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
850   std::array<G4HnDimensionInformation, kDim3>  << 687   if ( zmin != 0. || zmax != 0. ) {
851     G4HnDimensionInformation(xunitName, xfcnNa << 688     // Do not check  default values
852     G4HnDimensionInformation(yunitName, yfcnNa << 689     if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
853     G4HnDimensionInformation(zunitName, zfcnNa << 690   }
854                                                << 691 
855   return fVP2Manager->Set(id, bins, info);     << 692   return fVP2Manager->SetP2(id, nxbins, xmin, xmax, nybins, ymin, ymax, 
                                                   >> 693                             zmin, zmax,
                                                   >> 694                             xunitName, yunitName, zunitName,
                                                   >> 695                             xfcnName, yfcnName, zfcnName,
                                                   >> 696                             xbinSchemeName, ybinSchemeName);
856 }                                                 697 }
857                                                << 698   
858 //____________________________________________    699 //_____________________________________________________________________________
859 G4bool G4VAnalysisManager::SetP2(G4int id,        700 G4bool G4VAnalysisManager::SetP2(G4int id,
860                               const std::vecto    701                               const std::vector<G4double>& xedges,
861                               const std::vecto    702                               const std::vector<G4double>& yedges,
862                               G4double zmin, G    703                               G4double zmin, G4double zmax,
863                               const G4String&  << 704                               const G4String& xunitName, 
864                               const G4String&     705                               const G4String& yunitName,
865                               const G4String&     706                               const G4String& zunitName,
866                               const G4String&  << 707                               const G4String& xfcnName, 
867                               const G4String&     708                               const G4String& yfcnName,
868                               const G4String&     709                               const G4String& zfcnName)
869 {                                                 710 {
870   std::array<G4HnDimension, kDim3> bins = {    << 711   if ( ! CheckEdges(xedges) ) return kInvalidId;
871     G4HnDimension(xedges), G4HnDimension(yedge << 712   if ( ! CheckEdges(yedges) ) return kInvalidId;
872   std::array<G4HnDimensionInformation, kDim3>  << 713   if ( zmin != 0. || zmax != 0. ) {
873     G4HnDimensionInformation(xunitName, xfcnNa << 714     // Do not check  default values
874     G4HnDimensionInformation(yunitName, yfcnNa << 715     if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
875     G4HnDimensionInformation(zunitName, zfcnNa << 716   }
876                                                   717 
877   return fVP2Manager->Set(id, bins, info);     << 718   return fVP2Manager->SetP2(id, xedges, yedges, zmin, zmax, 
                                                   >> 719                             xunitName, yunitName, zunitName,
                                                   >> 720                             xfcnName, yfcnName, zfcnName);
878 }                                                 721 }
879                                                   722 
880 //____________________________________________    723 //_____________________________________________________________________________
881 G4bool G4VAnalysisManager::ScaleP1(G4int id, G    724 G4bool G4VAnalysisManager::ScaleP1(G4int id, G4double factor)
882 {                                                 725 {
883   return fVP1Manager->Scale(id, factor);       << 726   return fVP1Manager->ScaleP1(id, factor);
884 }                                              << 727 }  
885                                                   728 
886 //____________________________________________    729 //_____________________________________________________________________________
887 G4bool G4VAnalysisManager::ScaleP2(G4int id, G    730 G4bool G4VAnalysisManager::ScaleP2(G4int id, G4double factor)
888 {                                                 731 {
889   return fVP2Manager->Scale(id, factor);       << 732   return fVP2Manager->ScaleP2(id, factor);
890 }                                              << 733 }  
891                                                   734 
892 //____________________________________________    735 //_____________________________________________________________________________
893 G4int G4VAnalysisManager::CreateNtuple(const G << 736 G4int G4VAnalysisManager::CreateNtuple(const G4String& name, 
894                                           cons    737                                           const G4String& title)
895 {                                                 738 {
896   return fNtupleBookingManager->CreateNtuple(n << 739   if ( ! CheckName(name, "Ntuple") ) return kInvalidId;
897 }                                              << 740 
                                                   >> 741   return fVNtupleManager->CreateNtuple(name, title);
                                                   >> 742 }                                         
898                                                   743 
899 //____________________________________________    744 //_____________________________________________________________________________
900 G4int G4VAnalysisManager::CreateNtupleIColumn(    745 G4int G4VAnalysisManager::CreateNtupleIColumn(const G4String& name)
901 {                                                 746 {
902   return fNtupleBookingManager->CreateNtupleIC << 747   if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
903 }                                              << 748 
                                                   >> 749   return fVNtupleManager->CreateNtupleIColumn(name, 0);
                                                   >> 750 }  
904                                                   751 
905 //____________________________________________    752 //_____________________________________________________________________________
906 G4int G4VAnalysisManager::CreateNtupleFColumn(    753 G4int G4VAnalysisManager::CreateNtupleFColumn(const G4String& name)
907 {                                                 754 {
908   return fNtupleBookingManager->CreateNtupleFC << 755   if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
909 }                                              << 756 
                                                   >> 757   return fVNtupleManager->CreateNtupleFColumn(name, 0);
                                                   >> 758 }  
910                                                   759 
911 //____________________________________________    760 //_____________________________________________________________________________
912 G4int G4VAnalysisManager::CreateNtupleDColumn(    761 G4int G4VAnalysisManager::CreateNtupleDColumn(const G4String& name)
913 {                                                 762 {
914   return fNtupleBookingManager->CreateNtupleDC << 763   if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
915 }                                              << 764 
                                                   >> 765   return fVNtupleManager->CreateNtupleDColumn(name, 0);
                                                   >> 766 }  
916                                                   767 
917 //____________________________________________    768 //_____________________________________________________________________________
918 G4int G4VAnalysisManager::CreateNtupleSColumn(    769 G4int G4VAnalysisManager::CreateNtupleSColumn(const G4String& name)
919 {                                                 770 {
920   return fNtupleBookingManager->CreateNtupleSC << 771   if ( ! CheckName(name, "NtupleSColumn") ) return kInvalidId;
921 }                                              << 772 
                                                   >> 773   return fVNtupleManager->CreateNtupleSColumn(name);
                                                   >> 774 }  
922                                                   775 
923 //____________________________________________    776 //_____________________________________________________________________________
924 G4int G4VAnalysisManager::CreateNtupleIColumn( << 777 G4int G4VAnalysisManager::CreateNtupleIColumn(const G4String& name, 
925                                                   778                                               std::vector<int>& vector)
926 {                                                 779 {
927   return fNtupleBookingManager->CreateNtupleIC << 780   if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
928 }                                              << 781 
                                                   >> 782   return fVNtupleManager->CreateNtupleIColumn(name, &vector);
                                                   >> 783 }  
929                                                   784 
930 //____________________________________________    785 //_____________________________________________________________________________
931 G4int G4VAnalysisManager::CreateNtupleFColumn( << 786 G4int G4VAnalysisManager::CreateNtupleFColumn(const G4String& name, 
932                                                   787                                               std::vector<float>& vector)
933 {                                                 788 {
934   return fNtupleBookingManager->CreateNtupleFC << 789   if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
935 }                                              << 790 
                                                   >> 791   return fVNtupleManager->CreateNtupleFColumn(name, &vector);
                                                   >> 792 }  
936                                                   793 
937 //____________________________________________    794 //_____________________________________________________________________________
938 G4int G4VAnalysisManager::CreateNtupleDColumn( << 795 G4int G4VAnalysisManager::CreateNtupleDColumn(const G4String& name, 
939                                                   796                                               std::vector<double>& vector)
940 {                                                 797 {
941   return fNtupleBookingManager->CreateNtupleDC << 798   if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
942 }                                              << 
943                                                   799 
944 //____________________________________________ << 800   return fVNtupleManager->CreateNtupleDColumn(name, &vector);
945 G4int G4VAnalysisManager::CreateNtupleSColumn( << 801 }  
946                                                << 
947 {                                              << 
948   return fNtupleBookingManager->CreateNtupleSC << 
949 }                                              << 
950                                                   802 
951 //____________________________________________    803 //_____________________________________________________________________________
952 void G4VAnalysisManager::FinishNtuple()           804 void G4VAnalysisManager::FinishNtuple()
953 {                                              << 805 { 
954   auto ntupleBooking = fNtupleBookingManager-> << 806   return fVNtupleManager->FinishNtuple();
955                                                << 
956   if ( fVNtupleManager ) {                     << 
957     fVNtupleManager->CreateNtuple(ntupleBookin << 
958   }                                            << 
959 }                                              << 
960                                                << 
961 //____________________________________________ << 
962 void G4VAnalysisManager::SetNtupleMerging(G4bo << 
963                    G4int /*nofReducedNtupleFil << 
964 {                                              << 
965 // The function is overridden in the managers  << 
966 // Here we give just a warning that the featur << 
967                                                << 
968   NtupleMergingWarning(fkClass, "SetNtupleMerg << 
969 }                                                 807 }
970                                                << 808    
971 //____________________________________________    809 //_____________________________________________________________________________
972 void G4VAnalysisManager::SetNtupleRowWise(G4bo << 810 G4int G4VAnalysisManager::CreateNtupleIColumn(G4int ntupleId, 
973                                           G4bo << 811                                               const G4String& name)
974 {                                              << 
975 // The function is overridden in the managers  << 
976 // Here we give just a warning that the featur << 
977                                                << 
978   NtupleMergingWarning(fkClass, "SetNtupleRowW << 
979 }                                              << 
980                                                << 
981 //____________________________________________ << 
982 void G4VAnalysisManager::SetBasketSize(unsigne << 
983 {                                                 812 {
984 // The function is overridden in the managers  << 813   if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
985 // Here we give just a warning that the featur << 
986                                                   814 
987   NtupleMergingWarning(fkClass, "SetBasketSize << 815   return fVNtupleManager->CreateNtupleIColumn(ntupleId, name, 0);
988 }                                              << 816 }                                         
989                                                   817 
990 //____________________________________________    818 //_____________________________________________________________________________
991 void G4VAnalysisManager::SetBasketEntries(unsi << 819 G4int G4VAnalysisManager::CreateNtupleFColumn(G4int ntupleId, 
                                                   >> 820                                               const G4String& name)
992 {                                                 821 {
993 // The function is overridden in the managers  << 822   if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
994 // Here we give just a warning that the featur << 
995                                                   823 
996   NtupleMergingWarning(fkClass, "SetBasketEntr << 824   return fVNtupleManager->CreateNtupleFColumn(ntupleId, name, 0);
997 }                                              << 825 }                                         
998                                                   826 
999 //____________________________________________ << 
1000 G4int G4VAnalysisManager::CreateNtupleIColumn << 
1001                                               << 
1002 {                                             << 
1003   return fNtupleBookingManager->CreateNtupleI << 
1004 }                                             << 
1005                                                  827 
1006 //___________________________________________    828 //_____________________________________________________________________________
1007 G4int G4VAnalysisManager::CreateNtupleFColumn << 829 G4int G4VAnalysisManager::CreateNtupleDColumn(G4int ntupleId, 
1008                                               << 830                                               const G4String& name)   
1009 {                                                831 {
1010   return fNtupleBookingManager->CreateNtupleF << 832   if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
1011 }                                             << 
1012                                                  833 
                                                   >> 834   return fVNtupleManager->CreateNtupleDColumn(ntupleId, name, 0);
                                                   >> 835 }                                         
1013                                                  836 
1014 //___________________________________________    837 //_____________________________________________________________________________
1015 G4int G4VAnalysisManager::CreateNtupleDColumn << 838 G4int G4VAnalysisManager::CreateNtupleSColumn(G4int ntupleId, 
1016                                               << 839                                               const G4String& name)   
1017 {                                                840 {
1018   return fNtupleBookingManager->CreateNtupleD << 841   if ( ! CheckName(name, "NtupleSColumn") ) return kInvalidId;
1019 }                                             << 
1020                                                  842 
1021 //___________________________________________ << 843   return fVNtupleManager->CreateNtupleSColumn(ntupleId, name);
1022 G4int G4VAnalysisManager::CreateNtupleSColumn << 844 }                                         
1023                                               << 
1024 {                                             << 
1025   return fNtupleBookingManager->CreateNtupleS << 
1026 }                                             << 
1027                                                  845 
1028 //___________________________________________    846 //_____________________________________________________________________________
1029 G4int G4VAnalysisManager::CreateNtupleIColumn << 847 G4int G4VAnalysisManager::CreateNtupleIColumn(G4int ntupleId, 
1030                                               << 848                                               const G4String& name, 
1031                                                  849                                               std::vector<int>& vector)
1032 {                                                850 {
1033   return fNtupleBookingManager->CreateNtupleI << 851   if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
1034 }                                             << 852 
                                                   >> 853   return fVNtupleManager->CreateNtupleIColumn(ntupleId, name, &vector);
                                                   >> 854 }  
1035                                                  855 
1036 //___________________________________________    856 //_____________________________________________________________________________
1037 G4int G4VAnalysisManager::CreateNtupleFColumn << 857 G4int G4VAnalysisManager::CreateNtupleFColumn(G4int ntupleId, 
1038                                               << 858                                               const G4String& name, 
1039                                                  859                                               std::vector<float>& vector)
1040 {                                                860 {
1041   return fNtupleBookingManager->CreateNtupleF << 861   if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
1042 }                                             << 862 
                                                   >> 863   return fVNtupleManager->CreateNtupleFColumn(ntupleId, name, &vector);
                                                   >> 864 }  
1043                                                  865 
1044 //___________________________________________    866 //_____________________________________________________________________________
1045 G4int G4VAnalysisManager::CreateNtupleDColumn << 867 G4int G4VAnalysisManager::CreateNtupleDColumn(G4int ntupleId, 
1046                                               << 868                                               const G4String& name, 
1047                                                  869                                               std::vector<double>& vector)
1048 {                                                870 {
1049   return fNtupleBookingManager->CreateNtupleD << 871   if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
1050 }                                             << 
1051                                                  872 
1052 //___________________________________________ << 873   return fVNtupleManager->CreateNtupleDColumn(ntupleId, name, &vector);
1053 G4int G4VAnalysisManager::CreateNtupleSColumn << 874 }  
1054                                               << 
1055                                               << 
1056 {                                             << 
1057   return fNtupleBookingManager->CreateNtupleS << 
1058 }                                             << 
1059                                                  875 
1060 //___________________________________________    876 //_____________________________________________________________________________
1061 void G4VAnalysisManager::FinishNtuple(G4int n    877 void G4VAnalysisManager::FinishNtuple(G4int ntupleId)
1062 {                                             << 878 { 
1063   auto ntupleBooking = fNtupleBookingManager- << 879   return fVNtupleManager->FinishNtuple(ntupleId);
1064                                               << 
1065   if ( fVNtupleManager ) {                    << 
1066     fVNtupleManager->CreateNtuple(ntupleBooki << 
1067   }                                           << 
1068 }                                                880 }
1069                                               << 881    
1070 //___________________________________________    882 //_____________________________________________________________________________
1071 G4bool G4VAnalysisManager::SetFirstHistoId(G4 << 883 G4bool G4VAnalysisManager::SetFirstHistoId(G4int firstId) 
1072 {                                                884 {
1073   auto result = true;                         << 885   G4bool finalResult = true;
1074                                                  886 
1075   result &= SetFirstH1Id(firstId);            << 887   G4bool result = SetFirstH1Id(firstId);
1076   result &= SetFirstH2Id(firstId);            << 888   finalResult = finalResult && result;
1077   result &= SetFirstH3Id(firstId);            << 889   
                                                   >> 890   result = SetFirstH2Id(firstId);
                                                   >> 891   finalResult = finalResult && result;
1078                                                  892 
1079   return result;                              << 893   result = SetFirstH3Id(firstId);
1080 }                                             << 894   finalResult = finalResult && result;
                                                   >> 895    
                                                   >> 896   return finalResult; 
                                                   >> 897 }  
1081                                                  898 
1082 //___________________________________________    899 //_____________________________________________________________________________
1083 G4bool G4VAnalysisManager::SetFirstH1Id(G4int << 900 G4bool G4VAnalysisManager::SetFirstH1Id(G4int firstId) 
1084 {                                                901 {
1085   return fH1HnManager->SetFirstId(firstId);      902   return fH1HnManager->SetFirstId(firstId);
1086 }                                             << 903 }  
1087                                                  904 
1088 //___________________________________________    905 //_____________________________________________________________________________
1089 G4bool G4VAnalysisManager::SetFirstH2Id(G4int << 906 G4bool G4VAnalysisManager::SetFirstH2Id(G4int firstId) 
1090 {                                                907 {
1091   return fH2HnManager->SetFirstId(firstId);      908   return fH2HnManager->SetFirstId(firstId);
1092 }                                             << 909 }  
1093                                                  910 
1094 //___________________________________________    911 //_____________________________________________________________________________
1095 G4bool G4VAnalysisManager::SetFirstH3Id(G4int << 912 G4bool G4VAnalysisManager::SetFirstH3Id(G4int firstId) 
1096 {                                                913 {
1097   return fH3HnManager->SetFirstId(firstId);      914   return fH3HnManager->SetFirstId(firstId);
1098 }                                             << 915 }  
1099                                                  916 
1100 //___________________________________________    917 //_____________________________________________________________________________
1101 G4bool G4VAnalysisManager::SetFirstProfileId( << 918 G4bool G4VAnalysisManager::SetFirstProfileId(G4int firstId) 
1102 {                                                919 {
1103   auto result = true;                         << 920   G4bool finalResult = true;
1104                                                  921 
1105   result &= SetFirstP1Id(firstId);            << 922   G4bool result = SetFirstP1Id(firstId);
1106   result &= SetFirstP2Id(firstId);            << 923   finalResult = finalResult && result;
1107                                               << 924   
1108   return result;                              << 925   result = SetFirstP2Id(firstId);
1109 }                                             << 926   finalResult = finalResult && result;
                                                   >> 927    
                                                   >> 928   return finalResult; 
                                                   >> 929 }  
1110                                                  930 
1111 //___________________________________________    931 //_____________________________________________________________________________
1112 G4bool G4VAnalysisManager::SetFirstP1Id(G4int << 932 G4bool G4VAnalysisManager::SetFirstP1Id(G4int firstId) 
1113 {                                                933 {
1114   return fP1HnManager->SetFirstId(firstId);      934   return fP1HnManager->SetFirstId(firstId);
1115 }                                             << 935 }  
1116                                                  936 
1117 //___________________________________________    937 //_____________________________________________________________________________
1118 G4bool G4VAnalysisManager::SetFirstP2Id(G4int << 938 G4bool G4VAnalysisManager::SetFirstP2Id(G4int firstId) 
1119 {                                                939 {
1120   return fP2HnManager->SetFirstId(firstId);      940   return fP2HnManager->SetFirstId(firstId);
1121 }                                             << 941 }  
1122                                                  942 
1123 //___________________________________________    943 //_____________________________________________________________________________
1124 G4bool G4VAnalysisManager::SetFirstNtupleId(G << 944 G4bool G4VAnalysisManager::SetFirstNtupleId(G4int firstId) 
1125 {                                                945 {
1126   auto result = true;                         << 946   return fVNtupleManager->SetFirstId(firstId);
1127                                               << 947 }  
1128   result &= fNtupleBookingManager->SetFirstId << 
1129   if ( fVNtupleManager ) {                    << 
1130     result &= fVNtupleManager->SetFirstId(fir << 
1131   }                                           << 
1132                                               << 
1133   return result;                              << 
1134 }                                             << 
1135                                                  948 
1136 //___________________________________________    949 //_____________________________________________________________________________
1137 G4bool G4VAnalysisManager::SetFirstNtupleColu << 950 G4bool G4VAnalysisManager::SetFirstNtupleColumnId(G4int firstId) 
1138 {                                                951 {
1139   auto result = true;                         << 952   return fVNtupleManager->SetFirstNtupleColumnId(firstId);
1140                                               << 
1141   result &= fNtupleBookingManager->SetFirstNt << 
1142   if ( fVNtupleManager ) {                    << 
1143     result &= fVNtupleManager->SetFirstNtuple << 
1144   }                                           << 
1145                                               << 
1146   return result;                              << 
1147 }                                                953 }
1148                                                  954 
1149 // Fill methods in .icc                          955 // Fill methods in .icc
1150                                                  956 
1151 //___________________________________________    957 //_____________________________________________________________________________
1152 void  G4VAnalysisManager::SetActivation(G4boo << 958 void  G4VAnalysisManager::SetActivation(G4bool activation) 
1153 {                                                959 {
1154   fState.SetIsActivation(activation);            960   fState.SetIsActivation(activation);
1155 }                                                961 }
1156                                                  962 
1157 // GetActivation() in .icc                       963 // GetActivation() in .icc
1158                                                  964 
1159 //___________________________________________    965 //_____________________________________________________________________________
1160 G4bool G4VAnalysisManager::IsActive() const      966 G4bool G4VAnalysisManager::IsActive() const
1161 {                                                967 {
1162 // Return true if activation option is select << 968 // Return true if activation option is selected and any of managers has 
1163 // an activated object.                          969 // an activated object.
1164                                                  970 
1165   return fState.GetIsActivation() &&          << 971   return fState.GetIsActivation() && 
1166          ( fH1HnManager->IsActive() ||        << 972          ( fH1HnManager->IsActive() || 
1167            fH2HnManager->IsActive() ||        << 973            fH2HnManager->IsActive() || 
1168            fH3HnManager->IsActive() ||        << 974            fH3HnManager->IsActive() || 
1169            fP1HnManager->IsActive() ||        << 975            fP1HnManager->IsActive() || 
1170            fP2HnManager->IsActive() );           976            fP2HnManager->IsActive() );
1171 }                                             << 977 }  
1172                                                  978 
1173 //___________________________________________    979 //_____________________________________________________________________________
1174 G4bool G4VAnalysisManager::IsAscii() const       980 G4bool G4VAnalysisManager::IsAscii() const
1175 {                                                981 {
1176 // Return true any of managers has an object     982 // Return true any of managers has an object with activated ASCII option.
1177                                                  983 
1178   return ( fH1HnManager->IsAscii() ||         << 984   return ( fH1HnManager->IsAscii() || 
1179            fH2HnManager->IsAscii() ||            985            fH2HnManager->IsAscii() ||
1180            fH3HnManager->IsAscii() ||            986            fH3HnManager->IsAscii() ||
1181            fP1HnManager->IsAscii() ||            987            fP1HnManager->IsAscii() ||
1182            fP2HnManager->IsAscii() );            988            fP2HnManager->IsAscii() );
1183 }                                             << 989 }  
1184                                                  990 
1185 //___________________________________________    991 //_____________________________________________________________________________
1186 G4bool G4VAnalysisManager::IsPlotting() const    992 G4bool G4VAnalysisManager::IsPlotting() const
1187 {                                                993 {
1188 // Return true any of managers has an object     994 // Return true any of managers has an object with activated plotting option.
1189                                                  995 
1190   return ( fH1HnManager->IsPlotting() ||      << 996   return ( fH1HnManager->IsPlotting() || 
1191            fH2HnManager->IsPlotting() ||         997            fH2HnManager->IsPlotting() ||
1192            fH3HnManager->IsPlotting() ||         998            fH3HnManager->IsPlotting() ||
1193            fP1HnManager->IsPlotting() ||         999            fP1HnManager->IsPlotting() ||
1194            fP2HnManager->IsPlotting() );         1000            fP2HnManager->IsPlotting() );
1195 }                                             << 1001 }  
1196                                                  1002 
1197 //___________________________________________    1003 //_____________________________________________________________________________
1198 G4int G4VAnalysisManager::GetFirstH1Id() cons    1004 G4int G4VAnalysisManager::GetFirstH1Id() const
1199 {                                                1005 {
1200 // Return first H1 id                            1006 // Return first H1 id
1201                                                  1007 
1202   return fH1HnManager->GetFirstId();             1008   return fH1HnManager->GetFirstId();
1203 }                                             << 1009 }  
1204                                                  1010 
1205 //___________________________________________    1011 //_____________________________________________________________________________
1206 G4int G4VAnalysisManager::GetFirstH2Id() cons    1012 G4int G4VAnalysisManager::GetFirstH2Id() const
1207 {                                                1013 {
1208 // Return first H2 id                            1014 // Return first H2 id
1209                                                  1015 
1210   return fH2HnManager->GetFirstId();             1016   return fH2HnManager->GetFirstId();
1211 }                                             << 1017 }  
1212                                                  1018 
1213 //___________________________________________    1019 //_____________________________________________________________________________
1214 G4int G4VAnalysisManager::GetFirstH3Id() cons    1020 G4int G4VAnalysisManager::GetFirstH3Id() const
1215 {                                                1021 {
1216 // Return first H3 id                            1022 // Return first H3 id
1217                                                  1023 
1218   return fH3HnManager->GetFirstId();             1024   return fH3HnManager->GetFirstId();
1219 }                                             << 1025 }  
1220                                                  1026 
1221 //___________________________________________    1027 //_____________________________________________________________________________
1222 G4int G4VAnalysisManager::GetFirstP1Id() cons    1028 G4int G4VAnalysisManager::GetFirstP1Id() const
1223 {                                                1029 {
1224 // Return first P1 id                            1030 // Return first P1 id
1225                                                  1031 
1226   return fP1HnManager->GetFirstId();             1032   return fP1HnManager->GetFirstId();
1227 }                                             << 1033 }  
1228                                                  1034 
1229 //___________________________________________    1035 //_____________________________________________________________________________
1230 G4int G4VAnalysisManager::GetFirstP2Id() cons    1036 G4int G4VAnalysisManager::GetFirstP2Id() const
1231 {                                                1037 {
1232 // Return first P2 id                            1038 // Return first P2 id
1233                                                  1039 
1234   return fP2HnManager->GetFirstId();             1040   return fP2HnManager->GetFirstId();
1235 }                                             << 1041 }  
1236                                                  1042 
1237 //___________________________________________    1043 //_____________________________________________________________________________
1238 G4int G4VAnalysisManager::GetFirstNtupleId()     1044 G4int G4VAnalysisManager::GetFirstNtupleId() const
1239 {                                                1045 {
1240 // Return first Ntuple id                        1046 // Return first Ntuple id
1241                                                  1047 
1242   return fNtupleBookingManager->GetFirstId(); << 1048   return fVNtupleManager->GetFirstId();
1243 }                                             << 1049 }  
1244                                                  1050 
1245 //___________________________________________    1051 //_____________________________________________________________________________
1246 G4int G4VAnalysisManager::GetFirstNtupleColum    1052 G4int G4VAnalysisManager::GetFirstNtupleColumnId() const
1247 {                                                1053 {
1248 // Return first Ntuple column id                 1054 // Return first Ntuple column id
1249                                                  1055 
1250   return fNtupleBookingManager->GetFirstNtupl << 1056   return fVNtupleManager->GetFirstNtupleColumnId();
1251 }                                             << 1057 }  
1252                                               << 
1253 //___________________________________________ << 
1254 G4int G4VAnalysisManager::GetNofH1s(G4bool on << 
1255 {                                             << 
1256   return fVH1Manager->GetNofHns(onlyIfExist); << 
1257 }                                             << 
1258                                               << 
1259 //___________________________________________ << 
1260 G4int G4VAnalysisManager::GetNofH2s(G4bool on << 
1261 {                                             << 
1262   return fVH2Manager->GetNofHns(onlyIfExist); << 
1263 }                                             << 
1264                                               << 
1265 //___________________________________________ << 
1266 G4int G4VAnalysisManager::GetNofH3s(G4bool on << 
1267 {                                             << 
1268   return fVH3Manager->GetNofHns(onlyIfExist); << 
1269 }                                             << 
1270                                               << 
1271 //___________________________________________ << 
1272 G4int G4VAnalysisManager::GetNofP1s(G4bool on << 
1273 {                                             << 
1274   return fVP1Manager->GetNofHns(onlyIfExist); << 
1275 }                                             << 
1276                                               << 
1277 //___________________________________________ << 
1278 G4int G4VAnalysisManager::GetNofP2s(G4bool on << 
1279 {                                             << 
1280   return fVP2Manager->GetNofHns(onlyIfExist); << 
1281 }                                             << 
1282                                                  1058 
1283 //___________________________________________    1059 //_____________________________________________________________________________
1284 G4int G4VAnalysisManager::GetNofNtuples(G4boo << 1060 G4int G4VAnalysisManager::GetNofH1s() const
1285 {                                                1061 {
1286   return fNtupleBookingManager->GetNofNtuples << 1062   return fH1HnManager->GetNofHns();
1287 }                                             << 1063 }  
1288                                               << 
1289 // GetH1Id(), GetH2Id in .icc                 << 
1290                                                  1064 
1291 //___________________________________________    1065 //_____________________________________________________________________________
1292 G4bool G4VAnalysisManager::ListH1(G4bool only << 1066 G4int G4VAnalysisManager::GetNofH2s() const
1293 {                                                1067 {
1294   return fVH1Manager->List(G4cout, onlyIfActi << 1068   return fH2HnManager->GetNofHns();
1295 }                                             << 1069 }  
1296                                                  1070 
1297 //___________________________________________    1071 //_____________________________________________________________________________
1298 G4bool G4VAnalysisManager::ListH2(G4bool only << 1072 G4int G4VAnalysisManager::GetNofH3s() const
1299 {                                                1073 {
1300   return fVH2Manager->List(G4cout, onlyIfActi << 1074   return fH3HnManager->GetNofHns();
1301 }                                             << 1075 }  
1302                                                  1076 
1303 //___________________________________________    1077 //_____________________________________________________________________________
1304 G4bool G4VAnalysisManager::ListH3(G4bool only << 1078 G4int G4VAnalysisManager::GetNofP1s() const
1305 {                                                1079 {
1306   return fVH3Manager->List(G4cout, onlyIfActi << 1080   return fP1HnManager->GetNofHns();
1307 }                                             << 1081 }  
1308                                                  1082 
1309 //___________________________________________    1083 //_____________________________________________________________________________
1310 G4bool G4VAnalysisManager::ListP1(G4bool only << 1084 G4int G4VAnalysisManager::GetNofP2s() const
1311 {                                                1085 {
1312   return fVP1Manager->List(G4cout, onlyIfActi << 1086   return fP2HnManager->GetNofHns();
1313 }                                             << 1087 }  
1314                                                  1088 
1315 //___________________________________________    1089 //_____________________________________________________________________________
1316 G4bool G4VAnalysisManager::ListP2(G4bool only << 1090 G4int G4VAnalysisManager::GetNofNtuples() const
1317 {                                                1091 {
1318   return fVP2Manager->List(G4cout, onlyIfActi << 1092   return fVNtupleManager->GetNofNtuples();
1319 }                                             << 1093 }  
1320                                                  1094 
1321 //___________________________________________ << 1095 // GetH1Id(), GetH2Id in .icc 
1322 G4bool G4VAnalysisManager::ListNtuple(G4bool  << 
1323 {                                             << 
1324   return fNtupleBookingManager->List(G4cout,  << 
1325 }                                             << 
1326                                               << 
1327 //___________________________________________ << 
1328 G4bool G4VAnalysisManager::List(G4bool onlyIf << 
1329 {                                             << 
1330   auto result = true;                         << 
1331   result &= ListH1(onlyIfActive);             << 
1332   result &= ListH2(onlyIfActive);             << 
1333   result &= ListH3(onlyIfActive);             << 
1334   result &= ListP1(onlyIfActive);             << 
1335   result &= ListP2(onlyIfActive);             << 
1336   result &= ListNtuple(onlyIfActive);         << 
1337                                               << 
1338   return result;                              << 
1339 }                                             << 
1340                                                  1096 
1341 //___________________________________________    1097 //_____________________________________________________________________________
1342 void  G4VAnalysisManager::SetH1Activation(G4i    1098 void  G4VAnalysisManager::SetH1Activation(G4int id, G4bool activation)
1343 {                                                1099 {
1344 // Set activation to a given H1 object           1100 // Set activation to a given H1 object
1345                                                  1101 
1346   fH1HnManager->SetActivation(id, activation)    1102   fH1HnManager->SetActivation(id, activation);
1347 }                                             << 1103 }    
1348                                                  1104 
1349 //___________________________________________    1105 //_____________________________________________________________________________
1350 void  G4VAnalysisManager::SetH1Activation(G4b    1106 void  G4VAnalysisManager::SetH1Activation(G4bool activation)
1351 {                                                1107 {
1352 // Set activation to all H1 objects              1108 // Set activation to all H1 objects
1353                                                  1109 
1354   fH1HnManager->SetActivation(activation);       1110   fH1HnManager->SetActivation(activation);
1355 }                                             << 1111 }    
1356                                                  1112 
1357 //___________________________________________    1113 //_____________________________________________________________________________
1358 void  G4VAnalysisManager::SetH1Ascii(G4int id    1114 void  G4VAnalysisManager::SetH1Ascii(G4int id, G4bool ascii)
1359 {                                                1115 {
1360   fH1HnManager->SetAscii(id, ascii);             1116   fH1HnManager->SetAscii(id, ascii);
1361 }                                             << 1117 }    
1362                                                  1118 
1363 //___________________________________________    1119 //_____________________________________________________________________________
1364 void  G4VAnalysisManager::SetH1Plotting(G4int    1120 void  G4VAnalysisManager::SetH1Plotting(G4int id, G4bool plotting)
1365 {                                                1121 {
1366   fH1HnManager->SetPlotting(id, plotting);       1122   fH1HnManager->SetPlotting(id, plotting);
1367 }                                             << 1123 }    
1368                                               << 
1369 //___________________________________________ << 
1370 void  G4VAnalysisManager::SetH1FileName(G4int << 
1371 {                                             << 
1372   fH1HnManager->SetFileName(id, fileName);    << 
1373 }                                             << 
1374                                                  1124 
1375 //___________________________________________    1125 //_____________________________________________________________________________
1376 void  G4VAnalysisManager::SetH2Activation(G4i    1126 void  G4VAnalysisManager::SetH2Activation(G4int id, G4bool activation)
1377 {                                                1127 {
1378 // Set activation to a given H2 object           1128 // Set activation to a given H2 object
1379                                                  1129 
1380   fH2HnManager->SetActivation(id, activation)    1130   fH2HnManager->SetActivation(id, activation);
1381 }                                             << 1131 }    
1382                                                  1132 
1383 //___________________________________________    1133 //_____________________________________________________________________________
1384 void  G4VAnalysisManager::SetH2Activation(G4b    1134 void  G4VAnalysisManager::SetH2Activation(G4bool activation)
1385 {                                                1135 {
1386 // Set activation to all H2 objects              1136 // Set activation to all H2 objects
1387                                                  1137 
1388   fH2HnManager->SetActivation(activation);       1138   fH2HnManager->SetActivation(activation);
1389 }                                             << 1139 }    
1390                                                  1140 
1391 //___________________________________________    1141 //_____________________________________________________________________________
1392 void  G4VAnalysisManager::SetH2Ascii(G4int id    1142 void  G4VAnalysisManager::SetH2Ascii(G4int id, G4bool ascii)
1393 {                                                1143 {
1394   fH2HnManager->SetAscii(id, ascii);             1144   fH2HnManager->SetAscii(id, ascii);
1395 }                                                1145 }
1396                                                  1146 
1397 //___________________________________________    1147 //_____________________________________________________________________________
1398 void  G4VAnalysisManager::SetH2Plotting(G4int    1148 void  G4VAnalysisManager::SetH2Plotting(G4int id, G4bool plotting)
1399 {                                                1149 {
1400   fH2HnManager->SetPlotting(id, plotting);       1150   fH2HnManager->SetPlotting(id, plotting);
1401 }                                             << 1151 }    
1402                                               << 
1403 //___________________________________________ << 
1404 void  G4VAnalysisManager::SetH2FileName(G4int << 
1405 {                                             << 
1406   fH2HnManager->SetFileName(id, fileName);    << 
1407 }                                             << 
1408                                                  1152 
1409 //___________________________________________    1153 //_____________________________________________________________________________
1410 void  G4VAnalysisManager::SetH3Activation(G4i    1154 void  G4VAnalysisManager::SetH3Activation(G4int id, G4bool activation)
1411 {                                                1155 {
1412 // Set activation to a given H3 object           1156 // Set activation to a given H3 object
1413                                                  1157 
1414   fH3HnManager->SetActivation(id, activation)    1158   fH3HnManager->SetActivation(id, activation);
1415 }                                             << 1159 }    
1416                                                  1160 
1417 //___________________________________________    1161 //_____________________________________________________________________________
1418 void  G4VAnalysisManager::SetH3Activation(G4b    1162 void  G4VAnalysisManager::SetH3Activation(G4bool activation)
1419 {                                                1163 {
1420 // Set activation to all H3 objects              1164 // Set activation to all H3 objects
1421                                                  1165 
1422   fH3HnManager->SetActivation(activation);       1166   fH3HnManager->SetActivation(activation);
1423 }                                             << 1167 }    
1424                                                  1168 
1425 //___________________________________________    1169 //_____________________________________________________________________________
1426 void  G4VAnalysisManager::SetH3Ascii(G4int id    1170 void  G4VAnalysisManager::SetH3Ascii(G4int id, G4bool ascii)
1427 {                                                1171 {
1428   fH3HnManager->SetAscii(id, ascii);             1172   fH3HnManager->SetAscii(id, ascii);
1429 }                                                1173 }
1430                                                  1174 
1431 //___________________________________________    1175 //_____________________________________________________________________________
1432 void  G4VAnalysisManager::SetH3Plotting(G4int    1176 void  G4VAnalysisManager::SetH3Plotting(G4int id, G4bool plotting)
1433 {                                                1177 {
1434   fH3HnManager->SetPlotting(id, plotting);       1178   fH3HnManager->SetPlotting(id, plotting);
1435 }                                                1179 }
1436                                                  1180 
1437 //___________________________________________    1181 //_____________________________________________________________________________
1438 void  G4VAnalysisManager::SetH3FileName(G4int << 
1439 {                                             << 
1440   fH3HnManager->SetFileName(id, fileName);    << 
1441 }                                             << 
1442                                               << 
1443 //___________________________________________ << 
1444 void  G4VAnalysisManager::SetP1Activation(G4i    1182 void  G4VAnalysisManager::SetP1Activation(G4int id, G4bool activation)
1445 {                                                1183 {
1446 // Set activation to a given P1 object           1184 // Set activation to a given P1 object
1447                                                  1185 
1448   fP1HnManager->SetActivation(id, activation)    1186   fP1HnManager->SetActivation(id, activation);
1449 }                                             << 1187 }    
1450                                                  1188 
1451 //___________________________________________    1189 //_____________________________________________________________________________
1452 void  G4VAnalysisManager::SetP1Activation(G4b    1190 void  G4VAnalysisManager::SetP1Activation(G4bool activation)
1453 {                                                1191 {
1454 // Set activation to all P1 objects              1192 // Set activation to all P1 objects
1455                                                  1193 
1456   fP1HnManager->SetActivation(activation);       1194   fP1HnManager->SetActivation(activation);
1457 }                                             << 1195 }    
1458                                                  1196 
1459 //___________________________________________    1197 //_____________________________________________________________________________
1460 void  G4VAnalysisManager::SetP1Ascii(G4int id    1198 void  G4VAnalysisManager::SetP1Ascii(G4int id, G4bool ascii)
1461 {                                                1199 {
1462   fP1HnManager->SetAscii(id, ascii);             1200   fP1HnManager->SetAscii(id, ascii);
1463 }                                                1201 }
1464                                                  1202 
1465 //___________________________________________    1203 //_____________________________________________________________________________
1466 void  G4VAnalysisManager::SetP1Plotting(G4int    1204 void  G4VAnalysisManager::SetP1Plotting(G4int id, G4bool plotting)
1467 {                                                1205 {
1468   fP1HnManager->SetPlotting(id, plotting);       1206   fP1HnManager->SetPlotting(id, plotting);
1469 }                                             << 1207 }  
1470                                               << 
1471 //___________________________________________ << 
1472 void  G4VAnalysisManager::SetP1FileName(G4int << 
1473 {                                             << 
1474   fP1HnManager->SetFileName(id, fileName);    << 
1475 }                                             << 
1476                                                  1208 
1477 //___________________________________________    1209 //_____________________________________________________________________________
1478 void  G4VAnalysisManager::SetP2Activation(G4i    1210 void  G4VAnalysisManager::SetP2Activation(G4int id, G4bool activation)
1479 {                                                1211 {
1480 // Set activation to a given P2 object           1212 // Set activation to a given P2 object
1481                                                  1213 
1482   fP2HnManager->SetActivation(id, activation)    1214   fP2HnManager->SetActivation(id, activation);
1483 }                                             << 1215 }    
1484                                                  1216 
1485 //___________________________________________    1217 //_____________________________________________________________________________
1486 void  G4VAnalysisManager::SetP2Activation(G4b    1218 void  G4VAnalysisManager::SetP2Activation(G4bool activation)
1487 {                                                1219 {
1488 // Set activation to all P2 objects              1220 // Set activation to all P2 objects
1489                                                  1221 
1490   fP2HnManager->SetActivation(activation);       1222   fP2HnManager->SetActivation(activation);
1491 }                                             << 1223 }    
1492                                                  1224 
1493 //___________________________________________    1225 //_____________________________________________________________________________
1494 void  G4VAnalysisManager::SetP2Ascii(G4int id    1226 void  G4VAnalysisManager::SetP2Ascii(G4int id, G4bool ascii)
1495 {                                                1227 {
1496   fP2HnManager->SetAscii(id, ascii);             1228   fP2HnManager->SetAscii(id, ascii);
1497 }                                                1229 }
1498                                                  1230 
1499 //___________________________________________    1231 //_____________________________________________________________________________
1500 void  G4VAnalysisManager::SetP2Plotting(G4int    1232 void  G4VAnalysisManager::SetP2Plotting(G4int id, G4bool plotting)
1501 {                                                1233 {
1502   fP2HnManager->SetPlotting(id, plotting);       1234   fP2HnManager->SetPlotting(id, plotting);
1503 }                                             << 1235 } 
1504                                               << 
1505 //___________________________________________ << 
1506 void  G4VAnalysisManager::SetP2FileName(G4int << 
1507 {                                             << 
1508   fP2HnManager->SetFileName(id, fileName);    << 
1509 }                                             << 
1510                                                  1236 
1511 //___________________________________________    1237 //_____________________________________________________________________________
1512 void  G4VAnalysisManager::SetNtupleActivation    1238 void  G4VAnalysisManager::SetNtupleActivation(G4int id, G4bool activation)
1513 {                                                1239 {
1514 // Set activation to a given ntuple object    << 
1515                                               << 
1516   fNtupleBookingManager->SetActivation(id, ac << 
1517   if ( fVNtupleManager ) {                    << 
1518     fVNtupleManager->SetActivation(id, activa << 
1519   }                                           << 
1520 }                                             << 
1521                                               << 
1522 //___________________________________________ << 
1523 void  G4VAnalysisManager::SetNtupleActivation << 
1524 {                                             << 
1525 // Set activation to all ntuple objects       << 
1526                                               << 
1527   fNtupleBookingManager->SetActivation(activa << 
1528   if ( fVNtupleManager ) {                    << 
1529     fVNtupleManager->SetActivation(activation << 
1530   }                                           << 
1531 }                                             << 
1532                                               << 
1533 //___________________________________________ << 
1534 void  G4VAnalysisManager::SetNtupleFileName(G << 
1535 {                                             << 
1536 // Set activation to a given P2 object           1240 // Set activation to a given P2 object
1537                                                  1241 
1538   fNtupleBookingManager->SetFileName(id, file << 1242   fVNtupleManager->SetActivation(id, activation);
1539 }                                             << 1243 }    
1540                                                  1244 
1541 //___________________________________________    1245 //_____________________________________________________________________________
1542 void  G4VAnalysisManager::SetNtupleFileName(c << 1246 void  G4VAnalysisManager::SetNtupleActivation(G4bool activation)
1543 {                                                1247 {
1544 // Set activation to all P2 objects              1248 // Set activation to all P2 objects
1545                                                  1249 
1546   fNtupleBookingManager->SetFileName(fileName << 1250   fVNtupleManager->SetActivation(activation);
1547 }                                             << 1251 }    
1548                                               << 
1549 //___________________________________________ << 
1550 G4bool  G4VAnalysisManager::DeleteH1(G4int id << 
1551 {                                             << 
1552   return fVH1Manager->Delete(id, keepSetting) << 
1553 }                                             << 
1554                                               << 
1555 //___________________________________________ << 
1556 G4bool  G4VAnalysisManager::DeleteH2(G4int id << 
1557 {                                             << 
1558   return fVH2Manager->Delete(id, keepSetting) << 
1559 }                                             << 
1560                                               << 
1561 //___________________________________________ << 
1562 G4bool  G4VAnalysisManager::DeleteH3(G4int id << 
1563 {                                             << 
1564   return fVH3Manager->Delete(id, keepSetting) << 
1565 }                                             << 
1566                                               << 
1567 //___________________________________________ << 
1568 G4bool  G4VAnalysisManager::DeleteP1(G4int id << 
1569 {                                             << 
1570   return fVP1Manager->Delete(id, keepSetting) << 
1571 }                                             << 
1572                                               << 
1573 //___________________________________________ << 
1574 G4bool  G4VAnalysisManager::DeleteP2(G4int id << 
1575 {                                             << 
1576   return fVP2Manager->Delete(id, keepSetting) << 
1577 }                                             << 
1578                                               << 
1579 //___________________________________________ << 
1580 G4bool  G4VAnalysisManager::DeleteNtuple(G4in << 
1581 {                                             << 
1582   auto result = fNtupleBookingManager->Delete << 
1583                                               << 
1584   if (fVNtupleManager != nullptr) {           << 
1585     result &= fVNtupleManager->Delete(id);    << 
1586   }                                           << 
1587                                               << 
1588   return result;                              << 
1589 }                                             << 
1590                                                  1252 
1591 // Access methods in .icc                        1253 // Access methods in .icc
1592                                                  1254 
1593 //___________________________________________    1255 //_____________________________________________________________________________
1594 void G4VAnalysisManager::SetVerboseLevel(G4in << 1256 void G4VAnalysisManager::SetVerboseLevel(G4int verboseLevel) 
1595 {                                                1257 {
1596   fState.SetVerboseLevel(verboseLevel);          1258   fState.SetVerboseLevel(verboseLevel);
1597 }                                             << 1259 } 
1598                                                  1260 
1599 // GetVerboseLevel() in .icc                  << 1261 // GetVerboseLevel() in .icc 
1600                                                  1262 
1601                                                  1263