33 #ifndef G4RootNtupleManager_h
34 #define G4RootNtupleManager_h 1
39 #include "tools/wroot/ntuple"
73 G4int nofMainManagers = 0,
85 void SetFileManager(std::shared_ptr<G4RootFileManager> fileManager);
132 inline const std::vector<G4TNtupleDescription<tools::wroot::ntuple>* >&
148 if ( !
ntuple )
return false;
151 if ( index < 0 || index >=
G4int(
ntuple->columns().size()) ) {
153 description <<
" " <<
"ntupleId " << ntupleId
154 <<
" columnId " << columnId <<
" does not exist.";
155 G4Exception(
"G4RootNtupleManager::FillNtupleTColumn()",
160 auto icolumn =
ntuple->columns()[index];
161 auto column =
dynamic_cast<tools::wroot::ntuple::column_string*
>(icolumn);
164 description <<
" Column type does not match: "
165 <<
" ntupleId " << ntupleId
166 <<
" columnId " << columnId <<
" value " <<
value;
167 G4Exception(
"G4RootNtupleManager:FillNtupleColumn",
177 description <<
" ntupleId " << ntupleId
178 <<
" columnId " << columnId <<
" value " <<
value;
std::vector< G4TNtupleDescription< tools::wroot::ntuple > * > fNtupleDescriptionVector
G4RootMainNtupleManager * GetMainNtupleManager(G4int index) const
std::ostringstream G4ExceptionDescription
G4NtupleCreateMode fCreateMode
G4RootNtupleManager(const G4AnalysisManagerState &state, G4int nofMainManagers=0, G4bool rowWise=true)
G4bool GetIsActivation() const
virtual G4bool GetActivation(G4int ntupleId) const final
std::vector< G4RootMainNtupleManager * > fMainNtupleManagers
unsigned int GetBasketSize() const
TNTUPLE * GetNtupleInFunction(G4int id, G4String function, G4bool warn=true) const
void SetNtupleDirectory(tools::wroot::directory *directory)
G4int fFirstNtupleColumnId
const XML_Char int const XML_Char * value
G4bool FillNtupleTColumn(G4int ntupleId, G4int columnId, const T &value)
const G4AnalysisVerbose * GetVerboseL4() const
virtual G4bool Reset(G4bool deleteNtuple)
void CreateTNtuple(NtupleDescriptionType *ntupleDescription)
std::shared_ptr< G4RootFileManager > fFileManager
const std::vector< NtupleDescriptionType * > & GetNtupleDescriptionVector() const
tools::wroot::ntuple NtupleType
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual void CreateTNtupleFromBooking(NtupleDescriptionType *ntupleDescription) final
tools::wroot::directory * fNtupleDirectory
virtual void FinishTNtuple(NtupleDescriptionType *ntupleDescription) final
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
virtual ~G4RootNtupleManager()
void SetFileManager(std::shared_ptr< G4RootFileManager > fileManager)
const G4AnalysisManagerState & fState