Skip to content

Commit

Permalink
refs #4201 Warnings and trying to fix MAC error
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Jan 2, 2012
1 parent 196291e commit d5bd3dd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ namespace MDAlgorithms
*/
class ConvertToMDEvents;
// signature for an algorithm processing n-dimension event workspace
typedef boost::function<void (ConvertToMDEvents*, API::IMDEventWorkspace *const)> pMethod;
// signature for a fucntion, creating n-dimension workspace
typedef boost::function<API::IMDEventWorkspace_sptr (ConvertToMDEvents* )> pWSCreator;
typedef boost::function<void (ConvertToMDEvents* )> pMethod;
// vectors of strings are here everywhere
typedef std::vector<std::string> Strings;
/// known sates for algorithms, caluclating Q-values
Expand Down Expand Up @@ -181,7 +179,7 @@ namespace MDAlgorithms
* @param pOutWs -- pointer to initated target workspace, which should accomodate new events
*/
template<Q_state Q, AnalMode MODE, CnvrtUnits CONV>
void processQND(API::IMDEventWorkspace *const pOutWs);
void processQND();
/// shalow class which is invoked from processQND procedure and describes the transformation from workspace coordinates to target coordinates
/// presumably will be completely inlined
template<Q_state Q, AnalMode MODE, CnvrtUnits CONV>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace MDAlgorithms
//-----------------------------------------------
template<Q_state Q, AnalMode MODE, CnvrtUnits CONV>
void
ConvertToMDEvents::processQND(API::IMDEventWorkspace *const pOutWs)
ConvertToMDEvents::processQND()
{
// service variable used for efficient filling of the MD event WS -> should be moved to configuration;
size_t SPLIT_LEVEL(1024);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void ConvertToMDEvents::exec(){
// call selected algorithm
pMethod algo = alg_selector[algo_id];
if(algo){
algo(this,spws.get());
algo(this);
}else{
g_log.error()<<"requested undefined subalgorithm :"<<algo_id<<std::endl;
throw(std::invalid_argument("undefined subalgoritm requested "));
Expand Down
32 changes: 16 additions & 16 deletions Code/Mantid/Framework/MDEvents/src/MDEventWSWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ class LOOP{
LOOP< i-1 >::EXEC(pH);
// why does it not work as one row?
//pH->wsCreator[i] = &MDEventWSWrapper::createEmptyEventWS<i>;
fpVoidMethod fp = &MDEventWSWrapper::createEmptyEventWS<i>;
pH->wsCreator[i] =fp;
// fpVoidMethod fp = &MDEventWSWrapper::createEmptyEventWS<i>;
pH->wsCreator.push_back(&(MDEventWSWrapper::createEmptyEventWS<i>));

fpVoidMethod fp1 = &MDEventWSWrapper::add_MDData<i>;
pH->mdEvSummator[i] = fp1;
// fpVoidMethod fp1 = &MDEventWSWrapper::add_MDData<i>;
pH->mdEvSummator.push_back(&(MDEventWSWrapper::add_MDData<i>));

// vftable definition
fpVoidMethod fp2 = &MDEventWSWrapper::split_Box<i>;
pH->boxSplitter[i] = fp2;
//fpVoidMethod fp2 = &MDEventWSWrapper::split_Box<i>;
pH->boxSplitter.push_back(&(MDEventWSWrapper::split_Box<i>));// = fp2;

fpVoidMethod fp3 = &MDEventWSWrapper::refresh_Cache<i>;
pH->cashRefresher[i] = fp3;
//fpVoidMethod fp3 = &MDEventWSWrapper::refresh_Cache<i>;
pH->cashRefresher.push_back( &(MDEventWSWrapper::refresh_Cache<i>));

}
};
Expand All @@ -110,19 +110,19 @@ class LOOP<0>{
public:
static inline void EXEC(MDEventWSWrapper *pH){
fpVoidMethod fp = &MDEventWSWrapper::throwNotInitiatedError;
pH->wsCreator[0] = fp;
pH->mdEvSummator[0] = fp;
pH->boxSplitter[0] = fp;
pH->cashRefresher[0]= fp;
pH->wsCreator.push_back(fp);
pH->mdEvSummator.push_back(fp);
pH->boxSplitter.push_back(fp);
pH->cashRefresher.push_back(fp);
}
};

MDEventWSWrapper::MDEventWSWrapper():n_dimensions(0)
{
wsCreator.resize(MAX_N_DIM+1);
mdEvSummator.resize(MAX_N_DIM+1);
boxSplitter.resize(MAX_N_DIM+1);
cashRefresher.resize(MAX_N_DIM+1);
wsCreator.reserve(MAX_N_DIM+1);
mdEvSummator.reserve(MAX_N_DIM+1);
boxSplitter.reserve(MAX_N_DIM+1);
cashRefresher.reserve(MAX_N_DIM+1);
LOOP<MAX_N_DIM>::EXEC(this);
}

Expand Down

0 comments on commit d5bd3dd

Please sign in to comment.