Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4CsvAnalysisReader Class Reference

#include <G4CsvAnalysisReader.hh>

Inheritance diagram for G4CsvAnalysisReader:
Collaboration diagram for G4CsvAnalysisReader:

Public Member Functions

 G4CsvAnalysisReader (G4bool isMaster=true)
 
virtual ~G4CsvAnalysisReader ()
 
tools::rcsv::ntuple * GetNtuple () const
 
tools::rcsv::ntuple * GetNtuple (G4int ntupleId) const
 
- 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="")
 
G4int ReadH2 (const G4String &h2Name, const G4String &fileName="")
 
G4int ReadH3 (const G4String &h3Name, const G4String &fileName="")
 
G4int ReadP1 (const G4String &h1Name, const G4String &fileName="")
 
G4int ReadP2 (const G4String &h2Name, const G4String &fileName="")
 
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="")
 
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, G4bool isUserFileName) final
 
virtual G4int ReadH2Impl (const G4String &h2Name, const G4String &fileName, G4bool isUserFileName) final
 
virtual G4int ReadH3Impl (const G4String &h3Name, const G4String &fileName, G4bool isUserFileName) final
 
virtual G4int ReadP1Impl (const G4String &p1Name, const G4String &fileName, G4bool isUserFileName) final
 
virtual G4int ReadP2Impl (const G4String &p2Name, const G4String &fileName, G4bool isUserFileName) final
 
virtual G4int ReadNtupleImpl (const G4String &ntupleName, const G4String &fileName, G4bool isUserFileName) final
 
- Protected Member Functions inherited from G4ToolsAnalysisReader
G4bool Reset ()
 
- Protected Member Functions inherited from G4VAnalysisReader
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 54 of file G4CsvAnalysisReader.hh.

Constructor & Destructor Documentation

G4CsvAnalysisReader::G4CsvAnalysisReader ( G4bool  isMaster = true)
explicit

Definition at line 104 of file G4CsvAnalysisReader.cc.

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

Here is the call graph for this function:

G4CsvAnalysisReader::~G4CsvAnalysisReader ( )
virtual

Definition at line 132 of file G4CsvAnalysisReader.cc.

133 {
134  if ( fState.GetIsMaster() ) fgMasterInstance = nullptr;
135  fgInstance = nullptr;
136 }
G4AnalysisManagerState fState

Here is the call graph for this function:

Member Function Documentation

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

Definition at line 93 of file G4CsvAnalysisReader.cc.

94 {
95  if ( fgInstance == nullptr ) {
96  G4bool isMaster = ! G4Threading::IsWorkerThread();
97  fgInstance = new G4CsvAnalysisReader(isMaster);
98  }
99 
100  return fgInstance;
101 }
bool G4bool
Definition: G4Types.hh:79
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
G4CsvAnalysisReader(G4bool isMaster=true)

Here is the call graph for this function:

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

Implements G4VAnalysisReader.

Definition at line 178 of file G4CsvAnalysisReader.cc.

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

Here is the call graph for this function:

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

Implements G4VAnalysisReader.

Definition at line 219 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 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4AnalysisManagerState fState
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
G4H2ToolsManager * fH2Manager
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int AddH2(const G4String &name, tools::histo::h2d *h2d)
const G4int kInvalidId
const G4AnalysisVerbose * GetVerboseL1() const

Here is the call graph for this function:

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

Implements G4VAnalysisReader.

Definition at line 260 of file G4CsvAnalysisReader.cc.

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

Here is the call graph for this function:

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

Implements G4VAnalysisReader.

Definition at line 384 of file G4CsvAnalysisReader.cc.

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

Here is the call graph for this function:

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

Implements G4VAnalysisReader.

Definition at line 301 of file G4CsvAnalysisReader.cc.

304 {
305 #ifdef G4VERBOSE
306  if ( fState.GetVerboseL4() )
307  fState.GetVerboseL4()->Message("read", "p1", p1Name);
308 #endif
309 
310  // open file
311  G4String p1FileName = GetHnFileName("p1", p1Name, fileName, isUserFileName);
312  std::ifstream hnFile(p1FileName);
313  if ( ! hnFile.is_open() ) {
314  G4ExceptionDescription description;
315  description << " " << "Cannot open file " << p1FileName;
316  G4Exception("G4CsvAnalysisReader::ReadP1Impl()",
317  "Analysis_WR001", JustWarning, description);
318  return kInvalidId;
319  }
320 #ifdef G4VERBOSE
321  if ( fState.GetVerboseL1() )
323  ->Message("open", "read file", p1FileName);
324 #endif
325 
326  void* object
327  = ReadObject(hnFile, tools::histo::p1d::s_class(), fileName, "ReadP1Impl");
328  if ( ! object ) return kInvalidId;
329 
330  auto p1 = static_cast<tools::histo::p1d*>(object);
331  auto id = fP1Manager->AddP1(p1Name, p1);
332 
333 #ifdef G4VERBOSE
334  if ( fState.GetVerboseL2() )
335  fState.GetVerboseL2()->Message("read", "p1", p1Name, id > kInvalidId);
336 #endif
337 
338  return id;
339 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4P1ToolsManager * fP1Manager
G4AnalysisManagerState fState
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int AddP1(const G4String &name, tools::histo::p1d *p1d)
const G4int kInvalidId
const G4AnalysisVerbose * GetVerboseL1() const

Here is the call graph for this function:

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

Implements G4VAnalysisReader.

Definition at line 342 of file G4CsvAnalysisReader.cc.

345 {
346 #ifdef G4VERBOSE
347  if ( fState.GetVerboseL4() )
348  fState.GetVerboseL4()->Message("read", "p2", p2Name);
349 #endif
350 
351  // open file
352  G4String p2FileName = GetHnFileName("p2", p2Name, fileName, isUserFileName);
353  std::ifstream hnFile(p2FileName);
354  if ( ! hnFile.is_open() ) {
355  G4ExceptionDescription description;
356  description << " " << "Cannot open file " << p2FileName;
357  G4Exception("G4CsvAnalysisReader::ReadP2Impl()",
358  "Analysis_WR001", JustWarning, description);
359  return kInvalidId;
360  }
361 #ifdef G4VERBOSE
362  if ( fState.GetVerboseL1() )
364  ->Message("open", "read file", p2FileName);
365 #endif
366 
367  void* object
368  = ReadObject(hnFile, tools::histo::p2d::s_class(), p2FileName, "ReadP2Impl");
369  if ( ! object ) return kInvalidId;
370 
371  auto p2 = static_cast<tools::histo::p2d*>(object);
372  auto id = fP2Manager->AddP2(p2Name, p2);
373 
374 
375 #ifdef G4VERBOSE
376  if ( fState.GetVerboseL2() )
377  fState.GetVerboseL2()->Message("read", "p2", p2Name, id > kInvalidId);
378 #endif
379 
380  return id;
381 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4AnalysisManagerState fState
G4int AddP2(const G4String &name, tools::histo::p2d *p2d)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4P2ToolsManager * fP2Manager
const G4int kInvalidId
const G4AnalysisVerbose * GetVerboseL1() const

Here is the call graph for this function:


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