Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AculUtils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AccullinaGroup
AculUtils
Commits
f2af59b6
Commit
f2af59b6
authored
Oct 05, 2016
by
Kostyleva D.A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
To function AculCalibration::PeaksFitting trying to add output txt file
parent
0d57c4c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
AculCalibration.cpp
AculData/AculCalibration.cpp
+22
-2
No files found.
AculData/AculCalibration.cpp
View file @
f2af59b6
...
@@ -145,6 +145,23 @@ Int_t AculCalibration::PeaksFitting(TH1* hSpectrum, Option_t* option, Double_t s
...
@@ -145,6 +145,23 @@ Int_t AculCalibration::PeaksFitting(TH1* hSpectrum, Option_t* option, Double_t s
return
1
;
return
1
;
}
}
//creation of output text file with positions of peaks in MeV
TString
workFile
;
//if ( (lowersubaddress == 0) && (uppersubaddress == ADDRESSNUMBER-1) ) { oFileName.Form("%s[].cal", block); }
//else {
//if (lowersubaddress == uppersubaddress) { oFileName.Form("%s[%d].cal", block, lowersubaddress); }
//else { oFileName.Form("%s[%d-%d].cal", block, lowersubaddress, uppersubaddress); }
//}
workFile
.
Form
(
"energies.txt"
);
ofstream
outenergfile
;
outenergfile
.
open
(
workFile
.
Data
());
if
(
!
outenergfile
.
is_open
())
{
Error
(
"PeaksFitting"
,
"Output file %s was not opened"
,
workFile
.
Data
());
return
0
;
}
//should be optional output
//should be optional output
Info
(
"PeaksFitting"
,
"Number of peaks in %s: %d"
,
hSpectrum
->
GetName
(),
peaksNumber
);
Info
(
"PeaksFitting"
,
"Number of peaks in %s: %d"
,
hSpectrum
->
GetName
(),
peaksNumber
);
...
@@ -240,6 +257,8 @@ Int_t AculCalibration::PeaksFitting(TH1* hSpectrum, Option_t* option, Double_t s
...
@@ -240,6 +257,8 @@ Int_t AculCalibration::PeaksFitting(TH1* hSpectrum, Option_t* option, Double_t s
}
}
}
}
outenergfile
<<
hSpectrum
->
GetName
()
<<
"
\t
"
<<
fPeak
[
0
]
<<
"
\t
"
<<
fPeak
[
1
]
<<
"
\t
"
<<
fPeak
[
2
]
<<
"
\t
"
<<
fPeak
[
3
]
<<
endl
;
// provest kontrolu pomerne polohy piku,
// provest kontrolu pomerne polohy piku,
// jestli jsou spatne, provest urcita opatreni,
// jestli jsou spatne, provest urcita opatreni,
// napr. zapis daneho histogramu do souboru,
// napr. zapis daneho histogramu do souboru,
...
@@ -254,6 +273,7 @@ Int_t AculCalibration::PeaksFitting(TH1* hSpectrum, Option_t* option, Double_t s
...
@@ -254,6 +273,7 @@ Int_t AculCalibration::PeaksFitting(TH1* hSpectrum, Option_t* option, Double_t s
}
}
}
//for
}
//for
outenergfile
.
close
();
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment