Commit a680b2ff authored by mdurant's avatar mdurant

Hooking up the code that loads time & cycle information from a Vizschema data file

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12964 18c085ea-50e0-402c-830e-de6fd14e8384
parent 087279cf
......@@ -137,8 +137,10 @@ void VsRegistry::buildGroupObjects() {
VsMesh::buildObject(group);
} else if (type == VsSchema::vsVarsKey) {
buildExpressions(group);
// } else if (type == VsSchema::timeKey) {
// loadTime(group);
} else if (type == VsSchema::timeKey) {
loadTime(group);
} else if (type == VsSchema::runInfoKey) {
loadRunInfo(group);
} else {
VsLog::debugLog() <<"VsRegistry::buildGroupObjects - object is of unrecognized type " <<type <<std::endl;
}
......@@ -163,6 +165,7 @@ void VsRegistry::loadTime(VsH5Group* group) {
VsLog::debugLog() <<"VsRegistry::loadTime(): Error " <<err <<" while trying to load time attribute." <<std::endl;
} else {
foundTime = in[0];
VsLog::debugLog() <<"VsRegistry::loadTime() - loaded time: " <<foundTime <<std::endl;
}
}
......@@ -176,6 +179,7 @@ void VsRegistry::loadTime(VsH5Group* group) {
VsLog::debugLog() <<"VsRegistry::loadTime(): Error " <<err <<" while trying to load step attribute." <<std::endl;
} else {
foundStep = in[0];
VsLog::debugLog() <<"VsRegistry::loadTime() - loaded step: " <<foundStep <<std::endl;
}
}
......@@ -183,19 +187,25 @@ void VsRegistry::loadTime(VsH5Group* group) {
if ((foundTime != -1) && hasTime() && (foundTime != getTime())) {
VsLog::warningLog() <<"VsRegistry::loadTime() - was asked to load time data again, but time data already exists." <<std::endl;
VsLog::warningLog() <<"VsRegistry::loadTime() - and is in conflict: " <<foundTime <<" vs " <<getTime() <<std::endl;
return;
} else {
timeValue = foundTime;
}
if ((foundStep != -1) && hasStep() && (foundStep != getStep())) {
VsLog::warningLog() <<"VsRegistry::loadTime() - was asked to load step data again, but step data already exists." <<std::endl;
VsLog::warningLog() <<"VsRegistry::loadTime() - and is in conflict: " <<foundStep <<" vs " <<getStep() <<std::endl;
return;
} else {
step = foundStep;
}
}
VsLog::debugLog() <<"VsRegistry::loadTime() - loaded time: " <<foundTime <<" and step " <<foundStep <<std::endl;
void VsRegistry::loadRunInfo(VsH5Group* group) {
if (!group) {
VsLog::debugLog() <<"VsRegistry::loadRunInfo() - Group is NULL?" <<std::endl;
return;
}
timeValue = foundTime;
step = foundStep;
VsLog::debugLog() <<"VsRegistry::loadRunInfo() - not loading any information at this time." <<std::endl;
}
/*********** VsH5Datasets***********/
......
......@@ -55,6 +55,7 @@ public:
int numGroups();
void buildGroupObjects();
void loadTime(VsH5Group* group);
void loadRunInfo(VsH5Group* group);
//MESHES
void add(VsMesh* mesh);
......
......@@ -101,4 +101,8 @@ std::string VsSchema::timeKey = "time";
std::string VsSchema::timeAtt = "vsTime";
std::string VsSchema::stepAtt = "vsStep";
std::string VsSchema::timeGroupAtt = "vsTimeGroup";
//Run info
std::string VsSchema::runInfoKey = "runInfo";
std::string VsSchema::softwareAtt = "vsSoftware";
#endif
......@@ -106,6 +106,10 @@ struct VsSchema {
static std::string timeAtt;
static std::string stepAtt;
static std::string timeGroupAtt;
//run info
static std::string runInfoKey;
static std::string softwareAtt;
};
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment