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

Default format for new condition databases moved to v2 #8257

Merged
merged 1 commit into from Mar 14, 2015
Merged
Show file tree
Hide file tree
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
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