Skip to content
Snippets Groups Projects
Commit 0aa3c688 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

now reading acq52

parent aa44b9bc
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,7 @@ void CRawfileSpheres::RdRawYam( ifstream& F_in )
throw "DATA BUG: EnergyHistogram[" + strg(iEne) + "][" +
strg(i+1) + "] is not a SEQUENCE";
for( int j=0; j<ndet; ++j ) {
*arr >> val;
(*arr)[j] >> val;
if( !mystd::any2dbl( val, &num ) )
throw "E-Hist: invalid count " + val;
rawdata[i].push_back( num );
......@@ -146,7 +146,7 @@ void CRawfileSpheres::RdRawYam( ifstream& F_in )
throw "DATA BUG: EnergyHistogram[" + strg(iEne) + "][" +
strg(i+1+4) + "] is not a SEQUENCE";
for( int j=0; j<ndet; ++j ) {
*arr >> val;
(*arr)[j] >> val;
if( !mystd::any2dbl( val, &num ) )
throw "E-Hist: invalid tstep " + val;
rawdata[i].push_back( num );
......@@ -175,20 +175,28 @@ void CRawfileSpheres::RdRawYam( ifstream& F_in )
for( int i=4; i<6; ++i )
rawdata[i].push_back( num );
for( int i=4; i<6; ++i ){ // 2 cnts lines
doc["ChopperHistograms"][iCho][i-4+1] >> val;//cnts line
if( !mystd::str2vec( val, &numvec ) )
throw "DATA BUG: cnts line extraction failed";
if( numvec.size()!=ndet )
throw "DATA BUG: hist: ndet incompatibility";
for( int ii=0; ii<numvec.size(); ++ii )
rawdata[i].push_back( numvec[ii] );
arr = &(doc["ChopperHistograms"][iCho][i-4+1]);
if( arr->Type() != YAML::NodeType::Sequence )
throw "DATA BUG: ChopperHistogram[" + strg(iCho) + "][" +
strg(i-4+1) + "] is not a SEQUENCE";
for( int j=0; j<ndet; ++j ) {
(*arr)[j] >> val;
if( !mystd::any2dbl( val, &num ) )
throw "E-Hist: invalid count " + val;
rawdata[i].push_back( num );
}
}
for( int i=4; i<6; ++i ){ // 2 time lines
doc["ChopperHistograms"][iCho][i-4+1+2] >> val;//time line
if( !mystd::str2vec( val, &numvec ) )
throw "DATA BUG: time line extraction failed";
for( int ii=0; ii<numvec.size(); ++ii )
rawdata[i].push_back( numvec[ii] );
arr = &(doc["ChopperHistograms"][iCho][i-4+1+2]);
if( arr->Type() != YAML::NodeType::Sequence )
throw "DATA BUG: ChopperHistogram[" + strg(iCho) + "][" +
strg(i-4+1+2) + "] is not a SEQUENCE";
for( int j=0; j<ndet; ++j ) {
(*arr)[j] >> val;
if( !mystd::any2dbl( val, &num ) )
throw "E-Hist: invalid count " + val;
rawdata[i].push_back( num );
}
}
}
} catch( exception& e ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment