Skip to content
Snippets Groups Projects
Commit 5f2afa2e authored by adrien-matta's avatar adrien-matta
Browse files

* Fixing error in ReadAnalysisConfig of Sharc

        - Wrong token for Sharc Back E Threshold vause the code to
        ignore rest of the file
parent 1d2e6dbf
No related branches found
No related tags found
No related merge requests found
...@@ -339,16 +339,21 @@ void TSharcPhysics::ReadAnalysisConfig(){ ...@@ -339,16 +339,21 @@ void TSharcPhysics::ReadAnalysisConfig(){
if (DataBuffer.find("STRF") != string::npos) { if (DataBuffer.find("STRF") != string::npos) {
channel = atoi(DataBuffer.substr(8).c_str()); channel = atoi(DataBuffer.substr(8).c_str());
*(m_FrontChannelStatus[Detector-1].begin()+channel-1) = false; *(m_FrontChannelStatus[Detector-1].begin()+channel-1) = false;
cout << "DISABLE DETECTOR " << Detector << " STRIP FRONT " << channel << endl;
} }
else if (DataBuffer.find("STRB")!=string::npos) { else if (DataBuffer.find("STRB")!=string::npos) {
channel = atoi(DataBuffer.substr(8).c_str()); channel = atoi(DataBuffer.substr(8).c_str());
*(m_BackChannelStatus[Detector-1].begin()+channel-1) = false; *(m_BackChannelStatus[Detector-1].begin()+channel-1) = false;
cout << "DISABLE DETECTOR " << Detector << " STRIP BACK " << channel << endl;
} }
else if (DataBuffer.find("PAD") != string::npos) { else if (DataBuffer.find("PAD") != string::npos) {
channel = atoi(DataBuffer.substr(7).c_str()); channel = atoi(DataBuffer.substr(7).c_str());
*(m_PADChannelStatus[Detector-1].begin()+channel-1) = false; *(m_PADChannelStatus[Detector-1].begin()+channel-1) = false;
cout << "DISABLE PAD ON DETECTOR " << Detector << endl;
} }
else cout << "Warning: detector type for Sharc unknown!" << endl; else cout << "Warning: detector type for Sharc unknown!" << endl;
...@@ -377,37 +382,37 @@ void TSharcPhysics::ReadAnalysisConfig(){ ...@@ -377,37 +382,37 @@ void TSharcPhysics::ReadAnalysisConfig(){
else if (whatToDo=="STRIP_FRONT_E_RAW_THRESHOLD") { else if (whatToDo=="STRIP_FRONT_E_RAW_THRESHOLD") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
m_StripFront_E_RAW_Threshold = atoi(DataBuffer.c_str()); m_StripFront_E_RAW_Threshold = atof(DataBuffer.c_str());
cout << whatToDo << " " << m_StripFront_E_RAW_Threshold << endl; cout << whatToDo << " " << m_StripFront_E_RAW_Threshold << endl;
} }
else if (whatToDo=="STRIP_BACK_E_RAW_THRESHOLD") { else if (whatToDo=="STRIP_BACK_E_RAW_THRESHOLD") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
m_StripBack_E_RAW_Threshold = atoi(DataBuffer.c_str()); m_StripBack_E_RAW_Threshold = atof(DataBuffer.c_str());
cout << whatToDo << " " << m_StripBack_E_RAW_Threshold << endl; cout << whatToDo << " " << m_StripBack_E_RAW_Threshold << endl;
} }
else if (whatToDo=="STRIP_FRONT_E_THRESHOLD") { else if (whatToDo=="STRIP_FRONT_E_THRESHOLD") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
m_StripFront_E_Threshold = atoi(DataBuffer.c_str()); m_StripFront_E_Threshold = atof(DataBuffer.c_str());
cout << whatToDo << " " << m_StripFront_E_Threshold << endl; cout << whatToDo << " " << m_StripFront_E_Threshold << endl;
} }
else if (whatToDo=="STRIP_BACK_THRESHOLD") { else if (whatToDo=="STRIP_BACK_E_THRESHOLD") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
m_StripBack_E_Threshold = atoi(DataBuffer.c_str()); m_StripBack_E_Threshold = atof(DataBuffer.c_str());
cout << whatToDo << " " << m_StripBack_E_Threshold << endl; cout << whatToDo << " " << m_StripBack_E_Threshold << endl;
} }
else if (whatToDo=="PAD_E_RAW_THRESHOLD") { else if (whatToDo=="PAD_E_RAW_THRESHOLD") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
m_PAD_E_RAW_Threshold = atoi(DataBuffer.c_str()); m_PAD_E_RAW_Threshold = atof(DataBuffer.c_str());
cout << whatToDo << " " << m_PAD_E_RAW_Threshold << endl; cout << whatToDo << " " << m_PAD_E_RAW_Threshold << endl;
} }
else if (whatToDo=="PAD_E_THRESHOLD") { else if (whatToDo=="PAD_E_THRESHOLD") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
m_PAD_E_Threshold = atoi(DataBuffer.c_str()); m_PAD_E_Threshold = atof(DataBuffer.c_str());
cout << whatToDo << " " << m_PAD_E_Threshold << endl; cout << whatToDo << " " << m_PAD_E_Threshold << endl;
} }
......
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