|
musrfit 1.10.0
|

Go to the source code of this file.
Functions | |
| ClassImp (PUserFcnBase) Int_t parseXmlFile(TSAXParser *saxParser | |
| Parses an XML file using buffer-based parsing for better compatibility. | |
| xmlFile | open (startup_path_name, std::ios::in|std::ios::ate) |
| if (xmlFile.is_open()) | |
| if (!xmlBuffer) | |
Variables | |
| const char * | startup_path_name |
| std::fstream | xmlFile |
| UInt_t | xmlSize = 0 |
| Char_t * | xmlBuffer = nullptr |
| else | |
| return | status |
| std::vector< void * > | gGlobalUserFcn |
| Global storage for user function objects requiring persistent state. | |
| ClassImp | ( | PUserFcnBase | ) |
Parses an XML file using buffer-based parsing for better compatibility.
This function provides a replacement for TSAXParser::ParseFile() that works reliably across different environments. Some systems have issues with direct file parsing, but buffer-based parsing (ParseBuffer) works consistently.
User functions that need to read XML configuration files should use this function instead of TSAXParser::ParseFile():
| saxParser | Pointer to a configured TSAXParser object. The parser should have its handler connected before calling this function. |
| startup_path_name | Full filesystem path to the XML file to parse. |
| if | ( | ! | xmlBuffer | ) |
Definition at line 105 of file PUserFcnBase.cpp.
| if | ( | xmlFile. | is_open() | ) |
Definition at line 98 of file PUserFcnBase.cpp.
References xmlFile.
| xmlFile open | ( | startup_path_name | , |
| std::ios::in|std::ios::ate | ) |
References startup_path_name, and xmlFile.
| else |
Definition at line 107 of file PUserFcnBase.cpp.
| std::vector<void *> gGlobalUserFcn |
Global storage for user function objects requiring persistent state.
This vector provides a global container for user functions that need to maintain state across multiple evaluations or share data between runs. It is primarily used by user functions implementing the "global part" interface (NeedGlobalPart(), SetGlobalPart(), GlobalPartIsValid()).
User functions with expensive initialization (lookup tables, precomputed grids, loaded data files) store their global objects here:
Definition at line 155 of file PUserFcnBase.cpp.
Referenced by PTheory::PTheory(), and PTheory::~PTheory().
| const char* startup_path_name |
Definition at line 90 of file PUserFcnBase.cpp.
| return status |
Definition at line 113 of file PUserFcnBase.cpp.
| xmlBuffer = nullptr |
Definition at line 95 of file PUserFcnBase.cpp.
| std::fstream xmlFile |
Definition at line 93 of file PUserFcnBase.cpp.
| UInt_t xmlSize = 0 |
Definition at line 94 of file PUserFcnBase.cpp.