FACT++  1.0
template<typename T >
void RawDataViewer::getCalibrationDataForDisplay ( const CalibDataTypes  calibTypes,
const vector< T > &  inputData,
const int  roi,
const int  roiTM 
)

Definition at line 794 of file RawEventsViewer.cc.

References eventData, i, nRoi, nRoiTM, and VALUES_SPAN.

798 {
799 
800  eventData = new float[1440*roi + 160*roiTM];//(1440+160)*nRoi];
801  nRoi=roi;
802  nRoiTM=roiTM;
803 
804  long long min, max, mean;
805  min = max = inputData[0];
806  mean=0;
807  for (int i=0;i<1440*roi + 160*roiTM;i++) {
808  eventData[i] = (float)inputData[i];
809  mean += inputData[i];
810  if (inputData[i] > max)
811  max = inputData[i];
812  if (inputData[i] < min)
813  min = inputData[i];
814  }
815  mean /= 1440*roi + 160*roiTM;
816  for (int i=0;i<1440*roi + 160*roiTM;i++)
817  eventData[i] -= (float)mean;
818  VALUES_SPAN = max - min;
819 // cout << VALUES_SPAN << " " << min << " " << max << " " << mean << endl;
820 // cout << 1440*roi + 160*roiTM << " " << roi << " " << roiTM << " " << inputData.size() << endl;
821 }
int i
Definition: db_dim_client.c:21