Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 27 #include "G4AnalysisManagerState.hh" 28 #include "G4AnalysisUtilities.hh" 29 30 // 31 // private functions 32 // 33 34 //____________________________________________ 35 template <typename T> 36 G4int G4NtupleBookingManager::CreateNtupleTCol 37 G4int ntupleId, const G4String& name, std::v 38 { 39 if (! CheckName(name, "NtupleColumn")) retur 40 41 Message(G4Analysis::kVL4, "create", "ntuple 42 " ntupleId " + std::to_string(ntupleId)); 43 44 auto g4NtupleBooking 45 = GetNtupleBookingInFunction(ntupleId, "Cr 46 if ( ! g4NtupleBooking ) return G4Analysis: 47 48 // Save column info in booking 49 auto& ntupleBooking = g4NtupleBooking->fNtup 50 auto index = ntupleBooking.columns().size(); 51 if (! vector) { 52 ntupleBooking.template add_column<T>(name) 53 } 54 else { 55 ntupleBooking.template add_column<T>(name, 56 } 57 58 // Create column if ntuple already exists 59 // CreateTColumnInNtuple<T>(ntupleBooking, n 60 fLockFirstNtupleColumnId = true; 61 62 Message(G4Analysis::kVL2, "create", "ntuple 63 name + " ntupleId " + std::to_string(ntupl 64 65 return G4int(index + fFirstNtupleColumnId); 66 } 67 68 //____________________________________________ 69 inline G4int G4NtupleBookingManager::GetNofNtu 70 { 71 return (onlyIfExist) ? G4int(fNtupleBookingV 72 : G4int(fNtupleBookingV 73 } 74 75 //____________________________________________ 76 inline G4int G4NtupleBookingManager::GetCurre 77 { 78 return fCurrentNtupleId; 79 } 80 81 // 82 // public functions 83 // 84 85 //____________________________________________ 86 inline const std::vector<G4NtupleBooking*>& 87 G4NtupleBookingManager::GetNtupleBookingVector 88 { 89 return fNtupleBookingVector; 90 } 91 92 //____________________________________________ 93 inline G4int G4NtupleBookingManager::GetFirstN 94 return fFirstNtupleColumnId; 95 } 96 97 //____________________________________________ 98 inline G4String G4NtupleBookingManager::GetFil 99 { 100 return fFileType; 101 } 102