Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

71x Add check for an empty processHistory #5914

Merged
merged 1 commit into from Oct 25, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 16 additions & 10 deletions Fireworks/Core/src/FWFileEntry.cc
Expand Up @@ -76,17 +76,23 @@ void FWFileEntry::openFile(bool checkVersion)
}
}
}


fwLog(fwlog::kInfo) << "Checking process history. " << m_name.c_str() << " latest process \"" << dd->processName() << "\", version " << dd->releaseVersion() << std::endl;

b->SetAddress(0);
TString v = dd->releaseVersion();
if (!fireworks::acceptDataFormatsVersion(v))
{
int* di = (fireworks::supportedDataFormatsVersion());
TString msg = Form("incompatible data: Process version does not mactch major data formats version. File produced with %s. Data formats version \"CMSSW_%d_%d_%d\".\n",
dd->releaseVersion().c_str(), di[0], di[1], di[2]);
if (latestVersion) {
fwLog(fwlog::kInfo) << "Checking process history. " << m_name.c_str() << " latest process \"" << dd->processName() << "\", version " << dd->releaseVersion() << std::endl;

b->SetAddress(0);
TString v = dd->releaseVersion();
if (!fireworks::acceptDataFormatsVersion(v))
{
int* di = (fireworks::supportedDataFormatsVersion());
TString msg = Form("incompatible data: Process version does not mactch major data formats version. File produced with %s. Data formats version \"CMSSW_%d_%d_%d\".\n",
dd->releaseVersion().c_str(), di[0], di[1], di[2]);
msg += "Use --no-version-check option if you still want to view the file.\n";
throw std::runtime_error(msg.Data());
}
}
else {
TString msg = "No process history available\n";
msg += "Use --no-version-check option if you still want to view the file.\n";
throw std::runtime_error(msg.Data());
}
Expand Down