Skip to content

Commit

Permalink
Merge pull request #8259 from ggovi/new-conddb-sqlite-format-v2-74X
Browse files Browse the repository at this point in the history
Default format for new condition databases moved to v2
  • Loading branch information
cmsbuild committed Mar 15, 2015
2 parents d1dbe7d + ad645d5 commit 5ffae36
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CondCore/CondDB/interface/Types.h
Expand Up @@ -21,7 +21,7 @@ namespace cond {

// to be removed after the transition to new DB
typedef enum { UNKNOWN_DB=0, COND_DB, ORA_DB } BackendType;
static constexpr BackendType DEFAULT_DB = ORA_DB;
static constexpr BackendType DEFAULT_DB = COND_DB;
// for the validation of migrated data
typedef enum { ERROR=0, MIGRATED, VALIDATED } MigrationStatus;
static const std::vector<std::string> validationStatusText = { "Error",
Expand Down
7 changes: 1 addition & 6 deletions CondCore/CondDB/src/SessionImpl.cc
Expand Up @@ -70,13 +70,8 @@ namespace cond {
std::unique_ptr<IGTSchema> gtSchemaHandle( new OraGTSchema( oraSession ) );
if( !iovSchemaHandle->exists() && !gtSchemaHandle->exists() ){
iovSchemaHandle.reset( new IOVSchema( coralSession->nominalSchema() ) );
if( iovSchemaHandle->exists() ){
ret = COND_DB;
}
ret = COND_DB;
} else {
// edm::LogWarning("CondDB") << "You are using conditions from the old database via: "
// << connectionString
// << std::endl;
ret = ORA_DB;
}
oraSession.transaction().commit();
Expand Down
22 changes: 17 additions & 5 deletions CondCore/CondDB/test/MyTestData.h
Expand Up @@ -50,14 +50,24 @@ class MyTestData {
}

bool operator==( const MyTestData& rhs ) const {
if( a != rhs.a ) return false;
if( b != rhs.b ) return false;
if( a != rhs.a ) {
return false;
}
if( b != rhs.b ) {
return false;
}
for( size_t i=0;i<2;i++)
for( size_t j=0;j<2;j++){
if(d[i][j]!=rhs.d[i][j]) return false;
if(f[i][j]!=rhs.f[i][j]) return false;
if(d[i][j]!=rhs.d[i][j]) {
return false;
}
if(f[i][j]!=rhs.f[i][j]) {
return false;
}
}
if( s != rhs.s ) return false;
if( s != rhs.s ) {
return false;
}
return true;
}
bool operator!=( const MyTestData& rhs ) const {
Expand All @@ -84,6 +94,8 @@ void MyTestData::serialize(Archive & ar, const unsigned int)
ar & BOOST_SERIALIZATION_NVP(a);
ar & BOOST_SERIALIZATION_NVP(b);
ar & BOOST_SERIALIZATION_NVP(s);
ar & BOOST_SERIALIZATION_NVP(d);
ar & BOOST_SERIALIZATION_NVP(f);
}

#endif /* !defined(__GCCXML__) */
Expand Down

0 comments on commit 5ffae36

Please sign in to comment.