Skip to content

Commit

Permalink
Fixed some bugs. Refs #8096.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Oct 11, 2013
1 parent c3a9e3d commit 322aa1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,9 @@ namespace DataHandling
content << fixed;

// Write header
if (m_append)
if (!m_append)
{
content << " Instrumental resolution function for POWGEN/SNS J.P. Hodges 2011-09-02 ireso: 6" << "\n";
content << " Instrumental resolution function for POWGEN/SNS ireso: 6" << "\n";
content << "! To be used with function NPROF=" << profindex << " in FullProf (Res=6)" << "\n";
}

Expand Down Expand Up @@ -458,7 +458,10 @@ namespace DataHandling
if (has_key(m_profileParamMap, "CWL"))
{
double cwl = m_profileParamMap["CWL"];
content << "CWL = " << setprecision(4) << cwl << "A" << "\n";
if (cwl > 0.)
content << "CWL = " << setprecision(4) << cwl << "A" << "\n";
else
content << "\n";
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class SaveFullprofResolutionTest : public CxxTest::TestSuite
int getFileLines(std::string filename)
{
ifstream infile;
infile.open(filename);
infile.open(filename.c_str());

int numlines = 0;
if (infile.is_open())
Expand Down

0 comments on commit 322aa1f

Please sign in to comment.