Skip to content

Commit

Permalink
re #7200 minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDraper committed Jun 10, 2013
1 parent 9eb2afe commit dd4358b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions Code/Mantid/Framework/MDEvents/src/MDBoxFlatTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,30 +469,25 @@ namespace Mantid
if(BoxStructureOnly)
{
ibox = MDEventFactory::createBox(size_t(m_nDim),MDEventFactory::BoxType(iEventType),bc,extentsVector);
//box = new MDBox<MDE,nd>(bc.get(), m_Depth[i], extentsVector);
}
else // !BoxStructureOnly)
{

if(FileBackEnd)
{
ibox = MDEventFactory::createBox(size_t(m_nDim),MDEventFactory::BoxType(iEventType),bc,extentsVector,m_Depth[i]);
//box = new MDBox<MDE,nd>(bc.get(), m_Depth[i], extentsVector,UNDEF_SIZET);
// Mark the box as file backed and indicate that the box was saved
ibox->setFileBacked(indexStart,numEvents,true);
}
else
{
ibox = MDEventFactory::createBox(size_t(m_nDim),MDEventFactory::BoxType(iEventType),bc,extentsVector,m_Depth[i],numEvents);
//box = new MDBox<MDE,nd>(bc.get(), m_Depth[i], extentsVector,int64_t(numEvents));
}
} // ifBoxStructureOnly
//ibox = box;
}
else if (box_type == 2)
{
// --- Make a MDGridBox -----
//ibox = new MDGridBox<MDE,nd>(bc.get(), m_Depth[i], extentsVector);
ibox = MDEventFactory::createBox(size_t(m_nDim),MDEventFactory::BoxType(iEventType+1),bc,extentsVector,m_Depth[i]);
}
else
Expand Down Expand Up @@ -583,17 +578,17 @@ namespace Mantid
throw Kernel::Exception::FileError("Trying to open MDWorkspace nexus file with the the events: "+eventType+
"\n different from workspace type: " +WSEventType,fileName);
}
else // it is possible that woerkspace group has been created by somebody else and there are no this kind of attribute attached to it.
else // it is possible that workspace group has been created by somebody else and there are no this kind of attribute attached to it.
{
if(readOnly)
throw Kernel::Exception::FileError("The NXdata group: MDEventWorkspace opened in read-only mode but \n"
" does not have necessary attribute describing the event type used",fileName);
hFile->putAttr("event_type", WSEventType);
}
// check dimesions dataset
// check dimensions dataset
bool dimDatasetExist(false);
hFile->getEntries(groupEntries);
if(groupEntries.find("dimensions")!=groupEntries.end()) //dimesnions dataset exist
if(groupEntries.find("dimensions")!=groupEntries.end()) //dimensions dataset exist
dimDatasetExist = true;

if(dimDatasetExist)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def find_num_dim(lines):



def parce_file(file_name,start_marker,end_marker) :
def parse_file(file_name,start_marker,end_marker) :
"""Read the file and separate it into three parts with the part between input markers to be generated and two others left unchanged.
@param -- file_name -- full file name to open
Expand Down Expand Up @@ -159,7 +159,7 @@ def generate():
# All of the classes to instantiate
classes = classes_cpp + mdevent_types

padding,lines,lines_after=parce_file("../inc/MantidMDEvents/MDEventFactory.h",
padding,lines,lines_after=parse_file("../inc/MantidMDEvents/MDEventFactory.h",
"//### BEGIN AUTO-GENERATED CODE ###",
"//### END AUTO-GENERATED CODE ###");

Expand Down Expand Up @@ -211,7 +211,7 @@ def generate():


# =========== Do the Source File ===========
padding,lines,lines_after=parce_file("./MDEventFactory.cpp",
padding,lines,lines_after=parse_file("./MDEventFactory.cpp",
"//### BEGIN AUTO-GENERATED CODE ###",
"//### END AUTO-GENERATED CODE ###");

Expand Down

0 comments on commit dd4358b

Please sign in to comment.