38#include <TObjString.h>
92 xmlSize = xmlFile.tellg();
93 xmlFile.seekg(0, std::ios::beg);
94 xmlBuffer = new char[xmlSize];
95 xmlFile.read(xmlBuffer, xmlSize);
154 Char_t *pmusrpath=
nullptr;
155 Char_t *home=
nullptr;
156 Char_t musrpath[128];
159 strncpy(musrpath,
"",
sizeof(musrpath));
169 home = getenv(
"HOME");
170 if (home !=
nullptr) {
180 pmusrpath = getenv(
"MUSRFITPATH");
181 if (pmusrpath !=
nullptr) {
190 home = getenv(
"ROOTSYS");
191 if (home !=
nullptr) {
192 snprintf(musrpath,
sizeof(musrpath),
"%s/bin", home);
193 std::cerr << std::endl <<
"**WARNING** MUSRFITPATH environment variable not set will try " << musrpath << std::endl;
204 std::cout << std::endl;
205 std::cout <<
">> Will only reset the file: '" <<
fStartupFilePath.Data() <<
"'."<< std::endl;
206 std::cout << std::endl;
208 std::cerr << std::endl <<
"**ERROR** couldn't re-write " <<
fStartupFilePath.Data() <<
"." << std::endl;
215 std::cout << std::endl <<
"**INFO** no musrfit_startup.xml file found, will write a default one." << std::endl;
217 std::cerr << std::endl <<
"**ERROR** couldn't write default musrfit_startup.xml." << std::endl;
219 home = getenv(
"HOME");
220 if (home !=
nullptr) {
351 if (!strcmp(str,
"data_path")) {
353 }
else if (!strcmp(str,
"run_name_template")) {
356 TIter next(attributes);
357 while ((attr = (TXMLAttr*) next())) {
358 if (!strcmp(attr->GetName(),
"inst")) {
362 }
else if (!strcmp(str,
"marker")) {
364 }
else if (!strcmp(str,
"color")) {
366 }
else if (!strcmp(str,
"units")) {
368 }
else if (!strcmp(str,
"fourier_power")) {
370 }
else if (!strcmp(str,
"apodization")) {
372 }
else if (!strcmp(str,
"plot")) {
374 }
else if (!strcmp(str,
"phase")) {
376 }
else if (!strcmp(str,
"phase_increment")) {
457 Int_t color, r, g, b, ival;
475 if (tstr.IsDigit()) {
479 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a number, will ignore it";
480 std::cerr << std::endl;
486 tokens = tstr.Tokenize(
",");
489 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a rbg code, will ignore it";
490 std::cerr << std::endl;
494 if (tokens->GetEntries() != 3) {
495 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a rbg code, will ignore it";
496 std::cerr << std::endl;
500 ostr =
dynamic_cast<TObjString*
>(tokens->At(0));
501 tstr = ostr->GetString();
502 if (tstr.IsDigit()) {
505 std::cerr << std::endl <<
"PStartupHandler **WARNING** r within the rgb code is not a number, will ignore it";
506 std::cerr << std::endl;
510 ostr =
dynamic_cast<TObjString*
>(tokens->At(1));
511 tstr = ostr->GetString();
512 if (tstr.IsDigit()) {
515 std::cerr << std::endl <<
"PStartupHandler **WARNING** g within the rgb code is not a number, will ignore it";
516 std::cerr << std::endl;
520 ostr =
dynamic_cast<TObjString*
>(tokens->At(2));
521 tstr = ostr->GetString();
522 if (tstr.IsDigit()) {
525 std::cerr << std::endl <<
"PStartupHandler **WARNING** b within the rgb code is not a number, will ignore it";
526 std::cerr << std::endl;
535 color = TColor::GetColor(r,g,b);
541 if (!tstr.CompareTo(
"gauss", TString::kIgnoreCase)) {
543 }
else if (!tstr.CompareTo(
"tesla", TString::kIgnoreCase)) {
545 }
else if (!tstr.CompareTo(
"mhz", TString::kIgnoreCase)) {
547 }
else if (!tstr.CompareTo(
"mc/s", TString::kIgnoreCase)) {
550 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a valid unit, will ignore it.";
551 std::cerr << std::endl;
556 if (tstr.IsDigit()) {
558 if ((ival >= 0) && (ival <= 20)) {
561 std::cerr << std::endl <<
"PStartupHandler **WARNING** fourier power '" << str <<
"' is not a valid number (0..20), will ignore it.";
562 std::cerr << std::endl;
565 std::cerr << std::endl <<
"PStartupHandler **WARNING** fourier power '" << str <<
"' is not a valid number (0..20), will ignore it.";
566 std::cerr << std::endl;
571 if (!tstr.CompareTo(
"none", TString::kIgnoreCase)) {
573 }
else if (!tstr.CompareTo(
"weak", TString::kIgnoreCase)) {
575 }
else if (!tstr.CompareTo(
"medium", TString::kIgnoreCase)) {
577 }
else if (!tstr.CompareTo(
"strong", TString::kIgnoreCase)) {
580 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a valid apodization, will ignore it.";
581 std::cerr << std::endl;
586 if (!tstr.CompareTo(
"real", TString::kIgnoreCase)) {
588 }
else if (!tstr.CompareTo(
"imag", TString::kIgnoreCase)) {
590 }
else if (!tstr.CompareTo(
"real_and_imag", TString::kIgnoreCase)) {
592 }
else if (!tstr.CompareTo(
"power", TString::kIgnoreCase)) {
594 }
else if (!tstr.CompareTo(
"phase", TString::kIgnoreCase)) {
597 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a valid plot option, will ignore it.";
598 std::cerr << std::endl;
603 if (tstr.IsFloat()) {
606 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a valid phase, will ignore it.";
607 std::cerr << std::endl;
612 if (tstr.IsFloat()) {
615 std::cerr << std::endl <<
"PStartupHandler **WARNING** '" << str <<
"' is not a valid phase increment, will ignore it.";
616 std::cerr << std::endl;
660 std::cerr << std::endl <<
"PStartupHandler **WARNING** " << str;
661 std::cerr << std::endl;
683 std::cerr << std::endl <<
"PStartupHandler **ERROR** " << str;
684 std::cerr << std::endl;
707 std::cerr << std::endl <<
"PStartupHandler **FATAL ERROR** " << str;
708 std::cerr << std::endl;
772 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/lem/his/"));
773 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/alc/his/"));
774 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/dolly/his/"));
775 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/flame/his/"));
776 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/gpd/his/"));
777 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/gps/his/"));
778 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/hal/his/"));
779 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/ltf/his/"));
780 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/misc/his/"));
781 fDataPathList.push_back(TString(
"/psi.ch/group/lmu/public/data/vms/his/"));
804 fColorList.push_back(TColor::GetColor(0, 0, 0));
805 fColorList.push_back(TColor::GetColor(255, 0, 0));
806 fColorList.push_back(TColor::GetColor(0, 255, 0));
807 fColorList.push_back(TColor::GetColor(0, 0, 255));
808 fColorList.push_back(TColor::GetColor(255, 0, 255));
809 fColorList.push_back(TColor::GetColor(0, 255, 255));
810 fColorList.push_back(TColor::GetColor(156, 0, 255));
811 fColorList.push_back(TColor::GetColor(99, 101, 49));
812 fColorList.push_back(TColor::GetColor(49, 101, 49));
813 fColorList.push_back(TColor::GetColor(156, 48, 0));
836 Bool_t result =
false;
838 std::ifstream ifile(fln);
902 if (reset_startup_file) {
906 Char_t *home =
nullptr;
907 home = getenv(
"HOME");
908 if (home ==
nullptr) {
909 std::cerr << std::endl <<
"**ERROR** couldn't obtain $HOME." << std::endl;
918 if (!(info.st_mode & S_IFDIR))
922 std::cerr << std::endl <<
"**ERROR** couldn't create '" <<
startup_path_name <<
"'" << std::endl;
932 if (!fout.is_open()) {
933 std::cerr << std::endl <<
"**ERROR** couldn't open '" <<
startup_path_name <<
"' for writing." << std::endl;
938 fout <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
939 fout <<
"<musrfit xmlns=\"https://lmu.pages.psi.ch/musrfit-docu/\">" << std::endl;
940 fout <<
" <comment>" << std::endl;
941 fout <<
" Defines default settings for the musrfit package" << std::endl;
942 fout <<
" </comment>" << std::endl;
943 fout <<
" <data_path>/psi.ch/group/lmu/public/data/lem/his</data_path>" << std::endl;
944 fout <<
" <data_path>/psi.ch/group/lmu/public/data/alc/his</data_path>" << std::endl;
945 fout <<
" <data_path>/psi.ch/group/lmu/public/data/dolly/his</data_path>" << std::endl;
946 fout <<
" <data_path>/psi.ch/group/lmu/public/data/flame/his</data_path>" << std::endl;
947 fout <<
" <data_path>/psi.ch/group/lmu/public/data/gpd/his</data_path>" << std::endl;
948 fout <<
" <data_path>/psi.ch/group/lmu/public/data/gps/his</data_path>" << std::endl;
949 fout <<
" <data_path>/psi.ch/group/lmu/public/data/hal/his</data_path>" << std::endl;
950 fout <<
" <data_path>/psi.ch/group/lmu/public/data/ltf/his</data_path>" << std::endl;
951 fout <<
" <data_path>/psi.ch/group/lmu/public/data/misc/his</data_path>" << std::endl;
952 fout <<
" <data_path>/psi.ch/group/lmu/public/data/vms/his</data_path>" << std::endl;
953 fout <<
" <!-- MISC/PSI 1985 - 1990 -->" << std::endl;
954 fout <<
" <run_name_template inst=\"misc\">d%yyyy%/deltat_misc_%rrrr%.bin</run_name_template>" << std::endl;
955 fout <<
" <!-- ALC TD/PSI -->" << std::endl;
956 fout <<
" <run_name_template inst=\"alc\">d%yyyy%/deltat_zh_chem_%rrrr%.bin</run_name_template>" << std:: endl;
957 fout <<
" <run_name_template inst=\"alc\">d%yyyy%/deltat_tdc_alc_%rrrr%.bin</run_name_template>" << std::endl;
958 fout <<
" <run_name_template inst=\"alc\">d%yyyy%/tdc/deltat_tdc_alc_%rrrr%.bin</run_name_template>" << std::endl;
959 fout <<
" <!-- VMS/PSI -->" << std::endl;
960 fout <<
" <run_name_template inst=\"vms\">d%yyyy%/tdc/root/deltat_tdc_vms_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
961 fout <<
" <!-- Dolly/PSI -->" << std::endl;
962 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/tdc/root/deltat_tdc_dolly_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
963 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/pie1/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
964 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/pie3/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
965 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
966 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
967 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
968 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/tdc/deltat_tdc_dolly_%rrrr%.bin</run_name_template>" << std::endl;
969 fout <<
" <run_name_template inst=\"dolly\">d%yyyy%/tdc/mdu/deltat_tdc_dolly_%rrrr%.mdu</run_name_template>" << std::endl;
970 fout <<
" <!-- Flame/PSI -->" << std::endl;
971 fout <<
" <run_name_template inst=\"flame\">d%yyyy%/tdc/root/deltat_tdc_flame_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
972 fout <<
" <run_name_template inst=\"flame\">d%yyyy%/tdc/deltat_tdc_flame_%rrrr%.bin</run_name_template>" << std::endl;
973 fout <<
" <run_name_template inst=\"flame\">d%yyyy%/tdc/mdu/deltat_tdc_flame_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
974 fout <<
" <!-- GPD/PSI -->" << std::endl;
975 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/tdc/root/deltat_tdc_gpd_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
976 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_mue1_%rrrr%.bin</run_name_template>" << std::endl;
977 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_fq_si_%rrrr%.bin</run_name_template>" << std::endl;
978 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_strobo_%rrrr%.bin</run_name_template>" << std::endl;
979 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_hp_ni_ht_%rrrr%.bin</run_name_template>" << std::endl;
980 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_hp_ni_%rrrr%.bin</run_name_template>" << std::endl;
981 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_ccr2_%rrrr%.bin</run_name_template>" << std::endl;
982 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_gpd_%rrrr%.bin</run_name_template>" << std::endl;
983 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_%rrrr%.bin</run_name_template>" << std::endl;
984 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_gpd_%rrrr%.bin</run_name_template>" << std::endl;
985 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
986 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/pta/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
987 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/tdc/deltat_tdc_gpd_%rrrr%.bin</run_name_template>" << std::endl;
988 fout <<
" <run_name_template inst=\"gpd\">d%yyyy%/tdc/mdu/deltat_tdc_gpd_%rrrr%.mdu</run_name_template>" << std::endl;
989 fout <<
" <!-- GPS/PSI -->" << std::endl;
990 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/tdc/root/deltat_tdc_gps_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
991 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_ccr_%rrrr%.bin</run_name_template>" << std::endl;
992 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_he3_%rrrr%.bin</run_name_template>" << std::endl;
993 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_stutt_%rrrr%.bin</run_name_template>" << std::endl;
994 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_ltf_%rrrr%.bin</run_name_template>" << std::endl;
995 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
996 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_flc2_%rrrr%.bin</run_name_template>" << std::endl;
997 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_oven_%rrrr%.bin</run_name_template>" << std::endl;
998 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_oven2_%rrrr%.bin</run_name_template>" << std::endl;
999 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/deltat_pta_gps_%rrrr%.bin</run_name_template>" << std::endl;
1000 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/tdc/deltat_tdc_gps_%rrrr%.bin</run_name_template>" << std::endl;
1001 fout <<
" <run_name_template inst=\"gps\">d%yyyy%/tdc/mdu/deltat_tdc_gps_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
1002 fout <<
" <!-- HAL-9500/PSI == HIFI/PSI -->" << std::endl;
1003 fout <<
" <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
1004 fout <<
" <run_name_template inst=\"hifi\">d%yyyy%/tdc/deltat_hifi_%rrrr%.bin</run_name_template>" << std::endl;
1005 fout <<
" <run_name_template inst=\"hifi\">d%yyyy%/tdc/tdc_hifi_%yyyy%_%rrrrr%.mdu</run_name_template>" << std::endl;
1006 fout <<
" <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
1007 fout <<
" <!-- LTF/PSI -->" << std::endl;
1008 fout <<
" <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf_%rrrr%.bin</run_name_template>" << std::endl;
1009 fout <<
" <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf2_%rrrr%.bin</run_name_template>" << std::endl;
1010 fout <<
" <run_name_template inst=\"ltf\">d%yyyy%/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
1011 fout <<
" <run_name_template inst=\"ltf\">d%yyyy%/pta/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
1012 fout <<
" <run_name_template inst=\"ltf\">d%yyyy%/tdc/deltat_tdc_ltf_%rrrr%.bin</run_name_template>" << std::endl;
1013 fout <<
" <!-- LEM/PSI -->" << std::endl;
1014 fout <<
" <run_name_template inst=\"lem\">%yyyy%/lem%yy%_his_%rrrr%.root</run_name_template>" << std::endl;
1015 fout <<
" <run_name_template inst=\"lem\">d%yyyy%/tdc/lem%yy%_his_%rrrr%.root</run_name_template>" << std::endl;
1016 fout <<
" <run_name_template inst=\"lem\">%yyyy%/lem%yy%_his_%rrrrr%.root</run_name_template>" << std::endl;
1017 fout <<
" <run_name_template inst=\"lem\">d%yyyy%/tdc/lem%yy%_his_%rrrrr%.root</run_name_template>" << std::endl;
1018 fout <<
" <fourier_settings>" << std::endl;
1019 fout <<
" <units>Gauss</units>" << std::endl;
1020 fout <<
" <fourier_power>0</fourier_power>" << std::endl;
1021 fout <<
" <apodization>none</apodization>" << std::endl;
1022 fout <<
" <plot>real_and_imag</plot>" << std::endl;
1023 fout <<
" <phase>0.0</phase>" << std::endl;
1024 fout <<
" <phase_increment>1.0</phase_increment>" << std::endl;
1025 fout <<
" </fourier_settings>" << std::endl;
1026 fout <<
" <root_settings>" << std::endl;
1027 fout <<
" <marker_list>" << std::endl;
1028 fout <<
" <!-- Root marker numbers -->" << std::endl;
1029 fout <<
" <marker>24</marker> <!-- open circle -->" << std::endl;
1030 fout <<
" <marker>25</marker> <!-- open square -->" << std::endl;
1031 fout <<
" <marker>26</marker> <!-- open triangle -->" << std::endl;
1032 fout <<
" <marker>27</marker> <!-- open diamond -->" << std::endl;
1033 fout <<
" <marker>28</marker> <!-- open cross -->" << std::endl;
1034 fout <<
" <marker>29</marker> <!-- full star -->" << std::endl;
1035 fout <<
" <marker>30</marker> <!-- open star -->" << std::endl;
1036 fout <<
" <marker>20</marker> <!-- full circle -->" << std::endl;
1037 fout <<
" <marker>21</marker> <!-- full square -->" << std::endl;
1038 fout <<
" <marker>22</marker> <!-- full triangle -->" << std::endl;
1039 fout <<
" <marker>23</marker> <!-- full triangle down -->" << std::endl;
1040 fout <<
" <marker>2</marker> <!-- thin cross -->" << std::endl;
1041 fout <<
" <marker>3</marker> <!-- thin star -->" << std::endl;
1042 fout <<
" <marker>5</marker> <!-- thin x -->" << std::endl;
1043 fout <<
" </marker_list>" << std::endl;
1044 fout <<
" <color_list>" << std::endl;
1045 fout <<
" <!-- Color as RGB coded string -->" << std::endl;
1046 fout <<
" <color>0,0,0</color> <!-- kBlack -->" << std::endl;
1047 fout <<
" <color>255,0,0</color> <!-- kRed -->" << std::endl;
1048 fout <<
" <color>0,153,0</color> <!-- kGreen+2 -->" << std::endl;
1049 fout <<
" <color>0,0,255</color> <!-- kBlue -->" << std::endl;
1050 fout <<
" <color>255,0,255</color> <!-- kMagenta -->" << std::endl;
1051 fout <<
" <color>0,255,255</color> <!-- kCyan -->" << std::endl;
1052 fout <<
" <color>153,0,255</color> <!-- kViolet-3 -->" << std::endl;
1053 fout <<
" <color>102,102,51</color> <!-- kYellow-1 -->" << std::endl;
1054 fout <<
" <color>51,102,51</color> <!-- kGreen-1 -->" << std::endl;
1055 fout <<
" <color>153,0,0</color> <!-- kRed+2 -->" << std::endl;
1056 fout <<
" </color_list>" << std::endl;
1057 fout <<
" </root_settings>" << std::endl;
1058 fout <<
"</musrfit>" << std::endl;
#define FOURIER_UNIT_FREQ
Frequency in MHz.
#define FOURIER_PLOT_REAL_AND_IMAG
Plot both real and imaginary components (default)
#define FOURIER_UNIT_GAUSS
Magnetic field in Gauss (G)
#define FOURIER_PLOT_POWER
Plot power spectrum |F(ω)|²
#define FOURIER_PLOT_REAL
Plot real component only.
#define FOURIER_APOD_WEAK
Weak apodization (gentle windowing)
#define FOURIER_APOD_NONE
No apodization (rectangular window)
#define FOURIER_UNIT_CYCLES
Angular frequency in Mc/s (Mega-cycles per second)
#define FOURIER_APOD_STRONG
Strong apodization (heavy windowing for best frequency resolution)
#define FOURIER_PLOT_IMAG
Plot imaginary component only.
#define FOURIER_APOD_MEDIUM
Medium apodization (moderate windowing)
#define FOURIER_PLOT_PHASE
Plot phase spectrum arg(F(ω))
#define FOURIER_UNIT_TESLA
Magnetic field in Tesla (T)
const char * startup_path_name
ClassImpQ(PStartupHandler) int parseXmlFile(TSAXParser *saxParser
Replacement for TSAXParser::ParseFile() that uses buffer-based parsing.
int parseXmlFile(TSAXParser *, const char *)
Replacement function for TSAXParser::ParseFile().
Handles the musrfit XML startup configuration file (musrfit_startup.xml).
PRunNameTemplateList fRunNameTemplate
List of instrument-specific run name patterns.
PStartupHandler(bool reset_startup_file=false)
Constructor that locates and parses the musrfit startup configuration file.
virtual void CheckLists()
Validates configuration lists and fills missing entries with defaults.
virtual void OnComment(const Char_t *)
SAX callback: Called when XML comment is found (unused).
PIntVector fColorList
List of ROOT TColor codes (from RGB) for plotting.
PStringVector fDataPathList
List of directories to search for data files.
Bool_t fStartupFileFound
True if musrfit_startup.xml was located.
virtual void OnWarning(const Char_t *)
SAX callback: Called when XML parser issues a warning.
virtual void OnError(const Char_t *)
SAX callback: Called when XML parser encounters an error.
virtual void OnFatalError(const Char_t *)
SAX callback: Called when XML parser encounters a fatal error.
EKeyWords fKey
Current XML element type (SAX parser state)
TString fStartupFilePath
Full path to located startup file (empty if not found)
@ eApodization
Inside <apodization> element (none/weak/medium/strong)
@ eFourierPower
Inside <fourier_power> element (0-20)
@ eEmpty
No active element (between elements or unknown)
@ eMarker
Inside <marker> element (ROOT marker code)
@ ePhaseIncrement
Inside <phase_increment> element (degrees per step)
@ eUnits
Inside <units> element (Gauss/Tesla/MHz/Mc/s)
@ ePhase
Inside <phase> element (degrees)
@ ePlot
Inside <plot> element (real/imag/real_and_imag/power/phase)
@ eColor
Inside <color> element (RGB comma-separated)
@ eRunNameTemplate
Inside <run_name_template> element.
@ eDataPath
Inside <data_path> element.
TString fCurrentInstrumentName
Instrument name from run_name_template inst attribute.
virtual void OnEndElement(const Char_t *)
SAX callback: Called when an XML end element is encountered.
virtual void OnCharacters(const Char_t *)
SAX callback: Called with element text content.
PIntVector fMarkerList
List of ROOT TMarker style codes for plotting.
virtual ~PStartupHandler()
Destructor releasing allocated resources.
virtual void OnEndDocument()
SAX callback: Called when XML document parsing ends. Triggers CheckLists() to ensure all required set...
Bool_t WriteDefaultStartupFile(bool reset_startup_file=false)
Creates or overwrites a startup file with default configuration.
virtual void OnCdataBlock(const Char_t *, Int_t)
SAX callback: Called for CDATA blocks (unused).
PMsrFourierStructure fFourierDefaults
Fourier transform default settings structure.
virtual void OnStartElement(const Char_t *, const TList *)
SAX callback: Called when an XML start element is encountered.
virtual void OnStartDocument()
SAX callback: Called when XML document parsing begins. Initializes all configuration variables to def...
Bool_t StartupFileExists(Char_t *fln)
Checks if a file exists at the specified path.
TString runNameTemplate
File path template with placeholders (r=run, y=year)
TString instrument
Instrument identifier (e.g., "GPS", "LEM", "DOLLY")