Commit d0675990b5b446cd120f03c4fa72ac3159bdf2aa

Authored by Elena.Budnik
1 parent df66d049

Tab2D args processing

src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... ... @@ -699,9 +699,27 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
699 699 }
700 700 break;
701 701 case 2:
702   - if (($dim1_index != '*') || ($dim2_index != '*')) {
  702 + //Tab2D
  703 + if ($paramData->{'dim1-is-range'} && $paramData->{'dim2-is-range'}) {
  704 + throw new Exception('SumInRange is not implemented for 2D objects');
  705 + }
  706 + // spectra with one dim fixed; serie with 2 dims fixed
  707 + else if ((($dim1_index != '*') || ($dim2_index != '*')) && !$paramData->{'dim1-is-range'} && !$paramData->{'dim2-is-range'}) {
703 708 $paramInfo['indexes'][] = "[".$dim1_index.",".$dim2_index."]";
704 709 }
  710 + else if ($paramData->{'dim1-is-range'}) {
  711 + throw new Exception('SumInRange is not implemented for 2D objects');
  712 + }
  713 + else if ($paramData->{'dim2-is-range'}) {
  714 + throw new Exception('SumInRange is not implemented for 2D objects');
  715 + }
  716 + //total over 2 dims
  717 + else if (($dim1_index == '*') && ($dim2_index == '*')) {
  718 + $template_args = array(
  719 + 'paramid' => $paramInfo['id']
  720 + );
  721 + $paramInfo = $this->paramManager->addExistingParam('total_2D', $this->paramsData, $template_args);
  722 + }
705 723 break;
706 724 }
707 725  
... ...