11 namespace persistency {
14 unsigned int count = 0;
16 while( slashpos != std::string::npos ) {
17 slashpos = input.find(
'/', slashpos );
18 if( slashpos != std::string::npos ) {
30 std::string fipLocation = fipConnect.substr( pos+1 );
42 if( connectionString.empty() )
cond::throwException(
"The connection string is empty.",
"getConnectionParams" );
46 if( protocol ==
"frontier" ) {
49 unsigned int nslash =
countslash( connectionString.substr( protocol.size(), connectionString.size() - fpos ) );
57 if( !transactionId.empty() ) {
58 size_t l = finalConn.rfind(
'/');
59 finalConn.insert( l,
"(freshkey="+transactionId+
')' );
65 if( !signature.empty() ) {
66 if( signature.compare( signatureParameter ) == 0 ) {
68 finalConn.insert( s,
"(security="+signature+
')' );
75 if( startRefresh != std::string::npos ) {
79 if( endRefresh == std::string::npos ) {
80 refreshConn = finalConn;
82 refreshConn = finalConn.substr( startRefresh, endRefresh - startRefresh );
83 if( refreshConn.substr( 0, 1 ) !=
"(" ) {
86 refreshConn.insert( 0,
"http://" );
89 }
else if( protocol ==
"sqlite_fip" ) {
92 return std::make_pair( finalConn, refreshConn );
virtual std::string const lookupCalibConnect(std::string const &input) const =0
std::string getConnectionProtocol(const std::string &connectionString)
std::string parseFipConnectionString(const std::string &fipConnect)
void throwException(const std::string &message, const std::string &methodName)
static std::string const input
edm::Handle< T > connect(const T *&ptr, edm::EDGetTokenT< T > token, const edm::Event &evt)
std::pair< std::string, std::string > getConnectionParams(const std::string &connectionString, const std::string &transactionId, const std::string &signature)
std::string fullPath() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined signature
unsigned int countslash(const std::string &input)