Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4CsvAnalysisReader Class Reference

#include <G4CsvAnalysisReader.hh>

+ Inheritance diagram for G4CsvAnalysisReader:

Public Member Functions

 G4CsvAnalysisReader (G4bool isMaster=true)
 
virtual ~G4CsvAnalysisReader ()
 
tools::rcsv::ntuple * GetNtuple () const
 
tools::rcsv::ntuple * GetNtuple (G4int ntupleId) const
 
G4int GetNtuple (const G4String &ntupleName, const G4String &fileName="", const G4String &dirName="")
 
- Public Member Functions inherited from G4ToolsAnalysisReader
 G4ToolsAnalysisReader (const G4String &type, G4bool isMaster=true)
 
virtual ~G4ToolsAnalysisReader ()
 
tools::histo::h1d * GetH1 (G4int id, G4bool warn=true) const
 
tools::histo::h2d * GetH2 (G4int id, G4bool warn=true) const
 
tools::histo::h3d * GetH3 (G4int id, G4bool warn=true) const
 
tools::histo::p1d * GetP1 (G4int id, G4bool warn=true) const
 
tools::histo::p2d * GetP2 (G4int id, G4bool warn=true) const
 
- Public Member Functions inherited from G4VAnalysisReader
 G4VAnalysisReader (const G4String &type, G4bool isMaster)
 
virtual ~G4VAnalysisReader ()
 
void SetFileName (const G4String &fileName)
 
G4String GetFileName () const
 
G4int ReadH1 (const G4String &h1Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadH2 (const G4String &h2Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadH3 (const G4String &h3Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadP1 (const G4String &h1Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadP2 (const G4String &h2Name, const G4String &fileName="", const G4String &dirName="")
 
G4bool SetFirstHistoId (G4int firstId)
 
G4bool SetFirstH1Id (G4int firstId)
 
G4bool SetFirstH2Id (G4int firstId)
 
G4bool SetFirstH3Id (G4int firstId)
 
G4bool SetFirstProfileId (G4int firstId)
 
G4bool SetFirstP1Id (G4int firstId)
 
G4bool SetFirstP2Id (G4int firstId)
 
G4bool SetFirstNtupleId (G4int firstId)
 
G4int GetNtuple (const G4String &ntupleName, const G4String &fileName="", const G4String &dirName="")
 
G4bool SetNtupleIColumn (const G4String &columnName, G4int &value)
 
G4bool SetNtupleFColumn (const G4String &columnName, G4float &value)
 
G4bool SetNtupleDColumn (const G4String &columnName, G4double &value)
 
G4bool SetNtupleSColumn (const G4String &columnName, G4String &value)
 
G4bool SetNtupleIColumn (const G4String &columnName, std::vector< int > &vector)
 
G4bool SetNtupleFColumn (const G4String &columnName, std::vector< float > &vector)
 
G4bool SetNtupleDColumn (const G4String &columnName, std::vector< double > &vector)
 
G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, G4int &value)
 
G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, G4float &value)
 
G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, G4double &value)
 
G4bool SetNtupleSColumn (G4int ntupleId, const G4String &columnName, G4String &value)
 
G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, std::vector< int > &vector)
 
G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, std::vector< float > &vector)
 
G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, std::vector< double > &vector)
 
G4bool GetNtupleRow ()
 
G4bool GetNtupleRow (G4int ntupleId)
 
G4bool IsAscii () const
 
G4int GetNofH1s () const
 
G4int GetNofH2s () const
 
G4int GetNofH3s () const
 
G4int GetNofP1s () const
 
G4int GetNofP2s () const
 
G4int GetNofNtuples () const
 
G4int GetH1Id (const G4String &name, G4bool warn=true) const
 
G4int GetH2Id (const G4String &name, G4bool warn=true) const
 
G4int GetH3Id (const G4String &name, G4bool warn=true) const
 
G4int GetP1Id (const G4String &name, G4bool warn=true) const
 
