Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/analysis/management/src/G4VAnalysisReader.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/G4VAnalysisReader.cc (Version 11.3.0) and /analysis/management/src/G4VAnalysisReader.cc (Version 10.1.p3)


  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: G4VAnalysisReader.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 "G4VAnalysisReader.hh"                    30 #include "G4VAnalysisReader.hh"
 30 #include "G4AnalysisUtilities.hh"                  31 #include "G4AnalysisUtilities.hh"
                                                   >>  32 #include "G4BaseFileManager.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 "G4VRNtupleManager.hh"                    39 #include "G4VRNtupleManager.hh"
 33 #include "G4VRFileManager.hh"                  <<  40 
 34 #include "G4Threading.hh"                      <<  41 #include <iostream>
 35                                                    42 
 36 using namespace G4Analysis;                        43 using namespace G4Analysis;
 37                                                    44 
 38 //____________________________________________     45 //_____________________________________________________________________________
 39 G4VAnalysisReader::G4VAnalysisReader(const G4S <<  46 G4VAnalysisReader::G4VAnalysisReader(const G4String& type, G4bool isMaster)
 40  : fState(type, ! G4Threading::IsWorkerThread( <<  47  : fState(type, isMaster),
                                                   >>  48    fVH1Manager(0),
                                                   >>  49    fVH2Manager(0),
                                                   >>  50    fVH3Manager(0),
                                                   >>  51    fVP1Manager(0),
                                                   >>  52    fVP2Manager(0),
                                                   >>  53    fVNtupleManager(0),
                                                   >>  54    fFileManager(0)
 41 {}                                                 55 {}
 42                                                    56 
 43 //____________________________________________     57 //_____________________________________________________________________________
 44 G4VAnalysisReader::~G4VAnalysisReader() = defa <<  58 G4VAnalysisReader::~G4VAnalysisReader()
                                                   >>  59 {
                                                   >>  60   delete fVH1Manager;
                                                   >>  61   delete fVH2Manager;
                                                   >>  62   delete fVH3Manager;
                                                   >>  63   delete fVP1Manager;
                                                   >>  64   delete fVP2Manager;
                                                   >>  65   delete fVNtupleManager;
                                                   >>  66   delete fFileManager;
                                                   >>  67 }
 45                                                    68 
 46 //                                             <<  69 // 
 47 // protected methods                               70 // protected methods
 48 //                                                 71 //
 49                                                <<  72     
 50 //____________________________________________     73 //_____________________________________________________________________________
 51 void G4VAnalysisReader::SetH1Manager(G4VTBaseH <<  74 void G4VAnalysisReader::SetH1Manager(G4VH1Manager* h1Manager)
 52 {                                                  75 {
 53   fVH1Manager.reset(h1Manager);                <<  76   fVH1Manager = h1Manager;
 54 }                                              <<  77 } 
 55                                                    78 
 56 //____________________________________________     79 //_____________________________________________________________________________
 57 void G4VAnalysisReader::SetH2Manager(G4VTBaseH <<  80 void G4VAnalysisReader::SetH2Manager(G4VH2Manager* h2Manager)
 58 {                                                  81 {
 59   fVH2Manager.reset(h2Manager);                <<  82   fVH2Manager = h2Manager;
 60 }                                              <<  83 }  
 61                                                    84 
 62 //____________________________________________     85 //_____________________________________________________________________________
 63 void G4VAnalysisReader::SetH3Manager(G4VTBaseH <<  86 void G4VAnalysisReader::SetH3Manager(G4VH3Manager* h3Manager)
 64 {                                                  87 {
 65   fVH3Manager.reset(h3Manager);                <<  88   fVH3Manager = h3Manager;
 66 }                                              <<  89 }  
 67                                                    90 
 68 //____________________________________________     91 //_____________________________________________________________________________
 69 void G4VAnalysisReader::SetP1Manager(G4VTBaseH <<  92 void G4VAnalysisReader::SetP1Manager(G4VP1Manager* p1Manager)
 70 {                                                  93 {
 71   fVP1Manager.reset(p1Manager);                <<  94   fVP1Manager = p1Manager;
 72 }                                              <<  95 } 
 73                                                    96 
 74 //____________________________________________     97 //_____________________________________________________________________________
 75 void G4VAnalysisReader::SetP2Manager(G4VTBaseH <<  98 void G4VAnalysisReader::SetP2Manager(G4VP2Manager* p2Manager)
 76 {                                                  99 {
 77   fVP2Manager.reset(p2Manager);                << 100   fVP2Manager = p2Manager;
 78 }                                              << 101 }  
 79                                                   102 
 80 //____________________________________________    103 //_____________________________________________________________________________
 81 void G4VAnalysisReader::SetNtupleManager(std:: << 104 void G4VAnalysisReader::SetNtupleManager(G4VRNtupleManager* ntupleManager)
 82 {                                                 105 {
 83   fVNtupleManager = std::move(ntupleManager);  << 106   fVNtupleManager = ntupleManager;
 84 }                                              << 107 }  
 85                                                   108 
 86 //____________________________________________    109 //_____________________________________________________________________________
 87 void G4VAnalysisReader::SetFileManager(std::sh << 110 void G4VAnalysisReader::SetFileManager(G4BaseFileManager* fileManager)
 88 {                                                 111 {
 89   fVFileManager = std::move(fileManager);      << 112   fFileManager = fileManager;
 90 }                                              << 113 }  
 91                                                   114 
 92 //                                             << 115 // 
 93 // public methods                                 116 // public methods
 94 //                                                117 //
 95                                                   118 
 96 //____________________________________________    119 //_____________________________________________________________________________
 97 G4bool G4VAnalysisReader::CloseFiles(G4bool re << 
 98 {                                              << 
 99   return CloseFilesImpl(reset);                << 
100 }                                              << 
101                                                << 
102 //____________________________________________ << 
103 void G4VAnalysisReader::SetFileName(const G4St    120 void G4VAnalysisReader::SetFileName(const G4String& fileName)
104 {                                              << 121 { 
105   fVFileManager->SetFileName(fileName);        << 122   fFileManager->SetFileName(fileName); 
106 }                                                 123 }
107                                                   124 
108 //____________________________________________    125 //_____________________________________________________________________________
109 G4String G4VAnalysisReader::GetFileName() cons << 126 G4String G4VAnalysisReader::GetFileName() const 
110 {                                              << 127 {  
111   return fVFileManager->GetFileName();         << 128   return fFileManager->GetFileName(); 
112 }                                                 129 }
113                                                   130 
114 //____________________________________________    131 //_____________________________________________________________________________
115 G4int G4VAnalysisReader::ReadH1(const G4String << 132 G4int G4VAnalysisReader::ReadH1(const G4String& h1Name, 
116                                 const G4String << 133                                 const G4String& fileName)
117                                 const G4String << 
118 {                                                 134 {
119   if ( fileName != "" ) {                         135   if ( fileName != "" ) {
120     return ReadH1Impl(h1Name, fileName, dirNam << 136     return ReadH1Impl(h1Name, fileName, true);
121   }                                            << 
122   if (fVFileManager->GetFileName() == "") {    << 
123     Warn("Cannot get H1 " + h1Name + ". File n << 
124     return kInvalidId;                         << 
125   }                                               137   }
126   return ReadH1Impl(h1Name, fVFileManager->Get << 138   else {  
127 }                                              << 139     if ( fFileManager->GetFileName() == "" ) {
                                                   >> 140       G4ExceptionDescription description;
                                                   >> 141       description 
                                                   >> 142         << "Cannot get H1. File name has to be set first.";
                                                   >> 143       G4Exception("G4VAnalysisReader::ReadH1()",
                                                   >> 144                   "Analysis_WR011", JustWarning, description);
                                                   >> 145       return kInvalidId;
                                                   >> 146     }           
                                                   >> 147     return ReadH1Impl(h1Name, fFileManager->GetFileName(), false);
                                                   >> 148   }  
                                                   >> 149 }                                      
128                                                   150 
129 //____________________________________________    151 //_____________________________________________________________________________
130 G4int G4VAnalysisReader::ReadH2(const G4String << 152 G4int G4VAnalysisReader::ReadH2(const G4String& h2Name, 
131                                 const G4String << 153                                 const G4String& fileName)
132                                 const G4String << 
133 {                                                 154 {
134   if ( fileName != "" ) {                         155   if ( fileName != "" ) {
135     return ReadH2Impl(h2Name, fileName, dirNam << 156     return ReadH2Impl(h2Name, fileName, true);
136   }                                            << 
137   if (fVFileManager->GetFileName() == "") {    << 
138     Warn("Cannot get H2 " + h2Name + ". File n << 
139     return kInvalidId;                         << 
140   }                                               157   }
141   return ReadH2Impl(h2Name, fVFileManager->Get << 158   else {  
142 }                                              << 159     if ( fFileManager->GetFileName() == "" ) {
                                                   >> 160       G4ExceptionDescription description;
                                                   >> 161       description 
                                                   >> 162         << "Cannot get H2. File name has to be set first.";
                                                   >> 163       G4Exception("G4VAnalysisReader::ReadH2()",
                                                   >> 164                   "Analysis_WR011", JustWarning, description);
                                                   >> 165       return kInvalidId;
                                                   >> 166     }           
                                                   >> 167     return ReadH2Impl(h2Name, fFileManager->GetFileName(), false);
                                                   >> 168   }  
                                                   >> 169 }                                      
143                                                   170 
144 //____________________________________________    171 //_____________________________________________________________________________
145 G4int G4VAnalysisReader::ReadH3(const G4String << 172 G4int G4VAnalysisReader::ReadH3(const G4String& h3Name, 
146                                 const G4String << 173                                 const G4String& fileName)
147                                 const G4String << 
148 {                                                 174 {
149   if ( fileName != "" ) {                         175   if ( fileName != "" ) {
150     return ReadH3Impl(h3Name, fileName, dirNam << 176     return ReadH3Impl(h3Name, fileName, true);
151   }                                               177   }
152   if (fVFileManager->GetFileName() == "") {    << 178   else {  
153     Warn("Cannot get H3 " + h3Name + ". File n << 179     if ( fFileManager->GetFileName() == "" ) {
154     return kInvalidId;                         << 180       G4ExceptionDescription description;
155   }                                            << 181       description 
156   return ReadH3Impl(h3Name, fVFileManager->Get << 182         << "Cannot get H3. File name has to be set first.";
157 }                                              << 183       G4Exception("G4VAnalysisReader::ReadH2()",
                                                   >> 184                   "Analysis_WR011", JustWarning, description);
                                                   >> 185       return kInvalidId;
                                                   >> 186     }           
                                                   >> 187     return ReadH3Impl(h3Name, fFileManager->GetFileName(), false);
                                                   >> 188   }  
                                                   >> 189 }                                      
158                                                   190 
159 //____________________________________________    191 //_____________________________________________________________________________
160 G4int G4VAnalysisReader::ReadP1(const G4String << 192 G4int G4VAnalysisReader::ReadP1(const G4String& p1Name, 
161                                 const G4String << 193                                 const G4String& fileName)
162                                 const G4String << 
163 {                                                 194 {
164   if ( fileName != "" ) {                         195   if ( fileName != "" ) {
165     return ReadP1Impl(p1Name, fileName, dirNam << 196     return ReadP1Impl(p1Name, fileName, true);
166   }                                               197   }
167   if (fVFileManager->GetFileName() == "") {    << 198   else {  
168     Warn("Cannot get P1 " + p1Name + ". File n << 199     if ( fFileManager->GetFileName() == "" ) {
169     return kInvalidId;                         << 200       G4ExceptionDescription description;
170   }                                            << 201       description 
171   return ReadP1Impl(p1Name, fVFileManager->Get << 202         << "Cannot get P1. File name has to be set first.";
172 }                                              << 203       G4Exception("G4VAnalysisReader::ReadP1()",
                                                   >> 204                   "Analysis_WR011", JustWarning, description);
                                                   >> 205       return kInvalidId;
                                                   >> 206     }           
                                                   >> 207     return ReadP1Impl(p1Name, fFileManager->GetFileName(), false);
                                                   >> 208   }  
                                                   >> 209 }                                      
173                                                   210 
174 //____________________________________________    211 //_____________________________________________________________________________
175 G4int G4VAnalysisReader::ReadP2(const G4String << 212 G4int G4VAnalysisReader::ReadP2(const G4String& p2Name, 
176                                 const G4String << 213                                 const G4String& fileName)
177                                 const G4String << 
178 {                                                 214 {
179   if ( fileName != "" ) {                         215   if ( fileName != "" ) {
180     return ReadP2Impl(p2Name, fileName, dirNam << 216     return ReadP2Impl(p2Name, fileName, true);
181   }                                            << 
182   if (fVFileManager->GetFileName() == "") {    << 
183     Warn("Cannot get P2 " + p2Name + ". File n << 
184     return kInvalidId;                         << 
185   }                                               217   }
186   return ReadP2Impl(p2Name, fVFileManager->Get << 218   else {  
187 }                                              << 219     if ( fFileManager->GetFileName() == "" ) {
                                                   >> 220       G4ExceptionDescription description;
                                                   >> 221       description 
                                                   >> 222         << "Cannot get P2. File name has to be set first.";
                                                   >> 223       G4Exception("G4VAnalysisReader::ReadP2()",
                                                   >> 224                   "Analysis_WR011", JustWarning, description);
                                                   >> 225       return kInvalidId;
                                                   >> 226     }           
                                                   >> 227     return ReadP2Impl(p2Name, fFileManager->GetFileName(), false);
                                                   >> 228   }  
                                                   >> 229 }                                      
188                                                   230 
189 //____________________________________________    231 //_____________________________________________________________________________
190 G4bool G4VAnalysisReader::SetFirstHistoId(G4in << 232 G4bool G4VAnalysisReader::SetFirstHistoId(G4int firstId) 
191 {                                                 233 {
192   auto result = true;                          << 234   G4bool finalResult = true;
193                                                   235 
194   result &= SetFirstH1Id(firstId);             << 236   G4bool result = SetFirstH1Id(firstId);
195   result &= SetFirstH2Id(firstId);             << 237   finalResult = finalResult && result;
196   result &= SetFirstH3Id(firstId);             << 238   
                                                   >> 239   result = SetFirstH2Id(firstId);
                                                   >> 240   finalResult = finalResult && result;
197                                                   241 
198   return result;                               << 242   result = SetFirstH3Id(firstId);
199 }                                              << 243   finalResult = finalResult && result;
                                                   >> 244    
                                                   >> 245   return finalResult; 
                                                   >> 246 }  
200                                                   247 
201 //____________________________________________    248 //_____________________________________________________________________________
202 G4bool G4VAnalysisReader::SetFirstH1Id(G4int f << 249 G4bool G4VAnalysisReader::SetFirstH1Id(G4int firstId) 
203 {                                                 250 {
204   return fVH1Manager->GetHnManager()->SetFirst << 251   G4bool finalResult = true;
205 }                                              << 252   G4bool result = fVH1Manager->SetFirstId(firstId);
                                                   >> 253   finalResult = finalResult && result;
                                                   >> 254   
                                                   >> 255   result = fVH1Manager->fHnManager->SetFirstId(firstId);
                                                   >> 256   finalResult = finalResult && result;
                                                   >> 257   
                                                   >> 258   return finalResult; 
                                                   >> 259 }  
206                                                   260 
207 //____________________________________________    261 //_____________________________________________________________________________
208 G4bool G4VAnalysisReader::SetFirstH2Id(G4int f << 262 G4bool G4VAnalysisReader::SetFirstH2Id(G4int firstId) 
209 {                                                 263 {
210   return fVH2Manager->GetHnManager()->SetFirst << 264   G4bool finalResult = true;
211 }                                              << 265   G4bool result = fVH2Manager->SetFirstId(firstId);
                                                   >> 266   finalResult = finalResult && result;
                                                   >> 267 
                                                   >> 268   result = fVH2Manager->fHnManager->SetFirstId(firstId);
                                                   >> 269   finalResult = finalResult && result;
                                                   >> 270    
                                                   >> 271   return finalResult; 
                                                   >> 272 }  
212                                                   273 
213 //____________________________________________    274 //_____________________________________________________________________________
214 G4bool G4VAnalysisReader::SetFirstH3Id(G4int f << 275 G4bool G4VAnalysisReader::SetFirstH3Id(G4int firstId) 
215 {                                                 276 {
216   return fVH3Manager->GetHnManager()->SetFirst << 277   G4bool finalResult = true;
217 }                                              << 278   G4bool result = fVH3Manager->SetFirstId(firstId);
                                                   >> 279   finalResult = finalResult && result;
                                                   >> 280 
                                                   >> 281   result = fVH3Manager->fHnManager->SetFirstId(firstId);
                                                   >> 282   finalResult = finalResult && result;
                                                   >> 283    
                                                   >> 284   return finalResult; 
                                                   >> 285 }  
218                                                   286 
219 //____________________________________________    287 //_____________________________________________________________________________
220 G4bool G4VAnalysisReader::SetFirstProfileId(G4 << 288 G4bool G4VAnalysisReader::SetFirstProfileId(G4int firstId) 
221 {                                                 289 {
222   auto result = true;                          << 290   G4bool finalResult = true;
223                                                   291 
224   result &= SetFirstP1Id(firstId);             << 292   G4bool result = SetFirstP1Id(firstId);
225   result &= SetFirstP2Id(firstId);             << 293   finalResult = finalResult && result;
                                                   >> 294   
                                                   >> 295   result = SetFirstP2Id(firstId);
                                                   >> 296   finalResult = finalResult && result;
226                                                   297 
227   return result;                               << 298   return finalResult; 
228 }                                              << 299 }  
229                                                   300 
230 //____________________________________________    301 //_____________________________________________________________________________
231 G4bool G4VAnalysisReader::SetFirstP1Id(G4int f << 302 G4bool G4VAnalysisReader::SetFirstP1Id(G4int firstId) 
232 {                                                 303 {
233   return fVP1Manager->GetHnManager()->SetFirst << 304   G4bool finalResult = true;
234 }                                              << 305   G4bool result = fVP1Manager->SetFirstId(firstId);
                                                   >> 306   finalResult = finalResult && result;
                                                   >> 307   
                                                   >> 308   result = fVP1Manager->fHnManager->SetFirstId(firstId);
                                                   >> 309   finalResult = finalResult && result;
                                                   >> 310   
                                                   >> 311   return finalResult; 
                                                   >> 312 }  
235                                                   313 
236 //____________________________________________    314 //_____________________________________________________________________________
237 G4bool G4VAnalysisReader::SetFirstP2Id(G4int f << 315 G4bool G4VAnalysisReader::SetFirstP2Id(G4int firstId) 
238 {                                                 316 {
239   return fVP2Manager->GetHnManager()->SetFirst << 317   G4bool finalResult = true;
240 }                                              << 318   G4bool result = fVP2Manager->SetFirstId(firstId);
                                                   >> 319   finalResult = finalResult && result;
                                                   >> 320 
                                                   >> 321   result = fVP2Manager->fHnManager->SetFirstId(firstId);
                                                   >> 322   finalResult = finalResult && result;
                                                   >> 323    
                                                   >> 324   return finalResult; 
                                                   >> 325 }  
241                                                   326 
242 //____________________________________________    327 //_____________________________________________________________________________
243 G4bool G4VAnalysisReader::SetFirstNtupleId(G4i << 328 G4bool G4VAnalysisReader::SetFirstNtupleId(G4int firstId) 
244 {                                                 329 {
245   return fVNtupleManager->SetFirstId(firstId);    330   return fVNtupleManager->SetFirstId(firstId);
246 }                                              << 331 }  
247                                                   332 
248 //____________________________________________    333 //_____________________________________________________________________________
249 G4int G4VAnalysisReader::GetNtuple(const G4Str << 334 G4int G4VAnalysisReader::GetNtuple(const G4String& ntupleName, 
250                                    const G4Str << 335                                    const G4String& fileName)
251                                    const G4Str << 
252 {                                                 336 {
253   if ( fileName != "" ) {                         337   if ( fileName != "" ) {
254     return fVNtupleManager->ReadNtupleImpl(ntu << 338     return ReadNtupleImpl(ntupleName, fileName, true);
255   }                                               339   }
256   // Check if fileName was set                 << 340   else {  
257   if (fVFileManager->GetFileName() == "") {    << 341     if ( fFileManager->GetFileName() == "" ) {
258     Warn("Cannot read Ntuple " + ntupleName += << 342       G4ExceptionDescription description;
259       "ReadNtuple");                           << 343       description 
260     return kInvalidId;                         << 344         << "Cannot get Ntuple. File name has to be set first.";
261   }                                            << 345       G4Exception("G4VAnalysisReader::GetNtuple()",
262   return fVNtupleManager->ReadNtupleImpl(ntupl << 346                   "Analysis_WR011", JustWarning, description);
263 }                                              << 347       return kInvalidId;
                                                   >> 348     }           
                                                   >> 349     return ReadNtupleImpl(ntupleName, fFileManager->GetFileName(), false);
                                                   >> 350   }  
                                                   >> 351 }                                      
264                                                   352 
265 //____________________________________________    353 //_____________________________________________________________________________
266 G4bool G4VAnalysisReader::SetNtupleIColumn(con << 354 G4bool G4VAnalysisReader::SetNtupleIColumn(const G4String& columnName, 
267                                             G4    355                                             G4int& value)
268 {                                                 356 {
269   return fVNtupleManager->SetNtupleIColumn(col    357   return fVNtupleManager->SetNtupleIColumn(columnName, value);
270 }                                              << 358 }                                              
271                                                   359 
272 //____________________________________________    360 //_____________________________________________________________________________
273 G4bool G4VAnalysisReader::SetNtupleFColumn(con << 361 G4bool G4VAnalysisReader::SetNtupleFColumn(const G4String& columnName, 
274                                             G4    362                                             G4float& value)
275 {                                                 363 {
276   return fVNtupleManager->SetNtupleFColumn(col    364   return fVNtupleManager->SetNtupleFColumn(columnName, value);
277 }                                              << 365 }                                              
278                                                << 366                                             
279 //____________________________________________    367 //_____________________________________________________________________________
280 G4bool G4VAnalysisReader::SetNtupleDColumn(con << 368 G4bool G4VAnalysisReader::SetNtupleDColumn(const G4String& columnName, 
281                                             G4    369                                             G4double& value)
282 {                                                 370 {
283   return fVNtupleManager->SetNtupleDColumn(col    371   return fVNtupleManager->SetNtupleDColumn(columnName, value);
284 }                                              << 372 }                                              
285                                                   373 
286 //____________________________________________    374 //_____________________________________________________________________________
287 G4bool G4VAnalysisReader::SetNtupleSColumn(con << 375 G4bool G4VAnalysisReader::SetNtupleSColumn(const G4String& columnName, 
288                                             G4    376                                             G4String& value)
289 {                                                 377 {
290   return fVNtupleManager->SetNtupleSColumn(col    378   return fVNtupleManager->SetNtupleSColumn(columnName, value);
291 }                                              << 379 }                                              
292                                                   380 
293 //____________________________________________    381 //_____________________________________________________________________________
294 G4bool G4VAnalysisReader::SetNtupleIColumn(con << 382 G4bool G4VAnalysisReader::SetNtupleIColumn(const G4String& columnName, 
295                                             st    383                                             std::vector<int>& vector)
296 {                                                 384 {
297   return fVNtupleManager->SetNtupleIColumn(col    385   return fVNtupleManager->SetNtupleIColumn(columnName, vector);
298 }                                              << 386 }                                              
299                                                << 387                                             
300 //____________________________________________    388 //_____________________________________________________________________________
301 G4bool G4VAnalysisReader::SetNtupleFColumn(con << 389 G4bool G4VAnalysisReader::SetNtupleFColumn(const G4String& columnName, 
302                                             st    390                                             std::vector<float>& vector)
303 {                                                 391 {
304   return fVNtupleManager->SetNtupleFColumn(col    392   return fVNtupleManager->SetNtupleFColumn(columnName, vector);
305 }                                              << 393 }                                              
306                                                << 394                                             
307 //____________________________________________    395 //_____________________________________________________________________________
308 G4bool G4VAnalysisReader::SetNtupleDColumn(con << 396 G4bool G4VAnalysisReader::SetNtupleDColumn(const G4String& columnName, 
309                                             st    397                                             std::vector<double>& vector)
310 {                                                 398 {
311   return fVNtupleManager->SetNtupleDColumn(col    399   return fVNtupleManager->SetNtupleDColumn(columnName, vector);
312 }                                              << 400 }                                              
313                                                << 401                                             
314 //____________________________________________ << 
315 G4bool G4VAnalysisReader::SetNtupleSColumn(con << 
316                                             st << 
317 {                                              << 
318   return fVNtupleManager->SetNtupleSColumn(col << 
319 }                                              << 
320                                                << 
321 //____________________________________________    402 //_____________________________________________________________________________
322 G4bool G4VAnalysisReader::SetNtupleIColumn(G4i    403 G4bool G4VAnalysisReader::SetNtupleIColumn(G4int ntupleId,
323                                             co << 404                                             const G4String& columnName, 
324                                             G4    405                                             G4int& value)
325 {                                                 406 {
326   return fVNtupleManager->SetNtupleIColumn(ntu    407   return fVNtupleManager->SetNtupleIColumn(ntupleId, columnName, value);
327 }                                              << 408 }                                              
328                                                   409 
329 //____________________________________________    410 //_____________________________________________________________________________
330 G4bool G4VAnalysisReader::SetNtupleFColumn(G4i    411 G4bool G4VAnalysisReader::SetNtupleFColumn(G4int ntupleId,
331                                             co << 412                                             const G4String& columnName, 
332                                             G4    413                                             G4float& value)
333 {                                                 414 {
334   return fVNtupleManager->SetNtupleFColumn(ntu    415   return fVNtupleManager->SetNtupleFColumn(ntupleId, columnName, value);
335 }                                              << 416 }                                              
336                                                << 417                                             
337 //____________________________________________    418 //_____________________________________________________________________________
338 G4bool G4VAnalysisReader::SetNtupleDColumn(G4i    419 G4bool G4VAnalysisReader::SetNtupleDColumn(G4int ntupleId,
339                                             co << 420                                             const G4String& columnName, 
340                                             G4    421                                             G4double& value)
341 {                                                 422 {
342   return fVNtupleManager->SetNtupleDColumn(ntu    423   return fVNtupleManager->SetNtupleDColumn(ntupleId, columnName, value);
343 }                                              << 424 }                                              
344                                                   425 
345 //____________________________________________    426 //_____________________________________________________________________________
346 G4bool G4VAnalysisReader::SetNtupleSColumn(G4i    427 G4bool G4VAnalysisReader::SetNtupleSColumn(G4int ntupleId,
347                                             co << 428                                             const G4String& columnName, 
348                                             G4    429                                             G4String& value)
349 {                                                 430 {
350   return fVNtupleManager->SetNtupleSColumn(ntu    431   return fVNtupleManager->SetNtupleSColumn(ntupleId, columnName, value);
351 }                                              << 432 }                                              
352                                                   433 
353 //____________________________________________    434 //_____________________________________________________________________________
354 G4bool G4VAnalysisReader::SetNtupleIColumn(G4i << 435 G4bool G4VAnalysisReader::SetNtupleIColumn(G4int ntupleId, 
355                                             co << 436                                             const G4String& columnName, 
356                                             st    437                                             std::vector<int>& vector)
357 {                                                 438 {
358   return fVNtupleManager->SetNtupleIColumn(ntu    439   return fVNtupleManager->SetNtupleIColumn(ntupleId, columnName, vector);
359 }                                                 440 }
360                                                << 441                                             
361 //____________________________________________    442 //_____________________________________________________________________________
362 G4bool G4VAnalysisReader::SetNtupleFColumn(G4i << 443 G4bool G4VAnalysisReader::SetNtupleFColumn(G4int ntupleId, 
363                                             co << 444                                             const G4String& columnName, 
364                                             st    445                                             std::vector<float>& vector)
365 {                                                 446 {
366   return fVNtupleManager->SetNtupleFColumn(ntu    447   return fVNtupleManager->SetNtupleFColumn(ntupleId, columnName, vector);
367 }                                                 448 }
368                                                   449 
369 //____________________________________________    450 //_____________________________________________________________________________
370 G4bool G4VAnalysisReader::SetNtupleDColumn(G4i << 451 G4bool G4VAnalysisReader::SetNtupleDColumn(G4int ntupleId, 
371                                             co << 452                                             const G4String& columnName, 
372                                             st    453                                             std::vector<double>& vector)
373 {                                                 454 {
374   return fVNtupleManager->SetNtupleDColumn(ntu    455   return fVNtupleManager->SetNtupleDColumn(ntupleId, columnName, vector);
375 }                                                 456 }
376                                                   457 
377 //____________________________________________    458 //_____________________________________________________________________________
378 G4bool G4VAnalysisReader::SetNtupleSColumn(G4i << 
379                                             co << 
380                                             st << 
381 {                                              << 
382   return fVNtupleManager->SetNtupleSColumn(ntu << 
383 }                                              << 
384                                                << 
385 //____________________________________________ << 
386 G4bool G4VAnalysisReader::GetNtupleRow()          459 G4bool G4VAnalysisReader::GetNtupleRow()
387 {                                                 460 {
388   return fVNtupleManager->GetNtupleRow();         461   return fVNtupleManager->GetNtupleRow();
389 }                                              << 462 }                                              
390                                                   463 
391                                                   464 
392 //____________________________________________    465 //_____________________________________________________________________________
393 G4bool G4VAnalysisReader::GetNtupleRow(G4int n    466 G4bool G4VAnalysisReader::GetNtupleRow(G4int ntupleId)
394 {                                                 467 {
395   return fVNtupleManager->GetNtupleRow(ntupleI    468   return fVNtupleManager->GetNtupleRow(ntupleId);
396 }                                              << 469 }                                              
397                                                   470 
398 //____________________________________________    471 //_____________________________________________________________________________
399 G4int G4VAnalysisReader::GetNofH1s(G4bool only << 472 G4int G4VAnalysisReader::GetNofH1s() const
400 {                                                 473 {
401   return fVH1Manager->GetNofHns(onlyIfExist);  << 474   return fVH1Manager->fHnManager->GetNofHns();
402 }                                              << 475 }  
403                                                   476 
404 //____________________________________________    477 //_____________________________________________________________________________
405 G4int G4VAnalysisReader::GetNofH2s(G4bool only << 478 G4int G4VAnalysisReader::GetNofH2s() const
406 {                                                 479 {
407   return fVH2Manager->GetNofHns(onlyIfExist);  << 480   return fVH2Manager->fHnManager->GetNofHns();
408 }                                              << 481 }  
409                                                   482 
410 //____________________________________________    483 //_____________________________________________________________________________
411 G4int G4VAnalysisReader::GetNofH3s(G4bool only << 484 G4int G4VAnalysisReader::GetNofH3s() const
412 {                                                 485 {
413   return fVH3Manager->GetNofHns(onlyIfExist);  << 486   return fVH3Manager->fHnManager->GetNofHns();
414 }                                              << 487 }  
415                                                   488 
416 //____________________________________________    489 //_____________________________________________________________________________
417 G4int G4VAnalysisReader::GetNofP1s(G4bool only << 490 G4int G4VAnalysisReader::GetNofP1s() const
418 {                                                 491 {
419   return fVP1Manager->GetNofHns(onlyIfExist);  << 492   return fVP1Manager->fHnManager->GetNofHns();
420 }                                              << 493 }  
421                                                   494 
422 //____________________________________________    495 //_____________________________________________________________________________
423 G4int G4VAnalysisReader::GetNofP2s(G4bool only << 496 G4int G4VAnalysisReader::GetNofP2s() const
424 {                                                 497 {
425   return fVP2Manager->GetNofHns(onlyIfExist);  << 498   return fVP2Manager->fHnManager->GetNofHns();
426 }                                              << 499 }  
427                                                   500 
428 //____________________________________________    501 //_____________________________________________________________________________
429 G4int G4VAnalysisReader::GetNofNtuples() const    502 G4int G4VAnalysisReader::GetNofNtuples() const
430 {                                                 503 {
431   return fVNtupleManager->GetNofNtuples();        504   return fVNtupleManager->GetNofNtuples();
432 }                                              << 505 }  
433                                                   506 
434 // GetH1Id(), GetH2Id in .icc                  << 507 // GetH1Id(), GetH2Id in .icc 
435                                                   508 
436 // Access methods in .icc                         509 // Access methods in .icc
437                                                   510 
438 //____________________________________________    511 //_____________________________________________________________________________
439 void G4VAnalysisReader::SetVerboseLevel(G4int  << 512 void G4VAnalysisReader::SetVerboseLevel(G4int verboseLevel) 
440 {                                                 513 {
441   fState.SetVerboseLevel(verboseLevel);           514   fState.SetVerboseLevel(verboseLevel);
442 }                                              << 515 } 
443                                                   516 
444 // GetVerboseLevel() in .icc                   << 517 // GetVerboseLevel() in .icc 
445                                                   518