Skip to content

Commit

Permalink
Merge pull request #1618 from ggovi/new-conddb
Browse files Browse the repository at this point in the history
Superseding the previous request after conflicts clean up. Completed integration of existing ORA storage technology as a parallel back end.
  • Loading branch information
nclopezo committed Dec 4, 2013
2 parents 62b0f1e + e1f3cef commit 9b260bc
Show file tree
Hide file tree
Showing 52 changed files with 1,542 additions and 1,884 deletions.
20 changes: 19 additions & 1 deletion CondCore/CondDB/interface/Binary.h
Expand Up @@ -3,17 +3,29 @@

#include <string>
#include <memory>
// temporarely
#include <boost/shared_ptr.hpp>
//

namespace coral {
class Blob;
}

namespace cond {

struct Nodelete {
Nodelete(){}
void operator()( void* ptr ){}
};

class Binary {
public:
Binary();

template <typename T> explicit Binary( const T& object );

explicit Binary( const boost::shared_ptr<void>& objectPtr );

Binary( const void* data, size_t size );

explicit Binary( const coral::Blob& data );
Expand All @@ -32,11 +44,17 @@ namespace cond {

size_t size() const;

std::string hash() const;
boost::shared_ptr<void> share() const;

private:
std::shared_ptr<coral::Blob> m_data;
//
boost::shared_ptr<void> m_object;
};

template <typename T> Binary::Binary( const T& object ):
m_object( &const_cast<T&>(object), Nodelete() ){
}
}

#endif
Expand Down
16 changes: 0 additions & 16 deletions CondCore/CondDB/interface/CondDB.h

This file was deleted.

@@ -1,6 +1,8 @@
#ifndef ConditionDatabase_Configuration_h
#define ConditionDatabase_Configuration_h
#ifndef ConditionDatabase_ConnectionPool_h
#define ConditionDatabase_ConnectionPool_h

#include "CondCore/CondDB/interface/Session.h"
//
#include <string>
#include <memory>
//
Expand All @@ -16,7 +18,6 @@ namespace coral {

namespace cond {
class CoralServiceManager;
class DbConnectionConfiguration;
}

namespace cond {
Expand All @@ -25,29 +26,31 @@ namespace cond {
//
enum DbAuthenticationSystem { UndefinedAuthentication=0,CondDbKey, CoralXMLFile };

class SessionConfiguration {
class ConnectionPool {
public:
SessionConfiguration();
~SessionConfiguration();
ConnectionPool();
~ConnectionPool();

void setMessageVerbosity( coral::MsgLevel level );
void setAuthenticationPath( const std::string& p );
void setAuthenticationSystem( int authSysCode );
void setLogging( bool flag );
bool isLoggingEnabled() const;
void setParameters( const edm::ParameterSet& connectionPset );
void configure();
Session createSession( const std::string& connectionString, bool writeCapable=false );
Session createReadOnlySession( const std::string& connectionString, const std::string& transactionId );

private:
Session createSession( const std::string& connectionString, const std::string& transactionId, bool writeCapable=false );
void configure( coral::IConnectionServiceConfiguration& coralConfig);
// to be removed after the transition
void configure( cond::DbConnectionConfiguration& oraConfiguration );
bool isConfigured() const;
private:
std::string m_authPath;
int m_authSys;
coral::MsgLevel m_messageLevel;
bool m_logging;
int m_authSys = 0;
coral::MsgLevel m_messageLevel = coral::Info;
bool m_loggingEnabled = false;
// this one has to be moved!
cond::CoralServiceManager* m_pluginManager;
bool m_configured = false;
cond::CoralServiceManager* m_pluginManager = 0;
};
}
}
Expand Down
4 changes: 2 additions & 2 deletions CondCore/CondDB/interface/IOVProxy.h
Expand Up @@ -98,12 +98,12 @@ namespace cond {

// searches the DB for a valid iov containing the specified time.
// if the available iov sequence subset contains the target time, it does not issue a new query.
// otherwise, a query according the two consecutives groups is executed.
// otherwise, a new query will be executed using the resolved group boundaries.
Iterator find(cond::Time_t time);

// searches the DB for a valid iov containing the specified time.
// if the available iov sequence subset contains the target time, it does not issue a new query.
// otherwise, a query according the two consecutives groups is executed.
// otherwise, a new query will be executed using the resolved group boundaries.
// throws if the target time cannot be found.
cond::Iov_t getInterval( cond::Time_t time );

Expand Down

0 comments on commit 9b260bc

Please sign in to comment.