musrfit 1.10.0
PMsr2Data Class Reference

Utility class for msr2data: template-based msr-file generation and parameter extraction. More...

#include <PMsr2Data.h>

Public Member Functions

 PMsr2Data (const std::string &fileExtension)
 Constructor that initializes the msr2data handler.
 
 ~PMsr2Data ()
 Destructor that cleans up resources.
 
int SetRunNumbers (unsigned int runNumber)
 Sets a single run number for processing.
 
int SetRunNumbers (unsigned int firstRun, unsigned int lastRun)
 Sets a range of run numbers (from first to last, inclusive).
 
int SetRunNumbers (const std::string &runListFileName)
 Sets run numbers from a run list file.
 
int SetRunNumbers (const std::vector< unsigned int > &runVector)
 Sets run numbers from an explicit vector.
 
unsigned int GetPresentRun () const
 Gets the current run number being processed.
 
int DetermineRunNumberDigits (unsigned int maxRunNumber, bool templateFile) const
 Determines the number of digits needed for run number formatting.
 
int CheckRunNumbersInRange () const
 Validates that all run numbers are within acceptable ranges.
 
int ParseXmlStartupFile ()
 Parses the XML startup file for configuration.
 
int ReadMsrFile (const std::string &msrFileName) const
 Reads and parses an msr-file.
 
int ReadRunDataFile ()
 Reads the run data file for the current run.
 
bool PrepareNewInputFile (unsigned int templateNumber, bool sorted) const
 Generates a new msr-file from a template.
 
bool PrepareGlobalInputFile (unsigned int templateNumber, const std::string &globalOutputFile, unsigned int runListSize) const
 Generates an msr-file for global (multi-run) fitting.
 
int WriteOutput (const std::string &outputFileName, const std::vector< unsigned int > &parameters, bool dbFormat, unsigned int precision, bool global=false, unsigned int counter=0) const
 Writes extracted parameters to output file.
 

Private Member Functions

bool PrepareNewSortedInputFile (unsigned int templateNumber) const
 Generates a sorted msr-file from a template.
 
PMsrHandlerGetSingleRunMsrFile () const
 Retrieves msr-file handler for a single run.
 
void WriteValue (std::fstream &outFile, const double &value, const unsigned int &width) const
 Writes a single numeric value to output stream.
 
void WriteValue (std::fstream &outFile, const double &value, const double &errValue, const unsigned int &width, const bool &db) const
 Writes a value with its error to output stream.
 
int GetFirstSignificantDigit (const double &value) const
 Determines the first significant digit position of a value.
 
bool InParameterList (const unsigned int &paramValue, const std::vector< unsigned int > &paramList) const
 Checks if a parameter is in the output parameter list.
 

Private Attributes

std::string fFileExtension
 File extension for data files (e.g., "bin", "root")
 
std::vector< unsigned int > fRunVector
 Vector of run numbers to process.
 
std::vector< unsignedint >::const_iterator fRunVectorIter
 Iterator for current position in run vector.
 
bool fRunListFile
 Flag indicating if run list is from a file.
 
std::vector< std::string > fIndVar
 Independent variables for output.
 
std::unique_ptr< std::ifstream > fRunListFileStream
 Stream for reading run list file.
 
std::unique_ptr< TSAXParser > fSaxParser
 XML SAX parser for startup file.
 
std::unique_ptr< PStartupHandlerfStartupHandler
 Handler for XML startup file configuration.
 
std::unique_ptr< PRunDataHandlerfDataHandler
 Handler for run data files.
 
std::unique_ptr< PMsrHandlerfMsrHandler
 Handler for msr-file parsing and generation.
 
unsigned int fNumGlobalParam
 Number of global parameters in fit.
 
unsigned int fNumSpecParam
 Number of spectrum-specific parameters.
 
unsigned int fNumTempRunBlocks
 Number of temporary run blocks.
 
unsigned int fRunNumberDigits
 Number of digits for run number formatting.
 
bool fHeaderWritten
 Flag tracking if output header has been written.
 

Detailed Description

Utility class for msr2data: template-based msr-file generation and parameter extraction.

PMsr2Data provides comprehensive functionality for the msr2data tool, which is used to:

  • Generate new msr-files from templates by substituting run numbers
  • Extract fit parameters from analyzed msr-files
  • Write collected parameters to database (DB) or plain ASCII files
  • Support both single-run and global (multi-run) fitting workflows

