Commit 53e4e3cc authored by nkx Nicholas's avatar nkx Nicholas
Browse files

Merge branch 'development' of https://lfna.unizar.es/rest-development/REST_v2 into development

parents 9a638686 2748eb1c
......@@ -34,7 +34,8 @@ int REST_ViewReadout(TString rootFile, TString name = "", Int_t plane = 0) {
delete key;
TString title = "Reaout plane : " + IntegerToString(plane);
TString title =
"Readout: " + (string)readout->GetName() + " --- plane: " + IntegerToString(plane) + ";X[mm];Y[mm]";
readout->PrintMetadata();
......
......@@ -480,6 +480,13 @@ void TRestReadout::InitFromConfigFile() {
TString modName = GetFieldValue("name", moduleDefinition);
Int_t mid = GetModuleDefinitionId(modName);
if (mid == -1) {
ferr << "TRestReadout at <addReadoutModule>. Module name " << modName << " not found!"
<< endl;
ferr << "Please, check spelling" << endl;
exit(1);
}
fModuleDefinitions[mid].SetModuleID(StringToInteger(GetFieldValue("id", moduleDefinition)));
fModuleDefinitions[mid].SetOrigin(StringTo2DVector(GetFieldValue("origin", moduleDefinition)));
fModuleDefinitions[mid].SetRotation(StringToDouble(GetFieldValue("rotation", moduleDefinition)));
......
......@@ -142,16 +142,16 @@ void TRestReadoutModule::DoReadoutMapping(Int_t nodes) {
// often. This should be just a warning I guess.
if (showWarnings && fMapping.isNodeSet(nodeX, nodeY)) {
cout << endl;
cout << "TRestReadoutModule. WARNING. Node is already SET!!" << endl;
cout << "Trying to associate channel : " << ch << " Pixel : " << px << endl;
cout << "Pixel coordinates : ( " << xPix << " , " << yPix << " ) " << endl;
warning << "TRestReadoutModule. Node is already SET!!" << endl;
warning << "Trying to associate channel : " << ch << " Pixel : " << px << endl;
warning << "Pixel coordinates : ( " << xPix << " , " << yPix << " ) " << endl;
Int_t tempCh = fMapping.GetChannelByNode(nodeX, nodeY);
Int_t tempPix = fMapping.GetPixelByNode(nodeX, nodeY);
cout << "Already associated channel : " << tempCh << " pixel : " << tempPix << endl;
warning << "Already associated channel : " << tempCh << " pixel : " << tempPix << endl;
Double_t xP = this->GetChannel(tempCh)->GetPixel(tempPix)->GetCenter().X();
Double_t yP = this->GetChannel(tempCh)->GetPixel(tempPix)->GetCenter().Y();
cout << "Pixel coordinates : ( " << xP << " , " << yP << " ) " << endl;
warning << "Pixel coordinates : ( " << xP << " , " << yP << " ) " << endl;
cout << endl;
cout << "Increasing the number of mapping of nodes may solve this issue." << endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment