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.4)


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