Skip to content

Commit

Permalink
refs #6449 doxyden & minor DB changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts authored and martyngigg committed Apr 10, 2013
1 parent 1d848d1 commit 9f2ce5a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 19 deletions.
24 changes: 20 additions & 4 deletions Code/Mantid/Framework/API/inc/MantidAPI/IMDNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ class IMDNode
virtual void getEventsData(std::vector<coord_t> &coordTable,size_t &nColumns)const =0;
/** The method to convert the table of data into vector of events
* Used to load events from plain binary file
* @param coordTable -- vector of events parameters
* @param nColumns -- number of parameters for each event
* @param coordTable -- vector of events data, which would be packed into events
*/
virtual void setEventsData(const std::vector<coord_t> &coordTable)=0;

Expand All @@ -160,9 +159,26 @@ class IMDNode
/// General binning method for any shape.
//virtual void generalBin(MDBin<MDE,nd> & bin, Mantid::Geometry::MDImplicitFunction & function) const = 0;

/** Sphere (peak) integration */
/** Sphere (peak) integration
* The CoordTransform object could be used for more complex shapes, e.g. "lentil" integration, as long
* as it reduces the dimensions to a single value.
*
* @param radiusTransform :: nd-to-1 coordinate transformation that converts from these
* dimensions to the distance (squared) from the center of the sphere.
* @param radiusSquared :: radius^2 below which to integrate
* @param signal [out] :: set to the integrated signal
* @param errorSquared [out] :: set to the integrated squared error.
*/
virtual void integrateSphere(Mantid::API::CoordTransform & radiusTransform, const coord_t radiusSquared, signal_t & signal, signal_t & errorSquared) const = 0;
/** Find the centroid around a sphere */
/** Find the centroid of all events contained within by doing a weighted average
* of their coordinates.
*
* @param radiusTransform :: nd-to-1 coordinate transformation that converts from these
* dimensions to the distance (squared) from the center of the sphere.
* @param radiusSquared :: radius^2 below which to integrate
* @param[out] centroid :: array of size [nd]; its centroid will be added
* @param[out] signal :: set to the integrated signal
*/
virtual void centroidSphere(Mantid::API::CoordTransform & radiusTransform, const coord_t radiusSquared, coord_t * centroid, signal_t & signal) const = 0;


Expand Down
4 changes: 1 addition & 3 deletions Code/Mantid/Framework/API/src/BoxController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ namespace API
{

//-----------------------------------------------------------------------------------
/** create new box controller from the existing one
* @param pointer to new instance of a class responsible for boxes IO-operations
*/
/** create new box controller from the existing one. Drops file-based state if the box-controller was file-based */
BoxController * BoxController::clone()const
{
// reset the clone file IO controller to avoid dublicated file based operations for different box controllers
Expand Down
10 changes: 6 additions & 4 deletions Code/Mantid/Framework/Kernel/src/DiskBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ namespace Kernel
if(item->getBufPostion()) // already in the buffer and probably have changed its size in memory
{
// forget old memory size
m_writeBufferUsed-=item->getBufferSize();
// add new size
size_t newMemorySize =item->getDataMemorySize();
m_writeBufferUsed+=newMemorySize;
m_mutex.lock();
m_writeBufferUsed-=item->getBufferSize();
// add new size
size_t newMemorySize =item->getDataMemorySize();
m_writeBufferUsed+=newMemorySize;
m_mutex.unlock();
item->setBufferSize(newMemorySize);
}
else
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Kernel/test/DiskBufferTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class SaveableTesterWithFile : public Saveable

for (size_t i=mPos; i< mPos+mMem; i++)
fakeFile[i] = m_ch;

streamMutex.unlock();

(const_cast<SaveableTesterWithFile *>(this))->setFilePosition(mPos,mMem,true);
Expand Down
11 changes: 3 additions & 8 deletions Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDBoxBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,11 @@ namespace MDEvents

// -------------------------------- Events-Related -------------------------------------------
/** The method to convert events in a box into a table of coodrinates/signal/errors casted into coord_t type
* Used to save events from plain binary file
* @returns coordTable -- vector of events parameters
* @return nColumns -- number of parameters for each event
*/
* Used to conver events into plain data array. Does nothing for GridBox */
virtual void getEventsData(std::vector<coord_t> &/*coordTable*/,size_t &/*nColumns*/)const{};
/** The method to convert the table of data into vector of events
* Used to load events from plain binary file
* @param coordTable -- vector of events parameters
* @param nColumns -- number of parameters for each event
*/
* Used to convert from a vector of values (2D table in Fortran representation (by rows) into box events.
Does nothing for GridBox (may be temporary) -- can be combined with build and add events */
virtual void setEventsData(const std::vector<coord_t> &/*coordTable*/){};
/// Return a copy of contained events
virtual std::vector< MDE > * getEventsCopy() = 0;
Expand Down

0 comments on commit 9f2ce5a

Please sign in to comment.