Key Features:

  • Template-based msr-file generation with automatic run number substitution
  • Flexible run number specification (single, range, list file, explicit list)
  • Parameter extraction from fitted msr-files
  • Multiple output formats (DB format, ASCII tables)
  • Global fitting support for combined multi-run analysis
  • XML-based configuration via startup files

Implementation Note: This class uses std::string and standard C++ string handling exclusively (rather than ROOT's TString) to demonstrate modern C++ practices, though this occasionally requires conversions when interfacing with PMusr classes.

Typical Workflow:

  1. Create PMsr2Data object with file extension
  2. Parse XML startup file for configuration
  3. Set run numbers (single, range, or list)
  4. Generate msr-files from template or extract parameters from fitted files
  5. Write output to DB or ASCII format
See also
PStartupHandler for XML configuration parsing
PRunDataHandler for run data management
PMsrHandler for msr-file parsing and manipulation

Definition at line 80 of file PMsr2Data.h.

Constructor & Destructor Documentation

◆ PMsr2Data()

PMsr2Data::PMsr2Data ( const std::string & ext)

Constructor that initializes the msr2data handler.

Parameters
fileExtensionFile extension for data files (e.g., "bin", "root", "mdu")

Initializes all member variables and prepares the object for processing. Sets default values:

  • Run number digits: 4 (typical for standard run numbering)
  • Global/specific parameter counts: 0
  • Header written flag: false
  • Run list file flag: false

All handler pointers (SAX parser, startup handler, data handler, msr handler) are initialized to nullptr and will be created as needed during processing.

Parameters
extFile extension for data files (e.g., ".bin", ".root", ".mdu") This extension is used to locate corresponding data files for each run
Note
The extension should include the leading dot if required

Definition at line 73 of file PMsr2Data.cpp.

References fDataHandler, fFileExtension, fHeaderWritten, fMsrHandler, fNumGlobalParam, fNumSpecParam, fNumTempRunBlocks, fRunListFile, fRunNumberDigits, fRunVector, fRunVectorIter, fSaxParser, and fStartupHandler.

◆ ~PMsr2Data()

PMsr2Data::~PMsr2Data ( )

Destructor that cleans up resources.

Clears all vectors and resets iterators. The unique_ptr members (fRunListFileStream, fSaxParser, fStartupHandler, fDataHandler, fMsrHandler) are automatically cleaned up through their destructors.

Definition at line 93 of file PMsr2Data.cpp.

References fIndVar, fRunVector, and fRunVectorIter.

Member Function Documentation

◆ CheckRunNumbersInRange()

int PMsr2Data::CheckRunNumbersInRange ( ) const

Validates that all run numbers are within acceptable ranges.

Validates that all run numbers fit within the determined digit width.

Returns
0 if all run numbers are valid, non-zero otherwise

Checks if all run numbers in the run vector can be represented with the number of digits determined from the data file naming convention. This prevents formatting errors when generating file names.

The check has been loosened since 2023 to accommodate LEM run numbers exceeding 9999 by allowing one extra digit beyond the determined width.

Maximum allowed run number = 10^(fRunNumberDigits+1) - 1

Returns
  • 0 if all run numbers are within the acceptable range
  • -1 if any run number exceeds the maximum
Note
Since 2023, uses fRunNumberDigits+1 instead of fRunNumberDigits to handle larger run numbers at facilities like LEM

Definition at line 238 of file PMsr2Data.cpp.

References fRunNumberDigits, and fRunVector.

◆ DetermineRunNumberDigits()

int PMsr2Data::DetermineRunNumberDigits ( unsigned int runNo,
bool normalMode ) const

Determines the number of digits needed for run number formatting.

Determines the number of digits used for run number formatting.

Analyzes run numbers to determine zero-padding requirements for consistent file naming.

Parameters
maxRunNumberMaximum run number to consider
templateFileWhether processing a template file
Returns
Number of digits needed for run number formatting

Analyzes the first processable msr-file to determine how many digits are used for run number formatting in data file names. This ensures consistent zero-padding when generating new msr-files from templates.

The algorithm:

  1. Attempts to open the msr-file for the specified run number
  2. If in global mode and file not found, tries the "+global" variant
  3. If first run fails, iterates through the run list to find an existing file
  4. Searches the RUN block for the run number in the data file path
  5. Counts leading zeros to determine the digit width

Example: If the data file is "run_0042.bin", this determines 4 digits.

Parameters
runNoRun number to analyze
normalModetrue for normal mode, false for global fitting mode
Returns
  • 0 if the number of digits was successfully determined
  • -1 if no msr-file could be opened
  • -2 if msr-file run number doesn't match data file run number
  • -3 if the msr-file contains no RUN block
Note
The determined digit count is stored in fRunNumberDigits
In global mode, also checks for files with "+global" suffix

Definition at line 131 of file PMsr2Data.cpp.

References DetermineRunNumberDigits(), fFileExtension, fRunNumberDigits, fRunVector, and fRunVectorIter.

Referenced by DetermineRunNumberDigits().

◆ GetFirstSignificantDigit()

int PMsr2Data::GetFirstSignificantDigit ( const double & value) const
private

Determines the first significant digit position of a value.

Determines the position of the first significant digit.

Used for intelligent formatting and precision control.

Parameters
valueValue to analyze
Returns
Position of first significant digit

Calculates how many decimal places are needed to reach the first significant digit by repeatedly multiplying by 10 until the value is >= 1.0. This is used for precision control in output formatting.

Examples:

  • value = 2.03 → returns 1 (first significant digit in tenths place)
  • value = 0.00023 → returns 4 (first significant digit in ten-thousandths)
  • value = 0.5 → returns 1
Parameters
valueValue to analyze (typically an error/uncertainty)
Returns
  • Position of first significant digit (1-19)
  • 6 if no significant digit found after 20 iterations (default precision)
Note
Maximum 20 iterations to prevent infinite loops

Definition at line 2692 of file PMsr2Data.cpp.

Referenced by WriteValue().

◆ GetPresentRun()

unsigned int PMsr2Data::GetPresentRun ( ) const

Gets the current run number being processed.

Returns the current run number being processed.

Returns
Current run number from the internal iterator

Retrieves the run number pointed to by the internal iterator. Used to track progress through the run list during processing.

Returns
  • Current run number if processing is ongoing
  • 0 if all runs have been processed (iterator at end)

Definition at line 267 of file PMsr2Data.cpp.

References fRunVector, and fRunVectorIter.

◆ GetSingleRunMsrFile()

PMsrHandler * PMsr2Data::GetSingleRunMsrFile ( ) const
private

Retrieves msr-file handler for a single run.

Retrieves msr-file handler for a single-run fit file.

Returns
Pointer to PMsrHandler for the current run

Reads the "-OneRunFit" variant of the msr-file for the current run. This is used when extracting individual run results from global fits.

The file name format: "<runNumber>-OneRunFit<extension>.msr"

Returns
  • Pointer to newly created PMsrHandler on success
  • nullptr if file cannot be read or parsed
Note
Caller is responsible for deleting the returned handler
Different from the class member fMsrHandler

Definition at line 556 of file PMsr2Data.cpp.

References fFileExtension, fRunVectorIter, PMUSR_MSR_FILE_NOT_FOUND, PMUSR_MSR_SYNTAX_ERROR, PMUSR_SUCCESS, PMsrHandler::ReadMsrFile(), and status.

Referenced by PrepareGlobalInputFile().

◆ InParameterList()

bool PMsr2Data::InParameterList ( const unsigned int & paramValue,
const std::vector< unsigned int > & paramList ) const
private

Checks if a parameter is in the output parameter list.

Checks if a parameter index should be included in output.

Parameters
paramValueParameter index to check
paramListList of parameters to output
Returns
true if parameter should be output, false otherwise

Determines whether a given parameter should be written to the output file based on the user-specified parameter list. If the parameter list is empty, all parameters are included by default.

Parameters
paramValueZero-based parameter index to check
paramListVector of one-based parameter numbers to output (empty vector means output all parameters)
Returns
  • true if paramValue should be included in output
  • true if paramList is empty (output all parameters)
  • false if paramValue is not in the list
Note
paramValue is zero-based while paramList contains one-based indices

Definition at line 2733 of file PMsr2Data.cpp.

Referenced by WriteOutput().

◆ ParseXmlStartupFile()

int PMsr2Data::ParseXmlStartupFile ( )

Parses the XML startup file for configuration.

Parses the musrfit XML startup file for configuration.

Reads and processes the msr2data XML startup file containing paths, templates, and other configuration settings.

Returns
0 on success, non-zero on parsing errors

Creates a SAX parser and startup handler to read the musrfit_startup.xml configuration file. This file contains paths, templates, and other settings needed for msr2data operation.

The parseXmlFile function is used instead of ParseFile to avoid environment-specific issues encountered with direct parsing.

Returns
  • 0 if parsing succeeded
  • Non-zero error code from parseXmlFile if parsing failed
Note
Outputs a warning to stderr if parsing fails
See also
PStartupHandler for XML configuration details
parseXmlFile for the parsing implementation

Definition at line 482 of file PMsr2Data.cpp.

References fSaxParser, fStartupHandler, parseXmlFile(), startup_path_name, and status.

◆ PrepareGlobalInputFile()

bool PMsr2Data::PrepareGlobalInputFile ( unsigned int tempRun,
const std::string & msrOutFile,
unsigned int globalPlus ) const

Generates an msr-file for global (multi-run) fitting.

Creates a combined msr-file for global fits across multiple runs.

Parameters
templateNumberTemplate identifier number
globalOutputFilePath to output global msr-file
runListSizeNumber of runs in the global fit
Returns
true on success, false on failure

Generate a new global msr-file from a template

return:

  • true if everything is OK
  • false otherwise
Parameters
tempRuntemplate run number
msrOutFilename of the global msr-file to be written
globalPlustag of the global mode to be used:
  • 0: simple global mode with the same template starting parameters for each run
  • 1: global mode including single run fits and data extraction for the global msr-file (same template for all runs)
  • 2: global mode including single run fits and data extraction for the global msr-file (successive template generation)

Definition at line 779 of file PMsr2Data.cpp.

References compare_parameters(), fFileExtension, fMsrHandler, fNumGlobalParam, fNumSpecParam, fNumTempRunBlocks, fRunNumberDigits, fRunVector, fRunVectorIter, PMsrHandler::GetMsrParamList(), GetSingleRunMsrFile(), MSR_PARAM_FUN_OFFSET, PMUSR_SUCCESS, PrepareNewInputFile(), PrepareNewSortedInputFile(), ReadMsrFile(), and status.

◆ PrepareNewInputFile()

bool PMsr2Data::PrepareNewInputFile ( unsigned int tempRun,
bool calledFromGlobalMode ) const

Generates a new msr-file from a template.

Creates an msr-file by substituting run number placeholders in the template with actual run numbers.

Parameters
templateNumberTemplate identifier number
sortedWhether to generate sorted output
Returns
true on success, false on failure

Generate a new single-run msr file from a template

return:

  • true if everything is OK
  • false otherwise
Parameters
tempRuntemplate run number
calledFromGlobalModetag specifying if the routine is called as part of the global msr-file generation

Definition at line 628 of file PMsr2Data.cpp.

References fFileExtension, fRunNumberDigits, fRunVector, and fRunVectorIter.

Referenced by PrepareGlobalInputFile().

◆ PrepareNewSortedInputFile()

bool PMsr2Data::PrepareNewSortedInputFile ( unsigned int tempRun) const
private

Generates a sorted msr-file from a template.

Internal helper for creating sorted msr-files with proper histogram ordering.

Parameters
templateNumberTemplate identifier number
Returns
true on success, false on failure

Generate a new msr-file for a single run in which the parameters are sorted for a global fit An internal sorted msr-file data structure has to be present.

return:

  • true if everything is OK
  • false otherwise
Parameters
tempRuntemplate run number

Definition at line 1669 of file PMsr2Data.cpp.

References fFileExtension, fMsrHandler, fNumGlobalParam, fNumTempRunBlocks, fRunNumberDigits, fRunVectorIter, PMUSR_SUCCESS, and status.

Referenced by PrepareGlobalInputFile().

◆ ReadMsrFile()

int PMsr2Data::ReadMsrFile ( const std::string & infile) const

Reads and parses an msr-file.

Parameters
msrFileNamePath to the msr-file to read
Returns
0 on success, non-zero on read/parse errors

Creates a new PMsrHandler and uses it to read and parse the specified msr-file into the internal data structure.

Parameters
infilePath to the msr-file to read
Returns
See also
PMsrHandler::ReadMsrFile for parsing details

Definition at line 517 of file PMsr2Data.cpp.

References fMsrHandler, PMUSR_MSR_FILE_NOT_FOUND, PMUSR_MSR_SYNTAX_ERROR, PMUSR_SUCCESS, and status.

Referenced by PrepareGlobalInputFile().

◆ ReadRunDataFile()

int PMsr2Data::ReadRunDataFile ( )

Reads the run data file for the current run.

Returns
0 on success, non-zero on read errors

Creates a PRunDataHandler and reads the experimental data file associated with the current msr-file. Uses data paths from the startup handler if available, otherwise uses defaults.

Returns
  • 0 if all data was successfully read
  • 1 if some data files could not be read (with warning)
Note
Outputs a warning to stderr if data is unavailable but continues processing
See also
PRunDataHandler for data file reading details

Definition at line 599 of file PMsr2Data.cpp.

References fDataHandler, fMsrHandler, and fStartupHandler.

◆ SetRunNumbers() [1/4]

int PMsr2Data::SetRunNumbers ( const std::string & runListFile)

Sets run numbers from a run list file.

Reads run numbers from a text file, one run number per line.

Parameters
runListFileNamePath to file containing run numbers
Returns
0 on success, non-zero on error

Reads run numbers from a text file with the following format:

  • First line: "RUN" followed by optional independent variable names
  • Subsequent lines: run number followed by corresponding variable values
  • Comments start with '#' and are ignored
  • Empty lines are skipped

Example run list file:

* RUN FIELD TEMP
* 1234 0.5 295.0
* 1235 1.0 295.0  # This is a comment
* 1236 1.5 295.0
* 
Parameters
runListFilePath to run list file
Returns
  • -1 if the run list file cannot be opened
  • 0 if all run numbers are valid
  • 1 if any run number is invalid (< 1) or file format is incorrect
Note
Sets fRunListFile flag to true and opens stream for reading variables

Definition at line 400 of file PMsr2Data.cpp.

References fIndVar, fRunListFile, fRunListFileStream, fRunVector, and fRunVectorIter.

◆ SetRunNumbers() [2/4]

int PMsr2Data::SetRunNumbers ( const std::vector< unsigned int > & runListVector)

Sets run numbers from an explicit vector.

Parameters
runVectorVector of run numbers to process
Returns
0 on success, non-zero on error

Clears any existing run list and copies the provided vector of run numbers. All run numbers in the vector must be valid (>= 1).

Parameters
runListVectorVector containing run numbers to process
Returns
  • -1 if the vector is empty
  • 0 if all run numbers are valid
  • 1 if any run number is invalid (< 1)

Definition at line 355 of file PMsr2Data.cpp.

References fRunVector, and fRunVectorIter.

◆ SetRunNumbers() [3/4]

int PMsr2Data::SetRunNumbers ( unsigned int runNoStart,
unsigned int runNoEnd )

Sets a range of run numbers (from first to last, inclusive).

Sets a range of run numbers for processing.

Parameters
firstRunFirst run number in the range
lastRunLast run number in the range
Returns
0 on success, non-zero on error

Clears any existing run list and populates it with all run numbers from runNoStart to runNoEnd (inclusive). Handles both ascending and descending ranges automatically.

Parameters
runNoStartFirst run number in the range (must be >= 1)
runNoEndLast run number in the range (must be >= 1)
Returns
  • 0 if both run numbers are valid
  • 1 if either run number is invalid (< 1)
Note
If runNoStart > runNoEnd, the range is generated in descending order

Definition at line 321 of file PMsr2Data.cpp.

References fRunVector, and fRunVectorIter.

◆ SetRunNumbers() [4/4]

int PMsr2Data::SetRunNumbers ( unsigned int runNo)

Sets a single run number for processing.

Parameters
runNumberSingle run number to process
Returns
0 on success, non-zero on error

Clears any existing run list and initializes with a single run number. The internal iterator is reset to point to the beginning.

Parameters
runNoRun number to process (must be >= 1)
Returns
  • 0 if the run number is valid
  • 1 if the run number is invalid (< 1)

Definition at line 290 of file PMsr2Data.cpp.

References fRunVector, and fRunVectorIter.

◆ WriteOutput()

int PMsr2Data::WriteOutput ( const std::string & outfile,
const std::vector< unsigned int > & paramList,
bool db,
unsigned int withHeader,
bool global = false,
unsigned int counter = 0 ) const

Writes extracted parameters to output file.

Outputs fit parameters in either DB format or ASCII table format.

Parameters
outputFileNameOutput file path
parametersVector of parameter indices to output
dbFormatWhether to use DB format (true) or ASCII (false)
precisionNumber of significant digits for output
globalWhether this is global fit output
counterCounter for global fit indexing
Returns
0 on success, non-zero on write errors

Append fit parameters of a msr file to the DB or ASCII file

return:

  • PMUSR_SUCCESS if everything is OK
  • -1 in case of a fatal error
  • -2 if a fit has not converged (and the data is not appended to the output file)
Parameters
outfilename of the DB/ASCII output file
paramListparameter list which shall be written to the output file
dbDB or plain ASCII output
withHeaderwrite output file header or not
globalglobal mode or not
countercounter used within the global mode to determine how many runs have been processed already

Definition at line 1775 of file PMsr2Data.cpp.

References PMsrStatisticStructure::fChisq, fDataHandler, fHeaderWritten, fIndVar, PMsrStatisticStructure::fMin, fMsrHandler, PMsrStatisticStructure::fNdf, fNumGlobalParam, fNumSpecParam, fNumTempRunBlocks, fRunListFile, fRunListFileStream, fRunNumberDigits, fRunVector, fRunVectorIter, PMsrStatisticStructure::fValid, PRawRunData::GetEnergy(), PRawRunData::GetField(), PRawRunData::GetMuonSpinAngle(), PRawRunData::GetNoOfTemperatures(), PRawRunData::GetRingAnode(), PRawRunData::GetTemperature(), PRawRunData::GetTempError(), PRawRunData::GetTransport(), InParameterList(), PMUSR_SUCCESS, PMUSR_UNDEFINED, and WriteValue().

◆ WriteValue() [1/2]

void PMsr2Data::WriteValue ( std::fstream & outFile,
const double & value,
const double & errValue,
const unsigned int & width,
const bool & db ) const
private

Writes a value with its error to output stream.

Writes a value with error-based precision formatting.

Formats output based on DB or ASCII mode.

Parameters
outFileOutput file stream
valueValue to write
errValueError/uncertainty value
widthField width for formatting
dbWhether to use DB format (true) or ASCII (false)

Formats output with precision determined by the error value, ensuring significant digits are preserved appropriately. The precision is calculated based on the first significant digit of the error.

Examples:

  • value=17.0023 ± errValue=0.0018 → formatted with 4 decimal places
  • value=73212.081 ± errValue=0.033 → formatted with 2 decimal places

Formatting rules:

  • Precision based on error's first significant digit
  • Scientific notation if |value| >= 1e6 or (|value| < 1e-4 and value != 0)
  • Extra space added after value in ASCII mode for readability
Parameters
outFileOutput file stream
valueNumeric value to write
errValueError/uncertainty value (determines precision)
widthField width for formatted output
dbtrue for DB format, false for ASCII format (adds extra space)
See also
GetFirstSignificantDigit for precision calculation

Definition at line 2645 of file PMsr2Data.cpp.

References GetFirstSignificantDigit().

◆ WriteValue() [2/2]

void PMsr2Data::WriteValue ( std::fstream & outFile,
const double & value,
const unsigned int & width ) const
private

Writes a single numeric value to output stream.

Writes a formatted numeric value to output stream.

Parameters
outFileOutput file stream
valueValue to write
widthField width for formatting

Formats the value for column-aligned ASCII output with automatic selection of scientific notation for very large or very small numbers.

Formatting rules:

  • Scientific notation if |value| >= 1e6 or (|value| < 1e-4 and value != 0)
  • Fixed-point notation otherwise
  • Left-aligned in field of specified width
Parameters
outFileOutput file stream
valueNumeric value to write
widthColumn width for formatting

Definition at line 2609 of file PMsr2Data.cpp.

Referenced by WriteOutput().

Member Data Documentation

◆ fDataHandler

std::unique_ptr<PRunDataHandler> PMsr2Data::fDataHandler
mutableprivate

Handler for run data files.

Definition at line 308 of file PMsr2Data.h.

Referenced by PMsr2Data(), ReadRunDataFile(), and WriteOutput().

◆ fFileExtension

std::string PMsr2Data::fFileExtension
private

File extension for data files (e.g., "bin", "root")

Definition at line 300 of file PMsr2Data.h.

Referenced by DetermineRunNumberDigits(), GetSingleRunMsrFile(), PMsr2Data(), PrepareGlobalInputFile(), PrepareNewInputFile(), and PrepareNewSortedInputFile().

◆ fHeaderWritten

bool PMsr2Data::fHeaderWritten
mutableprivate

Flag tracking if output header has been written.

Definition at line 314 of file PMsr2Data.h.

Referenced by PMsr2Data(), and WriteOutput().

◆ fIndVar

std::vector<std::string> PMsr2Data::fIndVar
private

Independent variables for output.

Definition at line 304 of file PMsr2Data.h.

Referenced by SetRunNumbers(), WriteOutput(), and ~PMsr2Data().

◆ fMsrHandler

std::unique_ptr<PMsrHandler> PMsr2Data::fMsrHandler
mutableprivate

Handler for msr-file parsing and generation.

Definition at line 309 of file PMsr2Data.h.

Referenced by PMsr2Data(), PrepareGlobalInputFile(), PrepareNewSortedInputFile(), ReadMsrFile(), ReadRunDataFile(), and WriteOutput().

◆ fNumGlobalParam

unsigned int PMsr2Data::fNumGlobalParam
mutableprivate

Number of global parameters in fit.

Definition at line 310 of file PMsr2Data.h.

Referenced by PMsr2Data(), PrepareGlobalInputFile(), PrepareNewSortedInputFile(), and WriteOutput().

◆ fNumSpecParam

unsigned int PMsr2Data::fNumSpecParam
mutableprivate

Number of spectrum-specific parameters.

Definition at line 311 of file PMsr2Data.h.

Referenced by PMsr2Data(), PrepareGlobalInputFile(), and WriteOutput().

◆ fNumTempRunBlocks

unsigned int PMsr2Data::fNumTempRunBlocks
mutableprivate

Number of temporary run blocks.

Definition at line 312 of file PMsr2Data.h.

Referenced by PMsr2Data(), PrepareGlobalInputFile(), PrepareNewSortedInputFile(), and WriteOutput().

◆ fRunListFile

bool PMsr2Data::fRunListFile
private

Flag indicating if run list is from a file.

Definition at line 303 of file PMsr2Data.h.

Referenced by PMsr2Data(), SetRunNumbers(), and WriteOutput().

◆ fRunListFileStream

std::unique_ptr<std::ifstream> PMsr2Data::fRunListFileStream
private

Stream for reading run list file.

Definition at line 305 of file PMsr2Data.h.

Referenced by SetRunNumbers(), and WriteOutput().

◆ fRunNumberDigits

unsigned int PMsr2Data::fRunNumberDigits
mutableprivate

Number of digits for run number formatting.

Definition at line 313 of file PMsr2Data.h.

Referenced by CheckRunNumbersInRange(), DetermineRunNumberDigits(), PMsr2Data(), PrepareGlobalInputFile(), PrepareNewInputFile(), PrepareNewSortedInputFile(), and WriteOutput().

◆ fRunVector

std::vector<unsigned int> PMsr2Data::fRunVector
private

◆ fRunVectorIter

std::vector<unsignedint>::const_iterator PMsr2Data::fRunVectorIter
mutableprivate

◆ fSaxParser

std::unique_ptr<TSAXParser> PMsr2Data::fSaxParser
private

XML SAX parser for startup file.

Definition at line 306 of file PMsr2Data.h.

Referenced by ParseXmlStartupFile(), and PMsr2Data().

◆ fStartupHandler

std::unique_ptr<PStartupHandler> PMsr2Data::fStartupHandler
private

Handler for XML startup file configuration.

Definition at line 307 of file PMsr2Data.h.

Referenced by ParseXmlStartupFile(), PMsr2Data(), and ReadRunDataFile().


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