musrfit
1.9.2
|
#include <cstdio>
#include <cstdlib>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <iostream>
#include <fstream>
#include <memory>
#include <TSAXParser.h>
#include <TString.h>
#include <TFile.h>
#include <TCanvas.h>
#include <TH1.h>
#include <TSystem.h>
#include <TSystemFile.h>
#include <TThread.h>
#include "PMusr.h"
#include "PStartupHandler.h"
#include "PMsrHandler.h"
#include "PRunDataHandler.h"
#include "PRunListCollection.h"
#include "PFitter.h"
Go to the source code of this file.
Functions | |
void * | musrfit_timeout (void *args) |
void | musrfit_syntax () |
void | musrfit_write_ascii (TString fln, PRunData *data, int runCounter) |
void | musrfit_dump_ascii (char *fileName, PRunListCollection *runList) |
void | musrfit_write_root (TFile &f, TString fln, PRunData *data, int runCounter) |
void | musrfit_dump_root (char *fileName, PRunListCollection *runList) |
int | main (int argc, char *argv[]) |
Variables | |
static int | timeout = 3600 |
int main | ( | int | argc, |
char * | argv[] | ||
) |
The musrfit program is used to fit muSR data. For a detailed description/usage of the program, please see musrfit online help
return:
argc | number of input arguments |
argv | list of input arguments |
Definition at line 437 of file musrfit.cpp.
References PStartupOptions::estimateN0, PRawRunData::GetRunTitle(), kFit, musrfit_dump_ascii(), musrfit_dump_root(), musrfit_syntax(), musrfit_timeout(), parseXmlFile(), PMUSR_MSR_FILE_NOT_FOUND, PMUSR_MSR_LOG_FILE_WRITE_ERROR, PMUSR_MSR_SYNTAX_ERROR, PMUSR_SUCCESS, PMUSR_TOKENIZE_ERROR, PMUSR_WRONG_STARTUP_SYNTAX, startup_path_name, status, timeout, and PStartupOptions::writeExpectedChisq.
void musrfit_dump_ascii | ( | char * | fileName, |
PRunListCollection * | runList | ||
) |
Go through all msr-file runs and write each of them in ascii-format to disc (used for diagnostics). Be aware that this output is different to what you will get when using musrview!
fileName | file name |
runList | run list collection handler |
Definition at line 184 of file musrfit.cpp.
References PRunListCollection::GetAsymmetry(), PRunListCollection::GetAsymmetryRRF(), PRunListCollection::GetMuMinus(), PRunListCollection::GetNonMusr(), PRunListCollection::GetNoOfAsymmetry(), PRunListCollection::GetNoOfAsymmetryRRF(), PRunListCollection::GetNoOfMuMinus(), PRunListCollection::GetNoOfNonMusr(), PRunListCollection::GetNoOfSingleHisto(), PRunListCollection::GetNoOfSingleHistoRRF(), PRunListCollection::GetSingleHisto(), PRunListCollection::GetSingleHistoRRF(), and musrfit_write_ascii().
Referenced by main().
void musrfit_dump_root | ( | char * | fileName, |
PRunListCollection * | runList | ||
) |
Go through all msr-file runs and write each of them in root format to disc (used for diagnostics). Be aware that this output is different to what you will get when using musrview!
fileName | file name |
runList | run list connection handler |
Definition at line 327 of file musrfit.cpp.
References PRunListCollection::GetAsymmetry(), PRunListCollection::GetAsymmetryRRF(), PRunListCollection::GetMuMinus(), PRunListCollection::GetNonMusr(), PRunListCollection::GetNoOfAsymmetry(), PRunListCollection::GetNoOfAsymmetryRRF(), PRunListCollection::GetNoOfMuMinus(), PRunListCollection::GetNoOfNonMusr(), PRunListCollection::GetNoOfSingleHisto(), PRunListCollection::GetNoOfSingleHistoRRF(), PRunListCollection::GetSingleHisto(), PRunListCollection::GetSingleHistoRRF(), and musrfit_write_root().
Referenced by main().
void musrfit_syntax | ( | ) |
Sends the usage description to the standard output.
Definition at line 95 of file musrfit.cpp.
References timeout.
Referenced by main().
void* musrfit_timeout | ( | void * | args | ) |
Sometimes musrfit is not terminating properly for reasons still not pinned down, hence this workaround. It should be removed asap. Especially since it is leading to memory leaks.
Definition at line 78 of file musrfit.cpp.
References timeout.
Referenced by main().
void musrfit_write_ascii | ( | TString | fln, |
PRunData * | data, | ||
int | runCounter | ||
) |
Writes the fitted data- and theory-set in ascii format to disc.
fln | output file name |
data | processed-data handler |
runCounter | msr-file run counter needed to form the output file name |
Definition at line 144 of file musrfit.cpp.
References PRunData::GetDataTimeStart(), PRunData::GetDataTimeStep(), PRunData::GetError(), PRunData::GetTheory(), and PRunData::GetValue().
Referenced by musrfit_dump_ascii().
void musrfit_write_root | ( | TFile & | f, |
TString | fln, | ||
PRunData * | data, | ||
int | runCounter | ||
) |
Writes the fitted data- and theory-set in root format to disc.
f | root file object |
fln | file name |
data | processed-data handler |
runCounter | msr-file run counter needed to form the output file name |
Definition at line 282 of file musrfit.cpp.
References PRunData::GetDataTimeStep(), PRunData::GetError(), PRunData::GetTheory(), and PRunData::GetValue().
Referenced by musrfit_dump_root().
|
static |
Definition at line 71 of file musrfit.cpp.
Referenced by main(), musrfit_syntax(), musrfit_timeout(), musrt0_item(), PFourierCanvas::SetTimeout(), PMusrT0::SetTimeout(), and PMusrCanvas::SetTimeout().