Commit 132623c6 authored by Jeannie Backer's avatar Jeannie Backer
Browse files

Commented out unused variables.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6137 41f8697f-d340-4b68-9986-7bafba869bb8
parent b2515fad
Loading
Loading
Loading
Loading
+58 −61
Original line number Diff line number Diff line
@@ -1076,34 +1076,30 @@ namespace Isis {
  }

  void BundleSettings::savehdf5(hid_t fileId, H5::Group settingsGroup) const {
    //
    //
    //// Try block to detect exceptions raised by any of the calls inside it
    //try {
    //  /*
    //   * Turn off the auto-printing when failure occurs so that we can
    //   * handle the errors appropriately
    //   */
    //  H5::Exception::dontPrint();
    //  /*
    //   * Create a new file using H5F_ACC_TRUNC access,
    //   * default file creation properties, and default file
    //   * access properties.
    //   */
    //  H5::H5File hdfFile = H5::H5File( hdfFileName, H5F_ACC_TRUNC ); // does this append or overwrite ???
    //  hid_t fileId = hdfFile.getId();
  }
  void BundleSettings::savehdf5(hid_t settingsGroupId, QString objectName) const {
  #if 0
    
    // Try block to detect exceptions raised by any of the calls inside it
    try {
      /*
       * Turn off the auto-printing when failure occurs so that we can
       * handle the errors appropriately
       */
      H5::Exception::dontPrint();

    // passed in
    //   H5::Group bundleSettingsGroup = H5::Group(hdfFile.createGroup("/BundleSettings"));
    //
    //  hsize_t dims[2];              // dataset dimensions
    //
    //  //TODO: finish Correlation Matrix
    //  //Create a dataset with compression
    //  H5::Group correlationMatrixGroup
    //      = H5::Group(hdfFile.createGroup("/BundleSettings/CorrelationMatrix"));
    //  H5LTset_attribute_string(fileId, "/BundleSettings/CorrelationMatrix", "correlationFileName", 
    //                           correlationMatrix().correlationFileName().expanded());
    //  H5LTset_attribute_string(fileId, "/BundleSettings/CorrelationMatrix", "covarianceFileName", 
    //                           correlationMatrix().covarianceFileName().expanded());
      hsize_t dims[2];              // dataset dimensions

      //TODO: finish Correlation Matrix
      //Create a dataset with compression
      hid_t correlationGroupId = H5Gcreate(settingsGroupId, "/BundleSolutionInfo/BundleSettings/CorrelationMatrix", 0);//??? 
      QString location = objectName + "/CorrelationMatrix";
      H5LTset_attribute_string(correlationGroupId, location.toAscii(), "correlationFileName", 
                               correlationMatrix().correlationFileName().expanded());
      H5LTset_attribute_string(correlationGroupId, location.toAscii(), "covarianceFileName", 
                               correlationMatrix().covarianceFileName().expanded());
      //  // TODO: jb - how do we add
    //  // correlationMatrix().imagesAndParameters()???
    //  // QMapIterator<QString, QStringList> a list of images with their
@@ -1252,40 +1248,41 @@ namespace Isis {
    //  dataset = H5::DataSet(hdfFile.createDataSet("/MLEstimation/residualsCumulativeProbabilityCalculator", H5::PredType::NATIVE_FLOAT, resCumProbdataspace));
    //  //dataset.write(data, H5::PredType::NATIVE_FLAOT);
    //  
    //}  // end of try block
    //// catch failure caused by the H5File operations
    //catch( H5::FileIException error ) {
    //  QString msg = QString(error.getCDetailMsg());
    //  IException hpfError(IException::Unknown, msg, _FILEINFO_);
    //  msg = "Unable to save BundleResults to hpf5 file. "
    //        "H5 exception handler has detected a file error.";
    //  throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    //}
    //// catch failure caused by the DataSet operations
    //catch( H5::DataSetIException error ) {
    //  QString msg = QString(error.getCDetailMsg());
    //  IException hpfError(IException::Unknown, msg, _FILEINFO_);
    //  msg = "Unable to save BundleResults to hpf5 file. "
    //        "H5 exception handler has detected a data set error.";
    //  throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    //}
    //// catch failure caused by the DataSpace operations
    //catch( H5::DataSpaceIException error ) {
    //  QString msg = QString(error.getCDetailMsg());
    //  IException hpfError(IException::Unknown, msg, _FILEINFO_);
    //  msg = "Unable to save BundleResults to hpf5 file. "
    //        "H5 exception handler has detected a data space error.";
    //  throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    //}
    //// catch failure caused by the DataSpace operations
    //catch( H5::DataTypeIException error ) {
    //  QString msg = QString(error.getCDetailMsg());
    //  IException hpfError(IException::Unknown, msg, _FILEINFO_);
    //  msg = "Unable to save BundleResults to hpf5 file. "
    //        "H5 exception handler has detected a data type error.";
    //  throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    //}
    //return;
    }  // end of try block
    // catch failure caused by the H5File operations
    catch( H5::FileIException error ) {
      QString msg = QString(error.getCDetailMsg());
      IException hpfError(IException::Unknown, msg, _FILEINFO_);
      msg = "Unable to save BundleResults to hpf5 file. "
            "H5 exception handler has detected a file error.";
      throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    }
    // catch failure caused by the DataSet operations
    catch( H5::DataSetIException error ) {
      QString msg = QString(error.getCDetailMsg());
      IException hpfError(IException::Unknown, msg, _FILEINFO_);
      msg = "Unable to save BundleResults to hpf5 file. "
            "H5 exception handler has detected a data set error.";
      throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    }
    // catch failure caused by the DataSpace operations
    catch( H5::DataSpaceIException error ) {
      QString msg = QString(error.getCDetailMsg());
      IException hpfError(IException::Unknown, msg, _FILEINFO_);
      msg = "Unable to save BundleResults to hpf5 file. "
            "H5 exception handler has detected a data space error.";
      throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    }
    // catch failure caused by the DataSpace operations
    catch( H5::DataTypeIException error ) {
      QString msg = QString(error.getCDetailMsg());
      IException hpfError(IException::Unknown, msg, _FILEINFO_);
      msg = "Unable to save BundleResults to hpf5 file. "
            "H5 exception handler has detected a data type error.";
      throw IException(hpfError, IException::Unknown, msg, _FILEINFO_);
    }
    return;
      
#endif
  }
}
+1 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ namespace Isis {
      QDataStream &read(QDataStream &stream);

      void savehdf5(hid_t fileId, H5::Group settingsGroup) const;
      void savehdf5(hid_t settingsGroupId, QString objectName) const;

    private:
      /**
+10 −5
Original line number Diff line number Diff line
@@ -463,13 +463,18 @@ namespace Isis {
      H5::H5File hdfFile = H5::H5File( hdfFileName, H5F_ACC_EXCL );
      hid_t fileId = hdfFile.getId();

      H5LTset_attribute_string(fileId, "/BundleSolutionInfo", "runTime", m_runTime.toAscii());
      H5LTset_attribute_string(fileId, "/BundleSolutionInfo", "controlNetworkFileName", 
      QString objectName = "/BundleSolutionInfo";
      H5LTset_attribute_string(fileId, objectName.toAscii(), "runTime", m_runTime.toAscii());
      H5LTset_attribute_string(fileId, objectName.toAscii(), "controlNetworkFileName", 
                               m_controlNetworkFileName->expanded().toAscii());

      H5::Group settingsGroup = H5::Group(hdfFile.createGroup("/BundleSolutionInfo/BundleSettings"));
      m_settings->savehdf5(fileId, settingsGroup);
      H5::Group resultsGroup  = H5::Group(hdfFile.createGroup("/BundleSolutionInfo/BundleResults"));
      //??? H5::Group settingsGroup = H5::Group(hdfFile.createGroup("/BundleSolutionInfo/BundleSettings"));//???
      //???H5::Group settingsGroup = hdfFile.createGroup("/BundleSolutionInfo/BundleSettings"); 
      QString groupName = objectName + "/BundleSettings"; 
      hid_t groupId = H5Gcreate(fileId, groupName.toAscii(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
      m_settings->savehdf5(groupId, groupName.toAscii());
      groupName = objectName + "/BundleResults"; 
      H5::Group resultsGroup  = H5::Group(hdfFile.createGroup(groupName.toAscii()));
      m_statisticsResults->savehdf5(fileId, resultsGroup);
      
    }
+1 −1
Original line number Diff line number Diff line
@@ -574,12 +574,12 @@ namespace Isis {
      // update corrections
      m_corrections += corrections;

      return true;
    } 
    catch (IException &e) {
      QString msg = "Unable to apply parameter corrections to BundleObservation.";
      IException(e, IException::Unknown, msg, _FILEINFO_);
    }
    return true;
  }


+5 −2
Original line number Diff line number Diff line
@@ -542,6 +542,9 @@ namespace Isis {

  void Directory::cleanupFileListWidgets() {
    int numRemoved = m_fileListWidgets.removeAll(NULL);
    if (numRemoved < 0) {
      // why do we need this variable??? just for the print statement???
    }
    //qDebug()<<"Directory::cleanupFileListWidgets  numRemoved = "<<numRemoved;
  }

@@ -551,12 +554,12 @@ namespace Isis {
  }


// <<<<<<< .mine
  void Directory::cleanupControlPointEditorWidget() {
    delete m_controlPointEditWidget;
    m_controlPointEditWidget = NULL;
  }
// =======


  void Directory::cleanupMatrixViewWidgets() {
    m_matrixViewWidgets.removeAll(NULL);
  }
Loading