Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 26 27 // Author: Ivana Hrivnacova, 09/07/2013 (ivan 27 // Author: Ivana Hrivnacova, 09/07/2013 (ivana@ipno.in2p3.fr) 28 28 29 #include "G4VAnalysisReader.hh" 29 #include "G4VAnalysisReader.hh" 30 #include "G4AnalysisUtilities.hh" 30 #include "G4AnalysisUtilities.hh" >> 31 #include "G4BaseFileManager.hh" 31 #include "G4HnManager.hh" 32 #include "G4HnManager.hh" >> 33 #include "G4VH1Manager.hh" >> 34 #include "G4VH2Manager.hh" >> 35 #include "G4VH3Manager.hh" >> 36 #include "G4VP1Manager.hh" >> 37 #include "G4VP2Manager.hh" 32 #include "G4VRNtupleManager.hh" 38 #include "G4VRNtupleManager.hh" 33 #include "G4VRFileManager.hh" << 39 34 #include "G4Threading.hh" << 40 #include <iostream> 35 41 36 using namespace G4Analysis; 42 using namespace G4Analysis; 37 43 38 //____________________________________________ 44 //_____________________________________________________________________________ 39 G4VAnalysisReader::G4VAnalysisReader(const G4S << 45 G4VAnalysisReader::G4VAnalysisReader(const G4String& type, G4bool isMaster) 40 : fState(type, ! G4Threading::IsWorkerThread( << 46 : fState(type, isMaster), >> 47 fVH1Manager(nullptr), >> 48 fVH2Manager(nullptr), >> 49 fVH3Manager(nullptr), >> 50 fVP1Manager(nullptr), >> 51 fVP2Manager(nullptr), >> 52 fVNtupleManager(nullptr), >> 53 fFileManager(nullptr) 41 {} 54 {} 42 55 43 //____________________________________________ 56 //_____________________________________________________________________________ 44 G4VAnalysisReader::~G4VAnalysisReader() = defa << 57 G4VAnalysisReader::~G4VAnalysisReader() >> 58 {} 45 59 46 // << 60 // 47 // protected methods 61 // protected methods 48 // 62 // 49 << 63 50 //____________________________________________ 64 //_____________________________________________________________________________ 51 void G4VAnalysisReader::SetH1Manager(G4VTBaseH << 65 void G4VAnalysisReader::SetH1Manager(G4VH1Manager* h1Manager) 52 { 66 { 53 fVH1Manager.reset(h1Manager); 67 fVH1Manager.reset(h1Manager); 54 } << 68 } 55 69 56 //____________________________________________ 70 //_____________________________________________________________________________ 57 void G4VAnalysisReader::SetH2Manager(G4VTBaseH << 71 void G4VAnalysisReader::SetH2Manager(G4VH2Manager* h2Manager) 58 { 72 { 59 fVH2Manager.reset(h2Manager); 73 fVH2Manager.reset(h2Manager); 60 } << 74 } 61 75 62 //____________________________________________ 76 //_____________________________________________________________________________ 63 void G4VAnalysisReader::SetH3Manager(G4VTBaseH << 77 void G4VAnalysisReader::SetH3Manager(G4VH3Manager* h3Manager) 64 { 78 { 65 fVH3Manager.reset(h3Manager); 79 fVH3Manager.reset(h3Manager); 66 } << 80 } 67 81 68 //____________________________________________ 82 //_____________________________________________________________________________ 69 void G4VAnalysisReader::SetP1Manager(G4VTBaseH << 83 void G4VAnalysisReader::SetP1Manager(G4VP1Manager* p1Manager) 70 { 84 { 71 fVP1Manager.reset(p1Manager); 85 fVP1Manager.reset(p1Manager); 72 } << 86 } 73 87 74 //____________________________________________ 88 //_____________________________________________________________________________ 75 void G4VAnalysisReader::SetP2Manager(G4VTBaseH << 89 void G4VAnalysisReader::SetP2Manager(G4VP2Manager* p2Manager) 76 { 90 { 77 fVP2Manager.reset(p2Manager); 91 fVP2Manager.reset(p2Manager); 78 } << 92 } 79 93 80 //____________________________________________ 94 //_____________________________________________________________________________ 81 void G4VAnalysisReader::SetNtupleManager(std:: << 95 void G4VAnalysisReader::SetNtupleManager(G4VRNtupleManager* ntupleManager) 82 { 96 { 83 fVNtupleManager = std::move(ntupleManager); << 97 fVNtupleManager.reset(ntupleManager); 84 } << 98 } 85 99 86 //____________________________________________ 100 //_____________________________________________________________________________ 87 void G4VAnalysisReader::SetFileManager(std::sh << 101 void G4VAnalysisReader::SetFileManager(G4BaseFileManager* fileManager) 88 { 102 { 89 fVFileManager = std::move(fileManager); << 103 fFileManager.reset(fileManager); 90 } << 104 } 91 105 92 // << 106 // 93 // public methods 107 // public methods 94 // 108 // 95 109 96 //____________________________________________ 110 //_____________________________________________________________________________ 97 G4bool G4VAnalysisReader::CloseFiles(G4bool re << 98 { << 99 return CloseFilesImpl(reset); << 100 } << 101 << 102 //____________________________________________ << 103 void G4VAnalysisReader::SetFileName(const G4St 111 void G4VAnalysisReader::SetFileName(const G4String& fileName) 104 { << 112 { 105 fVFileManager->SetFileName(fileName); << 113 fFileManager->SetFileName(fileName); 106 } 114 } 107 115 108 //____________________________________________ 116 //_____________________________________________________________________________ 109 G4String G4VAnalysisReader::GetFileName() cons << 117 G4String G4VAnalysisReader::GetFileName() const 110 { << 118 { 111 return fVFileManager->GetFileName(); << 119 return fFileManager->GetFileName(); 112 } 120 } 113 121 114 //____________________________________________ 122 //_____________________________________________________________________________ 115 G4int G4VAnalysisReader::ReadH1(const G4String << 123 G4int G4VAnalysisReader::ReadH1(const G4String& h1Name, 116 const G4String 124 const G4String& fileName, 117 const G4String 125 const G4String& dirName) 118 { 126 { 119 if ( fileName != "" ) { 127 if ( fileName != "" ) { 120 return ReadH1Impl(h1Name, fileName, dirNam 128 return ReadH1Impl(h1Name, fileName, dirName, true); 121 } 129 } 122 if (fVFileManager->GetFileName() == "") { << 130 else { 123 Warn("Cannot get H1 " + h1Name + ". File n << 131 if ( fFileManager->GetFileName() == "" ) { 124 return kInvalidId; << 132 G4ExceptionDescription description; 125 } << 133 description 126 return ReadH1Impl(h1Name, fVFileManager->Get << 134 << "Cannot get H1. File name has to be set first."; 127 } << 135 G4Exception("G4VAnalysisReader::ReadH1()", >> 136 "Analysis_WR011", JustWarning, description); >> 137 return kInvalidId; >> 138 } >> 139 return ReadH1Impl(h1Name, fFileManager->GetFileName(), dirName, false); >> 140 } >> 141 } 128 142 129 //____________________________________________ 143 //_____________________________________________________________________________ 130 G4int G4VAnalysisReader::ReadH2(const G4String << 144 G4int G4VAnalysisReader::ReadH2(const G4String& h2Name, 131 const G4String 145 const G4String& fileName, 132 const G4String 146 const G4String& dirName) 133 { 147 { 134 if ( fileName != "" ) { 148 if ( fileName != "" ) { 135 return ReadH2Impl(h2Name, fileName, dirNam 149 return ReadH2Impl(h2Name, fileName, dirName, true); 136 } 150 } 137 if (fVFileManager->GetFileName() == "") { << 151 else { 138 Warn("Cannot get H2 " + h2Name + ". File n << 152 if ( fFileManager->GetFileName() == "" ) { 139 return kInvalidId; << 153 G4ExceptionDescription description; 140 } << 154 description 141 return ReadH2Impl(h2Name, fVFileManager->Get << 155 << "Cannot get H2. File name has to be set first."; 142 } << 156 G4Exception("G4VAnalysisReader::ReadH2()", >> 157 "Analysis_WR011", JustWarning, description); >> 158 return kInvalidId; >> 159 } >> 160 return ReadH2Impl(h2Name, fFileManager->GetFileName(), dirName, false); >> 161 } >> 162 } 143 163 144 //____________________________________________ 164 //_____________________________________________________________________________ 145 G4int G4VAnalysisReader::ReadH3(const G4String << 165 G4int G4VAnalysisReader::ReadH3(const G4String& h3Name, 146 const G4String 166 const G4String& fileName, 147 const G4String 167 const G4String& dirName) 148 { 168 { 149 if ( fileName != "" ) { 169 if ( fileName != "" ) { 150 return ReadH3Impl(h3Name, fileName, dirNam 170 return ReadH3Impl(h3Name, fileName, dirName, true); 151 } 171 } 152 if (fVFileManager->GetFileName() == "") { << 172 else { 153 Warn("Cannot get H3 " + h3Name + ". File n << 173 if ( fFileManager->GetFileName() == "" ) { 154 return kInvalidId; << 174 G4ExceptionDescription description; 155 } << 175 description 156 return ReadH3Impl(h3Name, fVFileManager->Get << 176 << "Cannot get H3. File name has to be set first."; 157 } << 177 G4Exception("G4VAnalysisReader::ReadH2()", >> 178 "Analysis_WR011", JustWarning, description); >> 179 return kInvalidId; >> 180 } >> 181 return ReadH3Impl(h3Name, fFileManager->GetFileName(), dirName, false); >> 182 } >> 183 } 158 184 159 //____________________________________________ 185 //_____________________________________________________________________________ 160 G4int G4VAnalysisReader::ReadP1(const G4String << 186 G4int G4VAnalysisReader::ReadP1(const G4String& p1Name, 161 const G4String 187 const G4String& fileName, 162 const G4String 188 const G4String& dirName) 163 { 189 { 164 if ( fileName != "" ) { 190 if ( fileName != "" ) { 165 return ReadP1Impl(p1Name, fileName, dirNam 191 return ReadP1Impl(p1Name, fileName, dirName, true); 166 } 192 } 167 if (fVFileManager->GetFileName() == "") { << 193 else { 168 Warn("Cannot get P1 " + p1Name + ". File n << 194 if ( fFileManager->GetFileName() == "" ) { 169 return kInvalidId; << 195 G4ExceptionDescription description; 170 } << 196 description 171 return ReadP1Impl(p1Name, fVFileManager->Get << 197 << "Cannot get P1. File name has to be set first."; 172 } << 198 G4Exception("G4VAnalysisReader::ReadP1()", >> 199 "Analysis_WR011", JustWarning, description); >> 200 return kInvalidId; >> 201 } >> 202 return ReadP1Impl(p1Name, fFileManager->GetFileName(), dirName, false); >> 203 } >> 204 } 173 205 174 //____________________________________________ 206 //_____________________________________________________________________________ 175 G4int G4VAnalysisReader::ReadP2(const G4String << 207 G4int G4VAnalysisReader::ReadP2(const G4String& p2Name, 176 const G4String 208 const G4String& fileName, 177 const G4String 209 const G4String& dirName) 178 { 210 { 179 if ( fileName != "" ) { 211 if ( fileName != "" ) { 180 return ReadP2Impl(p2Name, fileName, dirNam 212 return ReadP2Impl(p2Name, fileName, dirName, true); 181 } 213 } 182 if (fVFileManager->GetFileName() == "") { << 214 else { 183 Warn("Cannot get P2 " + p2Name + ". File n << 215 if ( fFileManager->GetFileName() == "" ) { 184 return kInvalidId; << 216 G4ExceptionDescription description; 185 } << 217 description 186 return ReadP2Impl(p2Name, fVFileManager->Get << 218 << "Cannot get P2. File name has to be set first."; 187 } << 219 G4Exception("G4VAnalysisReader::ReadP2()", 188 << 220 "Analysis_WR011", JustWarning, description); 189 //____________________________________________ << 221 return kInvalidId; 190 G4bool G4VAnalysisReader::SetFirstHistoId(G4in << 222 } 191 { << 223 return ReadP2Impl(p2Name, fFileManager->GetFileName(), dirName, false); 192 auto result = true; << 224 } 193 << 225 } 194 result &= SetFirstH1Id(firstId); << 226 195 result &= SetFirstH2Id(firstId); << 227 //_____________________________________________________________________________ 196 result &= SetFirstH3Id(firstId); << 228 G4bool G4VAnalysisReader::SetFirstHistoId(G4int firstId) 197 << 229 { 198 return result; << 230 G4bool finalResult = true; 199 } << 231 >> 232 G4bool result = SetFirstH1Id(firstId); >> 233 finalResult = finalResult && result; >> 234 >> 235 result = SetFirstH2Id(firstId); >> 236 finalResult = finalResult && result; >> 237 >> 238 result = SetFirstH3Id(firstId); >> 239 finalResult = finalResult && result; >> 240 >> 241 return finalResult; >> 242 } 200 243 201 //____________________________________________ 244 //_____________________________________________________________________________ 202 G4bool G4VAnalysisReader::SetFirstH1Id(G4int f << 245 G4bool G4VAnalysisReader::SetFirstH1Id(G4int firstId) 203 { 246 { 204 return fVH1Manager->GetHnManager()->SetFirst 247 return fVH1Manager->GetHnManager()->SetFirstId(firstId); 205 } << 248 } 206 249 207 //____________________________________________ 250 //_____________________________________________________________________________ 208 G4bool G4VAnalysisReader::SetFirstH2Id(G4int f << 251 G4bool G4VAnalysisReader::SetFirstH2Id(G4int firstId) 209 { 252 { 210 return fVH2Manager->GetHnManager()->SetFirst 253 return fVH2Manager->GetHnManager()->SetFirstId(firstId); 211 } << 254 } 212 255 213 //____________________________________________ 256 //_____________________________________________________________________________ 214 G4bool G4VAnalysisReader::SetFirstH3Id(G4int f << 257 G4bool G4VAnalysisReader::SetFirstH3Id(G4int firstId) 215 { 258 { 216 return fVH3Manager->GetHnManager()->SetFirst 259 return fVH3Manager->GetHnManager()->SetFirstId(firstId); 217 } << 260 } 218 261 219 //____________________________________________ 262 //_____________________________________________________________________________ 220 G4bool G4VAnalysisReader::SetFirstProfileId(G4 << 263 G4bool G4VAnalysisReader::SetFirstProfileId(G4int firstId) 221 { 264 { 222 auto result = true; << 265 G4bool finalResult = true; 223 266 224 result &= SetFirstP1Id(firstId); << 267 G4bool result = SetFirstP1Id(firstId); 225 result &= SetFirstP2Id(firstId); << 268 finalResult = finalResult && result; >> 269 >> 270 result = SetFirstP2Id(firstId); >> 271 finalResult = finalResult && result; 226 272 227 return result; << 273 return finalResult; 228 } << 274 } 229 275 230 //____________________________________________ 276 //_____________________________________________________________________________ 231 G4bool G4VAnalysisReader::SetFirstP1Id(G4int f << 277 G4bool G4VAnalysisReader::SetFirstP1Id(G4int firstId) 232 { 278 { 233 return fVP1Manager->GetHnManager()->SetFirst 279 return fVP1Manager->GetHnManager()->SetFirstId(firstId); 234 } << 280 } 235 281 236 //____________________________________________ 282 //_____________________________________________________________________________ 237 G4bool G4VAnalysisReader::SetFirstP2Id(G4int f << 283 G4bool G4VAnalysisReader::SetFirstP2Id(G4int firstId) 238 { 284 { 239 return fVP2Manager->GetHnManager()->SetFirst 285 return fVP2Manager->GetHnManager()->SetFirstId(firstId); 240 } << 286 } 241 287 242 //____________________________________________ 288 //_____________________________________________________________________________ 243 G4bool G4VAnalysisReader::SetFirstNtupleId(G4i << 289 G4bool G4VAnalysisReader::SetFirstNtupleId(G4int firstId) 244 { 290 { 245 return fVNtupleManager->SetFirstId(firstId); 291 return fVNtupleManager->SetFirstId(firstId); 246 } << 292 } 247 293 248 //____________________________________________ 294 //_____________________________________________________________________________ 249 G4int G4VAnalysisReader::GetNtuple(const G4Str << 295 G4int G4VAnalysisReader::GetNtuple(const G4String& ntupleName, 250 const G4Str 296 const G4String& fileName, 251 const G4Str 297 const G4String& dirName) 252 { 298 { 253 if ( fileName != "" ) { 299 if ( fileName != "" ) { 254 return fVNtupleManager->ReadNtupleImpl(ntu << 300 return ReadNtupleImpl(ntupleName, fileName, dirName, true); 255 } 301 } 256 // Check if fileName was set << 302 else { 257 if (fVFileManager->GetFileName() == "") { << 303 // Check if fileName was set 258 Warn("Cannot read Ntuple " + ntupleName += << 304 if ( fFileManager->GetFileName() == "" ) { 259 "ReadNtuple"); << 305 G4ExceptionDescription description; 260 return kInvalidId; << 306 description 261 } << 307 << "Cannot get Ntuple. File name has to be set first."; 262 return fVNtupleManager->ReadNtupleImpl(ntupl << 308 G4Exception("G4VAnalysisReader::GetNtuple()", 263 } << 309 "Analysis_WR011", JustWarning, description); >> 310 return kInvalidId; >> 311 } >> 312 return ReadNtupleImpl(ntupleName, fFileManager->GetFileName(), dirName, false); >> 313 } >> 314 } 264 315 265 //____________________________________________ 316 //_____________________________________________________________________________ 266 G4bool G4VAnalysisReader::SetNtupleIColumn(con << 317 G4bool G4VAnalysisReader::SetNtupleIColumn(const G4String& columnName, 267 G4 318 G4int& value) 268 { 319 { 269 return fVNtupleManager->SetNtupleIColumn(col 320 return fVNtupleManager->SetNtupleIColumn(columnName, value); 270 } << 321 } 271 322 272 //____________________________________________ 323 //_____________________________________________________________________________ 273 G4bool G4VAnalysisReader::SetNtupleFColumn(con << 324 G4bool G4VAnalysisReader::SetNtupleFColumn(const G4String& columnName, 274 G4 325 G4float& value) 275 { 326 { 276 return fVNtupleManager->SetNtupleFColumn(col 327 return fVNtupleManager->SetNtupleFColumn(columnName, value); 277 } << 328 } 278 << 329 279 //____________________________________________ 330 //_____________________________________________________________________________ 280 G4bool G4VAnalysisReader::SetNtupleDColumn(con << 331 G4bool G4VAnalysisReader::SetNtupleDColumn(const G4String& columnName, 281 G4 332 G4double& value) 282 { 333 { 283 return fVNtupleManager->SetNtupleDColumn(col 334 return fVNtupleManager->SetNtupleDColumn(columnName, value); 284 } << 335 } 285 336 286 //____________________________________________ 337 //_____________________________________________________________________________ 287 G4bool G4VAnalysisReader::SetNtupleSColumn(con << 338 G4bool G4VAnalysisReader::SetNtupleSColumn(const G4String& columnName, 288 G4 339 G4String& value) 289 { 340 { 290 return fVNtupleManager->SetNtupleSColumn(col 341 return fVNtupleManager->SetNtupleSColumn(columnName, value); 291 } << 342 } 292 343 293 //____________________________________________ 344 //_____________________________________________________________________________ 294 G4bool G4VAnalysisReader::SetNtupleIColumn(con << 345 G4bool G4VAnalysisReader::SetNtupleIColumn(const G4String& columnName, 295 st 346 std::vector<int>& vector) 296 { 347 { 297 return fVNtupleManager->SetNtupleIColumn(col 348 return fVNtupleManager->SetNtupleIColumn(columnName, vector); 298 } << 349 } 299 << 350 300 //____________________________________________ 351 //_____________________________________________________________________________ 301 G4bool G4VAnalysisReader::SetNtupleFColumn(con << 352 G4bool G4VAnalysisReader::SetNtupleFColumn(const G4String& columnName, 302 st 353 std::vector<float>& vector) 303 { 354 { 304 return fVNtupleManager->SetNtupleFColumn(col 355 return fVNtupleManager->SetNtupleFColumn(columnName, vector); 305 } << 356 } 306 << 357 307 //____________________________________________ 358 //_____________________________________________________________________________ 308 G4bool G4VAnalysisReader::SetNtupleDColumn(con << 359 G4bool G4VAnalysisReader::SetNtupleDColumn(const G4String& columnName, 309 st 360 std::vector<double>& vector) 310 { 361 { 311 return fVNtupleManager->SetNtupleDColumn(col 362 return fVNtupleManager->SetNtupleDColumn(columnName, vector); 312 } << 363 } 313 << 364 314 //____________________________________________ << 315 G4bool G4VAnalysisReader::SetNtupleSColumn(con << 316 st << 317 { << 318 return fVNtupleManager->SetNtupleSColumn(col << 319 } << 320 << 321 //____________________________________________ 365 //_____________________________________________________________________________ 322 G4bool G4VAnalysisReader::SetNtupleIColumn(G4i 366 G4bool G4VAnalysisReader::SetNtupleIColumn(G4int ntupleId, 323 co << 367 const G4String& columnName, 324 G4 368 G4int& value) 325 { 369 { 326 return fVNtupleManager->SetNtupleIColumn(ntu 370 return fVNtupleManager->SetNtupleIColumn(ntupleId, columnName, value); 327 } << 371 } 328 372 329 //____________________________________________ 373 //_____________________________________________________________________________ 330 G4bool G4VAnalysisReader::SetNtupleFColumn(G4i 374 G4bool G4VAnalysisReader::SetNtupleFColumn(G4int ntupleId, 331 co << 375 const G4String& columnName, 332 G4 376 G4float& value) 333 { 377 { 334 return fVNtupleManager->SetNtupleFColumn(ntu 378 return fVNtupleManager->SetNtupleFColumn(ntupleId, columnName, value); 335 } << 379 } 336 << 380 337 //____________________________________________ 381 //_____________________________________________________________________________ 338 G4bool G4VAnalysisReader::SetNtupleDColumn(G4i 382 G4bool G4VAnalysisReader::SetNtupleDColumn(G4int ntupleId, 339 co << 383 const G4String& columnName, 340 G4 384 G4double& value) 341 { 385 { 342 return fVNtupleManager->SetNtupleDColumn(ntu 386 return fVNtupleManager->SetNtupleDColumn(ntupleId, columnName, value); 343 } << 387 } 344 388 345 //____________________________________________ 389 //_____________________________________________________________________________ 346 G4bool G4VAnalysisReader::SetNtupleSColumn(G4i 390 G4bool G4VAnalysisReader::SetNtupleSColumn(G4int ntupleId, 347 co << 391 const G4String& columnName, 348 G4 392 G4String& value) 349 { 393 { 350 return fVNtupleManager->SetNtupleSColumn(ntu 394 return fVNtupleManager->SetNtupleSColumn(ntupleId, columnName, value); 351 } << 395 } 352 396 353 //____________________________________________ 397 //_____________________________________________________________________________ 354 G4bool G4VAnalysisReader::SetNtupleIColumn(G4i << 398 G4bool G4VAnalysisReader::SetNtupleIColumn(G4int ntupleId, 355 co << 399 const G4String& columnName, 356 st 400 std::vector<int>& vector) 357 { 401 { 358 return fVNtupleManager->SetNtupleIColumn(ntu 402 return fVNtupleManager->SetNtupleIColumn(ntupleId, columnName, vector); 359 } 403 } 360 << 404 361 //____________________________________________ 405 //_____________________________________________________________________________ 362 G4bool G4VAnalysisReader::SetNtupleFColumn(G4i << 406 G4bool G4VAnalysisReader::SetNtupleFColumn(G4int ntupleId, 363 co << 407 const G4String& columnName, 364 st 408 std::vector<float>& vector) 365 { 409 { 366 return fVNtupleManager->SetNtupleFColumn(ntu 410 return fVNtupleManager->SetNtupleFColumn(ntupleId, columnName, vector); 367 } 411 } 368 412 369 //____________________________________________ 413 //_____________________________________________________________________________ 370 G4bool G4VAnalysisReader::SetNtupleDColumn(G4i << 414 G4bool G4VAnalysisReader::SetNtupleDColumn(G4int ntupleId, 371 co << 415 const G4String& columnName, 372 st 416 std::vector<double>& vector) 373 { 417 { 374 return fVNtupleManager->SetNtupleDColumn(ntu 418 return fVNtupleManager->SetNtupleDColumn(ntupleId, columnName, vector); 375 } 419 } 376 420 377 //____________________________________________ 421 //_____________________________________________________________________________ 378 G4bool G4VAnalysisReader::SetNtupleSColumn(G4i << 379 co << 380 st << 381 { << 382 return fVNtupleManager->SetNtupleSColumn(ntu << 383 } << 384 << 385 //____________________________________________ << 386 G4bool G4VAnalysisReader::GetNtupleRow() 422 G4bool G4VAnalysisReader::GetNtupleRow() 387 { 423 { 388 return fVNtupleManager->GetNtupleRow(); 424 return fVNtupleManager->GetNtupleRow(); 389 } << 425 } 390 426 391 427 392 //____________________________________________ 428 //_____________________________________________________________________________ 393 G4bool G4VAnalysisReader::GetNtupleRow(G4int n 429 G4bool G4VAnalysisReader::GetNtupleRow(G4int ntupleId) 394 { 430 { 395 return fVNtupleManager->GetNtupleRow(ntupleI 431 return fVNtupleManager->GetNtupleRow(ntupleId); 396 } << 432 } 397 433 398 //____________________________________________ 434 //_____________________________________________________________________________ 399 G4int G4VAnalysisReader::GetNofH1s(G4bool only << 435 G4int G4VAnalysisReader::GetNofH1s() const 400 { 436 { 401 return fVH1Manager->GetNofHns(onlyIfExist); << 437 return fVH1Manager->GetHnManager()->GetNofHns(); 402 } << 438 } 403 439 404 //____________________________________________ 440 //_____________________________________________________________________________ 405 G4int G4VAnalysisReader::GetNofH2s(G4bool only << 441 G4int G4VAnalysisReader::GetNofH2s() const 406 { 442 { 407 return fVH2Manager->GetNofHns(onlyIfExist); << 443 return fVH2Manager->GetHnManager()->GetNofHns(); 408 } << 444 } 409 445 410 //____________________________________________ 446 //_____________________________________________________________________________ 411 G4int G4VAnalysisReader::GetNofH3s(G4bool only << 447 G4int G4VAnalysisReader::GetNofH3s() const 412 { 448 { 413 return fVH3Manager->GetNofHns(onlyIfExist); << 449 return fVH3Manager->GetHnManager()->GetNofHns(); 414 } << 450 } 415 451 416 //____________________________________________ 452 //_____________________________________________________________________________ 417 G4int G4VAnalysisReader::GetNofP1s(G4bool only << 453 G4int G4VAnalysisReader::GetNofP1s() const 418 { 454 { 419 return fVP1Manager->GetNofHns(onlyIfExist); << 455 return fVP1Manager->GetHnManager()->GetNofHns(); 420 } << 456 } 421 457 422 //____________________________________________ 458 //_____________________________________________________________________________ 423 G4int G4VAnalysisReader::GetNofP2s(G4bool only << 459 G4int G4VAnalysisReader::GetNofP2s() const 424 { 460 { 425 return fVP2Manager->GetNofHns(onlyIfExist); << 461 return fVP2Manager->GetHnManager()->GetNofHns(); 426 } << 462 } 427 463 428 //____________________________________________ 464 //_____________________________________________________________________________ 429 G4int G4VAnalysisReader::GetNofNtuples() const 465 G4int G4VAnalysisReader::GetNofNtuples() const 430 { 466 { 431 return fVNtupleManager->GetNofNtuples(); 467 return fVNtupleManager->GetNofNtuples(); 432 } << 468 } 433 469 434 // GetH1Id(), GetH2Id in .icc << 470 // GetH1Id(), GetH2Id in .icc 435 471 436 // Access methods in .icc 472 // Access methods in .icc 437 473 438 //____________________________________________ 474 //_____________________________________________________________________________ 439 void G4VAnalysisReader::SetVerboseLevel(G4int << 475 void G4VAnalysisReader::SetVerboseLevel(G4int verboseLevel) 440 { 476 { 441 fState.SetVerboseLevel(verboseLevel); 477 fState.SetVerboseLevel(verboseLevel); 442 } << 478 } 443 479 444 // GetVerboseLevel() in .icc << 480 // GetVerboseLevel() in .icc 445 481