Skip to content

Commit

Permalink
coverity uninits issues in crystal, etc, 1075493...1075849, re #11829
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed May 28, 2015
1 parent 20865da commit f397c92
Show file tree
Hide file tree
Showing 18 changed files with 491 additions and 471 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/BoxController.h
Expand Up @@ -37,6 +37,7 @@ class DLLExport BoxController {
m_fileIO(boost::shared_ptr<API::IBoxControllerIO>()) {
// TODO: Smarter ways to determine all of these values
m_maxDepth = 5;
m_numEventsAtMax = 0;
m_addingEvents_eventsPerTask = 1000;
m_significantEventsNumber = 10000000;
m_addingEvents_numTasksPerBlock =
Expand Down
Expand Up @@ -131,14 +131,14 @@ class DLLExport AnvredCorrection : public API::Algorithm {
void scale_exec(int &bank, double &lambda, double &depth, double &pathlength,
double &value);

double smu; ///< linear scattering coefficient in 1/cm
double amu; ///< linear absoprtion coefficient in 1/cm
double radius; ///< sample radius in cm
double power_th; ///< Power of lamda in BuildLamdaWeights
std::vector<double> lamda_weight; ///< lmabda weights
bool OnlySphericalAbsorption;
bool ReturnTransmissionOnly;
bool useScaleFactors;
double m_smu; ///< linear scattering coefficient in 1/cm
double m_amu; ///< linear absoprtion coefficient in 1/cm
double m_radius; ///< sample radius in cm
double m_power_th; ///< Power of lamda in BuildLamdaWeights
std::vector<double> m_lamda_weight; ///< lmabda weights
bool m_OnlySphericalAbsorption;
bool m_ReturnTransmissionOnly;
bool m_useScaleFactors;
};

} // namespace Crystal
Expand Down
Expand Up @@ -248,36 +248,32 @@ class DLLExport IntegratePeakTimeSlices : public Mantid::API::Algorithm {
void init();
void exec();

Mantid::API::MatrixWorkspace_sptr
inputW; ///< A pointer to the input workspace, the data set
Mantid::DataObjects::TableWorkspace_sptr
outputW; ///< A pointer to the output workspace
bool m_EdgePeak;

bool EdgePeak;
std::string m_AttributeNames[20];

std::string AttributeNames[20];
std::string m_ParameterNames[7];

std::string ParameterNames[7];
boost::shared_ptr<DataModeHandler> m_AttributeValues;
double m_ParameterValues[7];

boost::shared_ptr<DataModeHandler> AttributeValues;
double ParameterValues[7];
Mantid::detid2index_map m_wi_to_detid_map;

Mantid::detid2index_map wi_to_detid_map;
int *m_NeighborIDs; // Stores IDs of nearest neighbors
double m_R0; ///<for Weak Peaks, these can be set using info from close

int *NeighborIDs; // Stores IDs of nearest neighbors
double R0; ///<for Weak Peaks, these can be set using info from close

Kernel::V3D center; ///< for Describing the Plane at the Peak
Kernel::V3D xvec; ///< for Describing the Plane at the Peak
Kernel::V3D yvec; ///< for Describing the Plane at the Peak
Kernel::V3D m_center; ///< for Describing the Plane at the Peak
Kernel::V3D m_xvec; ///< for Describing the Plane at the Peak
Kernel::V3D m_yvec; ///< for Describing the Plane at the Peak
double
m_ROW; ///< for Describing the Row(or 0) describing the center of the Peak
double
ROW; ///< for Describing the Row(or 0) describing the center of the Peak
double COL; ///< for Describing the Column(or 0) describing the center of the
m_COL; ///< for Describing the Column(or 0) describing the center of the
/// Peak
double CellWidth; ///< for Describing the Plane at the Peak
double CellHeight; ///< for Describing the Plane at the Peak
int NROWS;
int NCOLS;
double m_cellWidth; ///< for Describing the Plane at the Peak
double m_cellHeight; ///< for Describing the Plane at the Peak
int m_NROWS;
int m_NCOLS;

void SetUpData(API::MatrixWorkspace_sptr &Data,
API::MatrixWorkspace_const_sptr const &inpWkSpace,
Expand Down Expand Up @@ -366,8 +362,7 @@ class DLLExport IntegratePeakTimeSlices : public Mantid::API::Algorithm {
bool updateNeighbors(boost::shared_ptr<Geometry::IComponent> &comp,
Kernel::V3D CentPos, Kernel::V3D oldCenter,
double NewRadius, double &neighborRadius);

bool debug;
bool m_debug;
};
} // namespace Crystal
} // namespace Mantid
Expand Down
Expand Up @@ -56,8 +56,8 @@ class DLLExport MaskPeaksWorkspace : public API::Algorithm {
}

private:
API::MatrixWorkspace_sptr inputW; ///< A pointer to the input workspace
API::MatrixWorkspace_sptr outputW; ///< A pointer to the output workspace
API::MatrixWorkspace_sptr m_inputW; ///< A pointer to the input workspace

// Overridden Algorithm methods
void init();
void exec();
Expand Down
Expand Up @@ -68,7 +68,7 @@ class DLLExport PeakIntegration : public API::Algorithm {
double qspan, DataObjects::PeaksWorkspace_sptr &Peaks,
const detid2index_map &pixel_to_wi);

bool IC; ///< Ikeida Carpenter fit of TOF
bool m_IC; ///< Ikeida Carpenter fit of TOF
};

} // namespace Algorithm
Expand Down
22 changes: 11 additions & 11 deletions Code/Mantid/Framework/Crystal/inc/MantidCrystal/PredictPeaks.h
Expand Up @@ -51,27 +51,27 @@ class DLLExport PredictPeaks : public API::Algorithm {
std::vector<Mantid::Geometry::ReflectionCondition_sptr> m_refConds;

/// Run number of input workspace
int runNumber;
int m_runNumber;
/// Min wavelength parameter
double wlMin;
double m_wlMin;
/// Max wavelength parameter
double wlMax;
double m_wlMax;
/// Instrument reference
Geometry::Instrument_const_sptr inst;
Geometry::Instrument_const_sptr m_inst;
/// Output peaks workspace
Mantid::DataObjects::PeaksWorkspace_sptr pw;
Mantid::DataObjects::PeaksWorkspace_sptr m_pw;
/// Counter of possible peaks
size_t numInRange;
size_t m_numInRange;
/// Crystal applied
Geometry::OrientedLattice crystal;
Geometry::OrientedLattice m_crystal;
/// Min D spacing to apply.
double minD;
double m_minD;
/// Max D spacing to apply.
double maxD;
double m_maxD;
/// HKL->Q matrix (Goniometer * UB)
Mantid::Kernel::DblMatrix mat;
Mantid::Kernel::DblMatrix m_mat;
/// Goniometer rotation matrix
Mantid::Kernel::DblMatrix gonio;
Mantid::Kernel::DblMatrix m_gonio;
};

} // namespace Mantid
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/Crystal/inc/MantidCrystal/SaveHKL.h
Expand Up @@ -40,10 +40,10 @@ class DLLExport SaveHKL : public API::Algorithm {
void exec();

double absor_sphere(double &twoth, double &wl, double &tbar);
double smu; // in 1/cm
double amu; // in 1/cm
double radius; // in cm
double power_th;
double m_smu; // in 1/cm
double m_amu; // in 1/cm
double m_radius; // in cm
double m_power_th;
double spectrumCalc(double TOF, int iSpec,
std::vector<std::vector<double>> time,
std::vector<std::vector<double>> spectra, size_t id);
Expand Down
Expand Up @@ -82,9 +82,9 @@ class DLLExport TOFExtinction : public API::Algorithm {
double tbar, double fsq, double sigfsq,
double relSigRg = 0.03);
double absor_sphere(double &twoth, double &wl);
double smu; ///< linear scattering coefficient in 1/cm
double amu; ///< linear absoprtion coefficient in 1/cm
double radius; ///< sample radius in cm
double m_smu; ///< linear scattering coefficient in 1/cm
double m_amu; ///< linear absoprtion coefficient in 1/cm
double m_radius; ///< sample radius in cm
};
} // namespace Mantid;
} // namespace Crystal;
Expand Down

0 comments on commit f397c92

Please sign in to comment.