11 sprintf(work_dir,
"%s",gSystem->WorkingDirectory());
15 sprintf(data_label,
"%s",gSystem->BaseName(work_dir));
24 if (!in.good()) {cout <<
"Error Opening File : " << ifName.Data() << endl;
exit(1);}
27 TString ifName_tmp = ifName+
".tmp";
28 out.open(ifName_tmp.Data(),
ios::out);
29 if (!out.good()) {cout <<
"Error Opening File : " << ifName_tmp << endl;
exit(1);}
36 if (!in.good())
break;
38 ostr.ReplaceAll(
" ",
"");
39 ostr.ReplaceAll(
"\t",
"");
41 if(ostr.BeginsWith(
"search=")) {
43 ostr=
"// "+ostr+
"\t// #ROOT5";
44 out << ostr.Data() << endl;
46 ostr.ReplaceAll(
"search",
"cfg_search");
48 }
else if(ostr.BeginsWith(
"gamma=")) {
50 ostr=
"// "+ostr+
"\t// #ROOT5";
51 out << ostr.Data() << endl;
53 ostr.ReplaceAll(
"gamma",
"cfg_gamma");
55 }
else if(ostr.BeginsWith(
"nDQF=")) {
57 ostr = ostr(ostr.First(
"=")+1,ostr.First(
";")-ostr.First(
"=")-1);
60 }
else if(!ostr.BeginsWith(
"//")&&ostr.Contains(
"nDQF")&&(nDQF!=
"")) {
62 ostr=
"// "+ostr+
"\t// #ROOT5";
63 out << ostr.Data() << endl;
65 ostr.ReplaceAll(
"nDQF",nDQF);
70 if(ostr.BeginsWith(
"chardata_label[1024]=")) {
72 ostr=
"// "+ostr+
"\t// #ROOT5";
73 out << ostr.Data() << endl;
75 TString old_label = ostr(ostr.First(
"=")+1,ostr.First(
";")-ostr.First(
"=")-1);
78 }
else if (ostr.BeginsWith(
"char*lagFile=\"")) {
81 ostr=
"// "+ostr+
"\t// #ROOT5";
82 out << ostr.Data() << endl;
84 ostr = ostr(0, ostr.First(
"=")+1)+
TString(
" NULL;");
86 }
else if (ostr.BeginsWith(
"char*slagFile=\"")) {
89 ostr=
"// "+ostr+
"\t// #ROOT5";
90 out << ostr.Data() << endl;
92 ostr = ostr(0, ostr.First(
"=")+1)+
TString(
" NULL;");
97 if(ostr.BeginsWith(
"intchunkID=")) {
99 ostr=
"// "+ostr+
"\t// #ROOT5";
100 out << ostr.Data() << endl;
102 ostr.ReplaceAll(
"int ",
"");
104 }
else if(ostr.BeginsWith(
"TStringcalibVer=")) {
106 ostr=
"// "+ostr+
"\t// #ROOT5";
107 out << ostr.Data() << endl;
109 ostr.ReplaceAll(
"TString ",
"");
113 out << ostr.Data() << endl;
119 sprintf(cmd,
"mv %s %s",ifName_tmp.Data(),ifName.Data());
void FixUserParametersROOT6(TString ifName, TString type)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)