Commit 7977fe8f authored by Roland Moser's avatar Roland Moser
Browse files

references #630: spotlight archive consistency


git-svn-id: file:///tmp/cmsos_migration/cmsos.svndb/releases/baseline9/trunk@15863 c528359e-2999-456a-ae53-7ba8edf254b3
parent d11fb826
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#define SENTINELSPOTLIGHT2G_VERSION_MAJOR 1 #define SENTINELSPOTLIGHT2G_VERSION_MAJOR 1
#define SENTINELSPOTLIGHT2G_VERSION_MINOR 0 #define SENTINELSPOTLIGHT2G_VERSION_MINOR 0
#define SENTINELSPOTLIGHT2G_VERSION_PATCH 0 #define SENTINELSPOTLIGHT2G_VERSION_PATCH 1
// If any previous versions available E.g. #define SENTINELSPOTLIGHT2G_PREVIOUS_VERSIONS "3.8.0,3.8.1" // If any previous versions available E.g. #define SENTINELSPOTLIGHT2G_PREVIOUS_VERSIONS "3.8.0,3.8.1"
#undef SENTINELSPOTLIGHT2G_PREVIOUS_VERSIONS #define SENTINELSPOTLIGHT2G_PREVIOUS_VERSIONS "1.0.0"
// //
......
...@@ -555,8 +555,14 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e ...@@ -555,8 +555,14 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e
{ {
XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind message value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind message value to insert catalog statement");
} }
if (sqlite3_bind_text(insertCatalogStmt_,8, properties.getProperty("qualifiedErrorSchemaURI").c_str(), properties.getProperty("qualifiedErrorSchemaURI").length(), SQLITE_STATIC) != SQLITE_OK) std::string propschema = properties.getProperty("qualifiedErrorSchemaURI");
if( propschema == "" )
{
propschema = properties.getProperty("schema");
}
if (sqlite3_bind_text(insertCatalogStmt_,8, propschema.c_str(), propschema.length(), SQLITE_STATIC) != SQLITE_OK)
{ {
XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind schema value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind schema value to insert catalog statement");
} }
...@@ -570,10 +576,8 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e ...@@ -570,10 +576,8 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e
{ {
XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind tag value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind tag value to insert catalog statement");
} }
std::string version = PACKAGE_VERSION_STRING(SENTINELSPOTLIGHT_VERSION_MAJOR,SENTINELSPOTLIGHT_VERSION_MINOR,SENTINELSPOTLIGHT_VERSION_PATCH); if (sqlite3_bind_text(insertCatalogStmt_,11, properties.getProperty("version").c_str(), properties.getProperty("version").length(), SQLITE_STATIC) != SQLITE_OK)
if (sqlite3_bind_text(insertCatalogStmt_,11, version.c_str(), version.length(), SQLITE_STATIC) != SQLITE_OK)
{ {
XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind tag value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight2g::exception::FailedToStore, "Failed to bind tag value to insert catalog statement");
} }
...@@ -606,12 +610,6 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e ...@@ -606,12 +610,6 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e
//std::cout << "QualifiedErrorSchemaURI: " << properties.getProperty("qualifiedErrorSchemaURI") << std::endl; //std::cout << "QualifiedErrorSchemaURI: " << properties.getProperty("qualifiedErrorSchemaURI") << std::endl;
std::string propschema = properties.getProperty("qualifiedErrorSchemaURI");
if( propschema == "" )
{
propschema = properties.getProperty("schema");
}
// This exception is qualified as a XDAQ application exception, therefore add specific schema property into xdaq-application table // This exception is qualified as a XDAQ application exception, therefore add specific schema property into xdaq-application table
if ( propschema == "http://xdaq.web.cern.ch/xdaq/xsd/2005/QualifiedSoftwareErrorRecord-10.xsd" ) if ( propschema == "http://xdaq.web.cern.ch/xdaq/xsd/2005/QualifiedSoftwareErrorRecord-10.xsd" )
{ {
...@@ -637,7 +635,7 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e ...@@ -637,7 +635,7 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e
std::string propid = properties.getProperty("urn:xdaq-application:id"); std::string propid = properties.getProperty("urn:xdaq-application:id");
if( propid == "" ) if( propid == "" )
{ {
propid = properties.getProperty("id"); propid = properties.getProperty("lid");
} }
std::string propcontext = properties.getProperty("urn:xdaq-application:context"); std::string propcontext = properties.getProperty("urn:xdaq-application:context");
...@@ -649,7 +647,7 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e ...@@ -649,7 +647,7 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e
std::string propgroup = properties.getProperty("urn:xdaq-application:group"); std::string propgroup = properties.getProperty("urn:xdaq-application:group");
if( propgroup == "" ) if( propgroup == "" )
{ {
propgroup = properties.getProperty("group"); propgroup = properties.getProperty("groups");
} }
std::string propservice = properties.getProperty("urn:xdaq-application:service"); std::string propservice = properties.getProperty("urn:xdaq-application:service");
...@@ -1033,9 +1031,14 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e ...@@ -1033,9 +1031,14 @@ throw (sentinel::spotlight2g::exception::FailedToStore, sentinel::spotlight2g::e
// //
toolbox::Properties properties; toolbox::Properties properties;
std::stringstream version;
version << SENTINELSPOTLIGHT2G_VERSION_MAJOR << "." << SENTINELSPOTLIGHT2G_VERSION_MINOR << "." << SENTINELSPOTLIGHT2G_VERSION_PATCH;
properties.setProperty("version", version.str());
std::stringstream storeTimeStream; std::stringstream storeTimeStream;
storeTimeStream << std::fixed << std::setprecision(6) << (double)lastExceptionTime_; storeTimeStream << std::fixed << std::setprecision(6) << (double)lastExceptionTime_;
properties.setProperty("storeTime", storeTimeStream.str()); properties.setProperty("storeTime", storeTimeStream.str());
// for fire event this identify the originator // for fire event this identify the originator
properties.setProperty("source", ex.getProperty("notifier") ); properties.setProperty("source", ex.getProperty("notifier") );
......
Supports Markdown
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