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

* Fixing strip disabling option in Sharc

        - Recently modified token leght lead to taking an extra caracter
on top of the number
parent dde760aa
No related branches found
No related tags found
No related merge requests found
...@@ -318,7 +318,7 @@ void TSharcPhysics::ReadAnalysisConfig(){ ...@@ -318,7 +318,7 @@ void TSharcPhysics::ReadAnalysisConfig(){
else if (whatToDo== "DISABLE_ALL") { else if (whatToDo== "DISABLE_ALL") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
cout << whatToDo << " " << DataBuffer << endl; cout << whatToDo << " " << DataBuffer << endl;
int Detector = atoi(DataBuffer.substr(2,1).c_str()); int Detector = atoi(DataBuffer.substr(2,2).c_str());
vector< bool > ChannelStatus; vector< bool > ChannelStatus;
ChannelStatus.resize(24,false); ChannelStatus.resize(24,false);
m_FrontChannelStatus[Detector-1] = ChannelStatus; m_FrontChannelStatus[Detector-1] = ChannelStatus;
...@@ -330,21 +330,20 @@ void TSharcPhysics::ReadAnalysisConfig(){ ...@@ -330,21 +330,20 @@ void TSharcPhysics::ReadAnalysisConfig(){
else if (whatToDo == "DISABLE_CHANNEL") { else if (whatToDo == "DISABLE_CHANNEL") {
AnalysisConfigFile >> DataBuffer; AnalysisConfigFile >> DataBuffer;
cout << whatToDo << " " << DataBuffer << endl; int Detector = atoi(DataBuffer.substr(2,2).c_str());
int Detector = atoi(DataBuffer.substr(2,1).c_str());
int channel = -1; int channel = -1;
if (DataBuffer.find("STRF") != string::npos) { if (DataBuffer.find("STRF") != string::npos) {
channel = atoi(DataBuffer.substr(7).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;
} }
else if (DataBuffer.find("STRB")!=string::npos) { else if (DataBuffer.find("STRB")!=string::npos) {
channel = atoi(DataBuffer.substr(7).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;
} }
else if (DataBuffer.find("PAD") != string::npos) { else if (DataBuffer.find("PAD") != string::npos) {
channel = atoi(DataBuffer.substr(6).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;
} }
......
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