Example #1
0
 /**
   * This method is called if a function does not call to useDimension at all. 
   * It adds all the dimensions in the workspace in the order they are in in that workspace
   * then calls init(). 
   */
 void IFunctionMD::useAllDimensions(IMDWorkspace_const_sptr workspace)
 {
   if (!workspace)
   {
     throw std::runtime_error("Method IFunctionMD::useAllDimensions() can only be called after setting the workspace");
   }
   for(size_t i = 0; i < workspace->getNumDims(); ++ i)
   {
     useDimension(workspace->getDimension(i)->getDimensionId());
   }
   this->initDimensions();
 }