Skip to content

Commit

Permalink
refs #4401 attempt to fix unix error
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Feb 14, 2012
1 parent 2587a93 commit ddcc45f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,18 @@ class DLLExport MDEventWSWrapper
}
pWs->getBox()->refreshCentroid(NULL);
}
/// terminator for 0 dimensions, will throw
template<>
void calc_Centroid<0>(void){

void calc_Centroid_wrong(void){
// g_log.error()<<" MDEventWSWrapper:calc_Centroid MDEventWSWrapper class has not been initiated with any number of dimensions\n";
throw(std::invalid_argument(" class has not been initiated"));
}
/// terminator for 0 dimensions, will throw
template<>
void createEmptyEventWS<0>(const Strings &,const Strings &,const Strings &,
void createEmptyEventWS_wrong(const Strings &,const Strings &,const Strings &,
const std::vector<double> &, const std::vector<double> &, size_t ){
throw(std::invalid_argument("MDEventWSWrapper:createEmptyEventWS can not be initated with 0 dimensions"));
}

template<>
void add_MDData<0>(float *,uint16_t *,uint32_t*,coord_t* ,size_t)const{
void add_MDData_wrong(float *,uint16_t *,uint32_t*,coord_t* ,size_t)const{
/// g_log.error()<<" MDEvent WSWrapper class has not been initiated with any number of dimensions, can not add anything to 0-dimensional ws\n";
throw(std::invalid_argument(" class has not been initiated, can not add data to 0-dimensional workspace"));
}
Expand Down
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/MDEvents/src/MDEventWSWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ template<>
class LOOP<0>{
public:
static inline void EXEC(MDEventWSWrapper *pH){
pH->wsCreator[0] =&MDEventWSWrapper::createEmptyEventWS<0>;
pH->mdEvSummator[0] =&MDEventWSWrapper::add_MDData<0>;
pH->mdCalCentroid[0]=&MDEventWSWrapper::calc_Centroid<0>;
pH->wsCreator[0] =&MDEventWSWrapper::createEmptyEventWS_wrong;
pH->mdEvSummator[0] =&MDEventWSWrapper::add_MDData_wrong;
pH->mdCalCentroid[0]=&MDEventWSWrapper::calc_Centroid_wrong;
}
};

Expand Down

0 comments on commit ddcc45f

Please sign in to comment.