Skip to content

Commit

Permalink
Merge pull request #5914 from alja/71-historyCheck
Browse files Browse the repository at this point in the history
71x Add check for an empty processHistory
  • Loading branch information
davidlange6 committed Oct 25, 2014
2 parents 5463a4d + a527b51 commit 95caf0c
Showing 1 changed file with 16 additions and 10 deletions.
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

0 comments on commit 95caf0c

Please sign in to comment.