G4int GetP2Id (const G4String &name, G4bool warn=true) const
 
G4int GetH1Nbins (G4int id) const
 
G4double GetH1Xmin (G4int id) const
 
G4double GetH1Xmax (G4int id) const
 
G4double GetH1Width (G4int id) const
 
G4int GetH2Nxbins (G4int id) const
 
G4double GetH2Xmin (G4int id) const
 
G4double GetH2Xmax (G4int id) const
 
G4double GetH2XWidth (G4int id) const
 
G4int GetH2Nybins (G4int id) const
 
G4double GetH2Ymin (G4int id) const
 
G4double GetH2Ymax (G4int id) const
 
G4double GetH2YWidth (G4int id) const
 
G4int GetH3Nxbins (G4int id) const
 
G4double GetH3Xmin (G4int id) const
 
G4double GetH3Xmax (G4int id) const
 
G4double GetH3XWidth (G4int id) const
 
G4int GetH3Nybins (G4int id) const
 
G4double GetH3Ymin (G4int id) const
 
G4double GetH3Ymax (G4int id) const
 
G4double GetH3YWidth (G4int id) const
 
G4int GetH3Nzbins (G4int id) const
 
G4double GetH3Zmin (G4int id) const
 
G4double GetH3Zmax (G4int id) const
 
G4double GetH3ZWidth (G4int id) const
 
G4int GetP1Nbins (G4int id) const
 
G4double GetP1Xmin (G4int id) const
 
G4double GetP1Xmax (G4int id) const
 
G4double GetP1XWidth (G4int id) const
 
G4double GetP1Ymin (G4int id) const
 
G4double GetP1Ymax (G4int id) const
 
G4int GetP2Nxbins (G4int id) const
 
G4double GetP2Xmin (G4int id) const
 
G4double GetP2Xmax (G4int id) const
 
G4double GetP2XWidth (G4int id) const
 
G4int GetP2Nybins (G4int id) const
 
G4double GetP2Ymin (G4int id) const
 
G4double GetP2Ymax (G4int id) const
 
G4double GetP2YWidth (G4int id) const
 
G4double GetP2Zmin (G4int id) const
 
G4double GetP2Zmax (G4int id) const
 
G4String GetH1Title (G4int id) const
 
G4String GetH1XAxisTitle (G4int id) const
 
G4String GetH1YAxisTitle (G4int id) const
 
G4String GetH2Title (G4int id) const
 
G4String GetH2XAxisTitle (G4int id) const
 
G4String GetH2YAxisTitle (G4int id) const
 
G4String GetH2ZAxisTitle (G4int id) const
 
G4String GetH3Title (G4int id) const
 
G4String GetH3XAxisTitle (G4int id) const
 
G4String GetH3YAxisTitle (G4int id) const
 
G4String GetH3ZAxisTitle (G4int id) const
 
G4String GetP1Title (G4int id) const
 
G4String GetP1XAxisTitle (G4int id) const
 
G4String GetP1YAxisTitle (G4int id) const
 
G4String GetP1ZAxisTitle (G4int id) const
 
G4String GetP2Title (G4int id) const
 
G4String GetP2XAxisTitle (G4int id) const
 
G4String GetP2YAxisTitle (G4int id) const
 
G4String GetP2ZAxisTitle (G4int id) const
 
void SetVerboseLevel (G4int verboseLevel)
 
G4int GetVerboseLevel () const
 
G4String GetType () const
 
G4String GetFileType () const
 

Static Public Member Functions

static G4CsvAnalysisReaderInstance ()
 

Protected Member Functions

