本文整理汇总了C++中nexus::File::closeGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ File::closeGroup方法的具体用法?C++ File::closeGroup怎么用?C++ File::closeGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nexus::File
的用法示例。
在下文中一共展示了File::closeGroup方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadNXLog
/**
* Load an NX log entry a group type that has value and time entries.
* @param file :: A reference to the NeXus file handle opened at the parent
* group
* @param entry_name :: The name of the log entry
* @param entry_class :: The type of the entry
* @param workspace :: A pointer to the workspace to store the logs
*/
void LoadNexusLogs::loadNXLog(
::NeXus::File &file, const std::string &entry_name,
const std::string &entry_class,
boost::shared_ptr<API::MatrixWorkspace> workspace) const {
g_log.debug() << "processing " << entry_name << ":" << entry_class << "\n";
file.openGroup(entry_name, entry_class);
// Validate the NX log class.
std::map<std::string, std::string> entries = file.getEntries();
if ((entries.find("value") == entries.end()) ||
(entries.find("time") == entries.end())) {
g_log.warning() << "Invalid NXlog entry " << entry_name
<< " found. Did not contain 'value' and 'time'.\n";
file.closeGroup();
return;
}
// whether or not to overwrite logs on workspace
bool overwritelogs = this->getProperty("OverwriteLogs");
try {
if (overwritelogs || !(workspace->run().hasProperty(entry_name))) {
Kernel::Property *logValue = createTimeSeries(file, entry_name);
workspace->mutableRun().addProperty(logValue, overwritelogs);
}
} catch (::NeXus::Exception &e) {
g_log.warning() << "NXlog entry " << entry_name
<< " gave an error when loading:'" << e.what() << "'.\n";
}
file.closeGroup();
}
示例2: runtime_error
void
SaveNXTomo::writeImageKeyValue(const DataObjects::Workspace2D_sptr workspace,
::NeXus::File &nxFile, int thisFileInd) {
// Add ImageKey to instrument/image_key if present, use 0 if not
try {
nxFile.openPath("/entry1/tomo_entry/instrument/detector");
} catch (...) {
throw std::runtime_error("Unable to create a valid NXTomo file");
}
// Set the default key value for this WS
std::vector<double> keyValue;
keyValue.push_back(0);
if (workspace->run().hasProperty("ImageKey")) {
std::string tmpVal = workspace->run().getLogData("ImageKey")->value();
try {
keyValue[0] = boost::lexical_cast<double>(tmpVal);
} catch (...) {
}
// Invalid Cast is handled below
}
nxFile.openData("image_key");
nxFile.putSlab(keyValue, thisFileInd, 1);
nxFile.closeData();
nxFile.closeGroup();
}
示例3: loadVetoPulses
/** Try to load the "Veto_pulse" field in DASLogs
* and convert it to a sample log.
*
* @param file :: open nexus file at the DASLogs group
* @param workspace :: workspace to add to.
*/
void LoadNexusLogs::loadVetoPulses(
::NeXus::File &file,
boost::shared_ptr<API::MatrixWorkspace> workspace) const {
try {
file.openGroup("Veto_pulse", "NXgroup");
} catch (::NeXus::Exception &) {
// No group. This is common in older files
return;
}
file.openData("veto_pulse_time");
// Load the start date/time as ISO8601 string.
std::string start_time;
file.getAttr("start_time", start_time);
DateAndTime start(start_time);
// Read the offsets
std::vector<double> time_double;
file.getData(time_double);
// Fake values with zeroes.
std::vector<double> values(time_double.size(), 0.0);
TimeSeriesProperty<double> *tsp =
new TimeSeriesProperty<double>("veto_pulse_time");
tsp->create(start, time_double, values);
tsp->setUnits("");
// Add the log
workspace->mutableRun().addProperty(tsp);
file.closeData();
file.closeGroup();
}
示例4: catch
/**
* Can we get a histogram (non event data) for every monitor?
*
* @param file :: NeXus file object (open)
* @param monitorNames :: names of monitors of interest
* @return If there seems to be histograms for all monitors (they have "data")
**/
bool LoadNexusMonitors2::allMonitorsHaveHistoData(
::NeXus::File &file, const std::vector<std::string> &monitorNames) {
bool res = true;
try {
for (std::size_t i = 0; i < m_monitor_count; ++i) {
file.openGroup(monitorNames[i], "NXmonitor");
file.openData("data");
file.closeData();
file.closeGroup();
}
} catch (::NeXus::Exception &) {
file.closeGroup();
res = false;
}
return res;
}
示例5: readLibisisNxs
/**
*
* @param nxsFile A reference to the open NeXus fileIt should be opened at the
* "full_reference_detector" group
* @param detInfo A reference to the struct that will hold the data from the file
*/
void LoadDetectorInfo::readLibisisNxs(::NeXus::File & nxsFile, DetectorInfo & detInfo) const
{
nxsFile.readData<int32_t>("det_no", detInfo.ids);
nxsFile.readData<int32_t>("det_type", detInfo.codes);
nxsFile.readData<double>("delay_time", detInfo.delays);
const size_t numDets = detInfo.ids.size();
if(m_moveDets)
{
nxsFile.readData<double>("L2", detInfo.l2);
nxsFile.readData<double>("theta", detInfo.theta);
nxsFile.readData<double>("phi", detInfo.phi);
}
else
{
// these will get ignored
detInfo.l2.resize(numDets, -1.0);
detInfo.theta.resize(numDets, -1.0);
detInfo.phi.resize(numDets, -1.0);
}
// pressure & wall thickness are global here
double pressure = -1.0;
double thickness = -1.0;
nxsFile.openGroup("det_he3", "NXIXTdet_he3");
nxsFile.readData<double>("gas_pressure", pressure);
nxsFile.readData<double>("wall_thickness", thickness);
nxsFile.closeGroup();
if(pressure <= 0.0)
{
g_log.warning("The data file does not contain correct He3 pressure, "
"default value of 10 bar is used instead");
pressure = 10.0;
}
if(thickness <= 0.0)
{
g_log.warning("The data file does not contain correct detector's wall "
"thickness, default value of 0.8mm is used instead");
thickness = 0.0008;
}
detInfo.pressures.resize(numDets, pressure);
detInfo.thicknesses.resize(numDets, thickness);
}
示例6: loadNPeriods
void LoadNexusLogs::loadNPeriods(
::NeXus::File &file,
boost::shared_ptr<API::MatrixWorkspace> workspace) const {
int value = 1; // Default to 1-period unless
try {
file.openGroup("periods", "IXperiods");
file.openData("number");
file.getData(&value);
file.closeData();
file.closeGroup();
} catch (::NeXus::Exception &) {
// Likely missing IXperiods.
return;
}
API::Run &run = workspace->mutableRun();
const std::string nPeriodsLabel = "nperiods";
if (!run.hasProperty(nPeriodsLabel)) {
run.addProperty(new PropertyWithValue<int>(nPeriodsLabel, value));
}
}
示例7: loadLogs
/**
* Load log entries from the given group
* @param file :: A reference to the NeXus file handle opened such that the
* next call can be to open the named group
* @param entry_name :: The name of the log entry
* @param entry_class :: The class type of the log entry
* @param workspace :: A pointer to the workspace to store the logs
*/
void LoadNexusLogs::loadLogs(
::NeXus::File &file, const std::string &entry_name,
const std::string &entry_class,
boost::shared_ptr<API::MatrixWorkspace> workspace) const {
file.openGroup(entry_name, entry_class);
std::map<std::string, std::string> entries = file.getEntries();
std::map<std::string, std::string>::const_iterator iend = entries.end();
for (std::map<std::string, std::string>::const_iterator itr = entries.begin();
itr != iend; ++itr) {
std::string log_class = itr->second;
if (log_class == "NXlog" || log_class == "NXpositioner") {
loadNXLog(file, itr->first, log_class, workspace);
} else if (log_class == "IXseblock") {
loadSELog(file, itr->first, workspace);
} else if (log_class == "NXcollection") {
int jj = 0;
++jj;
}
}
loadVetoPulses(file, workspace);
file.closeGroup();
}
示例8: writeSingleWorkspace
/**
* Writes a single workspace into the file
* @param workspace the workspace to get data from
* @param nxFile the nexus file to save data into
*/
void SaveNXTomo::writeSingleWorkspace(const Workspace2D_sptr workspace,
::NeXus::File &nxFile) {
try {
nxFile.openPath("/entry1/tomo_entry/data");
} catch (...) {
throw std::runtime_error("Unable to create a valid NXTomo file");
}
int numFiles = 0;
nxFile.getAttr<int>("NumFiles", numFiles);
// Change slab start to after last data position
m_slabStart[0] = numFiles;
m_slabSize[0] = 1;
// Set the rotation value for this WS
std::vector<double> rotValue;
rotValue.push_back(0);
if (workspace->run().hasProperty("Rotation")) {
std::string tmpVal = workspace->run().getLogData("Rotation")->value();
try {
rotValue[0] = boost::lexical_cast<double>(tmpVal);
} catch (...) {
}
// Invalid Cast is handled below
}
nxFile.openData("rotation_angle");
nxFile.putSlab(rotValue, numFiles, 1);
nxFile.closeData();
// Copy data out, remake data with dimension of old size plus new elements.
// Insert previous data.
nxFile.openData("data");
double *dataArr = new double[m_spectraCount];
for (int64_t i = 0; i < m_dimensions[1]; ++i) {
for (int64_t j = 0; j < m_dimensions[2]; ++j) {
dataArr[i * m_dimensions[1] + j] =
workspace->dataY(i * m_dimensions[1] + j)[0];
}
}
nxFile.putSlab(dataArr, m_slabStart, m_slabSize);
nxFile.closeData();
nxFile.putAttr("NumFiles", numFiles + 1);
nxFile.closeGroup();
// Write additional log information, intensity and image key
writeLogValues(workspace, nxFile, numFiles);
writeIntensityValue(workspace, nxFile, numFiles);
writeImageKeyValue(workspace, nxFile, numFiles);
++numFiles;
delete[] dataArr;
}
示例9: loadSampleLog
/** Loads an entry from a previously-open NXS file as a log entry
* in the workspace's run.
*
* @param file: NXS file handle. MUST BE PASSED BY REFERENCE otherwise there
* occurs a segfault.
* @param entry_name, entry_class: name and class of NXlog to open.
*/
void LoadLogsFromSNSNexus::loadSampleLog(::NeXus::File& file, std::string entry_name, std::string entry_class)
{
// whether or not to overwrite logs on workspace
bool overwritelogs = this->getProperty("OverwriteLogs");
file.openGroup(entry_name, entry_class);
// Validate the NX log class.
map<string, string> entries = file.getEntries();
if ((entries.find("value") == entries.end()) ||
(entries.find("time") == entries.end()) )
{
g_log.warning() << "Invalid NXlog entry " << entry_name << " found. Did not contain 'value' and 'time'.\n";
file.closeGroup();
return;
}
::NeXus::Info info;
//Two possible types of properties:
vector<double> values;
vector<int> values_int;
bool isTimeSeries = false;
bool isInt = false;
file.openData("value");
//Get the units of the property
std::string units("");
try
{
file.getAttr("units", units);
}
catch (::NeXus::Exception &)
{
//Ignore missing units field.
units = "";
}
//If there is more than one entry, it is a timeseries
info = file.getInfo();
//isTimeSeries = (info.dims[0] > 1);
isTimeSeries = true;
Timer timer1;
try
{
//Get the data (convert types if necessary)
if (file.isDataInt())
{
isInt = true;
file.getDataCoerce(values_int);
// if (values_int.size() == 1)
// {
// WS->mutableRun().addProperty(entry_name, values_int[0], units);
// }
}
else
{
//Try to get as doubles.
file.getDataCoerce(values);
// if (values.size() == 1)
// {
// WS->mutableRun().addProperty(entry_name, values[0], units);
// }
}
}
catch (::NeXus::Exception &e)
{
g_log.warning() << "NXlog entry " << entry_name << " gave an error when loading 'value' data:'" << e.what() << "'.\n";
file.closeData();
file.closeGroup();
return;
}
if (VERBOSE) std::cout << "getDataCoerce took " << timer1.elapsed() << " sec.\n";
file.closeData();
if (isTimeSeries)
{
// --- Time series property ---
//Get the times
vector<double> time_double;
vector<DateAndTime> times;
try {
file.openData("time");
}
catch (::NeXus::Exception &e)
//.........这里部分代码省略.........
示例10: readHistogramData
/**
* Read histogram data
* @param histogramEntries map of the file entries that have histogram
* @param outputGroup pointer to the workspace group
* @param nxFile Reads data from inside first first top entry
*/
void LoadMcStas::readHistogramData(
const std::map<std::string, std::string> &histogramEntries,
WorkspaceGroup_sptr &outputGroup, ::NeXus::File &nxFile) {
std::string nameAttrValueYLABEL;
for (const auto &histogramEntry : histogramEntries) {
const std::string &dataName = histogramEntry.first;
const std::string &dataType = histogramEntry.second;
// open second level entry
nxFile.openGroup(dataName, dataType);
// grap title to use to e.g. create workspace name
std::string nameAttrValueTITLE;
nxFile.getAttr("filename", nameAttrValueTITLE);
if (nxFile.hasAttr("ylabel")) {
nxFile.getAttr("ylabel", nameAttrValueYLABEL);
}
// Find the axis names
auto nxdataEntries = nxFile.getEntries();
std::string axis1Name, axis2Name;
for (auto &nxdataEntry : nxdataEntries) {
if (nxdataEntry.second == "NXparameters")
continue;
if (nxdataEntry.first == "ncount")
continue;
nxFile.openData(nxdataEntry.first);
if (nxFile.hasAttr("axis")) {
int axisNo(0);
nxFile.getAttr("axis", axisNo);
if (axisNo == 1)
axis1Name = nxdataEntry.first;
else if (axisNo == 2)
axis2Name = nxdataEntry.first;
else
throw std::invalid_argument("Unknown axis number");
}
nxFile.closeData();
}
std::vector<double> axis1Values, axis2Values;
nxFile.readData<double>(axis1Name, axis1Values);
if (axis2Name.length() == 0) {
axis2Name = nameAttrValueYLABEL;
axis2Values.push_back(0.0);
} else {
nxFile.readData<double>(axis2Name, axis2Values);
}
const size_t axis1Length = axis1Values.size();
const size_t axis2Length = axis2Values.size();
g_log.debug() << "Axis lengths=" << axis1Length << " " << axis2Length
<< '\n';
// Require "data" field
std::vector<double> data;
nxFile.readData<double>("data", data);
// Optional errors field
std::vector<double> errors;
try {
nxFile.readData<double>("errors", errors);
} catch (::NeXus::Exception &) {
g_log.information() << "Field " << dataName
<< " contains no error information.\n";
}
// close second level entry
nxFile.closeGroup();
MatrixWorkspace_sptr ws = WorkspaceFactory::Instance().create(
"Workspace2D", axis2Length, axis1Length, axis1Length);
Axis *axis1 = ws->getAxis(0);
axis1->title() = axis1Name;
// Set caption
auto lblUnit = boost::make_shared<Units::Label>();
lblUnit->setLabel(axis1Name, "");
axis1->unit() = lblUnit;
Axis *axis2 = new NumericAxis(axis2Length);
axis2->title() = axis2Name;
// Set caption
lblUnit = boost::make_shared<Units::Label>();
lblUnit->setLabel(axis2Name, "");
axis2->unit() = lblUnit;
ws->setYUnit(axis2Name);
ws->replaceAxis(1, axis2);
for (size_t wsIndex = 0; wsIndex < axis2Length; ++wsIndex) {
//.........这里部分代码省略.........
示例11: progInitial
/**
* Read Event Data
* @param eventEntries map of the file entries that have events
* @param nxFile Reads data from inside first top entry
* @return Names of workspaces to include in the output group
*/
std::vector<std::string> LoadMcStas::readEventData(
const std::map<std::string, std::string> &eventEntries,
::NeXus::File &nxFile) {
// vector to store output workspaces
std::vector<std::string> scatteringWSNames;
std::string filename = getPropertyValue("Filename");
auto entries = nxFile.getEntries();
const bool errorBarsSetTo1 = getProperty("ErrorBarsSetTo1");
// will assume that each top level entry contain one mcstas
// generated IDF and any event data entries within this top level
// entry are data collected for that instrument
// This code for loading the instrument is for now adjusted code from
// ExperimentalInfo.
// Close data folder and go back to top level. Then read and close the
// Instrument folder.
nxFile.closeGroup();
Geometry::Instrument_sptr instrument;
// Initialize progress reporting
int reports = 2;
const double progressFractionInitial = 0.1;
Progress progInitial(this, 0.0, progressFractionInitial, reports);
std::string instrumentXML;
progInitial.report("Loading instrument");
try {
nxFile.openGroup("instrument", "NXinstrument");
nxFile.openGroup("instrument_xml", "NXnote");
nxFile.readData("data", instrumentXML);
nxFile.closeGroup();
nxFile.closeGroup();
} catch (...) {
g_log.warning()
<< "\nCould not find the instrument description in the Nexus file:"
<< filename << " Ignore eventdata from the Nexus file\n";
return scatteringWSNames;
;
}
try {
std::string instrumentName = "McStas";
Geometry::InstrumentDefinitionParser parser(filename, instrumentName,
instrumentXML);
std::string instrumentNameMangled = parser.getMangledName();
// Check whether the instrument is already in the InstrumentDataService
if (InstrumentDataService::Instance().doesExist(instrumentNameMangled)) {
// If it does, just use the one from the one stored there
instrument =
InstrumentDataService::Instance().retrieve(instrumentNameMangled);
} else {
// Really create the instrument
instrument = parser.parseXML(nullptr);
// Add to data service for later retrieval
InstrumentDataService::Instance().add(instrumentNameMangled, instrument);
}
} catch (Exception::InstrumentDefinitionError &e) {
g_log.warning()
<< "When trying to read the instrument description in the Nexus file: "
<< filename << " the following error is reported: " << e.what()
<< " Ignore eventdata from the Nexus file\n";
return scatteringWSNames;
;
} catch (...) {
g_log.warning()
<< "Could not parse instrument description in the Nexus file: "
<< filename << " Ignore eventdata from the Nexus file\n";
return scatteringWSNames;
;
}
// Finished reading Instrument. Then open new data folder again
nxFile.openGroup("data", "NXdetector");
// create and prepare an event workspace ready to receive the mcstas events
progInitial.report("Set up EventWorkspace");
EventWorkspace_sptr eventWS(new EventWorkspace());
// initialize, where create up front number of eventlists = number of
// detectors
eventWS->initialize(instrument->getNumberDetectors(), 1, 1);
// Set the units
eventWS->getAxis(0)->unit() = UnitFactory::Instance().create("TOF");
eventWS->setYUnit("Counts");
// set the instrument
eventWS->setInstrument(instrument);
// assign detector ID to eventlists
std::vector<detid_t> detIDs = instrument->getDetectorIDs();
for (size_t i = 0; i < instrument->getNumberDetectors(); i++) {
//.........这里部分代码省略.........
示例12: loadSELog
/**
* Load an SE log entry
* @param file :: A reference to the NeXus file handle opened at the parent
* group
* @param entry_name :: The name of the log entry
* @param workspace :: A pointer to the workspace to store the logs
*/
void LoadNexusLogs::loadSELog(
::NeXus::File &file, const std::string &entry_name,
boost::shared_ptr<API::MatrixWorkspace> workspace) const {
// Open the entry
file.openGroup(entry_name, "IXseblock");
std::string propName = entry_name;
if (workspace->run().hasProperty(propName)) {
propName = "selog_" + propName;
}
// There are two possible entries:
// value_log - A time series entry. This can contain a corrupt value entry
// so if it does use the value one
// value - A single value float entry
Kernel::Property *logValue(nullptr);
std::map<std::string, std::string> entries = file.getEntries();
if (entries.find("value_log") != entries.end()) {
try {
try {
file.openGroup("value_log", "NXlog");
} catch (::NeXus::Exception &) {
file.closeGroup();
throw;
}
logValue = createTimeSeries(file, propName);
file.closeGroup();
} catch (::NeXus::Exception &e) {
g_log.warning() << "IXseblock entry '" << entry_name
<< "' gave an error when loading "
<< "a time series:'" << e.what() << "'. Skipping entry\n";
file.closeGroup(); // value_log
file.closeGroup(); // entry_name
return;
}
} else if (entries.find("value") != entries.end()) {
try {
// This may have a larger dimension than 1 bit it has no time field so
// take the first entry
file.openData("value");
::NeXus::Info info = file.getInfo();
if (info.type == ::NeXus::FLOAT32) {
boost::scoped_array<float> value(new float[info.dims[0]]);
file.getData(value.get());
file.closeData();
logValue = new Kernel::PropertyWithValue<double>(
propName, static_cast<double>(value[0]), true);
} else {
file.closeGroup();
return;
}
} catch (::NeXus::Exception &e) {
g_log.warning() << "IXseblock entry " << entry_name
<< " gave an error when loading "
<< "a single value:'" << e.what() << "'.\n";
file.closeData();
file.closeGroup();
return;
}
} else {
g_log.warning() << "IXseblock entry " << entry_name
<< " cannot be read, skipping entry.\n";
file.closeGroup();
return;
}
workspace->mutableRun().addProperty(logValue);
file.closeGroup();
}
示例13: readEventData
/**
* Return the confidence with with this algorithm can load the file
* @param eventEntries map of the file entries that have events
* @param outputGroup pointer to the workspace group
* @param nxFile Reads data from inside first first top entry
*/
void LoadMcStas::readEventData(
const std::map<std::string, std::string> &eventEntries,
WorkspaceGroup_sptr &outputGroup, ::NeXus::File &nxFile) {
std::string filename = getPropertyValue("Filename");
auto entries = nxFile.getEntries();
// will assume that each top level entry contain one mcstas
// generated IDF and any event data entries within this top level
// entry are data collected for that instrument
// This code for loading the instrument is for now adjusted code from
// ExperimentalInfo.
// Close data folder and go back to top level. Then read and close the
// Instrument folder.
nxFile.closeGroup();
Geometry::Instrument_sptr instrument;
// Initialize progress reporting
int reports = 2;
const double progressFractionInitial = 0.1;
Progress progInitial(this, 0.0, progressFractionInitial, reports);
try {
nxFile.openGroup("instrument", "NXinstrument");
std::string instrumentXML;
nxFile.openGroup("instrument_xml", "NXnote");
nxFile.readData("data", instrumentXML);
nxFile.closeGroup();
nxFile.closeGroup();
progInitial.report("Loading instrument");
Geometry::InstrumentDefinitionParser parser;
std::string instrumentName = "McStas";
parser.initialize(filename, instrumentName, instrumentXML);
std::string instrumentNameMangled = parser.getMangledName();
// Check whether the instrument is already in the InstrumentDataService
if (InstrumentDataService::Instance().doesExist(instrumentNameMangled)) {
// If it does, just use the one from the one stored there
instrument =
InstrumentDataService::Instance().retrieve(instrumentNameMangled);
} else {
// Really create the instrument
instrument = parser.parseXML(NULL);
// Add to data service for later retrieval
InstrumentDataService::Instance().add(instrumentNameMangled, instrument);
}
} catch (...) {
// Loader should not stop if there is no IDF.xml
g_log.warning()
<< "\nCould not find the instrument description in the Nexus file:"
<< filename << " Ignore evntdata from data file" << std::endl;
return;
}
// Finished reading Instrument. Then open new data folder again
nxFile.openGroup("data", "NXdetector");
// create and prepare an event workspace ready to receive the mcstas events
progInitial.report("Set up EventWorkspace");
EventWorkspace_sptr eventWS(new EventWorkspace());
// initialize, where create up front number of eventlists = number of
// detectors
eventWS->initialize(instrument->getNumberDetectors(), 1, 1);
// Set the units
eventWS->getAxis(0)->unit() = UnitFactory::Instance().create("TOF");
eventWS->setYUnit("Counts");
// set the instrument
eventWS->setInstrument(instrument);
// assign detector ID to eventlists
std::vector<detid_t> detIDs = instrument->getDetectorIDs();
for (size_t i = 0; i < instrument->getNumberDetectors(); i++) {
eventWS->getEventList(i).addDetectorID(detIDs[i]);
// spectrum number are treated as equal to detector IDs for McStas data
eventWS->getEventList(i).setSpectrumNo(detIDs[i]);
}
// the one is here for the moment for backward compatibility
eventWS->rebuildSpectraMapping(true);
bool isAnyNeutrons = false;
// to store shortest and longest recorded TOF
double shortestTOF(0.0);
double longestTOF(0.0);
const size_t numEventEntries = eventEntries.size();
Progress progEntries(this, progressFractionInitial, 1.0, numEventEntries * 2);
for (auto eit = eventEntries.begin(); eit != eventEntries.end(); ++eit) {
std::string dataName = eit->first;
std::string dataType = eit->second;
// open second level entry
//.........这里部分代码省略.........