Warning, file /include/Geant4/G4NtupleBookingManager.icc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "G4AnalysisManagerState.hh"
0028 #include "G4AnalysisUtilities.hh"
0029
0030
0031
0032
0033
0034
0035 template <typename T>
0036 G4int G4NtupleBookingManager::CreateNtupleTColumn(
0037 G4int ntupleId, const G4String& name, std::vector<T>* vector)
0038 {
0039 if (! CheckName(name, "NtupleColumn")) return G4Analysis::kInvalidId;
0040
0041 Message(G4Analysis::kVL4, "create", "ntuple T column",
0042 " ntupleId " + std::to_string(ntupleId));
0043
0044 auto g4NtupleBooking
0045 = GetNtupleBookingInFunction(ntupleId, "CreateNtupleTColumn");
0046 if ( ! g4NtupleBooking ) return G4Analysis::kInvalidId;
0047
0048
0049 auto& ntupleBooking = g4NtupleBooking->fNtupleBooking;
0050 auto index = ntupleBooking.columns().size();
0051 if (! vector) {
0052 ntupleBooking.template add_column<T>(name);
0053 }
0054 else {
0055 ntupleBooking.template add_column<T>(name, *vector);
0056 }
0057
0058
0059
0060 fLockFirstNtupleColumnId = true;
0061
0062 Message(G4Analysis::kVL2, "create", "ntuple T column",
0063 name + " ntupleId " + std::to_string(ntupleId));
0064
0065 return G4int(index + fFirstNtupleColumnId);
0066 }
0067
0068
0069 inline G4int G4NtupleBookingManager::GetNofNtuples(G4bool onlyIfExist) const
0070 {
0071 return (onlyIfExist) ? G4int(fNtupleBookingVector.size() - fFreeIds.size())
0072 : G4int(fNtupleBookingVector.size());
0073 }
0074
0075
0076 inline G4int G4NtupleBookingManager::GetCurrentNtupleId() const
0077 {
0078 return fCurrentNtupleId;
0079 }
0080
0081
0082
0083
0084
0085
0086 inline const std::vector<G4NtupleBooking*>&
0087 G4NtupleBookingManager::GetNtupleBookingVector() const
0088 {
0089 return fNtupleBookingVector;
0090 }
0091
0092
0093 inline G4int G4NtupleBookingManager::GetFirstNtupleColumnId() const {
0094 return fFirstNtupleColumnId;
0095 }
0096
0097
0098 inline G4String G4NtupleBookingManager::GetFileType() const
0099 {
0100 return fFileType;
0101 }