virtual G4int ReadH1Impl (const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
virtual G4int ReadH2Impl (const G4String &h2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
virtual G4int ReadH3Impl (const G4String &h3Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
virtual G4int ReadP1Impl (const G4String &p1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
virtual G4int ReadP2Impl (const G4String &p2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
virtual G4int ReadNtupleImpl (const G4String &ntupleName, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
- Protected Member Functions inherited from G4ToolsAnalysisReader
G4bool Reset ()
 
- Protected Member Functions inherited from G4VAnalysisReader
virtual G4int ReadH1Impl (const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName)=0
 
virtual G4int ReadH2Impl (const G4String &h2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName)=0
 
virtual G4int ReadH3Impl (const G4String &h3Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName)=0
 
virtual G4int ReadP1Impl (const G4String &p1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName)=0
 
virtual G4int ReadP2Impl (const G4String &p2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName)=0
 
virtual G4int ReadNtupleImpl (const G4String &ntupleName, const G4String &fileName, const G4String &dirName, G4bool isUserFileName)=0
 
void SetH1Manager (G4VH1Manager *h1Manager)
 
void SetH2Manager (G4VH2Manager *h2Manager)
 
void SetH3Manager (G4VH3Manager *h3Manager)
 
void SetP1Manager (G4VP1Manager *p1Manager)
 
void SetP2Manager (G4VP2Manager *p2Manager)
 
void SetNtupleManager (G4VRNtupleManager *ntupleManager)
 
void SetFileManager (G4BaseFileManager *fileManager)
 

Additional Inherited Members

- Protected Attributes inherited from G4ToolsAnalysisReader
G4H1ToolsManagerfH1Manager
 
G4H2ToolsManagerfH2Manager
 
G4H3ToolsManagerfH3Manager
 
G4P1ToolsManagerfP1Manager
 
G4P2ToolsManagerfP2Manager
 
- Protected Attributes inherited from G4VAnalysisReader
G4AnalysisManagerState fState
 

Detailed Description

Definition at line 53 of file G4CsvAnalysisReader.hh.

Constructor & Destructor Documentation

◆ G4CsvAnalysisReader()

G4CsvAnalysisReader::G4CsvAnalysisReader ( G4bool  isMaster = true)
explicit

Definition at line 102 of file G4CsvAnalysisReader.cc.

103 : G4ToolsAnalysisReader("Csv", isMaster),
104 fNtupleManager(nullptr),
105 fFileManager(nullptr)
106{
107 if ( ( isMaster && fgMasterInstance ) || ( fgInstance ) ) {
108 G4ExceptionDescription description;
109 description
110 << " "
111 << "G4CsvAnalysisReader already exists."
112 << "Cannot create another instance.";
113 G4Exception("G4CsvAnalysisReader::G4CsvAnalysisReader()",
114 "Analysis_F001", FatalException, description);
115 }
116 if ( isMaster ) fgMasterInstance = this;
117 fgInstance = this;
118
119 // Create managers
120 fNtupleManager = new G4CsvRNtupleManager(fState);
121 fFileManager = new G4CsvRFileManager(fState);
122 // The managers will be deleted by the base class
123
124 // Set managers to base class
125 SetNtupleManager(fNtupleManager);
126 SetFileManager(fFileManager);
127}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
void SetFileManager(G4BaseFileManager *fileManager)
void SetNtupleManager(G4VRNtupleManager *ntupleManager)
G4AnalysisManagerState fState

◆ ~G4CsvAnalysisReader()

G4CsvAnalysisReader::~G4CsvAnalysisReader ( )
virtual

Definition at line 130 of file G4CsvAnalysisReader.cc.

131{
132 if ( fState.GetIsMaster() ) fgMasterInstance = nullptr;
133 fgInstance = nullptr;
134}

Member Function Documentation

◆ GetNtuple() [1/3]

tools::rcsv::ntuple * G4CsvAnalysisReader::GetNtuple ( ) const

◆ GetNtuple() [2/3]

G4int G4VAnalysisReader::GetNtuple ( const G4String ntupleName,
const G4String fileName = "",
const G4String dirName = "" 
)

Definition at line 88 of file G4VAnalysisReader.cc.

298{
299 if ( fileName != "" ) {
300 return ReadNtupleImpl(ntupleName, fileName, dirName, true);
301 }
302 else {
303 // Check if fileName was set
304 if ( fFileManager->GetFileName() == "" ) {
305 G4ExceptionDescription description;
306 description
307 << "Cannot get Ntuple. File name has to be set first.";
308 G4Exception("G4VAnalysisReader::GetNtuple()",
309 "Analysis_WR011", JustWarning, description);
310 return kInvalidId;
311 }
312 return ReadNtupleImpl(ntupleName, fFileManager->GetFileName(), dirName, false);
313 }
314}
@ JustWarning
G4String GetFileName() const
virtual G4int ReadNtupleImpl(const G4String &ntupleName, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
const G4int kInvalidId

◆ GetNtuple() [3/3]

tools::rcsv::ntuple * G4CsvAnalysisReader::GetNtuple ( G4int  ntupleId) const

◆ Instance()

G4CsvAnalysisReader * G4CsvAnalysisReader::Instance ( )
static

Definition at line 91 of file G4CsvAnalysisReader.cc.

92{
93 if ( fgInstance == nullptr ) {
95 fgInstance = new G4CsvAnalysisReader(isMaster);
96 }
97
98 return fgInstance;
99}
bool G4bool
Definition: G4Types.hh:86
G4bool IsWorkerThread()
Definition: G4Threading.cc:123

◆ ReadH1Impl()

G4int G4CsvAnalysisReader::ReadH1Impl ( const G4String h1Name,
const G4String fileName,
const G4String dirName,
G4bool  isUserFileName 
)
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 176 of file G4CsvAnalysisReader.cc.

180{
181#ifdef G4VERBOSE
182 if ( fState.GetVerboseL4() )
183 fState.GetVerboseL4()->Message("get", "h1", h1Name);
184#endif
185
186 // open file
187 auto h1FileName = GetHnFileName("h1", h1Name, fileName, isUserFileName);
188 std::ifstream hnFile(h1FileName);
189 if ( ! hnFile.is_open() ) {
190 G4ExceptionDescription description;
191 description << " " << "Cannot open file " << h1FileName;
192 G4Exception("G4CsvAnalysisReader::ReadH1Impl()",
193 "Analysis_WR001", JustWarning, description);
194 return kInvalidId;
195 }
196#ifdef G4VERBOSE
197 if ( fState.GetVerboseL1() )
199 ->Message("open", "read file", h1FileName);
200#endif
201
202 void* object
203 = ReadObject(hnFile, tools::histo::h1d::s_class(), h1FileName, "ReadH1Impl");
204 if ( ! object ) return kInvalidId;
205
206 auto h1 = static_cast<tools::histo::h1d*>(object);
207 auto id = fH1Manager->AddH1(h1Name, h1);
208
209#ifdef G4VERBOSE
210 if ( fState.GetVerboseL2() )
211 fState.GetVerboseL2()->Message("read", "h1", h1Name, id > kInvalidId);
212#endif
213
214 return id;
215}
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL1() const
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
G4int AddH1(const G4String &name, tools::histo::h1d *h1d)
G4H1ToolsManager * fH1Manager

◆ ReadH2Impl()

G4int G4CsvAnalysisReader::ReadH2Impl ( const G4String h2Name,
const G4String fileName,
const G4String dirName,
G4bool  isUserFileName 
)
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 218 of file G4CsvAnalysisReader.cc.

222{
223#ifdef G4VERBOSE
224 if ( fState.GetVerboseL4() )
225 fState.GetVerboseL4()->Message("read", "h2", h2Name);
226#endif
227
228 // open file
229 auto h2FileName = GetHnFileName("h2", h2Name, fileName, isUserFileName);
230 std::ifstream hnFile(h2FileName);
231 if ( ! hnFile.is_open() ) {
232 G4ExceptionDescription description;
233 description << " " << "Cannot open file " << h2FileName;
234 G4Exception("G4CsvAnalysisReader::ReadH2Impl()",
235 "Analysis_WR001", JustWarning, description);
236 return kInvalidId;
237 }
238#ifdef G4VERBOSE
239 if ( fState.GetVerboseL1() )
241 ->Message("open", "read file", h2FileName);
242#endif
243
244 void* object
245 = ReadObject(hnFile, tools::histo::h2d::s_class(), h2FileName, "ReadH2Impl");
246 if ( ! object ) return kInvalidId;
247
248 auto h2 = static_cast<tools::histo::h2d*>(object);
249 auto id = fH2Manager->AddH2(h2Name, h2);
250
251#ifdef G4VERBOSE
252 if ( fState.GetVerboseL2() )
253 fState.GetVerboseL2()->Message("read", "h2", h2Name, id > kInvalidId);
254#endif
255
256 return id;
257}
G4int AddH2(const G4String &name, tools::histo::h2d *h2d)
G4H2ToolsManager * fH2Manager

◆ ReadH3Impl()

G4int G4CsvAnalysisReader::ReadH3Impl ( const G4String h3Name,
const G4String fileName,
const G4String dirName,
G4bool  isUserFileName 
)
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 260 of file G4CsvAnalysisReader.cc.

264{
265#ifdef G4VERBOSE
266 if ( fState.GetVerboseL4() )
267 fState.GetVerboseL4()->Message("read", "h3", h3Name);
268#endif
269
270 // open file
271 auto h3FileName = GetHnFileName("h3", h3Name, fileName, isUserFileName);
272 std::ifstream hnFile(h3FileName);
273 if ( ! hnFile.is_open() ) {
274 G4ExceptionDescription description;
275 description << " " << "Cannot open file " << h3FileName;
276 G4Exception("G4CsvAnalysisReader::ReadH3Impl()",
277 "Analysis_WR001", JustWarning, description);
278 return kInvalidId;
279 }
280#ifdef G4VERBOSE
281 if ( fState.GetVerboseL1() )
283 ->Message("open", "read file", h3FileName);
284#endif
285
286 void* object
287 = ReadObject(hnFile, tools::histo::h3d::s_class(), h3FileName, "ReadH3Impl");
288 if ( ! object ) return kInvalidId;
289
290 auto h3 = static_cast<tools::histo::h3d*>(object);
291 auto id = fH3Manager->AddH3(h3Name, h3);
292
293#ifdef G4VERBOSE
294 if ( fState.GetVerboseL2() )
295 fState.GetVerboseL2()->Message("read", "h3", h3Name, id > kInvalidId);
296#endif
297
298 return id;
299}
G4int AddH3(const G4String &name, tools::histo::h3d *h3d)
G4H3ToolsManager * fH3Manager

◆ ReadNtupleImpl()

G4int G4CsvAnalysisReader::ReadNtupleImpl ( const G4String ntupleName,
const G4String fileName,
const G4String dirName,
G4bool  isUserFileName 
)
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 387 of file G4CsvAnalysisReader.cc.

391{
392#ifdef G4VERBOSE
393 if ( fState.GetVerboseL4() )
394 fState.GetVerboseL4()->Message("read", "ntuple", ntupleName);
395#endif
396
397 // Ntuples are saved per object and per thread
398 // but apply the ntuple name and the thread suffixes
399 // only if fileName is not provided explicitly
400 G4String fullFileName = fileName;
401 if ( ! isUserFileName ) {
402 fullFileName = fFileManager->GetNtupleFileName(ntupleName);
403 }
404
405 // Open file
406 if ( ! fFileManager->OpenRFile(fullFileName) ) return kInvalidId;
407 auto ntupleFile = fFileManager->GetRFile(fullFileName);
408
409 // Create ntuple
410 auto rntuple = new tools::rcsv::ntuple(*ntupleFile);
411 auto id = fNtupleManager->SetNtuple(new G4TRNtupleDescription<tools::rcsv::ntuple>(rntuple));
412
413#ifdef G4VERBOSE
414 if ( fState.GetVerboseL2() )
415 fState.GetVerboseL2()->Message("read", "ntuple", ntupleName, id > kInvalidId);
416#endif
417
418 return id;
419}
G4String GetNtupleFileName(const G4String &ntupleName) const
std::ifstream * GetRFile(const G4String &fileName) const
virtual G4bool OpenRFile(const G4String &fileName)
G4int SetNtuple(G4TRNtupleDescription< TNTUPLE > *rntupleDescription)

◆ ReadP1Impl()

G4int G4CsvAnalysisReader::ReadP1Impl ( const G4String p1Name,
const G4String fileName,
const G4String dirName,
G4bool  isUserFileName 
)
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 302 of file G4CsvAnalysisReader.cc.

306{
307#ifdef G4VERBOSE
308 if ( fState.GetVerboseL4() )
309 fState.GetVerboseL4()->Message("read", "p1", p1Name);
310#endif
311
312 // open file
313 G4String p1FileName = GetHnFileName("p1", p1Name, fileName, isUserFileName);
314 std::ifstream hnFile(p1FileName);
315 if ( ! hnFile.is_open() ) {
316 G4ExceptionDescription description;
317 description << " " << "Cannot open file " << p1FileName;
318 G4Exception("G4CsvAnalysisReader::ReadP1Impl()",
319 "Analysis_WR001", JustWarning, description);
320 return kInvalidId;
321 }
322#ifdef G4VERBOSE
323 if ( fState.GetVerboseL1() )
325 ->Message("open", "read file", p1FileName);
326#endif
327
328 void* object
329 = ReadObject(hnFile, tools::histo::p1d::s_class(), fileName, "ReadP1Impl");
330 if ( ! object ) return kInvalidId;
331
332 auto p1 = static_cast<tools::histo::p1d*>(object);
333 auto id = fP1Manager->AddP1(p1Name, p1);
334
335#ifdef G4VERBOSE
336 if ( fState.GetVerboseL2() )
337 fState.GetVerboseL2()->Message("read", "p1", p1Name, id > kInvalidId);
338#endif
339
340 return id;
341}
G4int AddP1(const G4String &name, tools::histo::p1d *p1d)
G4P1ToolsManager * fP1Manager

◆ ReadP2Impl()

G4int G4CsvAnalysisReader::ReadP2Impl ( const G4String p2Name,
const G4String fileName,
const G4String dirName,
G4bool  isUserFileName 
)
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 344 of file G4CsvAnalysisReader.cc.

348{
349#ifdef G4VERBOSE
350 if ( fState.GetVerboseL4() )
351 fState.GetVerboseL4()->Message("read", "p2", p2Name);
352#endif
353
354 // open file
355 G4String p2FileName = GetHnFileName("p2", p2Name, fileName, isUserFileName);
356 std::ifstream hnFile(p2FileName);
357 if ( ! hnFile.is_open() ) {
358 G4ExceptionDescription description;
359 description << " " << "Cannot open file " << p2FileName;
360 G4Exception("G4CsvAnalysisReader::ReadP2Impl()",
361 "Analysis_WR001", JustWarning, description);
362 return kInvalidId;
363 }
364#ifdef G4VERBOSE
365 if ( fState.GetVerboseL1() )
367 ->Message("open", "read file", p2FileName);
368#endif
369
370 void* object
371 = ReadObject(hnFile, tools::histo::p2d::s_class(), p2FileName, "ReadP2Impl");
372 if ( ! object ) return kInvalidId;
373
374 auto p2 = static_cast<tools::histo::p2d*>(object);
375 auto id = fP2Manager->AddP2(p2Name, p2);
376
377
378#ifdef G4VERBOSE
379 if ( fState.GetVerboseL2() )
380 fState.GetVerboseL2()->Message("read", "p2", p2Name, id > kInvalidId);
381#endif
382
383 return id;
384}
G4int AddP2(const G4String &name, tools::histo::p2d *p2d)
G4P2ToolsManager * fP2Manager

The documentation for this class was generated from the following files: