diff --git a/Alignment/CocoaApplication/BuildFile.xml b/Alignment/CocoaApplication/BuildFile.xml index c28e43946b02a..2a5b475a99bea 100644 --- a/Alignment/CocoaApplication/BuildFile.xml +++ b/Alignment/CocoaApplication/BuildFile.xml @@ -1,8 +1,6 @@ - - @@ -14,6 +12,5 @@ - diff --git a/Alignment/CocoaApplication/src/CocoaAnalyzer.cc b/Alignment/CocoaApplication/src/CocoaAnalyzer.cc index b1d3cb2bf1aec..a0c6c062658cc 100644 --- a/Alignment/CocoaApplication/src/CocoaAnalyzer.cc +++ b/Alignment/CocoaApplication/src/CocoaAnalyzer.cc @@ -1,5 +1,4 @@ #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESHandle.h" diff --git a/Alignment/CocoaFit/BuildFile.xml b/Alignment/CocoaFit/BuildFile.xml index 3475a3141e75c..619b6a96fff5c 100644 --- a/Alignment/CocoaFit/BuildFile.xml +++ b/Alignment/CocoaFit/BuildFile.xml @@ -10,7 +10,6 @@ - diff --git a/Alignment/CocoaFit/src/CocoaDBMgr.cc b/Alignment/CocoaFit/src/CocoaDBMgr.cc index 0d919e6d52a6b..29421a0f8fc62 100644 --- a/Alignment/CocoaFit/src/CocoaDBMgr.cc +++ b/Alignment/CocoaFit/src/CocoaDBMgr.cc @@ -4,7 +4,6 @@ #include "CondFormats/Alignment/interface/AlignTransformErrorExtended.h" #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESHandle.h" diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h index 32e8e9ee458f6..40c1f9af874f6 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h @@ -33,7 +33,7 @@ class Trajectory; // class TsosVectorCollection; // class TkFittedLasBeamCollection; // class AliClusterValueMap; -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "Alignment/LaserAlignment/interface/TsosVectorCollection.h" #include "DataFormats/Alignment/interface/TkFittedLasBeamCollectionFwd.h" #include "DataFormats/Alignment/interface/AliClusterValueMapFwd.h" diff --git a/Alignment/MuonAlignment/BuildFile.xml b/Alignment/MuonAlignment/BuildFile.xml index 5959cd414f7ee..840fca465bbd2 100644 --- a/Alignment/MuonAlignment/BuildFile.xml +++ b/Alignment/MuonAlignment/BuildFile.xml @@ -12,7 +12,6 @@ - diff --git a/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml b/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml index 5c48b50a62013..b09d508d75a83 100644 --- a/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml +++ b/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml @@ -11,7 +11,6 @@ - diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h index dd76e37985941..807d6aa3bc201 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h @@ -48,7 +48,7 @@ #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/CalibCalorimetry/EcalTPGTools/BuildFile.xml b/CalibCalorimetry/EcalTPGTools/BuildFile.xml index f68f1fa80a47e..3653c6a1d060d 100644 --- a/CalibCalorimetry/EcalTPGTools/BuildFile.xml +++ b/CalibCalorimetry/EcalTPGTools/BuildFile.xml @@ -5,7 +5,6 @@ - diff --git a/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h b/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h index 935be6434019f..390c4f4196103 100644 --- a/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h +++ b/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h @@ -2,7 +2,7 @@ #define ECALTPGDBCOPY_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CalibMuon/CSCCalibration/test/BuildFile.xml b/CalibMuon/CSCCalibration/test/BuildFile.xml index 6150d34cf54a3..ba81e9855e3b1 100644 --- a/CalibMuon/CSCCalibration/test/BuildFile.xml +++ b/CalibMuon/CSCCalibration/test/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/CalibTracker/SiPixelConnectivity/BuildFile.xml b/CalibTracker/SiPixelConnectivity/BuildFile.xml index 8e015256c9455..80c6763008ffe 100644 --- a/CalibTracker/SiPixelConnectivity/BuildFile.xml +++ b/CalibTracker/SiPixelConnectivity/BuildFile.xml @@ -7,9 +7,6 @@ - - - diff --git a/CalibTracker/SiStripDCS/BuildFile.xml b/CalibTracker/SiStripDCS/BuildFile.xml index fe19a07f40f95..4d6605505bbf7 100644 --- a/CalibTracker/SiStripDCS/BuildFile.xml +++ b/CalibTracker/SiStripDCS/BuildFile.xml @@ -13,7 +13,6 @@ - diff --git a/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h b/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h index 65d1060ae3c84..93a44c78a5be2 100644 --- a/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h +++ b/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h @@ -1,9 +1,7 @@ #ifndef SISTRIPCORALIFACE_H #define SISTRIPCORALIFACE_H -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Session.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CoralBase/TimeStamp.h" #include @@ -36,13 +34,12 @@ class SiStripCoralIface /* member variables*/ std::string m_connectionString; + std::string m_authPath; std::map m_id_map; - // cond::DBSession* session; - cond::DbConnection m_connection; - cond::DbSession m_session; + cond::persistency::Session m_session; + std::auto_ptr m_transaction; // cond::CoralTransaction* m_coraldb; // cond::Connection* con; - std::auto_ptr m_transaction; bool debug_; }; diff --git a/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h b/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h index 62b28999a7106..4ebec53326287 100644 --- a/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h +++ b/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h @@ -6,8 +6,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/TagInfo.h" - #include "CondFormats/SiStripObjects/interface/SiStripDetVOff.h" #include "CondFormats/DataRecord/interface/SiStripCondDataRecords.h" diff --git a/CalibTracker/SiStripDCS/plugins/BuildFile.xml b/CalibTracker/SiStripDCS/plugins/BuildFile.xml index 5542f34cb1d41..a4cda2f4b603b 100644 --- a/CalibTracker/SiStripDCS/plugins/BuildFile.xml +++ b/CalibTracker/SiStripDCS/plugins/BuildFile.xml @@ -4,7 +4,6 @@ - diff --git a/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc b/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc index caa365e31c5b8..a1f3c155e08d8 100644 --- a/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc +++ b/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc @@ -1,5 +1,5 @@ #include "CalibTracker/SiStripDCS/interface/SiStripCoralIface.h" - +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "RelationalAccess/ISessionProxy.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/ITable.h" @@ -18,11 +18,9 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" // constructor -SiStripCoralIface::SiStripCoralIface( std::string connectionString , std::string authenticationPath, const bool debug) : m_connectionString(connectionString), m_session(), debug_(debug) +SiStripCoralIface::SiStripCoralIface( std::string connectionString , std::string authenticationPath, const bool debug) : m_connectionString(connectionString), m_authPath( authenticationPath ), m_session(), debug_(debug) { std::cout << "Building coral interface" << std::endl; - m_connection.configuration().setAuthenticationPath(authenticationPath); - m_connection.configure(); initialize(); } @@ -34,10 +32,12 @@ SiStripCoralIface::~SiStripCoralIface() { // open DB connection void SiStripCoralIface::initialize() { - m_session = m_connection.createSession(); - m_session.open(m_connectionString); + cond::persistency::ConnectionPool connection; + connection.setAuthenticationPath(m_authPath); + connection.configure(); + m_session = connection.createSession(m_connectionString); try { - m_transaction.reset( new cond::DbScopedTransaction(m_session) ); + m_transaction.reset( new cond::persistency::TransactionScope(m_session.transaction()) ); m_transaction->start(true); LogTrace("SiStripCoralIface") << "[SiStripCoralIface::" << __func__ << "] Database connection opened"; } @@ -51,7 +51,7 @@ void SiStripCoralIface::initialize() { void SiStripCoralIface::doQuery(std::string queryType, const coral::TimeStamp& startTime, const coral::TimeStamp& endTime, std::vector &vec_changedate, std::vector &vec_actualValue, std::vector &vec_dpname) { - std::auto_ptr query( m_session.schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); + std::auto_ptr query( m_session.coralSession().schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); std::string condition; LogTrace("SiStripCoralIface") << "[SiStripCoralIface::" << __func__ << "] table to be accessed: " << queryType; @@ -118,7 +118,7 @@ void SiStripCoralIface::doQuery(std::string queryType, const coral::TimeStamp& s void SiStripCoralIface::doSettingsQuery(const coral::TimeStamp& startTime, const coral::TimeStamp& endTime, std::vector &vec_changedate, std::vector &vec_settings, std::vector &vec_dpname, std::vector &vec_dpid) { - std::auto_ptr query( m_session.schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); + std::auto_ptr query( m_session.coralSession().schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); query->addToOutputList("FWCAENCHANNEL.CHANGE_DATE","CHANGE_DATE"); query->addToOutputList("FWCAENCHANNEL.SETTINGS_V0","VSET"); query->addToOutputList("FWCAENCHANNEL.DPID","DPID"); @@ -157,7 +157,7 @@ void SiStripCoralIface::doSettingsQuery(const coral::TimeStamp& startTime, const void SiStripCoralIface::doNameQuery(std::vector &vec_dpname, std::vector &vec_dpid) { - std::auto_ptr query( m_session.schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); + std::auto_ptr query( m_session.coralSession().schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); query->addToOutputList("DP_NAME2ID.DPNAME","DPNAME"); query->addToOutputList("DP_NAME2ID.ID","DPID"); query->addToTableList("DP_NAME2ID"); diff --git a/CalibTracker/SiStripESProducers/plugins/BuildFile.xml b/CalibTracker/SiStripESProducers/plugins/BuildFile.xml index 495560c6965a0..83e06dabe600b 100644 --- a/CalibTracker/SiStripESProducers/plugins/BuildFile.xml +++ b/CalibTracker/SiStripESProducers/plugins/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h index bba5ee337b009..9b6495219392b 100644 --- a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h +++ b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h @@ -9,7 +9,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h index cbb266a9c6b09..e6f5153201ab7 100644 --- a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h +++ b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h @@ -7,7 +7,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Utilities/interface/Exception.h" #include diff --git a/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h b/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h index 23e97a8eb3323..dfb171b7409a3 100644 --- a/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h +++ b/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h @@ -8,7 +8,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h b/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h index 1ac1ee0aaa1b7..5d074c07d87e4 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h @@ -2,7 +2,6 @@ #define SiStripApvGainBuilderFromTag_H #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Framework/interface/Frameworkfwd.h" diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h b/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h index 5dc63df8f6700..b71ee7269ec2b 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h @@ -2,7 +2,6 @@ #define SiStripNoiseNormalizedWithApvGainBuilder_H #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Framework/interface/Frameworkfwd.h" diff --git a/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h b/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h index 6d5c4cdf7ca26..3408ad7a0f008 100644 --- a/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h +++ b/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h @@ -139,7 +139,6 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/Run.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/CondCore/BeamSpotPlugins/BuildFile.xml b/CondCore/BeamSpotPlugins/BuildFile.xml index fbcd744dbd689..ebff3f7d1f4a4 100644 --- a/CondCore/BeamSpotPlugins/BuildFile.xml +++ b/CondCore/BeamSpotPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/CondDB/BuildFile.xml b/CondCore/CondDB/BuildFile.xml index d5cab07b1744b..7a0509ea30b3f 100644 --- a/CondCore/CondDB/BuildFile.xml +++ b/CondCore/CondDB/BuildFile.xml @@ -1,4 +1,3 @@ - diff --git a/CondCore/CondDB/interface/Auth.h b/CondCore/CondDB/interface/Auth.h new file mode 100644 index 0000000000000..df9ab144f769d --- /dev/null +++ b/CondCore/CondDB/interface/Auth.h @@ -0,0 +1,32 @@ +#ifndef CondCore_CondDB_Auth_h +#define CondCore_CondDB_Auth_h + +#include + +namespace cond{ + + namespace auth { + + static constexpr const char* const COND_AUTH_PATH = "COND_AUTH_PATH"; + static constexpr const char* const COND_AUTH_SYS = "COND_AUTH_SYS"; + + static constexpr const char* const COND_ADMIN_GROUP = "COND_ADMIN_GROUP"; + + static constexpr const char* const COND_DEFAULT_ROLE = "COND_DEFAULT_ROLE"; + static constexpr const char* const COND_WRITER_ROLE = "COND_WRITER_ROLE"; + static constexpr const char* const COND_READER_ROLE = "COND_READER_ROLE"; + static constexpr const char* const COND_ADMIN_ROLE = "COND_ADMIN_ROLE"; + + static constexpr const char* const COND_DEFAULT_PRINCIPAL = "COND_DEFAULT_PRINCIPAL"; + + static constexpr const char* const COND_KEY = "Memento"; + + static constexpr unsigned int COND_AUTHENTICATION_KEY_SIZE = 30; + static constexpr unsigned int COND_DB_KEY_SIZE = 30; + + static constexpr const char* const COND_AUTH_PATH_PROPERTY = "AuthenticationFile"; + } + +} +#endif + diff --git a/CondCore/CondDB/interface/Cipher.h b/CondCore/CondDB/interface/Cipher.h new file mode 100644 index 0000000000000..5cdc07c776dd7 --- /dev/null +++ b/CondCore/CondDB/interface/Cipher.h @@ -0,0 +1,41 @@ +#ifndef CondCore_CondDB_Cipher_h +#define CondCore_CondDB_Cipher_h + +#include +#include + +struct BLOWFISH_CTX; + +namespace cond { + + namespace auth { + + class Cipher { + public: + + explicit Cipher( const std::string& key ); + + ~Cipher(); + + size_t encrypt( const std::string& input, unsigned char*& output ); + + std::string decrypt( const unsigned char* input, size_t inputSize ); + + std::string b64encrypt( const std::string& input ); + + std::string b64decrypt( const std::string& input ); + + private: + + size_t bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt=false ); + + private: + + BLOWFISH_CTX* m_ctx; + }; + } + +} + +#endif // CondCore_CondDB_Cipher_h + diff --git a/CondCore/CondDB/interface/ConnectionPool.h b/CondCore/CondDB/interface/ConnectionPool.h index ceafb54a4cd08..93f91134045f7 100644 --- a/CondCore/CondDB/interface/ConnectionPool.h +++ b/CondCore/CondDB/interface/ConnectionPool.h @@ -36,29 +36,33 @@ namespace cond { void setMessageVerbosity( coral::MsgLevel level ); void setAuthenticationPath( const std::string& p ); void setAuthenticationSystem( int authSysCode ); + void setFrontierSecurity( const std::string& signature ); 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 createSession( const std::string& connectionString, bool writeCapable = false ); Session createReadOnlySession( const std::string& connectionString, const std::string& transactionId ); - boost::shared_ptr createCoralSession( const std::string& connectionString, bool writeCapable=false ); + boost::shared_ptr createCoralSession( const std::string& connectionString, bool writeCapable = false ); private: boost::shared_ptr createCoralSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable=false ); + const std::string& transactionId, + bool writeCapable = false ); Session createSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable=false ); - void configure( coral::IConnectionServiceConfiguration& coralConfig); + const std::string& transactionId, + bool writeCapable = false ); + void configure( coral::IConnectionServiceConfiguration& coralConfig ); private: - std::string m_authPath; + std::string m_authPath = std::string( "" ); int m_authSys = 0; coral::MsgLevel m_messageLevel = coral::Error; bool m_loggingEnabled = false; + //The frontier security option is turned on for all sessions + //usig this wrapper of the CORAL connection setup for configuring the server access + std::string m_frontierSecurity = std::string( "" ); // this one has to be moved! - cond::CoralServiceManager* m_pluginManager = 0; + cond::CoralServiceManager* m_pluginManager = nullptr; std::map m_dbTypes; }; } diff --git a/CondCore/DBCommon/interface/CoralServiceFactory.h b/CondCore/CondDB/interface/CoralServiceFactory.h similarity index 76% rename from CondCore/DBCommon/interface/CoralServiceFactory.h rename to CondCore/CondDB/interface/CoralServiceFactory.h index 7b1671f327830..b3690518e2c46 100644 --- a/CondCore/DBCommon/interface/CoralServiceFactory.h +++ b/CondCore/CondDB/interface/CoralServiceFactory.h @@ -1,12 +1,12 @@ -#ifndef CondCore_DBCommon_CoralServiceFactory_h -#define CondCore_DBCommon_CoralServiceFactory_h +#ifndef CondCore_CondDB_CoralServiceFactory_h +#define CondCore_CondDB_CoralServiceFactory_h #include "FWCore/PluginManager/interface/PluginFactory.h" #include // -// Package: CondCore/DBCommon +// Package: CondCore/CondDB // Class : CoralServiceFactory // -/**\class CoralServiceFactory CoralServiceFactory.h CondCore/DBCommon/interface/CoralServiceFactory.h +/**\class CoralServiceFactory CoralServiceFactory.h CondCore/CondDB/interface/CoralServiceFactory.h Description: A special edm plugin factory that creates coral::Service diff --git a/CondCore/DBCommon/interface/CoralServiceMacros.h b/CondCore/CondDB/interface/CoralServiceMacros.h similarity index 62% rename from CondCore/DBCommon/interface/CoralServiceMacros.h rename to CondCore/CondDB/interface/CoralServiceMacros.h index 1546337b92a19..c025663990624 100644 --- a/CondCore/DBCommon/interface/CoralServiceMacros.h +++ b/CondCore/CondDB/interface/CoralServiceMacros.h @@ -1,7 +1,7 @@ -#ifndef CondCore_DBCommon_CoralServiceMacros_h -#define CondCore_DBCommon_CoralServiceMacros_h +#ifndef CondCore_CondDB_CoralServiceMacros_h +#define CondCore_CondDB_CoralServiceMacros_h -#include "CondCore/DBCommon/interface/CoralServiceFactory.h" +#include "CondCore/CondDB/interface/CoralServiceFactory.h" #include "CoralKernel/Service.h" #define DEFINE_CORALSERVICE(type,name) \ diff --git a/CondCore/DBCommon/interface/CoralServiceManager.h b/CondCore/CondDB/interface/CoralServiceManager.h similarity index 79% rename from CondCore/DBCommon/interface/CoralServiceManager.h rename to CondCore/CondDB/interface/CoralServiceManager.h index 270a9545af9e8..862dc74edfdf9 100644 --- a/CondCore/DBCommon/interface/CoralServiceManager.h +++ b/CondCore/CondDB/interface/CoralServiceManager.h @@ -1,13 +1,13 @@ -#ifndef CondCore_DBCommon_CoralServiceManager_h -#define CondCore_DBCommon_CoralServiceManager_h +#ifndef CondCore_CondDB_CoralServiceManager_h +#define CondCore_CondDB_CoralServiceManager_h #include "CoralKernel/IPluginManager.h" #include #include // -// Package: CondCore/DBCommon +// Package: CondCore/CondDB // Class : CoralServiceManager // -/**\class CoralServiceManager CoralServiceManager.h CondCore/DBCommon/interface/CoralServiceManager.h +/**\class CoralServiceManager CoralServiceManager.h CondCore/CondDB/interface/CoralServiceManager.h Description: This is a bridge that implement coral::IPluginManager interface and internally uses edm plugin factory to create plugins of type coral::Service. diff --git a/CondCore/DBCommon/interface/CredentialStore.h b/CondCore/CondDB/interface/CredentialStore.h similarity index 95% rename from CondCore/DBCommon/interface/CredentialStore.h rename to CondCore/CondDB/interface/CredentialStore.h index b8022d6fdbbac..fb825cf691283 100644 --- a/CondCore/DBCommon/interface/CredentialStore.h +++ b/CondCore/CondDB/interface/CredentialStore.h @@ -1,13 +1,13 @@ -#ifndef INCLUDE_COND_CREDENTIALSTORE_H -#define INCLUDE_COND_CREDENTAILSTORE_H +#ifndef CondCore_CondDB_CredentialStore_h +#define CondCore_CondDB_CredentialStore_h -#include "CondCore/DBCommon/interface/DecodingKey.h" +#include "CondCore/CondDB/interface/DecodingKey.h" // #include #include -//#include #include // +#include "CoralBase/MessageStream.h" namespace coral { @@ -167,9 +167,9 @@ namespace cond { std::string m_principalKey; std::string m_serviceName; - const ServiceCredentials* m_serviceData; + const auth::ServiceCredentials* m_serviceData; - DecodingKey m_key; + auth::DecodingKey m_key; }; diff --git a/CondCore/CondDB/interface/DecodingKey.h b/CondCore/CondDB/interface/DecodingKey.h new file mode 100644 index 0000000000000..bd17d3297b6c8 --- /dev/null +++ b/CondCore/CondDB/interface/DecodingKey.h @@ -0,0 +1,136 @@ +#ifndef CondCore_CondDB_DecodingKey_h +#define CondCore_CondDB_DecodingKey_h + +#include +#include +#include +#include + +namespace cond { + + namespace auth { + + struct ServiceCredentials { + ServiceCredentials(); + std::string connectionString; + std::string userName; + std::string password; + }; + + class KeyGenerator { + public: + + KeyGenerator(); + + std::string make( size_t keySize ); + std::string makeWithRandomSize( size_t maxSize ); + + private: + + int m_iteration; + + }; + + class DecodingKey { + + public: + + static constexpr const char* const FILE_NAME = "db.key"; + static constexpr const char* const FILE_PATH = ".cms_cond/db.key"; + static constexpr size_t DEFAULT_KEY_SIZE = 100; + + static std::string templateFile(); + + public: + + DecodingKey(); + + virtual ~DecodingKey(){} + + size_t init( const std::string& keyFileName, const std::string& password, bool readMode = true ); + + size_t createFromInputFile( const std::string& inputFileName, size_t generatedKeySize = 0 ); + + void list( std::ostream& out ); + + void flush(); + + const std::string& principalName() const; + + const std::string& principalKey() const; + + bool isNominal() const; + + const std::string& ownerName() const; + + const std::map< std::string, ServiceCredentials >& services() const; + + void addDefaultService( const std::string& connectionString ); + + void addService( const std::string& serviceName, const std::string& connectionString, const std::string& userName, const std::string& password ); + + + private: + + std::string m_fileName; + + bool m_mode; + + std::string m_pwd; + + std::string m_principalName; + + std::string m_principalKey; + + std::string m_owner; + + std::map< std::string, ServiceCredentials > m_services; + + }; + } +} + +inline +cond::auth::KeyGenerator::KeyGenerator():m_iteration(0){ +} + +inline +cond::auth::ServiceCredentials::ServiceCredentials():connectionString(""),userName(""),password(""){ +} + +inline +cond::auth::DecodingKey::DecodingKey():m_fileName(""),m_mode( true ),m_pwd(""),m_principalName(""),m_principalKey(""),m_owner(""),m_services(){ +} + +inline +const std::string& +cond::auth::DecodingKey::principalName() const { + return m_principalName; +} + +inline +const std::string& +cond::auth::DecodingKey::principalKey() const { + return m_principalKey; +} + +inline +bool +cond::auth::DecodingKey::isNominal() const { + return !m_owner.empty(); +} + +inline +const std::string& +cond::auth::DecodingKey::ownerName() const { + return m_owner; +} + +inline +const std::map< std::string, cond::auth::ServiceCredentials >& +cond::auth::DecodingKey::services() const { return m_services; } + +#endif // CondCore_CondDB_DecodingKey_h + + + diff --git a/CondCore/CondDB/interface/Exception.h b/CondCore/CondDB/interface/Exception.h index b9cf9846ee95a..bc1ff29854468 100644 --- a/CondCore/CondDB/interface/Exception.h +++ b/CondCore/CondDB/interface/Exception.h @@ -2,8 +2,6 @@ #define CondCore_CondDB_Exception_h #include "FWCore/Utilities/interface/Exception.h" -// to bw removed after the transition -#include "CondCore/DBCommon/interface/Exception.h" namespace cond { @@ -12,6 +10,8 @@ namespace cond { /// Base exception class for the object to relational access class Exception : public cms::Exception { public: + /// Constructor + explicit Exception( const std::string& message ); /// Constructor Exception( const std::string& message, const std::string& methodName ); /// Destructor @@ -21,6 +21,11 @@ namespace cond { void throwException [[noreturn]] ( const std::string& message, const std::string& methodName ); } + + typedef persistency::Exception Exception; + + void throwException [[noreturn]] ( const std::string& message, const std::string& methodName ); + } #endif diff --git a/CondCore/DBCommon/interface/FileUtils.h b/CondCore/CondDB/interface/FileUtils.h similarity index 77% rename from CondCore/DBCommon/interface/FileUtils.h rename to CondCore/CondDB/interface/FileUtils.h index fddd83170dd8f..61132d58c64a0 100644 --- a/CondCore/DBCommon/interface/FileUtils.h +++ b/CondCore/CondDB/interface/FileUtils.h @@ -1,5 +1,5 @@ -#ifndef CondCoreDBCommon_FileUtils_H -#define CondCoreDBCommon_FileUtils_H +#ifndef CondCore_CondDB_FileUtils_h +#define CondCore_CondDB_FileUtils_h #include namespace cond { @@ -32,5 +32,5 @@ const std::string& cond::FileReader::content() const { return m_content; } -#endif // CondCoreDBCommon_FileUtils_H +#endif // CondCore_CondDB_FileUtils_h diff --git a/CondCore/CondDB/interface/IOVEditor.h b/CondCore/CondDB/interface/IOVEditor.h index a379af86fcadc..055edc38a619d 100644 --- a/CondCore/CondDB/interface/IOVEditor.h +++ b/CondCore/CondDB/interface/IOVEditor.h @@ -76,6 +76,8 @@ namespace cond { // execute the update/intert queries and reset the buffer bool flush(); bool flush( const boost::posix_time::ptime& operationTime ); + bool flush( const std::string& logText ); + bool flush( const std::string& logText, const boost::posix_time::ptime& operationTime ); private: void checkTransaction( const std::string& ctx ); diff --git a/CondCore/CondDB/interface/Types.h b/CondCore/CondDB/interface/Types.h index 8ba95bfd7349b..5a3b0c41b38ee 100644 --- a/CondCore/CondDB/interface/Types.h +++ b/CondCore/CondDB/interface/Types.h @@ -19,14 +19,12 @@ 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 = COND_DB; - // for the validation of migrated data - typedef enum { ERROR=0, MIGRATED, VALIDATED } MigrationStatus; - static const std::vector validationStatusText = { "Error", - "Migrated", - "Validated" }; + struct UserLogInfo{ + std::string provenance; + std::string usertext; + }; + + typedef enum { SYNCH_ANY = 0, diff --git a/CondCore/CondDB/interface/Utils.h b/CondCore/CondDB/interface/Utils.h index 175faf673f648..b2ebf669a4dd8 100644 --- a/CondCore/CondDB/interface/Utils.h +++ b/CondCore/CondDB/interface/Utils.h @@ -8,6 +8,9 @@ #include #include #include +#include +#include +#include // #include @@ -46,6 +49,35 @@ namespace cond { return arch; } + inline std::string getUserName(){ + char username[LOGIN_NAME_MAX]; + int retcode = getlogin_r(username,LOGIN_NAME_MAX); + if( retcode ) return ""; + return std::string(username); + } + + inline std::string getHostName(){ + char hostname[HOST_NAME_MAX]; + int retcode = gethostname(hostname,HOST_NAME_MAX); + if( retcode ) return ""; + return std::string(hostname); + } + + inline std::string getCommand(){ + std::string commName(""); + try{ + std::ifstream comm("/proc/self/cmdline"); + std::getline(comm,commName); + size_t ind = commName.find('\0'); + while( ind != std::string::npos ){ + commName.replace(ind,1,1,' '); + ind = commName.find('\0'); + } + } catch ( std::ifstream::failure ){ + commName = "unknown"; + } + return commName; + } } namespace persistency { diff --git a/CondCore/CondDB/plugins/BuildFile.xml b/CondCore/CondDB/plugins/BuildFile.xml index 2157cae5cff01..167e5207929c2 100644 --- a/CondCore/CondDB/plugins/BuildFile.xml +++ b/CondCore/CondDB/plugins/BuildFile.xml @@ -2,4 +2,20 @@ + + + + + + + + + + + + + + + + diff --git a/CondCore/DBCommon/plugins/RelationalAuthenticationService.cc b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc similarity index 94% rename from CondCore/DBCommon/plugins/RelationalAuthenticationService.cc rename to CondCore/CondDB/plugins/RelationalAuthenticationService.cc index 81bdaff3bad92..d737b00bf87ef 100644 --- a/CondCore/DBCommon/plugins/RelationalAuthenticationService.cc +++ b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc @@ -1,8 +1,8 @@ -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Auth.h" +#include "CondCore/CondDB/interface/Exception.h" #include "RelationalAccess/AuthenticationCredentials.h" #include "RelationalAccess/AuthenticationServiceException.h" -#include "CondCore/DBCommon/interface/CoralServiceMacros.h" +#include "CondCore/CondDB/interface/CoralServiceMacros.h" #include "RelationalAuthenticationService.h" // #include "RelationalAccess/AuthenticationServiceException.h" @@ -30,7 +30,7 @@ cond::RelationalAuthenticationService::RelationalAuthenticationService::Relation { boost::function1 cb(boost::bind(&cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, this, _1)); - coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(Auth::COND_AUTH_PATH_PROPERTY)); + coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY)); if(pm){ setAuthenticationPath( pm->get() ); m_callbackID = pm->registerCallback(cb); diff --git a/CondCore/DBCommon/plugins/RelationalAuthenticationService.h b/CondCore/CondDB/plugins/RelationalAuthenticationService.h similarity index 97% rename from CondCore/DBCommon/plugins/RelationalAuthenticationService.h rename to CondCore/CondDB/plugins/RelationalAuthenticationService.h index 7afbce0c484b5..4b5124e84f1d1 100644 --- a/CondCore/DBCommon/plugins/RelationalAuthenticationService.h +++ b/CondCore/CondDB/plugins/RelationalAuthenticationService.h @@ -1,7 +1,7 @@ #ifndef COND_XMLAUTHENTITACTIONSERVICE_H #define COND_XMLAUTHENTITACTIONSERVICE_H -#include "CondCore/DBCommon/interface/CredentialStore.h" +#include "CondCore/CondDB/interface/CredentialStore.h" // #include "RelationalAccess/IAuthenticationService.h" #include "CoralKernel/Service.h" diff --git a/CondCore/DBCommon/plugins/XMLAuthenticationService.cc b/CondCore/CondDB/plugins/XMLAuthenticationService.cc similarity index 98% rename from CondCore/DBCommon/plugins/XMLAuthenticationService.cc rename to CondCore/CondDB/plugins/XMLAuthenticationService.cc index 5e0984d999dca..f9dd34fb4dfe5 100644 --- a/CondCore/DBCommon/plugins/XMLAuthenticationService.cc +++ b/CondCore/CondDB/plugins/XMLAuthenticationService.cc @@ -1,14 +1,13 @@ -//#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/FileUtils.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Auth.h" +#include "CondCore/CondDB/interface/FileUtils.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/Auth.h" #include "RelationalAccess/AuthenticationCredentials.h" #include "CoralCommon/Cipher.h" #include "RelationalAccess/AuthenticationServiceException.h" #include "CoralKernel/IPropertyManager.h" #include "CoralKernel/Property.h" #include "CoralKernel/Context.h" -#include "CondCore/DBCommon/interface/CoralServiceMacros.h" +#include "CondCore/CondDB/interface/CoralServiceMacros.h" #include "FWCore/Concurrency/interface/Xerces.h" #include "xercesc/parsers/XercesDOMParser.hpp" #include "xercesc/framework/MemBufInputSource.hpp" @@ -96,7 +95,7 @@ cond::XMLAuthenticationService::XMLAuthenticationService::XMLAuthenticationServi { boost::function1 cb(boost::bind(&cond::XMLAuthenticationService::XMLAuthenticationService::setAuthenticationPath, this, _1)); - coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(Auth::COND_AUTH_PATH_PROPERTY)); + coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY)); if(pm){ setAuthenticationPath( pm->get() ); m_callbackID = pm->registerCallback(cb); diff --git a/CondCore/DBCommon/plugins/XMLAuthenticationService.h b/CondCore/CondDB/plugins/XMLAuthenticationService.h similarity index 100% rename from CondCore/DBCommon/plugins/XMLAuthenticationService.h rename to CondCore/CondDB/plugins/XMLAuthenticationService.h diff --git a/CondCore/CondDB/python/CondDB_cfi.py b/CondCore/CondDB/python/CondDB_cfi.py index 5a3927e1b91f2..3c4969ba1988a 100644 --- a/CondCore/CondDB/python/CondDB_cfi.py +++ b/CondCore/CondDB/python/CondDB_cfi.py @@ -4,9 +4,9 @@ DBParameters = cms.PSet( authenticationPath = cms.untracked.string(''), authenticationSystem = cms.untracked.int32(0), + security = cms.untracked.string(''), messageLevel = cms.untracked.int32(0), ), connect = cms.string(''), - dbFormat = cms.untracked.int32(0) ) diff --git a/CondCore/CondDB/python/CondDBboost_cfi.py b/CondCore/CondDB/python/CondDBboost_cfi.py deleted file mode 100644 index 4bdd412977015..0000000000000 --- a/CondCore/CondDB/python/CondDBboost_cfi.py +++ /dev/null @@ -1,12 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -CondDBboost = cms.PSet( - DBParameters = cms.PSet( - authenticationPath = cms.untracked.string(''), - authenticationSystem = cms.untracked.int32(0), - messageLevel = cms.untracked.int32(0), - ), - connect = cms.string('protocol://db/schema'), ##db/schema" - dbFormat = cms.untracked.int32(1) -) - diff --git a/CondCore/DBCommon/src/Cipher.cc b/CondCore/CondDB/src/Cipher.cc similarity index 83% rename from CondCore/DBCommon/src/Cipher.cc rename to CondCore/CondDB/src/Cipher.cc index 7687973129dcb..b0ec8d301de36 100644 --- a/CondCore/DBCommon/src/Cipher.cc +++ b/CondCore/CondDB/src/Cipher.cc @@ -1,5 +1,5 @@ -#include "CondCore/DBCommon/interface/Cipher.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Cipher.h" +#include "CondCore/CondDB/interface/Exception.h" #include // blowfish encryption #include "blowfish.h" @@ -7,17 +7,17 @@ #include "base64.h" #include -cond::Cipher::Cipher( const std::string& key ): +cond::auth::Cipher::Cipher( const std::string& key ): m_ctx(new BLOWFISH_CTX){ char* k = const_cast(key.c_str()); Blowfish_Init( m_ctx, reinterpret_cast(k), key.size()); } -cond::Cipher::~Cipher(){ +cond::auth::Cipher::~Cipher(){ delete m_ctx; } -size_t cond::Cipher::bf_process_alloc( const unsigned char* input, +size_t cond::auth::Cipher::bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt ){ @@ -68,7 +68,7 @@ size_t cond::Cipher::bf_process_alloc( const unsigned char* input, return output_size; } -size_t cond::Cipher::encrypt( const std::string& input, unsigned char*& output ){ +size_t cond::auth::Cipher::encrypt( const std::string& input, unsigned char*& output ){ if( input.empty() ) { output = 0; return 0; @@ -76,7 +76,7 @@ size_t cond::Cipher::encrypt( const std::string& input, unsigned char*& output ) return bf_process_alloc( reinterpret_cast(input.c_str()), input.size(), output, false );; } -std::string cond::Cipher::decrypt( const unsigned char* input, size_t inputSize ){ +std::string cond::auth::Cipher::decrypt( const unsigned char* input, size_t inputSize ){ if( !inputSize ) return ""; unsigned char* out = 0; size_t outSize = bf_process_alloc( input, inputSize, out, true ); @@ -102,7 +102,7 @@ std::string cond::Cipher::decrypt( const unsigned char* input, size_t inputSize return ret; } -std::string cond::Cipher::b64encrypt( const std::string& input ){ +std::string cond::auth::Cipher::b64encrypt( const std::string& input ){ if( input.empty() ) return ""; unsigned char* out = 0; size_t outSize = bf_process_alloc( reinterpret_cast(input.c_str()), input.size(), out, false ); @@ -114,7 +114,7 @@ std::string cond::Cipher::b64encrypt( const std::string& input ){ return ret; } -std::string cond::Cipher::b64decrypt( const std::string& b64in ){ +std::string cond::auth::Cipher::b64decrypt( const std::string& b64in ){ if( b64in.empty() ) return ""; char* input = 0; size_t inputSize = 0; diff --git a/CondCore/CondDB/src/ConnectionPool.cc b/CondCore/CondDB/src/ConnectionPool.cc index 02400141b9e33..cc97b9a28164c 100644 --- a/CondCore/CondDB/src/ConnectionPool.cc +++ b/CondCore/CondDB/src/ConnectionPool.cc @@ -3,8 +3,8 @@ #include "SessionImpl.h" #include "IOVSchema.h" // -#include "CondCore/DBCommon/interface/CoralServiceManager.h" -#include "CondCore/DBCommon/interface/Auth.h" +#include "CondCore/CondDB/interface/CoralServiceManager.h" +#include "CondCore/CondDB/interface/Auth.h" // CMSSW includes #include "FWCore/ParameterSet/interface/ParameterSet.h" // coral includes @@ -39,83 +39,90 @@ namespace cond { m_authSys = authSysCode; } + void ConnectionPool::setFrontierSecurity( const std::string& signature ){ + m_frontierSecurity = signature; + } + void ConnectionPool::setLogging( bool flag ){ m_loggingEnabled = flag; } void ConnectionPool::setParameters( const edm::ParameterSet& connectionPset ){ - setAuthenticationPath( connectionPset.getUntrackedParameter("authenticationPath","") ); - setAuthenticationSystem( connectionPset.getUntrackedParameter("authenticationSystem",0) ); - int messageLevel = connectionPset.getUntrackedParameter("messageLevel",0); - coral::MsgLevel level = coral::Error; + //set the connection parameters from a ParameterSet + //if a parameter is not defined, keep the values already set in the data members + //(i.e. default if no other setters called, or the ones currently available) + setAuthenticationPath( connectionPset.getUntrackedParameter( "authenticationPath", m_authPath ) ); + setAuthenticationSystem( connectionPset.getUntrackedParameter( "authenticationSystem", m_authSys ) ); + setFrontierSecurity( connectionPset.getUntrackedParameter( "security", m_frontierSecurity ) ); + int messageLevel = connectionPset.getUntrackedParameter( "messageLevel", 0 ); //0 corresponds to Error level, current default + coral::MsgLevel level = m_messageLevel; switch (messageLevel) { - case 0 : - level = coral::Error; - break; + case 0: + level = coral::Error; + break; case 1: - level = coral::Warning; - break; + level = coral::Warning; + break; case 2: - level = coral::Info; - break; + level = coral::Info; + break; case 3: - level = coral::Debug; - break; + level = coral::Debug; + break; default: - level = coral::Error; + level = coral::Error; } - setMessageVerbosity(level); - setLogging( connectionPset.getUntrackedParameter("logging",false) ); + setMessageVerbosity( level ); + setLogging( connectionPset.getUntrackedParameter( "logging", m_loggingEnabled ) ); } bool ConnectionPool::isLoggingEnabled() const { return m_loggingEnabled; } - void ConnectionPool::configure( coral::IConnectionServiceConfiguration& coralConfig){ - + void ConnectionPool::configure( coral::IConnectionServiceConfiguration& coralConfig ){ coralConfig.disablePoolAutomaticCleanUp(); coralConfig.disableConnectionSharing(); // message streaming coral::MessageStream::setMsgVerbosity( m_messageLevel ); - std::string authServiceName("CORAL/Services/EnvironmentAuthenticationService"); + std::string authServiceName( "CORAL/Services/EnvironmentAuthenticationService" ); std::string authPath = m_authPath; // authentication if( authPath.empty() ){ // first try to check the env... - const char* authEnv = ::getenv( cond::Auth::COND_AUTH_PATH ); + const char* authEnv = ::getenv( cond::auth::COND_AUTH_PATH ); if(authEnv){ authPath += authEnv; } } int authSys = m_authSys; // first attempt, look at the env... - const char* authSysEnv = ::getenv( cond::Auth::COND_AUTH_SYS ); + const char* authSysEnv = ::getenv( cond::auth::COND_AUTH_SYS ); if( authSysEnv ){ - authSys = ::atoi( authSysEnv ); + authSys = ::atoi( authSysEnv ); } if( authSys !=CondDbKey && authSys != CoralXMLFile ){ - // take the default - authSys = CondDbKey; + // take the default + authSys = CondDbKey; } - std::string servName(""); + std::string servName( "" ); if( authSys == CondDbKey ){ - if( authPath.empty() ){ - const char* authEnv = ::getenv("HOME"); - if(authEnv){ - authPath += authEnv; - } - } - servName = "COND/Services/RelationalAuthenticationService"; + if( authPath.empty() ){ + const char* authEnv = ::getenv( "HOME" ); + if(authEnv) { + authPath += authEnv; + } + } + servName = "COND/Services/RelationalAuthenticationService"; } else if( authSys == CoralXMLFile ){ - if( authPath.empty() ){ - authPath = "."; - } - servName = "COND/Services/XMLAuthenticationService"; + if( authPath.empty() ){ + authPath = "."; + } + servName = "COND/Services/XMLAuthenticationService"; } if( !authPath.empty() ){ authServiceName = servName; - coral::Context::instance().PropertyManager().property(cond::Auth::COND_AUTH_PATH_PROPERTY)->set(authPath); + coral::Context::instance().PropertyManager().property(cond::auth::COND_AUTH_PATH_PROPERTY)->set(authPath); coral::Context::instance().loadComponent( authServiceName, m_pluginManager ); } @@ -128,36 +135,27 @@ namespace cond { } boost::shared_ptr ConnectionPool::createCoralSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable ){ + const std::string& transactionId, + bool writeCapable ){ coral::ConnectionService connServ; - std::pair fullConnectionPars = getConnectionParams( connectionString, transactionId ); + //all sessions opened with this connection service will share the same frontier security option. + std::pair fullConnectionPars = getConnectionParams( connectionString, transactionId, m_frontierSecurity ); if( !fullConnectionPars.second.empty() ) { - // the new schema... - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, TAG::tname, 1 ); - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, IOV::tname, 1 ); - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, PAYLOAD::tname, 3 ); + //all sessions opened with this connection service will share the same TTL settings for TAG, IOV, and PAYLOAD tables. + connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, TAG::tname, 1 ); + connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, IOV::tname, 1 ); + connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, PAYLOAD::tname, 3 ); } return boost::shared_ptr( connServ.connect( fullConnectionPars.first, - writeCapable?Auth::COND_WRITER_ROLE:Auth::COND_READER_ROLE, - writeCapable?coral::Update:coral::ReadOnly ) ); + writeCapable ? auth::COND_WRITER_ROLE : auth::COND_READER_ROLE, + writeCapable ? coral::Update : coral::ReadOnly ) ); } Session ConnectionPool::createSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable ){ - coral::ConnectionService connServ; - std::pair fullConnectionPars = getConnectionParams( connectionString, transactionId ); - if( !fullConnectionPars.second.empty() ) { - // the new schema... - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, TAG::tname, 1 ); - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, IOV::tname, 1 ); - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, PAYLOAD::tname, 3 ); - } - + const std::string& transactionId, + bool writeCapable ){ boost::shared_ptr coralSession = createCoralSession( connectionString, transactionId, writeCapable ); - std::shared_ptr impl( new SessionImpl( coralSession, connectionString ) ); return Session( impl ); } @@ -171,7 +169,7 @@ namespace cond { } boost::shared_ptr ConnectionPool::createCoralSession( const std::string& connectionString, - bool writeCapable ){ + bool writeCapable ){ return createCoralSession( connectionString, "", writeCapable ); } diff --git a/CondCore/DBCommon/src/CoralServiceFactory.cc b/CondCore/CondDB/src/CoralServiceFactory.cc similarity index 88% rename from CondCore/DBCommon/src/CoralServiceFactory.cc rename to CondCore/CondDB/src/CoralServiceFactory.cc index dc094bd08b2c6..804fc79e5bcc5 100644 --- a/CondCore/DBCommon/src/CoralServiceFactory.cc +++ b/CondCore/CondDB/src/CoralServiceFactory.cc @@ -1,5 +1,5 @@ -#include "CondCore/DBCommon/interface/CoralServiceFactory.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/CoralServiceFactory.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CoralKernel/Service.h" EDM_REGISTER_PLUGINFACTORY(cond::CoralServicePluginFactory,"CoralService"); diff --git a/CondCore/DBCommon/src/CoralServiceManager.cc b/CondCore/CondDB/src/CoralServiceManager.cc similarity index 86% rename from CondCore/DBCommon/src/CoralServiceManager.cc rename to CondCore/CondDB/src/CoralServiceManager.cc index 42260c855503a..c096a47c83fad 100644 --- a/CondCore/DBCommon/src/CoralServiceManager.cc +++ b/CondCore/CondDB/src/CoralServiceManager.cc @@ -2,8 +2,8 @@ #include "CoralKernel/ILoadableComponent.h" #include "FWCore/PluginManager/interface/PluginFactory.h" #include "FWCore/PluginManager/interface/PluginInfo.h" -#include "CondCore/DBCommon/interface/CoralServiceManager.h" -#include "CondCore/DBCommon/interface/CoralServiceFactory.h" +#include "CondCore/CondDB/interface/CoralServiceManager.h" +#include "CondCore/CondDB/interface/CoralServiceFactory.h" coral::ILoadableComponent* cond::CoralServiceManager::newComponent( const std::string& componentname ){ return cond::CoralServiceFactory::get()->create(componentname); diff --git a/CondCore/DBCommon/src/CredentialStore.cc b/CondCore/CondDB/src/CredentialStore.cc similarity index 90% rename from CondCore/DBCommon/src/CredentialStore.cc rename to CondCore/CondDB/src/CredentialStore.cc index dda57e7b932d7..cbc6c27e3b573 100644 --- a/CondCore/DBCommon/src/CredentialStore.cc +++ b/CondCore/CondDB/src/CredentialStore.cc @@ -1,12 +1,10 @@ -#include "CondCore/DBCommon/interface/CredentialStore.h" -#include "CondCore/DBCommon/interface/Cipher.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/ORA/interface/SequenceManager.h" +#include "CondCore/CondDB/interface/CredentialStore.h" +#include "CondCore/CondDB/interface/Cipher.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/Auth.h" // #include "CoralBase/AttributeList.h" #include "CoralBase/Attribute.h" -#include "CoralBase/MessageStream.h" #include "CoralKernel/Context.h" #include "CoralCommon/URIParser.h" #include "RelationalAccess/AuthenticationCredentials.h" @@ -49,7 +47,7 @@ void coral_bridge::AuthenticationCredentialSet::reset(){ void coral_bridge::AuthenticationCredentialSet::registerItem( const std::string& connectionString, const std::string& itemName, const std::string& itemValue ){ - registerItem( connectionString, cond::Auth::COND_DEFAULT_ROLE, itemName, itemValue ); + registerItem( connectionString, cond::auth::COND_DEFAULT_ROLE, itemName, itemValue ); } @@ -70,7 +68,7 @@ void coral_bridge::AuthenticationCredentialSet::registerCredentials( const std::string& connectionString, const std::string& userName, const std::string& password ){ - registerCredentials( connectionString, cond::Auth::COND_DEFAULT_ROLE, userName, password ); + registerCredentials( connectionString, cond::auth::COND_DEFAULT_ROLE, userName, password ); } void @@ -100,7 +98,7 @@ void coral_bridge::AuthenticationCredentialSet::import( const AuthenticationCred const coral::IAuthenticationCredentials* coral_bridge::AuthenticationCredentialSet::get( const std::string& connectionString ) const { - return get( connectionString, cond::Auth::COND_DEFAULT_ROLE ); + return get( connectionString, cond::auth::COND_DEFAULT_ROLE ); } const coral::IAuthenticationCredentials* @@ -120,6 +118,8 @@ const std::map< std::pair, coral::AuthenticationCredent } static const std::string SEQUENCE_TABLE_NAME("COND_CREDENTIAL_SEQUENCE"); +static const std::string SEQUENCE_NAME_COL("NAME"); +static const std::string SEQUENCE_VALUE_COL("VALUE"); static const std::string COND_AUTHENTICATION_TABLE("COND_AUTHENTICATION"); static const std::string PRINCIPAL_ID_COL("P_ID"); @@ -353,16 +353,49 @@ void cond::CredentialStore::closeSession( bool commit ){ m_connection.reset(); } +bool getNextSequenceValue( coral::ISchema& schema, const std::string& sequenceName, int& value ){ + bool ret = false; + std::auto_ptr< coral::IQuery > query( schema.tableHandle( SEQUENCE_TABLE_NAME ).newQuery() ); + query->limitReturnedRows( 1, 0 ); + query->addToOutputList( SEQUENCE_VALUE_COL ); + query->defineOutputType( SEQUENCE_VALUE_COL, coral::AttributeSpecification::typeNameForType() ); + query->setForUpdate(); + std::string whereClause( SEQUENCE_NAME_COL + " = :" + SEQUENCE_NAME_COL ); + coral::AttributeList rowData; + rowData.extend( SEQUENCE_NAME_COL ); + rowData.begin()->data< std::string >() = sequenceName; + query->setCondition( whereClause, rowData ); + coral::ICursor& cursor = query->execute(); + if ( cursor.next() ) { + value = cursor.currentRow().begin()->data()+1; + ret = true; + } else { + return false; + } + // update... + coral::AttributeList updateData; + updateData.extend( SEQUENCE_NAME_COL ); + updateData.extend( SEQUENCE_VALUE_COL ); + std::string setClause( SEQUENCE_VALUE_COL + " = :" + SEQUENCE_VALUE_COL ); + std::string whClause( SEQUENCE_NAME_COL + " = :" + SEQUENCE_NAME_COL ); + coral::AttributeList::iterator iAttribute = updateData.begin(); + iAttribute->data< std::string >() = sequenceName; + ++iAttribute; + iAttribute->data< int >() = value; + schema.tableHandle( SEQUENCE_TABLE_NAME ).dataEditor().updateRows( setClause,whClause,updateData ); + return ret; +} + int cond::CredentialStore::addUser( const std::string& principalName, const std::string& authenticationKey, const std::string& principalKey, const std::string& adminKey ){ coral::ISchema& schema = m_session->nominalSchema(); coral::ITableDataEditor& editor0 = schema.tableHandle(COND_AUTHENTICATION_TABLE).dataEditor(); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - int principalId = sequenceMgr.getNextId( COND_AUTHENTICATION_TABLE, true ); + int principalId = -1; + if( !getNextSequenceValue( schema, COND_AUTHENTICATION_TABLE, principalId ) ) throwException( "Can't find "+COND_AUTHENTICATION_TABLE+" sequence.","CredentialStore::addUser" ); - Cipher cipher0( authenticationKey ); - Cipher cipher1( adminKey ); + auth::Cipher cipher0( authenticationKey ); + auth::Cipher cipher1( adminKey ); coral::AttributeList authData; editor0.rowBuffer(authData); @@ -430,7 +463,7 @@ void cond::CredentialStore::startSession( bool readMode ){ throwException( "Invalid credentials provided.(0)", "CredentialStore::openSession"); } - Cipher cipher0( m_key.principalKey() ); + auth::Cipher cipher0( m_key.principalKey() ); std::string verifStr = cipher0.b64decrypt( princData.verifKey ); if( verifStr != principalName ){ throwException( "Invalid credentials provided (1)", @@ -442,7 +475,7 @@ void cond::CredentialStore::startSession( bool readMode ){ if(!readMode ) { - Cipher cipher0( m_principalKey ); + auth::Cipher cipher0( m_principalKey ); std::string adminKey = cipher0.b64decrypt( princData.adminKey ); if( adminKey != m_principalKey ){ // not admin user! @@ -465,7 +498,7 @@ void cond::CredentialStore::startSession( bool readMode ){ whereData.extend(ROLE_COL); whereData.extend(SCHEMA_COL); whereData[ P_ID_COL ].data() = m_principalId; - whereData[ ROLE_COL ].data() = Auth::COND_ADMIN_ROLE; + whereData[ ROLE_COL ].data() = auth::COND_ADMIN_ROLE; whereData[ SCHEMA_COL ].data() = storeConnectionString; std::stringstream whereClause; whereClause << "AUTHO."<< C_ID_COL << " = CREDS."<(); const std::string& encryptedConnectionKey = row[ "CREDS."+CONNECTION_KEY_COL ].data(); std::string connectionKey = cipher0.b64decrypt( encryptedConnectionKey ); - Cipher cipher1( connectionKey ); + auth::Cipher cipher1( connectionKey ); const std::string& encryptedUserName = row[ "CREDS."+USERNAME_COL ].data(); const std::string& encryptedPassword = row[ "CREDS."+PASSWORD_COL ].data(); const std::string& verificationKey = row[ "CREDS."+VERIFICATION_KEY_COL ].data(); @@ -513,7 +546,7 @@ void cond::CredentialStore::startSession( bool readMode ){ bool cond::CredentialStore::setPermission( int principalId, const std::string& principalKey, const std::string& role, const std::string& connectionString, int connectionId, const std::string& connectionKey ){ coral::ISchema& schema = m_session->nominalSchema(); - Cipher cipher( principalKey ); + auth::Cipher cipher( principalKey ); std::string encryptedConnectionKey = cipher.b64encrypt( connectionKey ); AuthorizationData authData; @@ -533,8 +566,8 @@ bool cond::CredentialStore::setPermission( int principalId, const std::string& p editor.updateRows( setCl,whereCl, updateData ); } else { - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - int next = sequenceMgr.getNextId( COND_AUTHORIZATION_TABLE, true ); + int next = -1; + if( !getNextSequenceValue( schema, COND_AUTHORIZATION_TABLE, next ) ) throwException( "Can't find "+COND_AUTHORIZATION_TABLE+" sequence.","CredentialStore::setPermission" ); coral::AttributeList insertData; insertData.extend( AUTH_ID_COL ); @@ -563,13 +596,13 @@ std::pair cond::CredentialStore::updateConnection( const std::s bool found = selectConnection( schema, connectionLabel, credsData ); int connId = credsData.id; - Cipher adminCipher( m_principalKey ); + auth::Cipher adminCipher( m_principalKey ); std::string connectionKey(""); coral::ITableDataEditor& editor = schema.tableHandle(COND_CREDENTIAL_TABLE).dataEditor(); if( found ){ connectionKey = adminCipher.b64decrypt( credsData.connectionKey ); - Cipher cipher( connectionKey ); + auth::Cipher cipher( connectionKey ); std::string verificationKey = cipher.b64decrypt( credsData.verificationKey ); if( verificationKey != connectionLabel ){ throwException("Decoding of connection key failed.","CredentialStore::updateConnection"); @@ -595,15 +628,14 @@ std::pair cond::CredentialStore::updateConnection( const std::s if(!found){ - KeyGenerator gen; - connectionKey = gen.make( Auth::COND_DB_KEY_SIZE ); - Cipher cipher( connectionKey ); + auth::KeyGenerator gen; + connectionKey = gen.make( auth::COND_DB_KEY_SIZE ); + auth::Cipher cipher( connectionKey ); std::string encryptedUserName = cipher.b64encrypt( userName ); std::string encryptedPassword = cipher.b64encrypt( password ); std::string encryptedLabel = cipher.b64encrypt( connectionLabel ); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - connId = sequenceMgr.getNextId( COND_CREDENTIAL_TABLE, true ); + if( !getNextSequenceValue( schema, COND_CREDENTIAL_TABLE, connId ) ) throwException( "Can't find "+COND_CREDENTIAL_TABLE+" sequence.","CredentialStore::updateConnection" ); coral::AttributeList insertData; insertData.extend( CONNECTION_ID_COL ); @@ -635,7 +667,7 @@ std::pair cond::CredentialStore::updateConnection( const std::s authData.extend( C_ID_COL ); authData[ AUTH_ID_COL ].data() = authId; authData[ P_ID_COL ].data() = m_principalId; - authData[ ROLE_COL ].data() = Auth::COND_ADMIN_ROLE; + authData[ ROLE_COL ].data() = auth::COND_ADMIN_ROLE; authData[ SCHEMA_COL ].data() = defaultConnectionString( m_serviceData->connectionString, m_serviceName, userName ); authData[ AUTH_KEY_COL ].data() = adminCipher.b64encrypt( connectionKey ) ; authData[ C_ID_COL ].data() = connId; @@ -674,12 +706,12 @@ cond::CredentialStore::setUpForService( const std::string& serviceName, if(!boost::filesystem::exists(authPath) || !boost::filesystem::is_directory( authPath )){ throwException( "Authentication Path is invalid.","cond::CredentialStore::setUpForService" ); } - boost::filesystem::path file( DecodingKey::FILE_PATH ); + boost::filesystem::path file( auth::DecodingKey::FILE_PATH ); fullPath /= file; - m_key.init( fullPath.string(), Auth::COND_KEY ); + m_key.init( fullPath.string(), auth::COND_KEY ); - std::map< std::string, ServiceCredentials >::const_iterator iK = m_key.services().find( serviceName ); + std::map< std::string, auth::ServiceCredentials >::const_iterator iK = m_key.services().find( serviceName ); if( iK == m_key.services().end() ){ std::string msg(""); msg += "Service \""+serviceName+"\" can't be open with the current key."; @@ -704,6 +736,17 @@ cond::CredentialStore::setUpForConnectionString( const std::string& connectionSt return setUpForService( serviceName, authPath ); } +void addSequence( coral::ISchema& schema, const std::string& name ){ + // Create the entry in the table + coral::AttributeList insertData; + insertData.extend( SEQUENCE_NAME_COL ); + insertData.extend(SEQUENCE_VALUE_COL); + coral::AttributeList::iterator iAttribute = insertData.begin(); + iAttribute->data< std::string >() = name; + ++iAttribute; + iAttribute->data< int >() = -1; + schema.tableHandle( SEQUENCE_TABLE_NAME ).dataEditor().insertRow( insertData ); +} bool cond::CredentialStore::createSchema( const std::string& connectionString, const std::string& userName, const std::string& password ) { @@ -714,11 +757,22 @@ cond::CredentialStore::createSchema( const std::string& connectionString, const if(schema.existsTable(COND_AUTHENTICATION_TABLE)) { throwException("Credential database, already exists.","CredentialStore::create"); } - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME, schema ); + + coral::TableDescription dseq; + dseq.setName( SEQUENCE_TABLE_NAME ); + + dseq.insertColumn( SEQUENCE_NAME_COL, coral::AttributeSpecification::typeNameForType() ); + dseq.setNotNullConstraint( SEQUENCE_NAME_COL ); + dseq.insertColumn( SEQUENCE_VALUE_COL,coral::AttributeSpecification::typeNameForType() ); + dseq.setNotNullConstraint( SEQUENCE_VALUE_COL ); + dseq.setPrimaryKey( std::vector< std::string >( 1, SEQUENCE_NAME_COL ) ); + schema.createTable( dseq ); + int columnSize = 2000; // authentication table - sequenceMgr.create( COND_AUTHENTICATION_TABLE ); + + addSequence( schema, COND_AUTHENTICATION_TABLE ); coral::TableDescription descr0; descr0.setName( COND_AUTHENTICATION_TABLE ); descr0.insertColumn( PRINCIPAL_ID_COL, coral::AttributeSpecification::typeNameForType()); @@ -740,7 +794,7 @@ cond::CredentialStore::createSchema( const std::string& connectionString, const schema.createTable( descr0 ); // authorization table - sequenceMgr.create( COND_AUTHORIZATION_TABLE ); + addSequence( schema, COND_AUTHORIZATION_TABLE ); coral::TableDescription descr1; descr1.setName( COND_AUTHORIZATION_TABLE ); descr1.insertColumn( AUTH_ID_COL, coral::AttributeSpecification::typeNameForType()); @@ -766,7 +820,7 @@ cond::CredentialStore::createSchema( const std::string& connectionString, const schema.createTable( descr1 ); // credential table - sequenceMgr.create( COND_CREDENTIAL_TABLE ); + addSequence( schema, COND_CREDENTIAL_TABLE ); coral::TableDescription descr2; descr2.setName( COND_CREDENTIAL_TABLE ); descr2.insertColumn( CONNECTION_ID_COL, coral::AttributeSpecification::typeNameForType()); @@ -828,16 +882,16 @@ bool cond::CredentialStore::installAdmin( const std::string& userName, const std throwException(msg,"CredentialStore::installAdmin"); } - KeyGenerator gen; - m_principalKey = gen.make( Auth::COND_DB_KEY_SIZE ); + auth::KeyGenerator gen; + m_principalKey = gen.make( auth::COND_DB_KEY_SIZE ); coral::ITableDataEditor& editor0 = schema.tableHandle(COND_AUTHENTICATION_TABLE).dataEditor(); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - int principalId = sequenceMgr.getNextId( COND_AUTHENTICATION_TABLE, true ); + int principalId = -1; + if( !getNextSequenceValue( schema, COND_AUTHENTICATION_TABLE, principalId ) ) throwException( "Can't find "+COND_AUTHENTICATION_TABLE+" sequence.","CredentialStore::installAdmin" ); - Cipher cipher0( m_key.principalKey() ); - Cipher cipher1( m_principalKey ); + auth::Cipher cipher0( m_key.principalKey() ); + auth::Cipher cipher1( m_principalKey ); coral::AttributeList authData; editor0.rowBuffer(authData); @@ -849,16 +903,17 @@ bool cond::CredentialStore::installAdmin( const std::string& userName, const std editor0.insertRow( authData ); std::string connLabel = schemaLabelForCredentialStore( connectionString ); - DecodingKey tmpKey; - std::string connectionKey = gen.make( Auth::COND_DB_KEY_SIZE ); + auth::DecodingKey tmpKey; + std::string connectionKey = gen.make( auth::COND_DB_KEY_SIZE ); std::string encryptedConnectionKey = cipher1.b64encrypt( connectionKey ); - Cipher cipher2( connectionKey ); + auth::Cipher cipher2( connectionKey ); std::string encryptedUserName = cipher2.b64encrypt( userName ); std::string encryptedPassword = cipher2.b64encrypt( password ); std::string encryptedLabel = cipher2.b64encrypt( connLabel ); - int connId = sequenceMgr.getNextId( COND_CREDENTIAL_TABLE, true ); + int connId = -1; + if( !getNextSequenceValue( schema, COND_CREDENTIAL_TABLE, connId ) ) throwException( "Can't find "+COND_CREDENTIAL_TABLE+" sequence.","CredentialStore::installAdmin" ); coral::ITableDataEditor& editor1 = schema.tableHandle(COND_CREDENTIAL_TABLE).dataEditor(); coral::AttributeList connectionData; @@ -871,14 +926,15 @@ bool cond::CredentialStore::installAdmin( const std::string& userName, const std connectionData[ CONNECTION_KEY_COL ].data() = encryptedConnectionKey; editor1.insertRow( connectionData ); - int authId = sequenceMgr.getNextId( COND_AUTHORIZATION_TABLE, true ); + int authId = -1; + if( !getNextSequenceValue( schema, COND_AUTHORIZATION_TABLE, authId ) ) throwException( "Can't find "+COND_AUTHORIZATION_TABLE+" sequence.","CredentialStore::installAdmin" ); coral::ITableDataEditor& editor2 = schema.tableHandle(COND_AUTHORIZATION_TABLE).dataEditor(); coral::AttributeList permissionData; editor2.rowBuffer(permissionData); permissionData[ AUTH_ID_COL ].data() = authId; permissionData[ P_ID_COL ].data() = principalId; - permissionData[ ROLE_COL ].data() = Auth::COND_ADMIN_ROLE; + permissionData[ ROLE_COL ].data() = auth::COND_ADMIN_ROLE; permissionData[ SCHEMA_COL ].data() = connectionString; permissionData[ AUTH_KEY_COL ].data() = encryptedConnectionKey; permissionData[ C_ID_COL ].data() = connId; @@ -899,8 +955,8 @@ bool cond::CredentialStore::updatePrincipal( const std::string& principalName, PrincipalData princData; bool found = selectPrincipal( schema, principalName, princData ); - Cipher adminCipher( m_principalKey ); - Cipher cipher( authenticationKey ); + auth::Cipher adminCipher( m_principalKey ); + auth::Cipher cipher( authenticationKey ); std::string verifStr = cipher.b64encrypt( principalName ); std::string principalKey(""); if( setAdmin ) principalKey = m_principalKey; @@ -926,14 +982,13 @@ bool cond::CredentialStore::updatePrincipal( const std::string& principalName, editor.updateRows( setClause.str(),whereClause, updateData ); } else { if( principalKey.empty() ) { - KeyGenerator gen; - principalKey = gen.make( Auth::COND_DB_KEY_SIZE ); + auth::KeyGenerator gen; + principalKey = gen.make( auth::COND_DB_KEY_SIZE ); } coral::ITableDataEditor& editor0 = schema.tableHandle(COND_AUTHENTICATION_TABLE).dataEditor(); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - principalId = sequenceMgr.getNextId( COND_AUTHENTICATION_TABLE, true ); + if( !getNextSequenceValue( schema, COND_AUTHENTICATION_TABLE, principalId ) ) throwException( "Can't find "+COND_AUTHENTICATION_TABLE+" sequence.","CredentialStore::updatePrincipal" ); coral::AttributeList authData; editor0.rowBuffer(authData); @@ -953,7 +1008,7 @@ bool cond::CredentialStore::updatePrincipal( const std::string& principalName, if(!found){ throwException("Credential Store connection has not been defined.","CredentialStore::updatePrincipal"); } - setPermission( principalId, principalKey, Auth::COND_ADMIN_ROLE, connString, credsData.id, adminCipher.b64decrypt( credsData.connectionKey ) ); + setPermission( principalId, principalKey, auth::COND_ADMIN_ROLE, connString, credsData.id, adminCipher.b64decrypt( credsData.connectionKey ) ); } session.close(); @@ -986,7 +1041,7 @@ bool cond::CredentialStore::setPermission( const std::string& principal, throwException( msg, "CredentialStore::setPermission"); } - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); bool ret = setPermission( princData.id, cipher.b64decrypt( princData.adminKey), role, connectionString, credsData.id, cipher.b64decrypt( credsData.connectionKey ) ); session.close(); return ret; @@ -1111,7 +1166,7 @@ bool cond::CredentialStore::selectForUser( coral_bridge::AuthenticationCredentia session.start( true ); coral::ISchema& schema = m_session->nominalSchema(); - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); std::auto_ptr query(schema.newQuery()); query->addToTableList(COND_AUTHORIZATION_TABLE, "AUTHO"); @@ -1150,7 +1205,7 @@ bool cond::CredentialStore::selectForUser( coral_bridge::AuthenticationCredentia const std::string& encryptedPassword = row[ "CREDS."+PASSWORD_COL ].data(); const std::string& encryptedLabel = row[ "CREDS."+VERIFICATION_KEY_COL ].data(); std::string authKey = cipher.b64decrypt( encryptedAuthKey ); - Cipher connCipher( authKey ); + auth::Cipher connCipher( authKey ); if( connCipher.b64decrypt( encryptedLabel ) == connectionLabel ){ destinationData.registerCredentials( connectionString, role, connCipher.b64decrypt( encryptedUserName ), connCipher.b64decrypt( encryptedPassword ) ); } @@ -1175,7 +1230,7 @@ bool cond::CredentialStore::importForPrincipal( const std::string& principal, } bool imported = false; - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); std::string princKey = cipher.b64decrypt( princData.adminKey); const std::map< std::pair, coral::AuthenticationCredentials* >& creds = dataSource.data(); @@ -1189,7 +1244,7 @@ bool cond::CredentialStore::importForPrincipal( const std::string& principal, std::string password = iConn->second->valueForItem( coral::IAuthenticationCredentials::passwordItem()); // first import the connections std::pair conn = updateConnection( schemaLabel( serviceName, userName ), userName, password, forceUpdateConnection ); - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); // than set the permission for the specific role setPermission( princData.id, princKey, role, connectionString, conn.first, conn.second ); imported = true; @@ -1241,7 +1296,7 @@ bool cond::CredentialStore::listConnections( std::mapaddToOutputList( CONNECTION_KEY_COL ); coral::ICursor& cursor = query->execute(); bool found = false; - Cipher cipher0(m_principalKey ); + auth::Cipher cipher0(m_principalKey ); while ( cursor.next() ) { std::string userName(""); std::string password(""); @@ -1250,7 +1305,7 @@ bool cond::CredentialStore::listConnections( std::map(); const std::string& encryptedVerif = row[ VERIFICATION_KEY_COL].data(); std::string connKey = cipher0.b64decrypt( encryptedKey ); - Cipher cipher1( connKey ); + auth::Cipher cipher1( connKey ); std::string verif = cipher1.b64decrypt( encryptedVerif ); if( verif == connLabel ){ const std::string& encryptedUserName = row[ USERNAME_COL].data(); @@ -1356,7 +1411,7 @@ bool cond::CredentialStore::exportAll( coral_bridge::AuthenticationCredentialSet query->setCondition( whereClause.str(), whereData ); coral::ICursor& cursor = query->execute(); bool found = false; - Cipher cipher0( m_principalKey ); + auth::Cipher cipher0( m_principalKey ); while ( cursor.next() ) { const coral::AttributeList& row = cursor.currentRow(); const std::string& role = row[ "AUTHO."+ROLE_COL ].data(); @@ -1367,7 +1422,7 @@ bool cond::CredentialStore::exportAll( coral_bridge::AuthenticationCredentialSet std::string userName(""); std::string password(""); std::string connectionKey = cipher0.b64decrypt( encryptedConnection ); - Cipher cipher1( connectionKey ); + auth::Cipher cipher1( connectionKey ); std::string verifKey = cipher1.b64decrypt( encryptedVerifKey ); if( verifKey == connectionLabel ){ const std::string& encryptedUserName = row[ "CREDS."+USERNAME_COL].data(); diff --git a/CondCore/CondDB/src/DbConnectionString.cc b/CondCore/CondDB/src/DbConnectionString.cc index b99c8608b2a2a..14ac4f4751e00 100644 --- a/CondCore/CondDB/src/DbConnectionString.cc +++ b/CondCore/CondDB/src/DbConnectionString.cc @@ -2,7 +2,7 @@ #include "CondCore/CondDB/interface/Utils.h" #include "DbConnectionString.h" // -#include "CondCore/DBCommon/interface/FipProtocolParser.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" #include "FWCore/Catalog/interface/SiteLocalConfig.h" #include "FWCore/ServiceRegistry/interface/Service.h" @@ -10,62 +10,84 @@ namespace cond { namespace persistency { - - unsigned int - countslash(const std::string& input) { - unsigned int count=0; + unsigned int countslash( const std::string& input ) { + unsigned int count = 0; std::string::size_type slashpos( 0 ); - while( slashpos!=std::string::npos){ - slashpos = input.find('/', slashpos ); - if ( slashpos != std::string::npos ){ - ++count; - // start next search after this word - slashpos += 1; - } + while( slashpos != std::string::npos ) { + slashpos = input.find('/', slashpos ); + if( slashpos != std::string::npos ) { + ++count; + // start next search after this word + slashpos += 1; + } } return count; } + std::string parseFipConnectionString( const std::string& fipConnect ){ + std::string connect( "sqlite_file:" ); + std::string::size_type pos = fipConnect.find( ':' ); + std::string fipLocation = fipConnect.substr( pos+1 ); + edm::FileInPath fip( fipLocation ); + connect.append( fip.fullPath() ); + return connect; + } + + //FIXME: sdg this function does not support frontier connections strings like + //frontier://cmsfrontier.cern.ch:8000/FrontierPrep/CMS_CONDITIONS + //as http://cmsfrontier.cern.ch:8000/FrontierPrep(freshkey=foo) is an invalid URI. std::pair getConnectionParams( const std::string& connectionString, - const std::string& transactionId ){ - if( connectionString.empty() ) throwException( "The connection string is empty.","getConnectionParams"); + const std::string& transactionId, + const std::string& signature ) { + if( connectionString.empty() ) cond::throwException( "The connection string is empty.", "getConnectionParams" ); std::string protocol = getConnectionProtocol( connectionString ); std::string finalConn = connectionString; - std::string refreshConn(""); - if( protocol == "frontier" ){ - std::string protocol("frontier://"); - std::string::size_type fpos=connectionString.find(protocol); - unsigned int nslash=countslash(connectionString.substr(protocol.size(),connectionString.size()-fpos)); - if(nslash==1){ - edm::Service localconfservice; - if( !localconfservice.isAvailable() ){ - throwException("edm::SiteLocalConfigService is not available","getConnectionParams"); - } - finalConn=localconfservice->lookupCalibConnect(connectionString); - } - if (!transactionId.empty()) { - size_t l = finalConn.rfind('/'); - finalConn.insert(l,"(freshkey="+transactionId+')'); - } + std::string refreshConn( "" ); + if( protocol == "frontier" ) { + std::string protocol( "frontier://" ); + std::string::size_type fpos = connectionString.find( protocol ); + unsigned int nslash = countslash( connectionString.substr( protocol.size(), connectionString.size() - fpos ) ); + if( nslash==1 ) { + edm::Service localconfservice; + if( !localconfservice.isAvailable() ) { + cond::throwException( "edm::SiteLocalConfigService is not available", "getConnectionParams" ); + } + finalConn = localconfservice->lookupCalibConnect( connectionString ); + } + if( !transactionId.empty() ) { + size_t l = finalConn.rfind('/'); + finalConn.insert( l, "(freshkey="+transactionId+')' ); + } + + //When the signature parameter is set to sig, FroNTier requests that the server sends digital signatures on every response. + //We test here that the signature string, if defined, is actually set to sig, otherwise we throw an exception + std::string signatureParameter( "sig" ); + if( !signature.empty() ) { + if( signature.compare( signatureParameter ) == 0 ) { + std::string::size_type s = finalConn.rfind('/'); + finalConn.insert( s, "(security="+signature+')' ); + } else { + cond::throwException( "The FroNTier security option is invalid.", "getConnectionParams" ); + } + } - std::string::size_type startRefresh = finalConn.find("://"); - if (startRefresh != std::string::npos){ - startRefresh += 3; - } - std::string::size_type endRefresh=finalConn.rfind("/", std::string::npos); - if (endRefresh == std::string::npos){ - refreshConn = finalConn; - } else{ - refreshConn = finalConn.substr(startRefresh, endRefresh-startRefresh); - if(refreshConn.substr(0,1) != "("){ - //if the connect string is not a complicated parenthesized string, - // an http:// needs to be at the beginning of it - refreshConn.insert(0, "http://"); - } - } - } else if ( protocol == "sqlite_fip" ){ - cond::FipProtocolParser parser; - finalConn = parser.getRealConnect( connectionString ); + std::string::size_type startRefresh = finalConn.find( "://" ); + if( startRefresh != std::string::npos ) { + startRefresh += 3; + } + std::string::size_type endRefresh=finalConn.rfind( "/", std::string::npos ); + if( endRefresh == std::string::npos ) { + refreshConn = finalConn; + } else { + refreshConn = finalConn.substr( startRefresh, endRefresh - startRefresh ); + if( refreshConn.substr( 0, 1 ) != "(" ) { + //if the connect string is not a complicated parenthesized string, + // an http:// needs to be at the beginning of it + refreshConn.insert( 0, "http://" ); + } + } + } else if( protocol == "sqlite_fip" ) { + finalConn = parseFipConnectionString( connectionString ); } return std::make_pair( finalConn, refreshConn ); } diff --git a/CondCore/CondDB/src/DbConnectionString.h b/CondCore/CondDB/src/DbConnectionString.h index 6c28219286c75..cbdbbb0a4b474 100644 --- a/CondCore/CondDB/src/DbConnectionString.h +++ b/CondCore/CondDB/src/DbConnectionString.h @@ -9,7 +9,7 @@ namespace cond { namespace persistency { - std::pair getConnectionParams( const std::string& initialConnection, const std::string& transId ); + std::pair getConnectionParams( const std::string& initialConnection, const std::string& transId, const std::string& signature ); } diff --git a/CondCore/CondDB/src/DbCore.h b/CondCore/CondDB/src/DbCore.h index 74a74d0414200..994e4dd206a9c 100644 --- a/CondCore/CondDB/src/DbCore.h +++ b/CondCore/CondDB/src/DbCore.h @@ -46,7 +46,7 @@ // macros for the schema definition // table definition -#define table( NAME ) namespace NAME {\ +#define conddb_table( NAME ) namespace NAME {\ static constexpr char const* tname = #NAME ;\ }\ namespace NAME @@ -71,7 +71,7 @@ #define SELECT_COLUMN_MACRO(...) GET_4TH_ARG(__VA_ARGS__, FIXSIZE_COLUMN, VARSIZE_COLUMN, WRONG_PAR_NUMBER_ERROR ) // the final column definition macro -#define column( ... ) SELECT_COLUMN_MACRO(__VA_ARGS__)(__VA_ARGS__) +#define conddb_column( ... ) SELECT_COLUMN_MACRO(__VA_ARGS__)(__VA_ARGS__) namespace cond { diff --git a/CondCore/DBCommon/src/DecodingKey.cc b/CondCore/CondDB/src/DecodingKey.cc similarity index 90% rename from CondCore/DBCommon/src/DecodingKey.cc rename to CondCore/CondDB/src/DecodingKey.cc index e5a0079f0c628..b72c829a19546 100644 --- a/CondCore/DBCommon/src/DecodingKey.cc +++ b/CondCore/CondDB/src/DecodingKey.cc @@ -1,7 +1,7 @@ -#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/FileUtils.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Cipher.h" +#include "CondCore/CondDB/interface/DecodingKey.h" +#include "CondCore/CondDB/interface/FileUtils.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/Cipher.h" // #include #include @@ -71,7 +71,7 @@ namespace cond { } -std::string cond::KeyGenerator::make( size_t keySize ){ +std::string cond::auth::KeyGenerator::make( size_t keySize ){ ::srand( m_iteration+2 ); int rseed = ::rand(); int seed = ::time( NULL)%10 + rseed; @@ -84,7 +84,7 @@ std::string cond::KeyGenerator::make( size_t keySize ){ return ret; } -std::string cond::KeyGenerator::makeWithRandomSize( size_t maxSize ){ +std::string cond::auth::KeyGenerator::makeWithRandomSize( size_t maxSize ){ ::srand( m_iteration+2 ); int rseed = ::rand(); int seed = ::time( NULL)%10 + rseed; @@ -93,10 +93,7 @@ std::string cond::KeyGenerator::makeWithRandomSize( size_t maxSize ){ return make( sz ); } -const std::string cond::DecodingKey::FILE_NAME("db.key"); -const std::string cond::DecodingKey::FILE_PATH(".cms_cond/"+FILE_NAME); - -std::string cond::DecodingKey::templateFile(){ +std::string cond::auth::DecodingKey::templateFile(){ std::stringstream s; s<"<"< +#include + +bool cond::FileReader::read(const std::string& fileName){ + std::ifstream inputFile; + inputFile.open (fileName.c_str()); + if(!inputFile.good()){ + std::stringstream msg; + msg << "File \"" << fileName << "\" cannot be open."; + inputFile.close(); + throw cond::Exception(msg.str()); + } + // get pointer to associated buffer object + std::filebuf* pbuf=inputFile.rdbuf(); + // get file size using buffer's members + long size=pbuf->pubseekoff (0,std::ios::end,std::ios::in); + pbuf->pubseekpos (0,std::ios::in); + // allocate memory to contain file data + char* buffer=new char[size+1]; + // get file data + pbuf->sgetn (buffer,size); + inputFile.close(); + buffer[size]=0; + m_content += buffer; + delete [] buffer; + return true; +} diff --git a/CondCore/CondDB/src/GTSchema.h b/CondCore/CondDB/src/GTSchema.h index 72056883192f6..56be5b5ec6038 100644 --- a/CondCore/CondDB/src/GTSchema.h +++ b/CondCore/CondDB/src/GTSchema.h @@ -10,14 +10,14 @@ namespace cond { namespace persistency { - table( GLOBAL_TAG ) { + conddb_table( GLOBAL_TAG ) { - column( NAME, std::string ); - column( VALIDITY, cond::Time_t ); - column( DESCRIPTION, std::string ); - column( RELEASE, std::string ); - column( SNAPSHOT_TIME, boost::posix_time::ptime ); - column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( NAME, std::string ); + conddb_column( VALIDITY, cond::Time_t ); + conddb_column( DESCRIPTION, std::string ); + conddb_column( RELEASE, std::string ); + conddb_column( SNAPSHOT_TIME, boost::posix_time::ptime ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); class Table : public IGTTable { public: @@ -38,16 +38,16 @@ namespace cond { }; } - table ( GLOBAL_TAG_MAP ) { + conddb_table ( GLOBAL_TAG_MAP ) { static constexpr unsigned int PAYLOAD_HASH_SIZE = 40; - column( GLOBAL_TAG_NAME, std::string ); + conddb_column( GLOBAL_TAG_NAME, std::string ); // to be changed to RECORD_NAME! - column( RECORD, std::string ); + conddb_column( RECORD, std::string ); // to be changed to RECORD_LABEL! - column( LABEL, std::string ); - column( TAG_NAME, std::string ); + conddb_column( LABEL, std::string ); + conddb_column( TAG_NAME, std::string ); class Table : public IGTMapTable { public: diff --git a/CondCore/CondDB/src/IDbSchema.h b/CondCore/CondDB/src/IDbSchema.h index 92f64379bb445..500d5c9020f7c 100644 --- a/CondCore/CondDB/src/IDbSchema.h +++ b/CondCore/CondDB/src/IDbSchema.h @@ -90,6 +90,15 @@ namespace cond { const boost::posix_time::ptime& insertionTime ) = 0; }; + class ITagLogTable { + public: + virtual ~ITagLogTable(){} + virtual bool exists() = 0; + virtual void create() = 0; + virtual void insert( const std::string& tag, const boost::posix_time::ptime& eventTime, const std::string& userName, const std::string& hostName, + const std::string& command, const std::string& action, const std::string& userText ) = 0; + }; + class IIOVSchema { public: virtual ~IIOVSchema(){} @@ -98,9 +107,7 @@ namespace cond { virtual ITagTable& tagTable() = 0; virtual IIOVTable& iovTable() = 0; virtual IPayloadTable& payloadTable() = 0; - virtual ITagMigrationTable& tagMigrationTable() = 0; - virtual IPayloadMigrationTable& payloadMigrationTable() = 0; - virtual std::string parsePoolToken( const std::string& poolToken ) = 0; + virtual ITagLogTable& tagLogTable() = 0; }; class IGTTable { diff --git a/CondCore/CondDB/src/IOVEditor.cc b/CondCore/CondDB/src/IOVEditor.cc index 8ffcca7274dc1..61f8247e8ea82 100644 --- a/CondCore/CondDB/src/IOVEditor.cc +++ b/CondCore/CondDB/src/IOVEditor.cc @@ -1,4 +1,5 @@ #include "CondCore/CondDB/interface/IOVEditor.h" +#include "CondCore/CondDB/interface/Utils.h" #include "SessionImpl.h" // @@ -150,56 +151,80 @@ namespace cond { bool iovSorter( const std::tuple& f, const std::tuple& s ){ return std::get<0>(f) < std::get<0>(s); } - - bool IOVEditor::flush( const boost::posix_time::ptime& operationTime ){ + + bool IOVEditor::flush( const std::string& logText, const boost::posix_time::ptime& operationTime ){ bool ret = false; checkTransaction( "IOVEditor::flush" ); if( m_data->change ){ if( m_data->description.empty() ) throwException( "A non-empty description string is mandatory.","IOVEditor::flush" ); if( m_data->validationMode ) m_session->iovSchema().tagTable().setValidationMode(); if( !m_data->exists ){ + // set the creation time ( only available in the migration from v1...) + if( m_data->creationTime.is_not_a_date_time() ) m_data->creationTime = operationTime; m_session->iovSchema().tagTable().insert( m_data->tag, m_data->timeType, m_data->payloadType, m_data->synchronizationType, m_data->endOfValidity, m_data->description, m_data->lastValidatedTime, m_data->creationTime ); + if( m_session->iovSchema().tagLogTable().exists() ) + m_session->iovSchema().tagLogTable().insert( m_data->tag, m_data->creationTime, cond::getUserName(),cond::getHostName(), cond::getCommand(), + std::string("New tag created."),std::string("-") ); m_data->exists = true; ret = true; } else { m_session->iovSchema().tagTable().update( m_data->tag, m_data->endOfValidity, m_data->description, m_data->lastValidatedTime, operationTime ); + if( m_session->iovSchema().tagLogTable().exists() ) + m_session->iovSchema().tagLogTable().insert( m_data->tag, operationTime, cond::getUserName(),cond::getHostName(), cond::getCommand(), + std::string("Tag header updated."),std::string("-") ); ret = true; } m_data->change = false; } if( m_data->iovBuffer.size() ) { - std::sort(m_data->iovBuffer.begin(),m_data->iovBuffer.end(),iovSorter); - cond::Time_t l = std::get<0>(m_data->iovBuffer.front()); - if( m_data->synchronizationType != cond::SYNCH_ANY && m_data->synchronizationType != cond::SYNCH_VALIDATION ){ - // retrieve the last since - cond::Time_t last = 0; - cond::Hash h; - m_session->iovSchema().iovTable().getLastIov( m_data->tag, last, h ); - // check if the min iov is greater then the last since - if( l <= last ){ - std::stringstream msg; - msg << "Can't insert iov since "<tag<<": last since is "<synchronizationType )<<"\""; - throwException( msg.str(),"IOVEditor::flush"); - } - } - + cond::Time_t l = std::get<0>(m_data->iovBuffer.front()); + if( m_data->synchronizationType != cond::SYNCH_ANY && m_data->synchronizationType != cond::SYNCH_VALIDATION ){ + // retrieve the last since + cond::Time_t last = 0; + cond::Hash h; + m_session->iovSchema().iovTable().getLastIov( m_data->tag, last, h ); + // check if the min iov is greater then the last since + if( l <= last ){ + std::stringstream msg; + msg << "Can't insert iov since "<tag<<": last since is "<synchronizationType )<<"\""; + throwException( msg.str(),"IOVEditor::flush"); + } + } + // set the insertion time ( only for the migration from v1 will be available... ) + for( auto& iov : m_data->iovBuffer ){ + boost::posix_time::ptime& insertionTime = std::get<2>(iov); + if( insertionTime.is_not_a_date_time() ) insertionTime = operationTime; + } // insert the new iovs m_session->iovSchema().iovTable().insertMany( m_data->tag, m_data->iovBuffer ); + std::stringstream msg; + msg << m_data->iovBuffer.size() << " iov(s) inserted."; + if( m_session->iovSchema().tagLogTable().exists() ) + m_session->iovSchema().tagLogTable().insert( m_data->tag, operationTime, cond::getUserName(), cond::getHostName(), cond::getCommand(), + msg.str(),logText ); m_data->iovBuffer.clear(); ret = true; } return ret; } + bool IOVEditor::flush( const std::string& logText ){ + return flush( logText, boost::posix_time::microsec_clock::universal_time() ); + } + + bool IOVEditor::flush( const boost::posix_time::ptime& operationTime ){ + return flush( std::string("-"), operationTime ); + } + bool IOVEditor::flush(){ - return flush( boost::posix_time::microsec_clock::universal_time() ); + return flush( std::string("-"), boost::posix_time::microsec_clock::universal_time() ); } - + void IOVEditor::checkTransaction( const std::string& ctx ){ if( !m_session.get() ) throwException("The session is not active.",ctx ); if( !m_session->isTransactionActive( false ) ) throwException("The transaction is not active.",ctx ); diff --git a/CondCore/CondDB/src/IOVSchema.cc b/CondCore/CondDB/src/IOVSchema.cc index 427679ada9efa..1688ff4a3efe3 100644 --- a/CondCore/CondDB/src/IOVSchema.cc +++ b/CondCore/CondDB/src/IOVSchema.cc @@ -297,6 +297,37 @@ namespace cond { deleteFromTable( m_schema, tname, buffer ); } + TAG_LOG::Table::Table( coral::ISchema& schema ): + m_schema( schema ){ + } + + bool TAG_LOG::Table::exists(){ + return existsTable( m_schema, tname ); + } + + void TAG_LOG::Table::create(){ + if( exists() ){ + throwException( "TAG_LOG table already exists in this schema.", + "TAG_LOG::create"); + } + TableDescription< TAG_NAME, EVENT_TIME, USER_NAME, HOST_NAME, COMMAND, ACTION, USER_TEXT > descr( tname ); + descr.setPrimaryKey(); + descr.setForeignKey< TAG_NAME, TAG::NAME >( "TAG_NAME_FK" ); + createTable( m_schema, descr.get() ); + } + + void TAG_LOG::Table::insert( const std::string& tag, + const boost::posix_time::ptime& eventTime, + const std::string& userName, + const std::string& hostName, + const std::string& command, + const std::string& action, + const std::string& userText){ + RowBuffer< TAG_NAME, EVENT_TIME, USER_NAME, HOST_NAME, COMMAND, ACTION, USER_TEXT > + dataToInsert( std::tie( tag, eventTime, userName, hostName, command, action, userText ) ); + insertInTable( m_schema, tname, dataToInsert.get() ); + } + PAYLOAD::Table::Table( coral::ISchema& schema ): m_schema( schema ){ } @@ -371,104 +402,11 @@ namespace cond { return payloadHash; } - TAG_MIGRATION::Table::Table( coral::ISchema& schema ): - m_schema( schema ){ - } - - bool TAG_MIGRATION::Table::exists(){ - return existsTable( m_schema, tname ); - } - - void TAG_MIGRATION::Table::create(){ - if( exists() ){ - throwException( "TAG_MIGRATION table already exists in this schema.", - "TAG_MIGRATION::create"); - } - TableDescription< SOURCE_ACCOUNT, SOURCE_TAG, TAG_NAME, STATUS_CODE, INSERTION_TIME > descr( tname ); - descr.setPrimaryKey(); - descr.setForeignKey< TAG_NAME, TAG::NAME >( "TAG_NAME_FK" ); - createTable( m_schema, descr.get() ); - } - - bool TAG_MIGRATION::Table::select( const std::string& sourceAccount, const std::string& sourceTag, std::string& tagName, int& statusCode ){ - Query< TAG_NAME, STATUS_CODE > q( m_schema ); - q.addCondition( sourceAccount ); - q.addCondition( sourceTag ); - for ( auto row : q ) { - std::tie( tagName, statusCode ) = row; - } - - return q.retrievedRows(); - - } - - void TAG_MIGRATION::Table::insert( const std::string& sourceAccount, const std::string& sourceTag, const std::string& tagName, - int statusCode, const boost::posix_time::ptime& insertionTime ){ - RowBuffer< SOURCE_ACCOUNT, SOURCE_TAG, TAG_NAME, STATUS_CODE, INSERTION_TIME > - dataToInsert( std::tie( sourceAccount, sourceTag, tagName, statusCode, insertionTime ) ); - insertInTable( m_schema, tname, dataToInsert.get() ); - } - - void TAG_MIGRATION::Table::updateValidationCode( const std::string& sourceAccount, const std::string& sourceTag, int statusCode ){ - UpdateBuffer buffer; - buffer.setColumnData< STATUS_CODE >( std::tie( statusCode ) ); - buffer.addWhereCondition( sourceAccount ); - buffer.addWhereCondition( sourceTag ); - updateTable( m_schema, tname, buffer ); - } - - PAYLOAD_MIGRATION::Table::Table( coral::ISchema& schema ): - m_schema( schema ){ - } - - bool PAYLOAD_MIGRATION::Table::exists(){ - return existsTable( m_schema, tname ); - } - - void PAYLOAD_MIGRATION::Table::create(){ - if( exists() ){ - throwException( "PAYLOAD_MIGRATION table already exists in this schema.", - "PAYLOAD_MIGRATION::create"); - } - TableDescription< SOURCE_ACCOUNT, SOURCE_TOKEN, PAYLOAD_HASH, INSERTION_TIME > descr( tname ); - descr.setPrimaryKey(); - descr.setForeignKey< PAYLOAD_HASH, PAYLOAD::HASH >( "PAYLOAD_HASH_FK" ); - createTable( m_schema, descr.get() ); - } - - bool PAYLOAD_MIGRATION::Table::select( const std::string& sourceAccount, const std::string& sourceToken, std::string& payloadId ){ - Query< PAYLOAD_HASH > q( m_schema ); - q.addCondition( sourceAccount ); - q.addCondition( sourceToken ); - for ( auto row : q ) { - std::tie( payloadId ) = row; - } - - return q.retrievedRows(); - } - - void PAYLOAD_MIGRATION::Table::insert( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime ){ - RowBuffer< SOURCE_ACCOUNT, SOURCE_TOKEN, PAYLOAD_HASH, INSERTION_TIME > - dataToInsert( std::tie( sourceAccount, sourceToken, payloadId, insertionTime ) ); - insertInTable( m_schema, tname, dataToInsert.get() ); - } - - void PAYLOAD_MIGRATION::Table::update( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime ){ - UpdateBuffer buffer; - buffer.setColumnData< PAYLOAD_HASH, INSERTION_TIME >( std::tie( payloadId, insertionTime ) ); - buffer.addWhereCondition( sourceAccount ); - buffer.addWhereCondition( sourceToken ); - updateTable( m_schema, tname, buffer ); - } - IOVSchema::IOVSchema( coral::ISchema& schema ): m_tagTable( schema ), m_iovTable( schema ), - m_payloadTable( schema ), - m_tagMigrationTable( schema ), - m_payloadMigrationTable( schema ){ + m_tagLogTable( schema ), + m_payloadTable( schema ){ } bool IOVSchema::exists(){ @@ -484,6 +422,7 @@ namespace cond { m_tagTable.create(); m_payloadTable.create(); m_iovTable.create(); + m_tagLogTable.create(); created = true; } return created; @@ -497,21 +436,14 @@ namespace cond { return m_iovTable; } + ITagLogTable& IOVSchema::tagLogTable(){ + return m_tagLogTable; + } + IPayloadTable& IOVSchema::payloadTable(){ return m_payloadTable; } - ITagMigrationTable& IOVSchema::tagMigrationTable(){ - return m_tagMigrationTable; - } - - IPayloadMigrationTable& IOVSchema::payloadMigrationTable(){ - return m_payloadMigrationTable; - } - - std::string IOVSchema::parsePoolToken( const std::string& ){ - throwException("CondDB V2 can't parse a pool token.","IOVSchema::parsePoolToken"); - } } } diff --git a/CondCore/CondDB/src/IOVSchema.h b/CondCore/CondDB/src/IOVSchema.h index 6a450e83e2f78..7bc435726a46d 100644 --- a/CondCore/CondDB/src/IOVSchema.h +++ b/CondCore/CondDB/src/IOVSchema.h @@ -10,17 +10,17 @@ namespace cond { namespace persistency { - table( TAG ) { + conddb_table( TAG ) { - column( NAME, std::string ); - column( TIME_TYPE, cond::TimeType ); - column( OBJECT_TYPE, std::string ); - column( SYNCHRONIZATION, cond::SynchronizationType ); - column( END_OF_VALIDITY, cond::Time_t ); - column( DESCRIPTION, std::string ); - column( LAST_VALIDATED_TIME, cond::Time_t ); - column( INSERTION_TIME, boost::posix_time::ptime ); - column( MODIFICATION_TIME, boost::posix_time::ptime ); + conddb_column( NAME, std::string ); + conddb_column( TIME_TYPE, cond::TimeType ); + conddb_column( OBJECT_TYPE, std::string ); + conddb_column( SYNCHRONIZATION, cond::SynchronizationType ); + conddb_column( END_OF_VALIDITY, cond::Time_t ); + conddb_column( DESCRIPTION, std::string ); + conddb_column( LAST_VALIDATED_TIME, cond::Time_t ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( MODIFICATION_TIME, boost::posix_time::ptime ); class Table : public ITagTable { public: @@ -45,16 +45,16 @@ namespace cond { }; } - table ( PAYLOAD ) { + conddb_table ( PAYLOAD ) { static constexpr unsigned int PAYLOAD_HASH_SIZE = 40; - column( HASH, std::string, PAYLOAD_HASH_SIZE ); - column( OBJECT_TYPE, std::string ); - column( DATA, cond::Binary ); - column( STREAMER_INFO, cond::Binary ); - column( VERSION, std::string ); - column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( HASH, std::string, PAYLOAD_HASH_SIZE ); + conddb_column( OBJECT_TYPE, std::string ); + conddb_column( DATA, cond::Binary ); + conddb_column( STREAMER_INFO, cond::Binary ); + conddb_column( VERSION, std::string ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); class Table : public IPayloadTable { public: @@ -76,12 +76,12 @@ namespace cond { }; } - table( IOV ) { + conddb_table( IOV ) { - column( TAG_NAME, std::string ); - column( SINCE, cond::Time_t ); - column( PAYLOAD_HASH, std::string, PAYLOAD::PAYLOAD_HASH_SIZE ); - column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( TAG_NAME, std::string ); + conddb_column( SINCE, cond::Time_t ); + conddb_column( PAYLOAD_HASH, std::string, PAYLOAD::PAYLOAD_HASH_SIZE ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); struct SINCE_GROUP { typedef cond::Time_t type; @@ -135,53 +135,28 @@ namespace cond { }; } - // temporary... to be removed after the changeover. - table( TAG_MIGRATION ) { - - column( SOURCE_ACCOUNT, std::string ); - column( SOURCE_TAG, std::string ); - column( TAG_NAME, std::string ); - column( STATUS_CODE, int ); - column( INSERTION_TIME, boost::posix_time::ptime ); - - class Table : public ITagMigrationTable { - public: - explicit Table( coral::ISchema& schema ); - virtual ~Table(){} - bool exists(); - void create(); - bool select( const std::string& sourceAccount, const std::string& sourceTag, std::string& tagName, int& statusCode); - void insert( const std::string& sourceAccount, const std::string& sourceTag, const std::string& tagName, - int statusCode, const boost::posix_time::ptime& insertionTime); - void updateValidationCode( const std::string& sourceAccount, const std::string& sourceTag, int statusCode ); - private: - coral::ISchema& m_schema; - }; - } + conddb_table( TAG_LOG ) { - // temporary... to be removed after the changeover. - table( PAYLOAD_MIGRATION ) { - - column( SOURCE_ACCOUNT, std::string ); - column( SOURCE_TOKEN, std::string ); - column( PAYLOAD_HASH, std::string, PAYLOAD::PAYLOAD_HASH_SIZE ); - column( INSERTION_TIME, boost::posix_time::ptime ); - - class Table : public IPayloadMigrationTable { + conddb_column( TAG_NAME, std::string ); + conddb_column( EVENT_TIME, boost::posix_time::ptime ); + conddb_column( USER_NAME, std::string ); + conddb_column( HOST_NAME, std::string ); + conddb_column( COMMAND, std::string ); + conddb_column( ACTION, std::string ); + conddb_column( USER_TEXT, std::string ); + + class Table : public ITagLogTable { public: explicit Table( coral::ISchema& schema ); virtual ~Table(){} bool exists(); - void create(); - bool select( const std::string& sourceAccount, const std::string& sourceToken, std::string& payloadId ); - void insert( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime); - void update( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime); + void create(); + void insert( const std::string& tag, const boost::posix_time::ptime& eventTime, const std::string& userName, const std::string& hostName, + const std::string& command, const std::string& action, const std::string& userText ); private: coral::ISchema& m_schema; }; - } + } class IOVSchema : public IIOVSchema { public: @@ -191,16 +166,13 @@ namespace cond { bool create(); ITagTable& tagTable(); IIOVTable& iovTable(); + ITagLogTable& tagLogTable(); IPayloadTable& payloadTable(); - ITagMigrationTable& tagMigrationTable(); - IPayloadMigrationTable& payloadMigrationTable(); - std::string parsePoolToken( const std::string& ); private: TAG::Table m_tagTable; IOV::Table m_iovTable; + TAG_LOG::Table m_tagLogTable; PAYLOAD::Table m_payloadTable; - TAG_MIGRATION::Table m_tagMigrationTable; - PAYLOAD_MIGRATION::Table m_payloadMigrationTable; }; } } diff --git a/CondCore/CondDB/src/SessionImpl.h b/CondCore/CondDB/src/SessionImpl.h index bd267da50ec6a..dff8258fd1921 100644 --- a/CondCore/CondDB/src/SessionImpl.h +++ b/CondCore/CondDB/src/SessionImpl.h @@ -5,8 +5,6 @@ #include "IOVSchema.h" #include "GTSchema.h" // -#include "CondCore/DBCommon/interface/DbSession.h" -// #include "RelationalAccess/ConnectionService.h" #include "RelationalAccess/ISessionProxy.h" // diff --git a/CondCore/DBCommon/src/base64.cc b/CondCore/CondDB/src/base64.cc similarity index 100% rename from CondCore/DBCommon/src/base64.cc rename to CondCore/CondDB/src/base64.cc diff --git a/CondCore/DBCommon/src/base64.h b/CondCore/CondDB/src/base64.h similarity index 100% rename from CondCore/DBCommon/src/base64.h rename to CondCore/CondDB/src/base64.h diff --git a/CondCore/DBCommon/src/blowfish.cc b/CondCore/CondDB/src/blowfish.cc similarity index 100% rename from CondCore/DBCommon/src/blowfish.cc rename to CondCore/CondDB/src/blowfish.cc diff --git a/CondCore/DBCommon/src/blowfish.h b/CondCore/CondDB/src/blowfish.h similarity index 100% rename from CondCore/DBCommon/src/blowfish.h rename to CondCore/CondDB/src/blowfish.h diff --git a/CondCore/CondDB/test/BuildFile.xml b/CondCore/CondDB/test/BuildFile.xml index c0feaaadcf3e3..1f3f65cd247cb 100644 --- a/CondCore/CondDB/test/BuildFile.xml +++ b/CondCore/CondDB/test/BuildFile.xml @@ -28,3 +28,7 @@ + + + + diff --git a/CondCore/CondDB/test/testConditionDatabase_0.cpp b/CondCore/CondDB/test/testConditionDatabase_0.cpp index 788cf571ae0ef..a68536d7eeb84 100644 --- a/CondCore/CondDB/test/testConditionDatabase_0.cpp +++ b/CondCore/CondDB/test/testConditionDatabase_0.cpp @@ -6,9 +6,6 @@ // #include "CondCore/CondDB/interface/ConnectionPool.h" // -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" #include "MyTestData.h" // #include diff --git a/CondCore/CondDB/test/testConnectionPool.cpp b/CondCore/CondDB/test/testConnectionPool.cpp new file mode 100644 index 0000000000000..8455d9382cd8a --- /dev/null +++ b/CondCore/CondDB/test/testConnectionPool.cpp @@ -0,0 +1,158 @@ +//Framework includes +#include "FWCore/PluginManager/interface/PluginManager.h" +#include "FWCore/PluginManager/interface/standard.h" +#include "FWCore/PluginManager/interface/SharedLibrary.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" +//Module includes +#include "CondCore/CondDB/interface/ConnectionPool.h" +#include "CondCore/CondDB/interface/PayloadProxy.h" +//Entity class +#include "CondFormats/RunInfo/interface/RunInfo.h" +//CORAL includes +#include "RelationalAccess/ISessionProxy.h" +#include "RelationalAccess/ISchema.h" +#include "RelationalAccess/ITransaction.h" +#include "RelationalAccess/ITable.h" +#include "RelationalAccess/IColumn.h" +#include "RelationalAccess/IQuery.h" +#include "RelationalAccess/ICursor.h" +#include "CoralBase/AttributeSpecification.h" +#include "CoralBase/AttributeList.h" +#include "CoralBase/Attribute.h" +//BOOST includes +#include +// +#include +#include +#include +#include + +void testCreateCoralSession( cond::persistency::ConnectionPool & connPool, std::string const & connectionString, bool const writeCapable ) { + boost::shared_ptr session = connPool.createCoralSession( connectionString, writeCapable ); + session->transaction().start( true ); + coral::ISchema& schema = session->nominalSchema(); + std::string tagTable( "TAG" ); + std::string iovTable( "IOV" ); + std::string payloadTable( "PAYLOAD" ); + std::string tag( "RunInfo_v1_mc" ); + std::string object( "RunInfo" ); + std::string hash( "cfd8987f899e99de69626e8a91b5c6b1506b82de" ); + std::unique_ptr query( schema.tableHandle( tagTable ).newQuery() ); + query->addToOutputList( "OBJECT_TYPE" ); + query->defineOutputType( "OBJECT_TYPE", "string" ); + std::string tagWhereClause( "NAME=:tag" ); + coral::AttributeList tagBindVariableList; + tagBindVariableList.extend( "tag", typeid(std::string) ); + tagBindVariableList[ "tag" ].data() = tag; + query->setCondition( tagWhereClause, tagBindVariableList ); + coral::ICursor& tagCursor = query->execute(); + while( tagCursor.next() ) { + tagCursor.currentRow().toOutputStream( std::cout ) << std::endl; + } + query.reset( schema.tableHandle( iovTable ).newQuery() ); + query->addToOutputList( "SINCE" ); + query->defineOutputType( "SINCE", "unsigned long long" ); + std::string iovWhereClause( "TAG_NAME=:tag" ); + coral::AttributeList iovBindVariableList; + iovBindVariableList.extend( "tag", typeid(std::string) ); + iovBindVariableList[ "tag" ].data() = tag; + query->setCondition( iovWhereClause, iovBindVariableList ); + coral::ICursor& iovCursor = query->execute(); + while( iovCursor.next() ) { + iovCursor.currentRow().toOutputStream( std::cout ) << std::endl; + } + query.reset( schema.tableHandle( payloadTable ).newQuery() ); + query->addToOutputList( "OBJECT_TYPE" ); + query->defineOutputType( "OBJECT_TYPE", "string" ); + std::string payloadWhereClause( "HASH=:hash" ); + coral::AttributeList payloadBindVariableList; + payloadBindVariableList.extend( "hash", typeid(std::string) ); + payloadBindVariableList[ "hash" ].data() = hash; + query->setCondition( payloadWhereClause, payloadBindVariableList ); + coral::ICursor& payloadCursor = query->execute(); + while( payloadCursor.next() ) { + payloadCursor.currentRow().toOutputStream( std::cout ) << std::endl; + } + session->transaction().commit(); +} + +void testCreateSession( cond::persistency::ConnectionPool & connPool, std::string const & connectionString, bool const writeCapable ) { + cond::persistency::Session session = connPool.createSession( connectionString, writeCapable ); + cond::persistency::PayloadProxy pp; + pp.setUp( session ); + pp.loadTag( "RunInfo_v1_mc" ); + pp.setIntervalFor( 1, true ); + std::cout << "run number: " << pp().m_run << std::endl; +} + +void testCreateReadOnlySession( cond::persistency::ConnectionPool & connPool, std::string const & connectionString, std::string const & transactionId ) { + cond::persistency::Session session = connPool.createReadOnlySession( connectionString, transactionId ); + session.transaction().start(); + cond::persistency::IOVProxy iov = session.readIov( "RunInfo_v1_mc", true ); + std::cout << "Loaded size="<( currentIov.payloadId )->m_run << std::endl; + session.transaction().commit(); +} + +int main (int argc, char** argv) { + edmplugin::PluginManager::Config config; + edmplugin::PluginManager::configure( edmplugin::standard::config() ); + + std::vector psets; + edm::ParameterSet pSet; + pSet.addParameter( "@service_type", std::string( "SiteLocalConfigService" ) ); + psets.push_back( pSet ); + static const edm::ServiceToken services( edm::ServiceRegistry::createSet( psets ) ); + static const edm::ServiceRegistry::Operate operate( services ); + + std::array connectionStrings{ { "frontier://FrontierPrep/CMS_CONDITIONS", + "frontier://(proxyconfigurl=http://cmst0frontier.cern.ch/t0.pac)(backupproxyurl=http://cmst0frontier.cern.ch:3128)(backupproxyurl=http://cmst0frontier1.cern.ch:3128)(backupproxyurl=http://cmst0frontier2.cern.ch:3128)(backupproxyurl=http://cmsbpfrontier.cern.ch:3128)(backupproxyurl=http://cmsbpfrontier1.cern.ch:3128)(backupproxyurl=http://cmsbpfrontier2.cern.ch:3128)(backupproxyurl=http://cmsbproxy.fnal.gov:3128)(serverurl=http://cmsfrontier.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier1.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier2.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier3.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier4.cern.ch:8000/FrontierPrep)/CMS_CONDITIONS" + } + }; + try { + //************* + for( const auto& connectionString : connectionStrings ) { + std::cout << "# Connecting with db in '" << connectionString << "'" << std::endl; + cond::persistency::ConnectionPool connPool; + //connPool.setMessageVerbosity( coral::Debug ); + //connPool.configure(); + try { + connPool.createCoralSession( connectionString, true ); + } catch( const std::exception& e ) { + std::cout << "EXPECTED EXCEPTION: " << e.what() << std::endl; + } + testCreateCoralSession( connPool, connectionString, false ); + testCreateSession( connPool, connectionString, false ); + testCreateReadOnlySession( connPool, connectionString, "" ); + testCreateReadOnlySession( connPool, connectionString, "testConnectionPool" ); + connPool.setFrontierSecurity( "foo" ); + connPool.configure(); + try { + connPool.createCoralSession( connectionString, false ); + } catch( const cms::Exception& e ) { + std::cout << "EXPECTED EXCEPTION: " << e.what() << std::endl; + } + edm::ParameterSet dbParameters; + dbParameters.addUntrackedParameter( "authenticationPath", std::string( "" ) ); + dbParameters.addUntrackedParameter( "authenticationSystem", 0 ); + dbParameters.addUntrackedParameter( "messageLevel", 3 ); + dbParameters.addUntrackedParameter( "security", std::string( "sig" ) ); + dbParameters.addUntrackedParameter( "logging", false ); + connPool.setParameters( dbParameters ); + connPool.configure(); + testCreateCoralSession( connPool, connectionString, false ); + testCreateSession( connPool, connectionString, false ); + testCreateReadOnlySession( connPool, connectionString, "" ); + testCreateReadOnlySession( connPool, connectionString, "testConnectionPool" ); + } + } catch (const std::exception& e){ + std::cout << "ERROR: " << e.what() << std::endl; + return -1; + } catch (...){ + std::cout << "UNEXPECTED FAILURE." << std::endl; + return -1; + } +} + diff --git a/CondCore/CondDB/test/testReadWritePayloads.cpp b/CondCore/CondDB/test/testReadWritePayloads.cpp index e701d5df5bf80..18958141c8f0b 100644 --- a/CondCore/CondDB/test/testReadWritePayloads.cpp +++ b/CondCore/CondDB/test/testReadWritePayloads.cpp @@ -7,9 +7,6 @@ // #include "CondCore/CondDB/interface/ConnectionPool.h" // -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" #include "MyTestData.h" // #include "ArrayPayload.h" // #include "SimplePayload.h" diff --git a/CondCore/CondDB/test/testTempWrapper_1.cpp b/CondCore/CondDB/test/testTempWrapper_1.cpp deleted file mode 100644 index 1a12261d5e218..0000000000000 --- a/CondCore/CondDB/test/testTempWrapper_1.cpp +++ /dev/null @@ -1,174 +0,0 @@ -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include "FWCore/PluginManager/interface/SharedLibrary.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" -// -#include "CondCore/CondDB/interface/CondDB.h" -#include "CondCore/MetaDataService/interface/MetaData.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -// -#include -#include -#include -#include - -using namespace cond::db; - -void dumpSince( cond::Time_t target, IOVProxy& data ){ - auto i = data.find( target ); - if( i == data.end() ) { - std::cout <<"No valid IOV for time="<( tag1, cond::runnumber, cond::OFFLINE ); - std::cout <<"Now the database "< - - - - - - - - - diff --git a/CondCore/DBCommon/doc/DBCommon.doc b/CondCore/DBCommon/doc/DBCommon.doc deleted file mode 100644 index dd9cf2872f933..0000000000000 --- a/CondCore/DBCommon/doc/DBCommon.doc +++ /dev/null @@ -1,60 +0,0 @@ - -/*! - -\page CondCore_DBCommon Package CondCore/DBCommon - -
- - - -Source code (CVS tag: @CVS_TAG@) - -Administrative privileges - -
- -\section desc Description - - -Central base package encapsulates the interaction with databases. - -\subsection interface Public interface - - -- AuthenticationMethod -- ConfigSessionFromParameterSet -- ConnectionConfiguration -- ConnectMode -- ContainerIterator -- DBSession -- Exception -- MessageLevel -- ObjectRelationalMappingUtility -- PoolStorageManager -- Ref -- RelationalStorageManager -- SessionConfiguration -- Time -- TokenBuilder - -\subsection modules Modules - -None - -\subsection tests Unit tests and examples - -testCondObjRef: unit test cond::Ref wrapper class
-testCondObjCopy: test container copy functionality
-testGenericCondObjCopy: test copy objects by token
-testTokenBuilder: test building pool token by external parameters
-testContainerIterator: test container iterator functionality
-testServiceLoader: test serviceloader
- -\section status Status and planned development - -stable - -
-Last updated: -@DATE@ Author: Z. Xie -*/ - diff --git a/CondCore/DBCommon/interface/Auth.h b/CondCore/DBCommon/interface/Auth.h deleted file mode 100644 index 5b3a3d6ba3a7c..0000000000000 --- a/CondCore/DBCommon/interface/Auth.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef COND_DBCommon_Roles_h -#define COND_DBCommon_Roles_h - -#include - -namespace cond{ - - class Auth { - - public: - - static const char* COND_AUTH_PATH; - static const char* COND_AUTH_SYS; - - static const std::string COND_ADMIN_GROUP; - - static const std::string COND_DEFAULT_ROLE; - static const std::string COND_WRITER_ROLE; - static const std::string COND_READER_ROLE; - static const std::string COND_ADMIN_ROLE; - static const std::string COND_DEFAULT_PRINCIPAL; - - static const std::string COND_KEY; - static const unsigned int COND_AUTHENTICATION_KEY_SIZE = 30; - static const unsigned int COND_DB_KEY_SIZE = 30; - - static const std::string COND_AUTH_PATH_PROPERTY; - - }; -} - -#endif -// DBSESSION_H diff --git a/CondCore/DBCommon/interface/BlobStreamerPluginFactory.h b/CondCore/DBCommon/interface/BlobStreamerPluginFactory.h deleted file mode 100644 index 98184008a12e9..0000000000000 --- a/CondCore/DBCommon/interface/BlobStreamerPluginFactory.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CondCore_DBCommon_BlobStreamerPluginFactory_h -#define CondCore_DBCommon_BlobStreamerPluginFactory_h -#include "FWCore/PluginManager/interface/PluginFactory.h" -#include "CondCore/ORA/interface/IBlobStreamingService.h" -#include - -namespace cond { - typedef edmplugin::PluginFactory< ora::IBlobStreamingService*() > BlobStreamerPluginFactory; -} - -#endif diff --git a/CondCore/DBCommon/interface/Cipher.h b/CondCore/DBCommon/interface/Cipher.h deleted file mode 100644 index 962dfdf0e7825..0000000000000 --- a/CondCore/DBCommon/interface/Cipher.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef INCLUDE_COND_CIPHER_H -#define INCLUDE_COND_CIPHER_H - -#include -#include - -struct BLOWFISH_CTX; - -namespace cond { - - class Cipher { - public: - - explicit Cipher( const std::string& key ); - - ~Cipher(); - - size_t encrypt( const std::string& input, unsigned char*& output ); - - std::string decrypt( const unsigned char* input, size_t inputSize ); - - std::string b64encrypt( const std::string& input ); - - std::string b64decrypt( const std::string& input ); - - private: - - size_t bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt=false ); - - private: - - BLOWFISH_CTX* m_ctx; - }; - -} - -#endif - diff --git a/CondCore/DBCommon/interface/ClassID.h b/CondCore/DBCommon/interface/ClassID.h deleted file mode 100644 index f132c68bbfbe5..0000000000000 --- a/CondCore/DBCommon/interface/ClassID.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef CondCoreDBCommon_ClassID_H -#define CondCoreDBCommon_ClassID_H -#include -#include -#include - -namespace cond { - - namespace idCategories { - std::string const pythonIDCategory("CondPythonID"); - } - - - - char const * className(const std::type_info& t); - - - class ClassInfo { - public: - virtual ~ClassInfo(){} - inline ClassInfo(const std::type_info& t) : tinfo(t) {} - //inline ClassInfo(const std::type_info& t, int); - inline const std::type_info& type() const { return tinfo;} - std::string pluginName(std::string const & prefix) const; - virtual std::string resource() const=0; - private: - //ClassIDRegistry * registry; - //const char * registerMe(const std::type_info& t); - const std::type_info& tinfo; - }; - - - /**class ClassIDRegistry { - public: - typedef ClassInfo Elem; - std::vector sids; - std::vector csids; - ClassIDRegistry(std::string const & pfix); - - const char * registerMe(const std::type_info& t); - - private: - std::string prefix; - - }; - **/ - - template - struct ClassID : public ClassInfo { - ClassID() : ClassInfo(typeid(T)) {} - ClassID(char const * res ) : ClassInfo(typeid(T)), m_res(res) {} -// ClassID(int i) : ClassInfo(typeid(T),i) {} - virtual std::string resource() const { return m_res;} - private: - std::string m_res; - }; - - -} - -/** -// magic: works only if a file local registry exists in the file -#define ELEM_CONSTR(xx_) \ - cond::ClassInfo::ClassInfo(const std::type_info& t,int) : tinfo(t) {registry = &xx_;registerMe(t);} -**/ - -#include "FWCore/PluginManager/interface/PluginFactory.h" -namespace cond{ - typedef edmplugin::PluginFactory ClassInfoFactory; -} - -#define PYTHON_ID(type_, plugName_, uname_) \ - namespace pythonID { struct EDM_PLUGIN_SYM(plugName_, uname_) : public cond::ClassID { EDM_PLUGIN_SYM(plugName_ , uname_) () : cond::ClassID(::plugName_){}};} \ - DEFINE_EDM_PLUGIN(cond::ClassInfoFactory, EDM_PLUGIN_SYM(pythonID::plugName_, uname_) , EDM_PLUGIN_SYM(pythonID::plugName_, uname_)().pluginName(cond::idCategories::pythonIDCategory).c_str() ) - - -#endif // CondCoreDBCommon_ClassID_H diff --git a/CondCore/DBCommon/interface/ConvertIOVSyncValue.h b/CondCore/DBCommon/interface/ConvertIOVSyncValue.h deleted file mode 100644 index 09f15553ceebd..0000000000000 --- a/CondCore/DBCommon/interface/ConvertIOVSyncValue.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef COND_DBCommon_ConvertIOVSyncValue_H -#define COND_DBCommon__ConvertIOVSyncValue_H - -#include "CondCore/DBCommon/interface/Time.h" -#include "FWCore/Framework/interface/IOVSyncValue.h" - -namespace cond { - - edm::IOVSyncValue toIOVSyncValue(cond::Time_t time, cond::TimeType timetype, bool startOrStop); - - cond::Time_t fromIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype); - - // min max sync value.... - edm::IOVSyncValue limitedIOVSyncValue(cond::Time_t time, cond::TimeType timetype); - - edm::IOVSyncValue limitedIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype); - - -} - - -#endif diff --git a/CondCore/DBCommon/interface/DbConnection.h b/CondCore/DBCommon/interface/DbConnection.h deleted file mode 100644 index 51fe35a6c6868..0000000000000 --- a/CondCore/DBCommon/interface/DbConnection.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef COND_DBCommon_DbConnection_h -#define COND_DBCommon_DbConnection_h - -#include -#include -#include "DbConnectionConfiguration.h" -#include "DbSession.h" -// -// Package: CondCore/DBCommon -// Class: DbConnection -// -/**\class DbConnection DbConnection.h CondCore/DBCommon/interface/DbConnection.h - Description: Class to prepare database connection setup -*/ - -namespace coral { - class ConnectionService; - class ISessionProxy; - class IMonitoringReporter; - class IWebCacheControl; -} - -namespace edm{ - class ParameterSet; -} - -namespace ora { - class ConnectionPool; -} - -namespace cond{ - - /* - **/ - class DbConnection{ - public: - DbConnection(); - - DbConnection(const DbConnection& conn); - - virtual ~DbConnection(); - - DbConnection& operator=(const DbConnection& conn); - - void configure(); - - void configure( cond::DbConfigurationDefaults defaultItem ); - - void configure( const edm::ParameterSet& connectionPset ); - - void close(); - - bool isOpen() const; - - DbSession createSession() const; - - DbConnectionConfiguration & configuration(); - DbConnectionConfiguration const & configuration() const; - - boost::shared_ptr connectionPool() const; - - coral::IConnectionService& connectionService() const; - - const coral::IMonitoringReporter& monitoringReporter() const; - - coral::IWebCacheControl& webCacheControl() const; - - private: - class ConnectionImpl; - - private: - boost::shared_ptr m_implementation; - - }; -} -#endif -// DBCONNECTION_H diff --git a/CondCore/DBCommon/interface/DbConnectionConfiguration.h b/CondCore/DBCommon/interface/DbConnectionConfiguration.h deleted file mode 100644 index 3285d6d37eef5..0000000000000 --- a/CondCore/DBCommon/interface/DbConnectionConfiguration.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef COND_DBCommon_DbConnectionConfiguration_h -#define COND_DBCommon_DbConnectionConfiguration_h -// -// Package: CondCore/DBCommon -// Class: DbConnectionConfiguration -// -/**\class ConnectionConfiguration ConnectionConfiguration.h CondCore/DBCommon/interface/ConnectionConfiguration.h - Description: set cofiguration parameters of the session -*/ -// -// -#include -// coral includes -#include "CoralBase/MessageStream.h" -#include "RelationalAccess/IMonitoring.h" - -namespace coral { - class IConnectionServiceConfiguration; -} - -namespace edm{ - class ParameterSet; -} - -namespace cond{ - class CoralServiceManager; - - enum DbConfigurationDefaults { CoralDefaults, CmsDefaults, ProdDefaults, ToolDefaults, WebDefaults}; - - enum DbAuthenticationSystem { UndefinedAuthentication=0,CondDbKey, CoralXMLFile }; - - class DbConnectionConfiguration{ - public: - static const std::vector& defaultConfigurations(); - public: - DbConnectionConfiguration(); - DbConnectionConfiguration( bool connectionSharing, - int connectionTimeOut, - bool readOnlySessionOnUpdateConnections, - int connectionRetrialPeriod, - int connectionRetrialTimeOut, - bool poolAutomaticCleanUp, - const std::string& authenticationPath, - const std::string& transactionId, - coral::MsgLevel msgLev, - coral::monitor::Level monitorLev, - bool SQLMonitoring ); - - DbConnectionConfiguration( const DbConnectionConfiguration& rhs); - ~DbConnectionConfiguration(); - DbConnectionConfiguration& operator=( const DbConnectionConfiguration& rhs); - // configuration from edm parameter set - void setParameters( const edm::ParameterSet& connectionPset ); - // configuration for individual connection parameters - void setConnectionSharing( bool flag ); - void setConnectionTimeOut( int timeOut ); - void setReadOnlySessionOnUpdateConnections( bool flag ); - void setConnectionRetrialPeriod( int period ); - void setConnectionRetrialTimeOut( int timeout ); - void setPoolAutomaticCleanUp( bool flag ); - // authentication - void setAuthenticationPath( const std::string& p ); - void setAuthenticationSystem( int authSysCode ); - // transaction Id for multijob (used by frontier) - void setTransactionId( std::string const & tid); - // message level - void setMessageLevel( coral::MsgLevel l ); - // monitoring level - void setMonitoringLevel( coral::monitor::Level l ); - // SQL monitoring - void setSQLMonitoring( bool flag ); - // force the coral configuration - void configure( coral::IConnectionServiceConfiguration& coralConfig) const; - // getters - bool isConnectionSharingEnabled() const; - int connectionTimeOut() const; - bool isReadOnlySessionOnUpdateConnectionEnabled() const; - int connectionRetrialPeriod() const; - int connectionRetrialTimeOut() const; - bool isPoolAutomaticCleanUpEnabled() const; - const std::string& authenticationPath() const; - const std::string& transactionId() const; - coral::MsgLevel messageLevel() const; - bool isSQLMonitoringEnabled() const; - private: - std::pair m_connectionSharing; - std::pair m_connectionTimeOut; - std::pair m_readOnlySessionOnUpdateConnections; - std::pair m_connectionRetrialPeriod; - std::pair m_connectionRetrialTimeOut; - std::pair m_poolAutomaticCleanUp; - std::string m_authPath; - int m_authSys; - std::string m_transactionId; - coral::MsgLevel m_messageLevel; - coral::monitor::Level m_monitoringLevel; - //int m_idleConnectionCleanupPeriod; - - bool m_SQLMonitoring; - CoralServiceManager* m_pluginManager; - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DbOpenTransaction.h b/CondCore/DBCommon/interface/DbOpenTransaction.h deleted file mode 100644 index c16f183416dd2..0000000000000 --- a/CondCore/DBCommon/interface/DbOpenTransaction.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef CondCore_DBCommon_DbOpenTransaction_H -#define CondCore_DBCommon_DbOpenTransaction_H -// -// Package: DBCommon -// Class : DbOpenTransaction -// -/**\class DbScopedTransaction DbScopedTransaction.h CondCore/DBCommon/interface/DbScopedTransaction.h - Description: -*/ -// -// - -namespace cond{ - - class DbTransaction; - - class DbOpenTransaction { - public: - explicit DbOpenTransaction( cond::DbTransaction& transaction ); - - ~DbOpenTransaction(); - /// start transaction - /// current transaction is readonly - void ok(); - private: - cond::DbTransaction& m_transaction; - bool m_status; - - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DbScopedTransaction.h b/CondCore/DBCommon/interface/DbScopedTransaction.h deleted file mode 100644 index 3d2b4bfb31261..0000000000000 --- a/CondCore/DBCommon/interface/DbScopedTransaction.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef CondCore_DBCommon_DbScopedTransaction_H -#define CondCore_DBCommon_DbScopedTransaction_H -// -// Package: DBCommon -// Class : DbScopedTransaction -// -/**\class DbScopedTransaction DbScopedTransaction.h CondCore/DBCommon/interface/DbScopedTransaction.h - Description: -*/ -// -// - -namespace cond{ - - class DbSession; - - class DbScopedTransaction { - public: - explicit DbScopedTransaction( cond::DbSession& session ); - - ~DbScopedTransaction(); - /// start transaction - int start(bool readOnly = false); - /// commit transaction. Will disconnect from database if connection timeout==0 or connectted time close to the threshold - int commit(); - /// rollback transaction - bool rollback(); - /// query if locally has been activated - bool isLocallyActive() const; - /// current transaction is active - int isActive() const; - /// current transaction is readonly - bool isReadOnly() const; - private: - cond::DbSession& m_session; - bool m_locallyActive; - - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DbSession.h b/CondCore/DBCommon/interface/DbSession.h deleted file mode 100644 index d9565aada0513..0000000000000 --- a/CondCore/DBCommon/interface/DbSession.h +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef COND_DBCommon_DbSession_h -#define COND_DBCommon_DbSession_h - -#include "CondCore/ORA/interface/Database.h" -#include "CondCore/ORA/interface/PoolToken.h" -#include -#include - -// -// Package: CondCore/DBCommon -// Class: DbSession -// -/**\class DbSession DbSession.h CondCore/DBCommon/interface/DbSession.h - Description: Class to prepare database connection setup -*/ - -namespace coral { - class IConnectionService; - class ISchema; - class ISessionProxy; -} - -namespace cond{ - - class DbTransaction; - class DbConnection; - class SessionImpl; - - /* - **/ - class DbSession{ - public: - static const char* COND_SCHEMA_VERSION; - static const char* CHANGE_SCHEMA_VERSION; - - public: - DbSession(); - - explicit DbSession( const DbConnection& connection ); - - DbSession( const DbSession& rhs ); - - virtual ~DbSession(); - - DbSession& operator=( const DbSession& rhs ); - - const std::string& connectionString() const; - - const DbConnection& connection() const; - - bool isTransactional() const; - - const std::string& blobStreamingService() const; - - void open( const std::string& connectionString, bool readOnly=false ); - void open( const std::string& connectionString, const std::string& role, bool readOnly=false ); - void openReadOnly( const std::string& connectionString, const std::string& id ); - void open( boost::shared_ptr& coralSession, const std::string& connectionString, const std::string& schemaName="" ); - void close(); - - bool isOpen() const; - - DbTransaction& transaction(); - - bool createDatabase(); - - // TEMPORARY, for the IOV schema changeover. - bool isOldSchema(); - - coral::ISchema& schema(const std::string& schemaName); - - coral::ISchema& nominalSchema(); - - bool deleteMapping( const std::string& mappingVersion ); - - bool importMapping( const std::string& sourceConnectionString, - const std::string& contName ); - - ora::Object getObject( const std::string& objectId ); - - template boost::shared_ptr getTypedObject( const std::string& objectId ); - - template std::string storeObject( const T* object, const std::string& containerName ); - - std::string storeObject( const ora::Object& objectRef, const std::string& containerName ); - - template bool updateObject( const T* object, const std::string& objectId ); - - bool deleteObject( const std::string& objectId ); - - std::string importObject( cond::DbSession& fromDatabase, const std::string& objectId ); - - std::string classNameForItem( const std::string& objectId ); - - void flush(); - - ora::Database& storage(); - - private: - - boost::shared_ptr m_implementation; - }; - - class PoolTokenParser : public ora::ITokenParser { - public: - explicit PoolTokenParser( ora::Database& db ); - ~PoolTokenParser(){ - } - ora::OId parse( const std::string& poolToken ); - std::string className( const std::string& poolToken ); - - private: - ora::Database& m_db; - }; - - class PoolTokenWriter : public ora::ITokenWriter { - public: - explicit PoolTokenWriter( ora::Database& db ); - ~PoolTokenWriter(){ - } - std::string write( const ora::OId& oid ); - private: - ora::Database& m_db; - }; - - template inline boost::shared_ptr DbSession::getTypedObject( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - return storage().fetch( oid ); - } - - template inline std::string DbSession::storeObject( const T* object, - const std::string& containerName ){ - std::string ret(""); - if( object ){ - ora::OId oid = storage().insert( containerName, *object ); - storage().flush(); - ret = oid.toString(); - } - return ret; - } - - template inline bool DbSession::updateObject( const T* object, - const std::string& objectId ){ - bool ret = false; - if( object ){ - ora::OId oid; - oid.fromString( objectId ); - storage().update( oid, *object ); - storage().flush(); - ret = true; - } - return ret; - } - -} - -#endif -// DBSESSION_H diff --git a/CondCore/DBCommon/interface/DbTransaction.h b/CondCore/DBCommon/interface/DbTransaction.h deleted file mode 100644 index 1e500072ad8c6..0000000000000 --- a/CondCore/DBCommon/interface/DbTransaction.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef CondCore_DBCommon_DbTransaction_H -#define CondCore_DBCommon_DbTransaction_H - -// -// Package: DBCommon -// Class : DbTransaction -// -/**\class DbTransaction DbTransaction.h CondCore/DBCommon/interface/DbTransaction.h - Description: -*/ -// -// - -namespace ora { - class Transaction; -} - -namespace cond{ - class DbTransaction { - - public: - DbTransaction( ora::Transaction& dbTrans, bool owned=true ); - - ~DbTransaction(); - /// start transaction - int start(bool readOnly = false); - /// commit transaction. - int commit(); - /// force the commit, regardless to the transaction clients - bool forceCommit(); - /// rollback transaction - bool rollback(); - /// current transaction is active - int isActive() const; - /// current transaction is readonly - bool isReadOnly() const; - private: - ora::Transaction& m_dbTrans; - bool m_readOnly; - int m_clients; - bool m_owned; - - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DecodingKey.h b/CondCore/DBCommon/interface/DecodingKey.h deleted file mode 100644 index c732f6f13d789..0000000000000 --- a/CondCore/DBCommon/interface/DecodingKey.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef CondCoreDBCommon_DecodingKey_H -#define CondCoreDBCommon_DecodingKey_H - -#include -#include -#include -#include - -namespace cond { - - struct ServiceCredentials { - ServiceCredentials(); - std::string connectionString; - std::string userName; - std::string password; - }; - - class KeyGenerator { - public: - - KeyGenerator(); - - std::string make( size_t keySize ); - std::string makeWithRandomSize( size_t maxSize ); - - private: - - int m_iteration; - - }; - - class DecodingKey { - - public: - - static const std::string FILE_NAME; - static const std::string FILE_PATH; - static const size_t DEFAULT_KEY_SIZE = 100; - static std::string templateFile(); - - public: - - DecodingKey(); - - virtual ~DecodingKey(){} - - size_t init( const std::string& keyFileName, const std::string& password, bool readMode = true ); - - size_t createFromInputFile( const std::string& inputFileName, size_t generatedKeySize = 0 ); - - void list( std::ostream& out ); - - void flush(); - - const std::string& principalName() const; - - const std::string& principalKey() const; - - bool isNominal() const; - - const std::string& ownerName() const; - - const std::map< std::string, ServiceCredentials >& services() const; - - void addDefaultService( const std::string& connectionString ); - - void addService( const std::string& serviceName, const std::string& connectionString, const std::string& userName, const std::string& password ); - - - private: - - std::string m_fileName; - - bool m_mode; - - std::string m_pwd; - - std::string m_principalName; - - std::string m_principalKey; - - std::string m_owner; - - std::map< std::string, ServiceCredentials > m_services; - - }; -} - -inline -cond::KeyGenerator::KeyGenerator():m_iteration(0){ -} - -inline -cond::ServiceCredentials::ServiceCredentials():connectionString(""),userName(""),password(""){ -} - -inline -cond::DecodingKey::DecodingKey():m_fileName(""),m_mode( true ),m_pwd(""),m_principalName(""),m_principalKey(""),m_owner(""),m_services(){ -} - -inline -const std::string& -cond::DecodingKey::principalName() const { - return m_principalName; -} - -inline -const std::string& -cond::DecodingKey::principalKey() const { - return m_principalKey; -} - -inline -bool -cond::DecodingKey::isNominal() const { - return !m_owner.empty(); -} - -inline -const std::string& -cond::DecodingKey::ownerName() const { - return m_owner; -} - -inline -const std::map< std::string, cond::ServiceCredentials >& -cond::DecodingKey::services() const { return m_services; } - -#endif // CondCoreDBCommon_DecodingKey_H - - diff --git a/CondCore/DBCommon/interface/Exception.h b/CondCore/DBCommon/interface/Exception.h deleted file mode 100644 index 450a5ded48b3c..0000000000000 --- a/CondCore/DBCommon/interface/Exception.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifdef COND_EXP_WARNING -#warning please ignore previous warning -#endif -#ifndef COND_EXCEPTION_H -#define COND_EXCEPTION_H -#include "FWCore/Utilities/interface/Exception.h" -#include -namespace cond{ - class Exception : public cms::Exception{ - public: - explicit Exception( const std::string& message ); - virtual ~Exception() throw(); - }; - class noDataForRequiredTimeException : public Exception{ - public: - noDataForRequiredTimeException(const std::string& from, - const std::string& rcd, - const std::string& current); - virtual ~noDataForRequiredTimeException() throw(); - }; - class RefException : public Exception{ - public: - RefException(const std::string& from, - const std::string& msg); - virtual ~RefException() throw(){} - }; - class TransactionException : public Exception{ - public: - TransactionException(const std::string& from, - const std::string& msg); - virtual ~TransactionException() throw(){} - }; - - void throwException [[noreturn]] ( std::string const& message, std::string const& methodName ); -} -#endif diff --git a/CondCore/DBCommon/interface/FipProtocolParser.h b/CondCore/DBCommon/interface/FipProtocolParser.h deleted file mode 100644 index d61401a4109bf..0000000000000 --- a/CondCore/DBCommon/interface/FipProtocolParser.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DBCommon_FipProtocolParser_H -#define DBCommon_FipProtocolParser_H -#include -namespace cond{ - class FipProtocolParser{ - public: - FipProtocolParser(); - ~FipProtocolParser(); - std::string getRealConnect(const std::string& fipConnect) const; - }; -}//ns cond -#endif - diff --git a/CondCore/DBCommon/interface/IOVInfo.h b/CondCore/DBCommon/interface/IOVInfo.h deleted file mode 100644 index 3f676dca6193a..0000000000000 --- a/CondCore/DBCommon/interface/IOVInfo.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef COND_DBCommon_IOVInfo_H -#define COND_DBCommon_IOVInfo_H - -#include - -namespace cond { - - // return a formatted information about the current user taken from the environment - std::string userInfo(); - - -} - - -#endif // COND_DBCommon_IOVInfo_H diff --git a/CondCore/DBCommon/interface/LogDBEntry.h b/CondCore/DBCommon/interface/LogDBEntry.h deleted file mode 100644 index 9837334598ac3..0000000000000 --- a/CondCore/DBCommon/interface/LogDBEntry.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef CondCore_DBCommon_LogDBEntry_H -#define CondCore_DBCommon_LogDBEntry_H -#include -namespace cond{ - - class UserLogInfo{ - public: - std::string provenance; - std::string usertext; - }; - - class NullUserLogInfo : public UserLogInfo{ - }; - - class LogDBEntry{ - public: - unsigned long long logId; - std::string destinationDB; - std::string provenance; - std::string usertext; - std::string iovtag; - std::string iovtimetype; - unsigned int payloadIdx; - unsigned long long lastSince; - std::string payloadClass; - std::string payloadToken; - std::string exectime; - std::string execmessage; - }; -} -#endif diff --git a/CondCore/DBCommon/interface/Logger.h b/CondCore/DBCommon/interface/Logger.h deleted file mode 100644 index 289ebeacb1284..0000000000000 --- a/CondCore/DBCommon/interface/Logger.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef CONDCORE_DBCOMMON_LOGGER_H -#define CONDCORE_DBCOMMON_LOGGER_H - -#include "CondCore/DBCommon/interface/DbSession.h" -#include - -// -// Package: CondCore/DBCommon -// Class : Logger -// -/**\class -*/ -// -// Author: Zhen Xie -// - -namespace coral{ - //class ISchema; - class IQuery; -} -namespace cond{ - class UserLogInfo; - class LogDBEntry; - class SequenceManager; - class Logger{ - public: - explicit Logger(DbSession& sessionHandle); - ~Logger(); - - void connect( const std::string& logConnectionString, bool readOnly=false ); - //NB. for oracle only schema owner can do this - void createLogDBIfNonExist(); - // - //the current local time will be registered as execution time - // payloadName and containerName are also logged but they are deduced from payloadToken - void logOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadToken, - const std::string& payloadClass, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince - ); - // - //the current local time will be registered as execution time - // - // payloadName and containerName are also logged but they are deduced from payloadToken - void logFailedOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadToken, - const std::string& payloadClass, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage - ); - // - // Here we query the log for the last entry for these payloads. - // Parameter LogDBEntry& result is both input and output - // As input, it defines query condition. - // Last: in the sense of max rowid satisfies the requirement - // Note: if empty logentry is given, the absolute max is returned which - // normally is useless. - // return empty struct is no result found - // - void LookupLastEntryByProvenance( const std::string& provenance, - LogDBEntry& logentry, - bool filterFailedOp=true) const; - // - // Here we query the log for the last entry for these payloads. - // Parameter LogDBEntry& result is both input and output - // As input, it defines query condition. - // Last: in the sense of max rowid satisfies the requirement - // Note: if empty logentry is given, the absolute max is returned which - // normally is useless. - // - void LookupLastEntryByTag( const std::string& iovtag, - LogDBEntry& logentry, - bool filterFailedOp=true) const; - - void LookupLastEntryByTag( const std::string& iovtag, - const std::string & connectionStr, - LogDBEntry& logentry, - bool filterFailedOp=true) const; - - private: - void insertLogRecord(unsigned long long logId, - const std::string& utctime, - const std::string& destDB, - const std::string& payloadToken, - const std::string& payloadClass, - const cond::UserLogInfo& userLogInfo, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage); - - mutable DbSession m_sessionHandle; - //coral::ISchema& m_schema; - bool m_locked; - coral::IQuery* m_statusEditorHandle; - SequenceManager* m_sequenceManager; - bool m_logTableExists; - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/interface/PayloadRef.h b/CondCore/DBCommon/interface/PayloadRef.h deleted file mode 100644 index b95e83822926c..0000000000000 --- a/CondCore/DBCommon/interface/PayloadRef.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef CondCore_DBCommon_PayloadRef_h -#define CondCore_DBCommon_PayloadRef_h -#include "CondCore/DBCommon/interface/DbTransaction.h" - -namespace cond { - - /* manages various types of wrappers... - */ - template - class PayloadRef { - public: - - PayloadRef() {} - ~PayloadRef(){} - - // dereference (does not re-load) - const DataT & operator*() const { - return *m_Data; - } - - void clear() { - m_Data.reset(); - } - - - bool load( DbSession& dbSess, std::string const & itoken) { - clear(); - bool ok = false; - // is it ok to open a transaction here? or could be at higher level? - boost::shared_ptr tmp = dbSess.getTypedObject( itoken ); - if (tmp.get()) { - m_Data = tmp; - ok = true; - } - return ok; - } - - - private: - boost::shared_ptr m_Data; - }; - -} -#endif // CondCore_PayloadProxy_h diff --git a/CondCore/DBCommon/interface/SQLReport.h b/CondCore/DBCommon/interface/SQLReport.h deleted file mode 100644 index 0a0b5382e9634..0000000000000 --- a/CondCore/DBCommon/interface/SQLReport.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef CondCoreDBCommon_SQLReport_H -#define CondCoreDBCommon_SQLReport_H -#include -#include -#include "CondCore/DBCommon/interface/DbConnection.h" - -namespace cond { - - class DbConnection; - - class SQLReport { - - public: - - explicit SQLReport(DbConnection& connection); - - virtual ~SQLReport(){} - - void reportForConnection(const std::string& connectionString); - - bool putOnFile(std::string fileName=std::string("")); - - private: - - SQLReport(); - - DbConnection m_connection; - - std::stringstream m_report; - - }; -} - -inline -cond::SQLReport::SQLReport(DbConnection& connection):m_connection(connection),m_report(){ -} - -#endif // CondCoreDBCommon_SQLReport_H - - diff --git a/CondCore/DBCommon/interface/SequenceManager.h b/CondCore/DBCommon/interface/SequenceManager.h deleted file mode 100644 index 5bc106640e50f..0000000000000 --- a/CondCore/DBCommon/interface/SequenceManager.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef CondCore_DBCommon_SequenceManager_h -#define CondCore_DBCommon_SequenceManager_h - -#include -#include -#include "CondCore/DBCommon/interface/DbSession.h" -// -// Package: DBCommon -// Class : SequenceManager -// -/**\class SequenceManager SequenceManager.h CondCore/DBCommon/interface/SequenceManager.h - Description: utility class. Handle sequences. Universal to all DB backend. -*/ -// -// Author: Zhen Xie -// -namespace coral{ - class ISchema; - class AttributeList; -} -namespace cond { - class CoralTransaction; - class SequenceManager { - public: - /// Constructor - SequenceManager(cond::DbSession& coraldb, - const std::string& sequenceTableName); - - /// Destructor - ~SequenceManager(); - - /// Increments and returns a new valid oid for a table - unsigned long long incrementId( const std::string& reftableName ); - - /// Updates the last used id - void updateId( const std::string& reftableName, - unsigned long long lastId ); - - /// Clears the internal state - void clear(); - - /// Whether sequence table exists - bool existSequencesTable(); - - /// Creates the table holding the sequences - void createSequencesTable(); - - private: - - /// Locks the id entry in the ref table and returns the lastId value - bool lockEntry( coral::ISchema& schema, - const std::string& reftableName, - unsigned long long& lastId ); - void init(); - private: - /// The coraldb in use - cond::DbSession m_coraldb; - - /// Sequence table name - std::string m_sequenceTableName; - - /// Map of ids used. - std::map< std::string, unsigned long long > m_tableToId; - - /// Flag indicating whether the sequence table exists - bool m_sequenceTableExists; - - /// The where clause pinning a sequence entry - std::string m_whereClause; - - /// The data for the where clause - coral::AttributeList* m_whereData; - - /// The set clause for updating a sequence entry - std::string m_setClause; - bool m_started; - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/interface/SharedLibraryName.h b/CondCore/DBCommon/interface/SharedLibraryName.h deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/CondCore/DBCommon/interface/TagInfo.h b/CondCore/DBCommon/interface/TagInfo.h deleted file mode 100644 index 2568915a33c0b..0000000000000 --- a/CondCore/DBCommon/interface/TagInfo.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef CondCore_DBCommon_TagInfo_H -#define CondCore_DBCommon_TagInfo_H -#endif diff --git a/CondCore/DBCommon/interface/TagMetadata.h b/CondCore/DBCommon/interface/TagMetadata.h deleted file mode 100644 index 2cdf02f3dc5fe..0000000000000 --- a/CondCore/DBCommon/interface/TagMetadata.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef DBCommon_TagMetadata_h -#define DBCommon_TagMetadata_h -#include -#include -namespace cond{ - class TagMetadata{ - public: - std::string tag; - std::string pfn; - std::string recordname; - std::string labelname; - std::string objectname; - std::size_t hashvalue()const{ - boost::hash hasher; - std::size_t result=hasher(tag+pfn); - return result; - } - bool operator<(const TagMetadata& toCompare ) const { - return this->hashvalue() -namespace cond{ - class DbSession; - class TechnologyProxy{ - public: - explicit TechnologyProxy( ){} - virtual ~TechnologyProxy(){} - virtual void initialize( const DbConnection& connection )=0; - virtual std::string getRealConnectString( const std::string&userconnect ) const=0; - virtual std::string getRealConnectString( const std::string&userconnect, const std::string& transactionId ) const=0; - virtual bool isTransactional() const=0; - private: - TechnologyProxy( const TechnologyProxy& ); - const TechnologyProxy& operator=(const TechnologyProxy&); - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/interface/TechnologyProxyFactory.h b/CondCore/DBCommon/interface/TechnologyProxyFactory.h deleted file mode 100644 index 9ee524f5cb1fa..0000000000000 --- a/CondCore/DBCommon/interface/TechnologyProxyFactory.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CondCore_DBCommon_TechnologyProxyFactory_h -#define CondCore_DBCommon_TechnologyProxyFactory_h -#include "FWCore/PluginManager/interface/PluginFactory.h" -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -#include "CondCore/DBCommon/interface/Exception.h" - -#include -#include -namespace cond{ - typedef edmplugin::PluginFactory< cond::TechnologyProxy*() > TechnologyProxyFactory; -} -#endif diff --git a/CondCore/DBCommon/interface/Time.h b/CondCore/DBCommon/interface/Time.h deleted file mode 100644 index 00393549438d9..0000000000000 --- a/CondCore/DBCommon/interface/Time.h +++ /dev/null @@ -1 +0,0 @@ -#include "CondFormats/Common/interface/Time.h" diff --git a/CondCore/DBCommon/interface/UserLogInfo.h b/CondCore/DBCommon/interface/UserLogInfo.h deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/CondCore/DBCommon/plugins/BlobStreamingService.cc b/CondCore/DBCommon/plugins/BlobStreamingService.cc deleted file mode 100644 index 40c337272d607..0000000000000 --- a/CondCore/DBCommon/plugins/BlobStreamingService.cc +++ /dev/null @@ -1,230 +0,0 @@ -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include "CondCore/ORA/interface/IBlobStreamingService.h" - -#include "TBufferBlobStreamingService.h" - - -// -#include -// -#include "CoralBase/Blob.h" -// -#include -#include -#include -#include -#include - -// Function for testing BlobStreamingService -namespace test { - namespace BlobStreaming { - int test(); - } -} - -namespace cond { - - class BlobStreamingService : virtual public ora::IBlobStreamingService { - friend int test::BlobStreaming::test(); - - public: - - - BlobStreamingService(); - - virtual ~BlobStreamingService(); - - boost::shared_ptr write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression=true ) override; - - void read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ) override; - - - private: - - typedef std::pair uuid; - - static const size_t m_idsize=sizeof(uuid); - static const size_t m_offset = m_idsize + sizeof(unsigned long long); - static const size_t nVariants=3; - - enum Variant { OLD, COMPRESSED_TBUFFER, COMPRESSED_CHARS }; - static uuid const variantIds[nVariants]; - - - static Variant findVariant(const void* address); - static int isVectorChar(edm::TypeWithDict const & classDictionary); - - - static boost::shared_ptr compress(const void* addr, size_t isize); - static boost::shared_ptr expand(const coral::Blob& blobIn); - - - boost::shared_ptr rootService; - - }; - - - BlobStreamingService::BlobStreamingService() : rootService(new cond::TBufferBlobStreamingService()){} - - BlobStreamingService::~BlobStreamingService(){} - - boost::shared_ptr BlobStreamingService::write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression ) { - boost::shared_ptr blobOut; - int const k = isVectorChar(classDictionary); - switch (k) { - case 0 : - { - // at the moment we write TBuffer compressed, than we see.... - // we may wish to avoid one buffer copy... - boost::shared_ptr buffer = rootService->write(addressOfInputData, classDictionary); - if( useCompression ){ - blobOut = compress(buffer->startingAddress(),buffer->size()); - *reinterpret_cast(blobOut->startingAddress()) = variantIds[COMPRESSED_TBUFFER]; - } else { - blobOut = buffer; - } - } - break; - case 1 : - { - if( useCompression ){ - std::vector const & v = *reinterpret_cast< std::vector const *> (addressOfInputData); - blobOut = compress(&v.front(),v.size()); - *reinterpret_cast(blobOut->startingAddress()) = variantIds[COMPRESSED_CHARS]; - } else { - blobOut = rootService->write(addressOfInputData,classDictionary); - } - } - break; - case 2 : - { - if( useCompression ){ - std::vector const & v = *reinterpret_cast const *> (addressOfInputData); - blobOut = compress(&v.front(),v.size()); - *reinterpret_cast(blobOut->startingAddress()) = variantIds[COMPRESSED_CHARS]; - } else { - blobOut = rootService->write(addressOfInputData,classDictionary); - } - } - break; - - } - return blobOut; - - } - - - void BlobStreamingService::read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ) { - // protect against small blobs... - Variant v = (size_t(blobData.size()) < m_offset) ? OLD : findVariant(blobData.startingAddress()); - switch (v) { - case OLD : - { - rootService->read( blobData, addressOfContainer, classDictionary); - } - break; - case COMPRESSED_TBUFFER : - { - boost::shared_ptr blobIn = expand(blobData); - rootService->read( *blobIn, addressOfContainer, classDictionary); - } - break; - case COMPRESSED_CHARS : - { - boost::shared_ptr blobIn = expand(blobData); - int const k = isVectorChar(classDictionary); - switch (k) { - case 0 : - { - // error!!! - } - break; - case 1: - { - std::vector & v = *reinterpret_cast< std::vector *> (addressOfContainer); - // we should avoid the copy! - v.resize(blobIn->size()); - std::memcpy(&v.front(),blobIn->startingAddress(),v.size()); - } - break; - case 2: - { - std::vector & v = *reinterpret_cast< std::vector *> (addressOfContainer); - // we should avoid the copy! - v.resize(blobIn->size()); - std::memcpy(&v.front(),blobIn->startingAddress(),v.size()); - } - break; - } - } - } - } - - - - - const BlobStreamingService::uuid BlobStreamingService::variantIds[nVariants] = { - BlobStreamingService::uuid(0,0) - ,BlobStreamingService::uuid(0xf4e92f169c974e8eLL, 0x97851f372586010dLL) - ,BlobStreamingService::uuid(0xc9a95a45e60243cfLL, 0x8dc549534f9a9274LL) - }; - - - int BlobStreamingService::isVectorChar(edm::TypeWithDict const& classDictionary) { - if (classDictionary == typeid(std::vector)) return 1; - if (classDictionary == typeid(std::vector)) return 2; - return 0; - } - - - - BlobStreamingService::Variant BlobStreamingService::findVariant(const void* address) { - uuid const & id = *reinterpret_cast(address); - uuid const * v = std::find(variantIds,variantIds+nVariants,id); - return (v==variantIds+nVariants) ? OLD : (Variant)(v-variantIds); - } - - - boost::shared_ptr BlobStreamingService::compress(const void* addr, size_t isize) { - uLongf destLen = compressBound(isize); - size_t usize = destLen + m_offset; - boost::shared_ptr theBlob( new coral::Blob(usize)); - void * startingAddress = (unsigned char*)(theBlob->startingAddress())+ m_offset; - int zerr = compress2( (unsigned char*)(startingAddress), &destLen, - (unsigned char*)(addr), isize, - 9); - if (zerr!=0) edm::LogError("BlobStreamingService")<< "Compression error " << zerr; - destLen+= m_idsize + sizeof(unsigned long long); - theBlob->resize(destLen); - - startingAddress = (unsigned char*)(theBlob->startingAddress())+ m_idsize; - // write expanded size; - *reinterpret_cast(startingAddress)=isize; - return theBlob; - } - - boost::shared_ptr BlobStreamingService::expand(const coral::Blob& blobIn) { - if (size_t(blobIn.size()) < m_offset) return boost::shared_ptr(new coral::Blob()); - long long csize = blobIn.size() - m_offset; - unsigned char const * startingAddress = (unsigned char const*)(blobIn.startingAddress())+ m_idsize; - unsigned long long usize = *reinterpret_cast(startingAddress); - startingAddress += sizeof(unsigned long long); - boost::shared_ptr theBlob( new coral::Blob(usize)); - uLongf destLen = usize; - int zerr = uncompress((unsigned char *)(theBlob->startingAddress()), &destLen, - startingAddress, csize); - if (zerr!=0 || usize!=destLen) - edm::LogError("BlobStreamingService")<< "uncompressing error " << zerr - << " original size was " << usize - << " new size is " << destLen; - - return theBlob; - } - -} - -// keep the old good name -DEFINE_EDM_PLUGIN(cond::BlobStreamerPluginFactory,cond::BlobStreamingService,"COND/Services/BlobStreamingService"); diff --git a/CondCore/DBCommon/plugins/BuildFile.xml b/CondCore/DBCommon/plugins/BuildFile.xml deleted file mode 100644 index 126e691392b4a..0000000000000 --- a/CondCore/DBCommon/plugins/BuildFile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CondCore/DBCommon/plugins/FrontierProxy.cc b/CondCore/DBCommon/plugins/FrontierProxy.cc deleted file mode 100644 index ee1d59c0536b1..0000000000000 --- a/CondCore/DBCommon/plugins/FrontierProxy.cc +++ /dev/null @@ -1,143 +0,0 @@ -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "RelationalAccess/IWebCacheControl.h" -#include "FWCore/Catalog/interface/SiteLocalConfig.h" -#include "FWCore/ServiceRegistry/interface/Service.h" - -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -#include -#include - -namespace cond{ - class FrontierProxy: public TechnologyProxy{ - public: - FrontierProxy(); - ~FrontierProxy(); - void initialize( const DbConnection& connection) override; - std::string getRealConnectString( const std::string&userconnect ) const override; - std::string getRealConnectString( const std::string&userconnect, const std::string& transactionId ) const override; - bool isTransactional() const override { return false;} - - private: - //static unsigned int countslash(const std::string& input); - std::string makeRealConnectString( const std::string& initialConnection, const std::string& transactionId ) const ; - private: - const DbConnection* m_dbConnection; - std::vector m_refreshtablelist; - }; -}//ns cond - - -cond::FrontierProxy::FrontierProxy(): - m_dbConnection(0), - m_refreshtablelist(){ - m_refreshtablelist.reserve(10); - //table names for IOVSequence in ORA - //FIXME: do not use hard-coded names, ORA should provide them for a given container... - m_refreshtablelist.push_back("ORA_C_COND_IOVSEQUENCE"); - m_refreshtablelist.push_back("ORA_C_COND_IOVSEQU_A0"); - m_refreshtablelist.push_back("ORA_C_COND_IOVSEQU_A1"); - // do not refesh tag table in production... - // m_refreshtablelist.push_back(cond::MetaDataNames::metadataTable()); -} - -cond::FrontierProxy::~FrontierProxy(){ - m_refreshtablelist.clear(); -} - -namespace cond { - - unsigned int - countslash(const std::string& input) { - unsigned int count=0; - std::string::size_type slashpos( 0 ); - while( slashpos!=std::string::npos){ - slashpos = input.find('/', slashpos ); - if ( slashpos != std::string::npos ){ - ++count; - // start next search after this word - slashpos += 1; - } - } - return count; - } - - std::string - cond::FrontierProxy::makeRealConnectString( const std::string& initialConnection, - const std::string& transactionId ) const { - std::string realConn = initialConnection; - // for testing - //std::string res = initialConnection; - std::string proto("frontier://"); - std::string::size_type fpos=initialConnection.find(proto); - unsigned int nslash=countslash(initialConnection.substr(proto.size(),initialConnection.size()-fpos)); - if(nslash==1){ - edm::Service localconfservice; - if( !localconfservice.isAvailable() ){ - throw cms::Exception("edm::SiteLocalConfigService is not available"); - } - realConn=localconfservice->lookupCalibConnect(initialConnection); - //res=localconfservice->lookupCalibConnect(initialConnection); - } - if (!transactionId.empty()) { - size_t l = realConn.rfind('/'); - realConn.insert(l,"(freshkey="+transactionId+')'); - //size_t l = res.rfind('/'); - //res.insert(l,"(freshkey="+transactionId+')'); - } - - std::string refreshConnect; - std::string::size_type startRefresh = realConn.find("://"); - if (startRefresh != std::string::npos){ - startRefresh += 3; - } - std::string::size_type endRefresh=realConn.rfind("/", std::string::npos); - if (endRefresh == std::string::npos){ - refreshConnect = realConn; - }else{ - refreshConnect = realConn.substr(startRefresh, endRefresh-startRefresh); - if(refreshConnect.substr(0,1) != "("){ - //if the connect string is not a complicated parenthesized string, - // an http:// needs to be at the beginning of it - refreshConnect.insert(0, "http://"); - } - } - std::vector::const_iterator ibeg=m_refreshtablelist.begin(); - std::vector::const_iterator iend=m_refreshtablelist.end(); - for(std::vector::const_iterator it=ibeg; it!=iend; ++it){ - m_dbConnection->webCacheControl().refreshTable(refreshConnect,*it ); - } - - //std::cout << "***** frontier connection string " << std::endl; - //std::cout << res << std::endl; - return realConn; - } - -} - -std::string -cond::FrontierProxy::getRealConnectString( const std::string&userconnect ) const { - if( ! m_dbConnection ){ - throwException("The Technology Proxy has not been initialized.","FrontierProxy::getRealConnectString"); - } - return makeRealConnectString( userconnect, m_dbConnection->configuration().transactionId() ); -} - -std::string -cond::FrontierProxy::getRealConnectString( const std::string&userconnect, const std::string& transId ) const{ - if( ! m_dbConnection ){ - throwException("The Technology Proxy has not been initialized.","FrontierProxy::getRealConnectString"); - } - const std::string* tId = &transId; - if( transId.empty() ) tId = &m_dbConnection->configuration().transactionId(); - return makeRealConnectString( userconnect, *tId ); -} - -void -cond::FrontierProxy::initialize( const DbConnection& connection ) { - m_dbConnection = &connection; -} - -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -DEFINE_EDM_PLUGIN(cond::TechnologyProxyFactory,cond::FrontierProxy,"frontier"); diff --git a/CondCore/DBCommon/plugins/OracleProxy.cc b/CondCore/DBCommon/plugins/OracleProxy.cc deleted file mode 100644 index 62ddb06b00107..0000000000000 --- a/CondCore/DBCommon/plugins/OracleProxy.cc +++ /dev/null @@ -1,17 +0,0 @@ -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -namespace cond { - class OracleProxy: public TechnologyProxy { - public: - OracleProxy(){} - ~OracleProxy(){} - void initialize( const DbConnection& ) override{ - } - std::string getRealConnectString( const std::string &userconnect ) const override{ return userconnect;} - std::string getRealConnectString( const std::string &userconnect, const std::string& ) const override{ return userconnect;} - bool isTransactional() const override { return true;} - }; -}//ns cond - - -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -DEFINE_EDM_PLUGIN(cond::TechnologyProxyFactory,cond::OracleProxy,"oracle"); diff --git a/CondCore/DBCommon/plugins/SQLMonitoringService.cc b/CondCore/DBCommon/plugins/SQLMonitoringService.cc deleted file mode 100644 index 2d23cced6d8a1..0000000000000 --- a/CondCore/DBCommon/plugins/SQLMonitoringService.cc +++ /dev/null @@ -1,371 +0,0 @@ -#include "SQLMonitoringService.h" -#include "RelationalAccess/MonitoringException.h" -#include "CoralBase/MessageStream.h" -#include "CoralBase/TimeStamp.h" -#include "CoralKernel/Context.h" -#include "CoralKernel/IHandle.h" -#include "CondCore/DBCommon/interface/CoralServiceMacros.h" - -namespace cond -{ - SessionMonitor::SessionMonitor() - : active( false ), level( coral::monitor::Default ), stream() - { - } - - SessionMonitor::SessionMonitor( bool act, coral::monitor::Level lvl ) - : active( act ), level( lvl ), stream() - { - } - - SQLMonitoringService::SQLMonitoringService( const std::string& key ) - : coral::Service( key ), - m_events() - { - } - - SQLMonitoringService::~SQLMonitoringService() - { - } - - void SQLMonitoringService::setLevel( const std::string& contextKey, coral::monitor::Level level ) - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - { - m_events[contextKey] = SessionMonitor(); - m_monitoredDS.insert( contextKey ); - } - - m_events[contextKey].level = level; - - if( level == coral::monitor::Off ) - { - m_events[contextKey].active = false; - } - else - { - m_events[contextKey].active = true; - } - } - - coral::monitor::Level SQLMonitoringService::level( const std::string& contextKey ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::level", this->name() ); - - return (*rit).second.level; - } - - bool SQLMonitoringService::active( const std::string& contextKey ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::active", this->name() ); - - return (*rit).second.active; - } - - void SQLMonitoringService::enable( const std::string& contextKey ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::enable", this->name() ); - - (*rit).second.active = true; - } - - void SQLMonitoringService::disable( const std::string& contextKey ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::disable", this->name() ); - - (*rit).second.active = false; - } - - //relaxing filter on coral monitoring level due to a bug in the connection pool - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string& )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, int data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, int )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, long long data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, long long )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, double data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, double )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, const std::string& data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, const std::string& )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active /*&& (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - const coral::IMonitoringReporter& SQLMonitoringService::reporter() const - { - return( static_cast(*this) ); - } - - // The coral::IMonitoringReporter interface implementation - std::set< std::string > SQLMonitoringService::monitoredDataSources() const - { - return m_monitoredDS; - } - - void SQLMonitoringService::report( unsigned int /*level*/ ) const - { - Repository::const_iterator rit; - coral::MessageStream log( "MonitoringService" ); - - // Dummy reporting so far - for( rit = m_events.begin(); rit != m_events.end(); ++rit ) - reportForSession( rit, log ); - } - - void SQLMonitoringService::report( const std::string& contextKey, unsigned int /* level */ ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record", this->name() ); - - // Dummy reporting so far - coral::MessageStream log( "MonitoringService" ); - - reportForSession( rit, log ); - } - - void SQLMonitoringService::reportToOutputStream( const std::string& contextKey, std::ostream& os, unsigned int /* level */ ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record", this->name() ); - - // Dummy reporting so far - coral::MessageStream log( "MonitoringService" ); - - reportForSession( rit, os ); - } - - void SQLMonitoringService::reportOnEvent( EventStream::const_iterator& it, std::ostream& os ) const - { - std::string source(""); - switch( it->m_source ) { - case coral::monitor::Application: - source = "Application"; - break; - case coral::monitor::Session: - source = "Session"; - break; - case coral::monitor::Transaction: - source = "Transaction"; - break; - case coral::monitor::Statement: - source = "Statement"; - break; - default: - source = ""; - }; - - std::string type(""); - switch( it->m_type ) { - case coral::monitor::Info: - type = "Info"; - break; - case coral::monitor::Time: - type = "Time"; - break; - case coral::monitor::Warning: - type = "Warning"; - break; - case coral::monitor::Error: - type = "Error"; - break; - case coral::monitor::Config: - type = "Config"; - break; - default: - type = ""; - }; - - if(it->m_source == coral::monitor::Statement || it->m_source == coral::monitor::Transaction) - { - os << boost::posix_time::to_iso_extended_string((*it).m_time.time()) << ": " - << source << "; " - << type << "; " - <<(*it).m_description << ";"<< std::endl; - } - } - - - void SQLMonitoringService::reportOnEvent( EventStream::const_iterator& it,coral::MessageStream& os ) const - { - std::string source(""); - switch( it->m_source ) { - case coral::monitor::Application: - source = "Application"; - break; - case coral::monitor::Session: - source = "Session"; - break; - case coral::monitor::Transaction: - source = "Transaction"; - break; - case coral::monitor::Statement: - source = "Statement"; - break; - default: - source = ""; - }; - - std::string type(""); - switch( it->m_type ) { - case coral::monitor::Info: - type = "Info"; - break; - case coral::monitor::Time: - type = "Time"; - break; - case coral::monitor::Warning: - type = "Warning"; - break; - case coral::monitor::Error: - type = "Error"; - break; - case coral::monitor::Config: - type = "Config"; - break; - default: - type = ""; - }; - - if(it->m_source == coral::monitor::Statement || it->m_source == coral::monitor::Transaction) - { - os << boost::posix_time::to_iso_extended_string((*it).m_time.time()) << ": " - << source << "; " - << type << "; " - << (*it).m_description < -#include -#include - -namespace coral -{ - class MessageStream; -} - -namespace cond -{ - /// The raw stream of recorder monitoring events - typedef std::vector EventStream; - - /// The session related book-keeping of monitored events - struct SessionMonitor{ - SessionMonitor(); - SessionMonitor( bool, coral::monitor::Level ); - - bool active; - coral::monitor::Level level; - EventStream stream; - }; - - /// The repository of monitored events for all sessions where event streams - /// are identified by session key - typedef std::map< std::string, SessionMonitor > Repository; - - class SQLMonitoringService : public coral::Service, virtual public coral::monitor::IMonitoringService, virtual public coral::IMonitoringReporter - { - - public: - explicit SQLMonitoringService( const std::string& ); - virtual ~SQLMonitoringService(); - - public: - /** The implementation coral::IMonitoringService interface */ - /** - * Sets the level - * @param contextKey The session ID for which to make the report - * @param level The monitoring level ( Default, Debug, Trace ) - */ - virtual void setLevel( const std::string& contextKey, coral::monitor::Level level ); - - /** - * Return current monitoring level - */ - virtual coral::monitor::Level level( const std::string& contextKey ) const; - - /** - * Return monitoring activity status - */ - virtual bool active( const std::string& contextKey ) const; - - virtual void enable( const std::string& contextKey ); - virtual void disable( const std::string& contextKey ); - - /** - * Records an event without a payload ( time event for example ) - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - int data ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - long long data ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - double data ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - const std::string& data ); - - /** - * Return the current reporter - */ - virtual const coral::IMonitoringReporter& reporter() const; - - // - // The coral::IMonitoringReporter interface implementation - // - - /** - * Return the set of currently monitored data sources - */ - virtual std::set< std::string > monitoredDataSources() const; - - /** - * Reports all the events - * @param contextKey The session ID for which to make the report - */ - virtual void report( unsigned int level ) const; - - /** - * Reports the events to the default reporter - * @param contextKey The session ID for which to make the report - */ - virtual void report( const std::string& contextKey, unsigned int level ) const; - - /** - * Reports the events to the specified output stream - * @param contextKey The session ID for which to make the report - */ - virtual void reportToOutputStream( const std::string& contextKey, std::ostream& os, unsigned int level ) const; - - void reportOnEvent( EventStream::const_iterator& it, std::ostream& os ) const; - void reportOnEvent( EventStream::const_iterator& it, coral::MessageStream& os ) const; - - void reportForSession( Repository::const_iterator& it, std::ostream& os ) const; - void reportForSession( Repository::const_iterator& it, coral::MessageStream& os ) const; - private: - - /// The all events repository classified by the sessions' keys - Repository m_events; - std::set m_monitoredDS; - }; -} // namespace cond - -#endif // COND_SQLMONITORINGSERVICE_H diff --git a/CondCore/DBCommon/plugins/SQLiteProxy.cc b/CondCore/DBCommon/plugins/SQLiteProxy.cc deleted file mode 100644 index f1e84ce28bdb5..0000000000000 --- a/CondCore/DBCommon/plugins/SQLiteProxy.cc +++ /dev/null @@ -1,32 +0,0 @@ -#include "CondCore/DBCommon/interface/FipProtocolParser.h" -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -#include -namespace cond{ - class SQLiteProxy:public TechnologyProxy{ - public: - SQLiteProxy(){} - ~SQLiteProxy(){} - void initialize( const DbConnection& ) override{ - } - std::string - getRealConnectString( const std::string &userconnect ) const override{ - if( userconnect.find("sqlite_fip:") != std::string::npos ){ - cond::FipProtocolParser p; - return p.getRealConnect( userconnect ); - } - return userconnect; - } - - std::string - getRealConnectString( const std::string &userconnect, const std::string& ) const override { - return getRealConnectString( userconnect ); - } - - bool isTransactional() const override { return true;} - - }; -}//ns cond - -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -DEFINE_EDM_PLUGIN(cond::TechnologyProxyFactory,cond::SQLiteProxy,"sqlite"); - diff --git a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc deleted file mode 100644 index 48981f659197d..0000000000000 --- a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc +++ /dev/null @@ -1,161 +0,0 @@ -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "TBufferBlobStreamingService.h" -// -#include -#include -#include -#include -// -#include "TBufferFile.h" - -#include "FWCore/Utilities/interface/TypeWithDict.h" - -typedef void (TBuffer::*WriteArrayFn_t)(const void *obj, Int_t n); -typedef void (TBuffer::*ReadArrayFn_t)(void *obj, Int_t n); - -#define PRIMITIVE(x) { \ - typeid(x), \ - reinterpret_cast( \ - (void (TBuffer::*)(const x*, Int_t))&TBuffer::WriteFastArray), \ - reinterpret_cast( \ - (void (TBuffer::*)(x*, Int_t))&TBuffer::ReadFastArray) \ -} - -struct Primitive { - const std::type_info &type; - WriteArrayFn_t writeArrayFn; - ReadArrayFn_t readArrayFn; - - inline bool operator == (const std::type_info &other) const - { return type == other; } -} static const primitives[] = { - PRIMITIVE(Bool_t), - PRIMITIVE(Char_t), - PRIMITIVE(UChar_t), - PRIMITIVE(Short_t), - PRIMITIVE(UShort_t), - PRIMITIVE(Int_t), - PRIMITIVE(UInt_t), - PRIMITIVE(Long_t), - PRIMITIVE(ULong_t), - PRIMITIVE(Long64_t), - PRIMITIVE(ULong64_t), - PRIMITIVE(Float_t), - PRIMITIVE(Double_t) -}; - -static const std::size_t nPrimitives = - (sizeof primitives / sizeof primitives[0]); - -#undef PRIMTIVE - -cond::TBufferBlobTypeInfo::TBufferBlobTypeInfo( edm::TypeWithDict const & type_) - : m_arraySize(0), m_class(0), m_primitive(0) -{ - edm::TypeWithDict type = type_; - while(true) { - type = type.finalType(); - - if (!type.isArray()) - break; - - if (!m_arraySize) - m_arraySize = 1; - m_arraySize *= type.arrayLength(); - type = type.toType(); - } - - if (type.isClass()) { - const std::type_info &typeInfo = type.typeInfo(); - m_class = TClass::GetClass(typeInfo); - if (!m_class) - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "No ROOT class registered for " + type.name()); - } else if (type.isFundamental()) { - if (!m_arraySize) - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "Only arrays of primitive types supported. " - "Please to not use a Blob for this member."); - - m_primitive = std::find(primitives, primitives + nPrimitives, - type.typeInfo()) - primitives; - if (m_primitive >= nPrimitives) - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "Cannot handle primitive type " + type.name()); - } else - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "Cannot handle C++ type " + type.name()); -} - - -cond::TBufferBlobStreamingService::TBufferBlobStreamingService(){ -} - -cond::TBufferBlobStreamingService::~TBufferBlobStreamingService(){ -} - -#include -namespace { - inline char * reallocInBlob( boost::shared_ptr theBlob, char* p, size_t newsize, size_t oldsize) { - // various checks missing.... - theBlob->resize(newsize); - return (char*)theBlob->startingAddress(); - - } -} - -boost::shared_ptr cond::TBufferBlobStreamingService::write( const void* addr, - edm::TypeWithDict const & classDictionary, - bool ){ - TBufferBlobTypeInfo theType( classDictionary ); - if (theType.m_class && theType.m_class->GetActualClass(addr) != theType.m_class) - throw cond::Exception("TBufferBlobWriter::write object to stream is " - "not of actual class."); - - boost::shared_ptr theBlob( new coral::Blob ); - //theBlob->resize(1024); - - // with new root... - // TBufferFile buffer(TBufferFile::kWrite, theBlob->size(), theBlob->startingAddress(), kFALSE, boost::bind(reallocInBlob, theBlob,_1,_2,_3)); - TBufferFile buffer(TBufferFile::kWrite); - buffer.InitMap(); - - if (theType.m_arraySize && !theType.m_class) - (buffer.*primitives[theType.m_primitive].writeArrayFn)(addr, theType.m_arraySize); - else if (theType.m_arraySize) - buffer.WriteFastArray(const_cast(addr), theType.m_class, theType.m_arraySize); - else - buffer.StreamObject(const_cast(addr), theType.m_class); - - Int_t size = buffer.Length(); - - theBlob->resize(size); - void *startingAddress = theBlob->startingAddress(); - std::memcpy(startingAddress, buffer.Buffer(), size); - - return theBlob; -} - -void cond::TBufferBlobStreamingService::read( const coral::Blob& blobData, - void* addr, - edm::TypeWithDict const & classDictionary ){ - TBufferBlobTypeInfo theType( classDictionary ); - const void *startingAddress = blobData.startingAddress(); - size_t size = blobData.size(); - if (!size) - return; - - TBufferFile buffer(TBufferFile::kRead, size, - const_cast(startingAddress), kFALSE); - - buffer.InitMap(); - - if (theType.m_arraySize && !theType.m_class) - (buffer.*primitives[theType.m_primitive].readArrayFn)(addr, theType.m_arraySize); - else if (theType.m_arraySize) - buffer.ReadFastArray(addr, theType.m_class, theType.m_arraySize); - else - buffer.StreamObject(addr, theType.m_class); -} - diff --git a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h deleted file mode 100644 index 33deb51d803d6..0000000000000 --- a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef CondCore_DBCommon_TBufferBlobStreamer_h -#define CondCore_DBCommon_TBufferBlobStreamer_h - -#include "CondCore/ORA/interface/IBlobStreamingService.h" -// -#include -// -#include "CoralBase/Blob.h" - -#include "FWCore/Utilities/interface/TypeWithDict.h" - -#include "TClass.h" - -namespace cond { - class TBufferBlobTypeInfo { - public: - TBufferBlobTypeInfo( const edm::TypeWithDict& type ); - - /// length of the plain C array (zero otherwise) - std::size_t m_arraySize; - - /// The class as seen by the ROOT streaming services - TClass *m_class; - - /// the primitive C++ type if m_class is unset - unsigned int m_primitive; - }; - - class TBufferBlobStreamingService : virtual public ora::IBlobStreamingService { - public: - TBufferBlobStreamingService(); - - virtual ~TBufferBlobStreamingService(); - - boost::shared_ptr write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression=false ); - - void read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ); - - }; - -} - -#endif // COND_TBUFFERBLOBSTREAMER_H diff --git a/CondCore/DBCommon/python/CondDBCommon_cfi.py b/CondCore/DBCommon/python/CondDBCommon_cfi.py deleted file mode 100644 index 68742784c4a78..0000000000000 --- a/CondCore/DBCommon/python/CondDBCommon_cfi.py +++ /dev/null @@ -1,19 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -CondDBCommon = cms.PSet( - DBParameters = cms.PSet( - authenticationPath = cms.untracked.string(''), - authenticationSystem = cms.untracked.int32(0), - connectionRetrialPeriod = cms.untracked.int32(10), - idleConnectionCleanupPeriod = cms.untracked.int32(10), - messageLevel = cms.untracked.int32(0), - enablePoolAutomaticCleanUp = cms.untracked.bool(False), - enableConnectionSharing = cms.untracked.bool(True), - connectionRetrialTimeOut = cms.untracked.int32(60), - connectionTimeOut = cms.untracked.int32(60), - enableReadOnlySessionOnUpdateConnection = cms.untracked.bool(False) - ), - connect = cms.string('protocol://db/schema') ##db/schema" - -) - diff --git a/CondCore/DBCommon/python/CondDBSetup_cfi.py b/CondCore/DBCommon/python/CondDBSetup_cfi.py deleted file mode 100644 index e4931346f067e..0000000000000 --- a/CondCore/DBCommon/python/CondDBSetup_cfi.py +++ /dev/null @@ -1,17 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -CondDBSetup = cms.PSet( - DBParameters = cms.PSet( - authenticationPath = cms.untracked.string(''), - authenticationSystem = cms.untracked.int32(0), - connectionRetrialPeriod = cms.untracked.int32(10), - idleConnectionCleanupPeriod = cms.untracked.int32(10), - messageLevel = cms.untracked.int32(0), - enablePoolAutomaticCleanUp = cms.untracked.bool(False), - enableConnectionSharing = cms.untracked.bool(True), - connectionRetrialTimeOut = cms.untracked.int32(60), - connectionTimeOut = cms.untracked.int32(60), - enableReadOnlySessionOnUpdateConnection = cms.untracked.bool(False) - ) -) - diff --git a/CondCore/DBCommon/src/Auth.cc b/CondCore/DBCommon/src/Auth.cc deleted file mode 100644 index ac9853c9e4de0..0000000000000 --- a/CondCore/DBCommon/src/Auth.cc +++ /dev/null @@ -1,22 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/Auth.h" - -namespace cond{ - - const char* Auth::COND_AUTH_PATH = "COND_AUTH_PATH"; - const char* Auth::COND_AUTH_SYS = "COND_AUTH_SYS"; - - const std::string Auth::COND_ADMIN_GROUP("COND_ADMIN_GROUP"); - - const std::string Auth::COND_DEFAULT_ROLE("COND_DEFAULT_ROLE"); - const std::string Auth::COND_WRITER_ROLE("COND_WRITER_ROLE"); - const std::string Auth::COND_READER_ROLE("COND_READER_ROLE"); - const std::string Auth::COND_ADMIN_ROLE("COND_ADMIN_ROLE"); - const std::string Auth::COND_DEFAULT_PRINCIPAL("COND_DEFAULT_PRINCIPAL"); - const std::string Auth::COND_KEY("Memento"); - - // horrible workaround: coral does not allow to define custom properties: only the pre-defined ones can be used! In this case, AuthenticationFile - const std::string Auth::COND_AUTH_PATH_PROPERTY("AuthenticationFile"); - - -} diff --git a/CondCore/DBCommon/src/BlobStreamerPluginFactory.cc b/CondCore/DBCommon/src/BlobStreamerPluginFactory.cc deleted file mode 100644 index d87725fe7c109..0000000000000 --- a/CondCore/DBCommon/src/BlobStreamerPluginFactory.cc +++ /dev/null @@ -1,4 +0,0 @@ -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -EDM_REGISTER_PLUGINFACTORY(cond::BlobStreamerPluginFactory,"BlobStreamerPlugin"); - - diff --git a/CondCore/DBCommon/src/ClassID.cc b/CondCore/DBCommon/src/ClassID.cc deleted file mode 100644 index ada6848983164..0000000000000 --- a/CondCore/DBCommon/src/ClassID.cc +++ /dev/null @@ -1,64 +0,0 @@ -#include "CondCore/DBCommon/interface/ClassID.h" -#include "CondCore/ORA/interface/Guid.h" -#include -#include "cxxabi.h" - -namespace cond { - - char const * className(const std::type_info& t) { - int status=0; - return __cxxabiv1::__cxa_demangle(t.name(), 0, 0, &status); - } - -// namespace { -// std::string id(const std::type_info& t) { -// const Reflex::Type type=Reflex::Type::ByTypeInfo(t); -// std::string s; -// if (type) { -// Reflex::PropertyList pl = type.Properties(); -// if ( pl.HasProperty("ClassID") ) { -// s = pl.PropertyAsString("ClassID"); -// } -// else { -// char buff[20]; -// genMD5(type.Name(Reflex::SCOPED),buff); -// Guid* gd = reinterpret_cast(buff); -// s = gd->toString(); -// } -// } -// else { -// // only for test -// std::string name = className(t); -// char buff[20]; -// genMD5(name,buff); -// Guid* gd = reinterpret_cast(buff); -// s = gd->toString(); -// } -// return s; -// } -// } - - - /** - ClassIDRegistry::ClassIDRegistry(std::string const & pfix) : prefix(pfix+"/"){} - - const char * ClassIDRegistry::registerMe(const std::type_info& t) { - sids.push_back(prefix+id(t)+"\0"); - csids.push_back(sids.back().data()); - return sids.back().c_str(); - } - - const char * ClassInfo::registerMe(const std::type_info& t) { - return registry->registerMe(t); - } - - **/ - - std::string ClassInfo::pluginName(std::string const & prefix) const { - return prefix + "/" +className(tinfo); - //return prefix + "/" +id(tinfo); - } - -} - -EDM_REGISTER_PLUGINFACTORY(cond::ClassInfoFactory, "CondFormatsID"); diff --git a/CondCore/DBCommon/src/ConvertIOVSyncValue.cc b/CondCore/DBCommon/src/ConvertIOVSyncValue.cc deleted file mode 100644 index 0f67b21789d15..0000000000000 --- a/CondCore/DBCommon/src/ConvertIOVSyncValue.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include "CondCore/DBCommon/interface/ConvertIOVSyncValue.h" -#include "DataFormats/Provenance/interface/LuminosityBlockID.h" - - -namespace cond { - - edm::IOVSyncValue toIOVSyncValue(cond::Time_t time, cond::TimeType timetype, bool startOrStop) { - switch (timetype) { - case cond::runnumber : - return edm::IOVSyncValue( edm::EventID(time, - startOrStop ? 0 : edm::EventID::maxEventNumber(), - startOrStop ? 0 : edm::EventID::maxEventNumber()) - ); - case cond::lumiid : - { - edm::LuminosityBlockID l(time); - return edm::IOVSyncValue(edm::EventID(l.run(), - l.luminosityBlock(), - startOrStop ? 0 : edm::EventID::maxEventNumber()) - ); - } - case cond::timestamp : - return edm::IOVSyncValue( edm::Timestamp(time)); - default: - return edm::IOVSyncValue::invalidIOVSyncValue(); - } - } - - cond::Time_t fromIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype) { - switch (timetype) { - case cond::runnumber : - return time.eventID().run(); - case cond::lumiid : - { - edm::LuminosityBlockID lum(time.eventID().run(), time.luminosityBlockNumber()); - return lum.value(); - } - case cond::timestamp : - return time.time().value(); - default: - return 0; - } - } - - // the minimal maximum-time an IOV can extend to - edm::IOVSyncValue limitedIOVSyncValue(cond::Time_t time, cond::TimeType timetype) { - switch (timetype) { - case cond::runnumber : - // last lumi and event of this run - return edm::IOVSyncValue( edm::EventID(time, - edm::EventID::maxEventNumber(), - edm::EventID::maxEventNumber()) - ); - case cond::lumiid : - { - // the same lumiblock - edm::LuminosityBlockID l(time); - return edm::IOVSyncValue(edm::EventID(l.run(), - l.luminosityBlock(), - edm::EventID::maxEventNumber()) - ); - } - case cond::timestamp : - // next event ? - return edm::IOVSyncValue::invalidIOVSyncValue(); - default: - return edm::IOVSyncValue::invalidIOVSyncValue(); - } - } - - edm::IOVSyncValue limitedIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype) { - switch (timetype) { - case cond::runnumber : - // last event of this run - return edm::IOVSyncValue(edm::EventID(time.eventID().run(), - edm::EventID::maxEventNumber(), - edm::EventID::maxEventNumber()) - ); - case cond::lumiid : - // the same lumiblock - return edm::IOVSyncValue(edm::EventID(time.eventID().run(), - time.luminosityBlockNumber(), - edm::EventID::maxEventNumber()) - ); - case cond::timestamp : - // same lumiblock - return edm::IOVSyncValue(edm::EventID(time.eventID().run(), - time.luminosityBlockNumber(), - edm::EventID::maxEventNumber()) - ); - default: - return edm::IOVSyncValue::invalidIOVSyncValue(); - } - } - -} - - diff --git a/CondCore/DBCommon/src/DbConnection.cc b/CondCore/DBCommon/src/DbConnection.cc deleted file mode 100644 index 3649e2861dc59..0000000000000 --- a/CondCore/DBCommon/src/DbConnection.cc +++ /dev/null @@ -1,114 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/Exception.h" -// ora includes -#include "CondCore/ORA/interface/ConnectionPool.h" - -namespace cond { - class DbConnection::ConnectionImpl { - public: - ConnectionImpl(): - m_initialized(false), - m_connectionPool( new ora::ConnectionPool ), - m_configuration(){ - } - - virtual ~ConnectionImpl(){ - close(); - } - - void close(){ - m_connectionPool.reset(); - } - - bool m_initialized; - boost::shared_ptr m_connectionPool; - DbConnectionConfiguration m_configuration; - }; -} - -cond::DbConnection::DbConnection(): - m_implementation(new ConnectionImpl()){ - configure(); -} - -cond::DbConnection::DbConnection(const DbConnection& conn): - m_implementation( conn.m_implementation ){ -} - -cond::DbConnection::~DbConnection(){ -} - -cond::DbConnection& cond::DbConnection::operator=(const cond::DbConnection& conn) -{ - if(this!=&conn) m_implementation = conn.m_implementation; - return *this; -} - -void cond::DbConnection::configure() -{ - m_implementation->m_configuration.configure( m_implementation->m_connectionPool->configuration() ); - m_implementation->m_initialized = true; -} - -void cond::DbConnection::configure( cond::DbConfigurationDefaults defaultItem ){ - m_implementation->m_configuration = DbConnectionConfiguration::defaultConfigurations()[ defaultItem ]; - configure(); -} - -void -cond::DbConnection::configure( const edm::ParameterSet& connectionPset ){ - m_implementation->m_configuration.setParameters( connectionPset ); - configure(); -} - -cond::DbSession cond::DbConnection::createSession() const{ - if(!isOpen()) - throw cond::Exception("DbConnection::createSession: cannot create session. Connection has been closed."); - return cond::DbSession( *this ); -} - - -void cond::DbConnection::close() -{ - m_implementation->close(); -} - -bool cond::DbConnection::isOpen() const -{ - return m_implementation->m_connectionPool.get(); -} - -cond::DbConnectionConfiguration & cond::DbConnection::configuration() -{ - return m_implementation->m_configuration; -} - -cond::DbConnectionConfiguration const & cond::DbConnection::configuration() const -{ - return m_implementation->m_configuration; -} - -boost::shared_ptr cond::DbConnection::connectionPool() const { - return m_implementation->m_connectionPool; -} - -coral::IConnectionService& cond::DbConnection::connectionService() const { - if(!isOpen()) - throw cond::Exception("DbConnection::connectionService: cannot get connection service. Connection has not been open."); - return m_implementation->m_connectionPool->connectionService(); -} - -const coral::IMonitoringReporter& cond::DbConnection::monitoringReporter() const { - if(!isOpen()) - throw cond::Exception("DbConnection::monitoringReporter: cannot get connection service. Connection has not been open."); - return m_implementation->m_connectionPool->connectionService().monitoringReporter(); -} - -coral::IWebCacheControl& cond::DbConnection::webCacheControl() const{ - if(!isOpen()) - throw cond::Exception("DbConnection::webCacheControl: cannot get connection service. Connection has not been open."); - return m_implementation->m_connectionPool->connectionService().webCacheControl(); -} - diff --git a/CondCore/DBCommon/src/DbConnectionConfiguration.cc b/CondCore/DBCommon/src/DbConnectionConfiguration.cc deleted file mode 100644 index 4efa93dade98f..0000000000000 --- a/CondCore/DBCommon/src/DbConnectionConfiguration.cc +++ /dev/null @@ -1,339 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/DbConnectionConfiguration.h" -#include "CondCore/DBCommon/interface/CoralServiceManager.h" -#include "CondCore/DBCommon/interface/Auth.h" -// CMSSW includes -#include "FWCore/ParameterSet/interface/ParameterSet.h" -//#include "FWCore/MessageLogger/interface/MessageLogger.h" -// coral includes -#include "RelationalAccess/IConnectionServiceConfiguration.h" -#include "CoralKernel/Context.h" -#include "CoralKernel/IProperty.h" -#include "CoralKernel/IPropertyManager.h" -// externals -#include - -const std::vector& -cond::DbConnectionConfiguration::defaultConfigurations(){ - static const std::vector s_defaultConfigurations = - { cond::DbConnectionConfiguration(), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "", coral::Error, coral::monitor::Off, false ), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "", coral::Error, coral::monitor::Off, false ), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "",coral::Error, coral::monitor::Off, false ), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "",coral::Error, coral::monitor::Off, false ) - }; - return s_defaultConfigurations; -} - -cond::DbConnectionConfiguration::DbConnectionConfiguration(): - m_connectionSharing(false,false), - m_connectionTimeOut(false,0), - m_readOnlySessionOnUpdateConnections(false,false), - m_connectionRetrialPeriod(false,0), - m_connectionRetrialTimeOut(false,0), - m_poolAutomaticCleanUp(false,false), - m_authPath(""), - m_authSys(0), - m_transactionId(), - m_messageLevel(coral::Error), - m_monitoringLevel(coral::monitor::Off), - m_SQLMonitoring(false), - m_pluginManager(new CoralServiceManager){ -} - -cond::DbConnectionConfiguration::DbConnectionConfiguration( bool connectionSharing, - int connectionTimeOut, - bool readOnlySessionOnUpdateConnections, - int connectionRetrialPeriod, - int connectionRetrialTimeOut, - bool poolAutomaticCleanUp, - const::std::string& authenticationPath, - const::std::string& transactionId, - coral::MsgLevel msgLev, - coral::monitor::Level monitorLev, - bool SQLMonitoring ): - m_connectionSharing(true,connectionSharing), - m_connectionTimeOut(true,connectionTimeOut), - m_readOnlySessionOnUpdateConnections(true,readOnlySessionOnUpdateConnections), - m_connectionRetrialPeriod(true,connectionRetrialPeriod), - m_connectionRetrialTimeOut(true,connectionRetrialTimeOut), - m_poolAutomaticCleanUp(true,poolAutomaticCleanUp), - m_authPath(authenticationPath), - m_authSys(0), - m_transactionId(transactionId), - m_messageLevel(msgLev), - m_monitoringLevel(monitorLev), - m_SQLMonitoring(SQLMonitoring), - m_pluginManager(new CoralServiceManager){ -} - -cond::DbConnectionConfiguration::DbConnectionConfiguration( const cond::DbConnectionConfiguration& rhs): - m_connectionSharing(rhs.m_connectionSharing), - m_connectionTimeOut(rhs.m_connectionTimeOut), - m_readOnlySessionOnUpdateConnections(rhs.m_readOnlySessionOnUpdateConnections), - m_connectionRetrialPeriod(rhs.m_connectionRetrialPeriod), - m_connectionRetrialTimeOut(rhs.m_connectionRetrialTimeOut), - m_poolAutomaticCleanUp(rhs.m_poolAutomaticCleanUp), - m_authPath(rhs.m_authPath), - m_authSys(rhs.m_authSys), - m_transactionId(rhs.m_transactionId), - m_messageLevel(rhs.m_messageLevel), - m_monitoringLevel(rhs.m_monitoringLevel), - m_SQLMonitoring(rhs.m_SQLMonitoring), - m_pluginManager(new CoralServiceManager){ -} - -cond::DbConnectionConfiguration::~DbConnectionConfiguration(){ - delete m_pluginManager; -} - -cond::DbConnectionConfiguration& -cond::DbConnectionConfiguration::operator=( const cond::DbConnectionConfiguration& rhs){ - m_connectionSharing = rhs.m_connectionSharing; - m_connectionTimeOut = rhs.m_connectionTimeOut; - m_readOnlySessionOnUpdateConnections = rhs.m_readOnlySessionOnUpdateConnections; - m_connectionRetrialPeriod = rhs.m_connectionRetrialPeriod; - m_connectionRetrialTimeOut = rhs.m_connectionRetrialTimeOut; - m_poolAutomaticCleanUp = rhs.m_poolAutomaticCleanUp; - m_authPath = rhs.m_authPath; - m_authSys = rhs.m_authSys; - m_transactionId=rhs.m_transactionId; - m_messageLevel = rhs.m_messageLevel; - m_monitoringLevel = rhs.m_monitoringLevel; - m_SQLMonitoring = rhs.m_SQLMonitoring; - return *this; -} - -void cond::DbConnectionConfiguration::setParameters( const edm::ParameterSet& connectionPset ){ - std::string authPath = connectionPset.getUntrackedParameter("authenticationPath",""); - setAuthenticationPath(authPath); - int authSysPar = connectionPset.getUntrackedParameter("authenticationSystem",0); - setAuthenticationSystem( authSysPar ); - setTransactionId(connectionPset.getUntrackedParameter("transactionId","")); - int messageLevel = connectionPset.getUntrackedParameter("messageLevel",0); - coral::MsgLevel level = coral::Error; - switch (messageLevel) { - case 0 : - level = coral::Error; - break; - case 1: - level = coral::Warning; - break; - case 2: - level = coral::Info; - break; - case 3: - level = coral::Debug; - break; - default: - level = coral::Error; - } - setMessageLevel(level); - bool enableConnectionSharing = connectionPset.getUntrackedParameter("enableConnectionSharing",true); - setConnectionSharing( enableConnectionSharing ); - int connectionTimeOut = connectionPset.getUntrackedParameter("connectionTimeOut",600); - setConnectionTimeOut( connectionTimeOut ); - bool enableReadOnlySessionOnUpdateConnection = connectionPset.getUntrackedParameter("enableReadOnlySessionOnUpdateConnection",true); - setReadOnlySessionOnUpdateConnections( enableReadOnlySessionOnUpdateConnection ); - int connectionRetrialPeriod = connectionPset.getUntrackedParameter("connectionRetrialPeriod",30); - setConnectionRetrialPeriod( connectionRetrialPeriod ); - int connectionRetrialTimeOut = connectionPset.getUntrackedParameter("connectionRetrialTimeOut",180); - setConnectionRetrialTimeOut( connectionRetrialTimeOut ); - bool enablePoolAutomaticCleanUp = connectionPset.getUntrackedParameter("enablePoolAutomaticCleanUp",false); - setPoolAutomaticCleanUp( enablePoolAutomaticCleanUp ); - //int idleConnectionCleanupPeriod = connectionPset.getUntrackedParameter("idleConnectionCleanupPeriod",300); -} - -void cond::DbConnectionConfiguration::setConnectionSharing( bool flag ){ - m_connectionSharing.first = true; - m_connectionSharing.second = flag; -} - -void cond::DbConnectionConfiguration::setConnectionTimeOut( int timeOut ){ - m_connectionTimeOut.first = true; - m_connectionTimeOut.second = timeOut; -} - -void cond::DbConnectionConfiguration::setReadOnlySessionOnUpdateConnections( bool flag ){ - m_readOnlySessionOnUpdateConnections.first = true; - m_readOnlySessionOnUpdateConnections.second = flag; -} - -void cond::DbConnectionConfiguration::setConnectionRetrialPeriod( int period ){ - m_connectionRetrialPeriod.first = true; - m_connectionRetrialPeriod.second = period; -} - -void cond::DbConnectionConfiguration::setConnectionRetrialTimeOut( int timeout ){ - m_connectionRetrialTimeOut.first = true; - m_connectionRetrialTimeOut.second = timeout; -} - -void cond::DbConnectionConfiguration::setPoolAutomaticCleanUp( bool flag ){ - m_poolAutomaticCleanUp.first = true; - m_poolAutomaticCleanUp.second = flag; -} - -void cond::DbConnectionConfiguration::setAuthenticationPath( const std::string& p ){ - m_authPath = p; -} - -void cond::DbConnectionConfiguration::setAuthenticationSystem( int authSysCode ){ - m_authSys = authSysCode; -} - -void cond::DbConnectionConfiguration::setTransactionId( std::string const & tid) { - m_transactionId=tid; -} - -void cond::DbConnectionConfiguration::setMessageLevel( coral::MsgLevel l ) { - m_messageLevel = l; -} - -void cond::DbConnectionConfiguration::setMonitoringLevel( coral::monitor::Level l) -{ - m_monitoringLevel = l; -} - - -void cond::DbConnectionConfiguration::setSQLMonitoring( bool flag ){ - m_SQLMonitoring = flag; -} - -void cond::DbConnectionConfiguration::configure( coral::IConnectionServiceConfiguration& coralConfig) const -{ - // message streaming - coral::MessageStream::setMsgVerbosity( m_messageLevel ); - std::string authServiceName("CORAL/Services/EnvironmentAuthenticationService"); - std::string authPath = m_authPath; - // authentication - if( authPath.empty() ){ - // first try to check the env... - const char* authEnv = ::getenv( Auth::COND_AUTH_PATH ); - if(authEnv){ - authPath += authEnv; - } - } - int authSys = m_authSys; - // first attempt, look at the env... - const char* authSysEnv = ::getenv( Auth::COND_AUTH_SYS ); - if( authSysEnv ){ - authSys = ::atoi( authSysEnv ); - } - if( authSys != CondDbKey && authSys != CoralXMLFile ){ - // take the default - authSys = CondDbKey; - } - std::string servName(""); - if( authSys == CondDbKey ){ - if( authPath.empty() ){ - const char* authEnv = ::getenv("HOME"); - if(authEnv){ - authPath += authEnv; - } - } - servName = "COND/Services/RelationalAuthenticationService"; - //edm::LogInfo("DbSessionInfo") << "Authentication using Keys"; - } else if( authSys == CoralXMLFile ){ - if( authPath.empty() ){ - authPath = "."; - } - servName = "COND/Services/XMLAuthenticationService"; - //edm::LogInfo("DbSessionInfo") << "Authentication using XML File"; - } - if( !authPath.empty() ){ - authServiceName = servName; - coral::Context::instance().PropertyManager().property(Auth::COND_AUTH_PATH_PROPERTY)->set(authPath); - coral::Context::instance().loadComponent( authServiceName, m_pluginManager ); - } - coralConfig.setAuthenticationService( authServiceName ); - // connection sharing - if(m_connectionSharing.first) - { - if(m_connectionSharing.second) coralConfig.enableConnectionSharing(); - else coralConfig.disableConnectionSharing(); - } - // connection timeout - if(m_connectionTimeOut.first) - { - coralConfig.setConnectionTimeOut(m_connectionTimeOut.second); - } - // read only session on update connection - if(m_readOnlySessionOnUpdateConnections.first) - { - if(m_readOnlySessionOnUpdateConnections.second) coralConfig.enableReadOnlySessionOnUpdateConnections(); - else coralConfig.disableReadOnlySessionOnUpdateConnections(); - } - // pool automatic clean up - if(m_poolAutomaticCleanUp.first) - { - if(m_poolAutomaticCleanUp.second) coralConfig.enablePoolAutomaticCleanUp(); - else coralConfig.disablePoolAutomaticCleanUp(); - } - // connection retrial period - if(m_connectionRetrialPeriod.first) - { - coralConfig.setConnectionRetrialPeriod( m_connectionRetrialPeriod.second ); - } - // connection retrial timeout - if( m_connectionRetrialTimeOut.first) - { - coralConfig.setConnectionRetrialTimeOut(m_connectionRetrialTimeOut.second ); - } - // monitoring level - coralConfig.setMonitoringLevel( m_monitoringLevel ); - // SQL monitoring - if( m_SQLMonitoring ) - { - std::string pluginName("COND/Services/SQLMonitoringService"); - coral::Context::instance().loadComponent( pluginName, m_pluginManager ); - coralConfig.setMonitoringLevel(coral::monitor::Trace); - } - -} - -bool cond::DbConnectionConfiguration::isConnectionSharingEnabled() const -{ - return m_connectionSharing.second; -} - -int cond::DbConnectionConfiguration::connectionTimeOut() const { - return m_connectionTimeOut.second; -} - -bool cond::DbConnectionConfiguration::isReadOnlySessionOnUpdateConnectionEnabled() const { - return m_readOnlySessionOnUpdateConnections.second; -} - -int cond::DbConnectionConfiguration::connectionRetrialPeriod() const { - return m_connectionRetrialPeriod.second; -} - -int cond::DbConnectionConfiguration::connectionRetrialTimeOut() const { - return m_connectionRetrialTimeOut.second; -} - -bool cond::DbConnectionConfiguration::isPoolAutomaticCleanUpEnabled() const { - return m_poolAutomaticCleanUp.second; -} - -const std::string& cond::DbConnectionConfiguration::authenticationPath() const -{ - return m_authPath; -} - -const std::string& cond::DbConnectionConfiguration::transactionId() const { - return m_transactionId; -} - - -coral::MsgLevel cond::DbConnectionConfiguration::messageLevel() const -{ - return m_messageLevel; -} - -bool cond::DbConnectionConfiguration::isSQLMonitoringEnabled() const -{ - return m_SQLMonitoring; -} - diff --git a/CondCore/DBCommon/src/DbOpenTransaction.cc b/CondCore/DBCommon/src/DbOpenTransaction.cc deleted file mode 100644 index 5861c824f2270..0000000000000 --- a/CondCore/DBCommon/src/DbOpenTransaction.cc +++ /dev/null @@ -1,20 +0,0 @@ -// local includes -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbOpenTransaction.h" - -cond::DbOpenTransaction::DbOpenTransaction( cond::DbTransaction& transaction ): - m_transaction(transaction),m_status(false){ -} - -#include -cond::DbOpenTransaction::~DbOpenTransaction(){ - if(!m_status && m_transaction.isActive() ) { - m_transaction.rollback(); - } -} - -void cond::DbOpenTransaction::ok() -{ - m_status = true; -} - diff --git a/CondCore/DBCommon/src/DbScopedTransaction.cc b/CondCore/DBCommon/src/DbScopedTransaction.cc deleted file mode 100644 index ab8bcf87f4965..0000000000000 --- a/CondCore/DBCommon/src/DbScopedTransaction.cc +++ /dev/null @@ -1,49 +0,0 @@ -// local includes -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" - -cond::DbScopedTransaction::DbScopedTransaction( cond::DbSession& session ): - m_session(session),m_locallyActive(false){ -} - -cond::DbScopedTransaction::~DbScopedTransaction(){ - if(m_locallyActive) { - m_session.transaction().rollback(); - } -} - -int cond::DbScopedTransaction::start(bool readOnly){ - if(m_locallyActive) return -1; - int ret = m_session.transaction().start( readOnly ); - m_locallyActive = true; - return ret; -} - -int cond::DbScopedTransaction::commit(){ - if(!m_locallyActive) return -1; - int ret = m_session.transaction().commit(); - m_locallyActive = false; - return ret; -} - -bool cond::DbScopedTransaction::rollback(){ - if(!m_locallyActive) return false; - bool ret = m_session.transaction().rollback(); - m_locallyActive = false; - return ret; -} - -bool cond::DbScopedTransaction::isLocallyActive() const { - return m_locallyActive; -} - -int cond::DbScopedTransaction::isActive() const { - return m_session.transaction().isActive(); -} - -bool cond::DbScopedTransaction::isReadOnly() const -{ - return m_session.transaction().isReadOnly(); -} - diff --git a/CondCore/DBCommon/src/DbSession.cc b/CondCore/DBCommon/src/DbSession.cc deleted file mode 100644 index 3e57b5a63e4a1..0000000000000 --- a/CondCore/DBCommon/src/DbSession.cc +++ /dev/null @@ -1,334 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -#include "CondCore/DBCommon/interface/Auth.h" -// CMSSW includes -#include "FWCore/PluginManager/interface/PluginFactory.h" -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -#include "CondCore/ORA/interface/ConnectionPool.h" -// coral includes -#include "RelationalAccess/ISessionProxy.h" - -namespace cond { - - inline std::auto_ptr buildTechnologyProxy(const std::string&userconnect, - const DbConnection& connection){ - std::string protocol; - std::size_t pos=userconnect.find_first_of(':'); - if( pos!=std::string::npos ){ - protocol=userconnect.substr(0,pos); - std::size_t p=protocol.find_first_of('_'); - if(p!=std::string::npos){ - protocol=protocol.substr(0,p); - } - }else{ - throw cond::Exception(userconnect +":connection string format error"); - } - std::auto_ptr ptr(cond::TechnologyProxyFactory::get()->create(protocol)); - (*ptr).initialize(connection); - return ptr; - } - - class SessionImpl { - public: - SessionImpl(): - connection(), - blobStreamingService( "COND/Services/BlobStreamingService" ), - database(), - transaction(), - isOpen(false){ - } - - explicit SessionImpl( const DbConnection& connection ): - connection(new DbConnection(connection)), - blobStreamingService( "COND/Services/BlobStreamingService" ), - database(), - transaction(), - isOpen(false){ - } - - - virtual ~SessionImpl(){ - close(); - } - - void open( const std::string& connectionString, - const std::string& role, - bool readOnly ){ - close(); - if( connection.get() ){ - if(!connection->isOpen()){ - throw cond::Exception("DbSession::open: cannot open session. Underlying connection is closed."); - } - boost::shared_ptr connPool = connection->connectionPool(); - database.reset( new ora::Database( connPool ) ); - - ora::IBlobStreamingService* blobStreamer = cond::BlobStreamerPluginFactory::get()->create( blobStreamingService ); - if(!blobStreamer) throw cond::Exception("DbSession::open: cannot find required plugin. No instance of ora::IBlobStreamingService has been loaded.."); - database->configuration().setBlobStreamingService( blobStreamer ); - //database->configuration().properties().setFlag( ora::Configuration::automaticDatabaseCreation() ); - database->configuration().properties().setFlag( ora::Configuration::automaticContainerCreation() ); - // open the db connection - technologyProxy = buildTechnologyProxy(connectionString, *connection); - std::string connStr = (*technologyProxy).getRealConnectString( connectionString ); - database->connect( connStr, role, readOnly ); - transaction.reset( new cond::DbTransaction( database->transaction() ) ); - isOpen = true; - } - } - - void openReadOnly( const std::string& connectionString, - const std::string& transactionId ){ - close(); - if( connection.get() ){ - if(!connection->isOpen()){ - throw cond::Exception("DbSession::open: cannot open session. Underlying connection is closed."); - } - boost::shared_ptr connPool = connection->connectionPool(); - database.reset( new ora::Database( connPool ) ); - - ora::IBlobStreamingService* blobStreamer = cond::BlobStreamerPluginFactory::get()->create( blobStreamingService ); - if(!blobStreamer) throw cond::Exception("DbSession::open: cannot find required plugin. No instance of ora::IBlobStreamingService has been loaded.."); - database->configuration().setBlobStreamingService( blobStreamer ); - // open the db connection - technologyProxy = buildTechnologyProxy(connectionString, *connection); - std::string connStr = (*technologyProxy).getRealConnectString(connectionString, transactionId); - database->connect( connStr, Auth::COND_READER_ROLE, true ); - transaction.reset( new cond::DbTransaction( database->transaction() ) ); - isOpen = true; - } - } - - void open( boost::shared_ptr& coralSession, - const std::string& connectionString, - const std::string& schemaName ){ - close(); - database.reset( new ora::Database ); - - ora::IBlobStreamingService* blobStreamer = cond::BlobStreamerPluginFactory::get()->create( blobStreamingService ); - if(!blobStreamer) throw cond::Exception("DbSession::open: cannot find required plugin. No instance of ora::IBlobStreamingService has been loaded.."); - database->configuration().setBlobStreamingService( blobStreamer ); - database->configuration().properties().setFlag( ora::Configuration::automaticContainerCreation() ); - database->connect( coralSession, connectionString, schemaName ); - transaction.reset( new cond::DbTransaction( database->transaction(), false ) ); - isOpen = true; - } - - void close(){ - transaction.reset(); - database.reset(); - isOpen = false; - } - - std::auto_ptr connection; - std::auto_ptr technologyProxy; - std::string const blobStreamingService; - std::auto_ptr database; - std::auto_ptr transaction; - bool isOpen; - }; - -} - -const char* cond::DbSession::COND_SCHEMA_VERSION = "2.0.0"; -const char* cond::DbSession::CHANGE_SCHEMA_VERSION = "2.0.0"; - -cond::DbSession::DbSession(): - m_implementation( new SessionImpl ){ -} - -cond::DbSession::DbSession( const DbConnection& connection ): - m_implementation( new SessionImpl ( connection ) ){ -} - -cond::DbSession::DbSession( const DbSession& rhs ): - m_implementation( rhs.m_implementation ){ -} - -cond::DbSession::~DbSession(){ -} - -cond::DbSession& cond::DbSession::operator=( const cond::DbSession& rhs ){ - if(this!=&rhs) m_implementation = rhs.m_implementation; - return *this; -} - -void cond::DbSession::open( const std::string& connectionString, bool readOnly ) -{ - std::string emptyRole(""); - m_implementation->open( connectionString, emptyRole, readOnly ); -} - -void cond::DbSession::open( const std::string& connectionString, const std::string& asRole, bool readOnly ) -{ - m_implementation->open( connectionString, asRole, readOnly ); -} - -void cond::DbSession::openReadOnly( const std::string& connectionString, const std::string& id ) -{ - m_implementation->openReadOnly( connectionString, id ); -} - -void cond::DbSession::open( boost::shared_ptr& coralSession, const std::string& connectionString, const std::string& schemaName ){ - m_implementation->open( coralSession, connectionString, schemaName ); -} - -void cond::DbSession::close() -{ - m_implementation->close(); -} - -bool cond::DbSession::isOpen() const { - return m_implementation->isOpen; -} - -const std::string& cond::DbSession::connectionString() const { - if(!m_implementation->database.get()) - throw cond::Exception("DbSession::connectionString: cannot get connection string. Session has not been open."); - return m_implementation->database->connectionString(); -} - -cond::DbConnection const & cond::DbSession::connection() const { - return *(m_implementation->connection); -} - - -bool cond::DbSession::isTransactional() const { - return m_implementation->technologyProxy->isTransactional(); -} - -const std::string& cond::DbSession::blobStreamingService() const -{ - return m_implementation->blobStreamingService; -} - -cond::DbTransaction& cond::DbSession::transaction() -{ - if(!m_implementation->transaction.get()) - throw cond::Exception("DbSession::transaction: cannot get transaction. Session has not been open."); - return *m_implementation->transaction; -} - -ora::Database& cond::DbSession::storage(){ - if(!m_implementation->database.get()) - throw cond::Exception("DbSession::storage: cannot access the database. Session has not been open."); - return *m_implementation->database; -} - -bool cond::DbSession::createDatabase(){ - bool created = false; - if ( !storage().exists() ){ - created = true; - storage().create( std::string(COND_SCHEMA_VERSION) ); - } - return created; -} - -bool cond::DbSession::isOldSchema() -{ - ora::Version dbVer = storage().schemaVersion(); - if (dbVer == ora::Version::poolSchemaVersion()) return true; - dbVer = storage().schemaVersion( true ); - return dbVer < ora::Version::fromString( std::string( CHANGE_SCHEMA_VERSION ) ); -} - -coral::ISchema& cond::DbSession::schema( const std::string& schemaName ) -{ - return storage().storageAccessSession().get().schema( schemaName ); -} - -coral::ISchema& cond::DbSession::nominalSchema() -{ - return storage().storageAccessSession().get().nominalSchema(); -} - -bool cond::DbSession::deleteMapping( const std::string& mappingVersion ){ - ora::DatabaseUtility utility = storage().utility(); - utility.eraseMapping( mappingVersion ); - return true; -} - -bool cond::DbSession::importMapping( const std::string& sourceConnectionString, - const std::string& contName ){ - ora::DatabaseUtility utility = storage().utility(); - std::auto_ptr technologyProxy = buildTechnologyProxy(sourceConnectionString, *(m_implementation->connection)); - utility.importContainerSchema( (*technologyProxy).getRealConnectString( sourceConnectionString ), contName ); - return true; -} - -std::string cond::DbSession::storeObject( const ora::Object& object, const std::string& containerName ){ - ora::OId oid = storage().insertItem( containerName, object ); - storage().flush(); - return oid.toString(); -} - -ora::Object cond::DbSession::getObject( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - return storage().fetchItem( oid ); -} - -bool cond::DbSession::deleteObject( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - storage().erase( oid ); - storage().flush(); - return true; -} - -std::string cond::DbSession::importObject( cond::DbSession& fromDatabase, const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - ora::Object data = fromDatabase.getObject( objectId ); - ora::Container cont = fromDatabase.storage().containerHandle( oid.containerId() ); - std::string ret = storeObject( data, cont.name() ); - data.destruct(); - return ret; -} - -std::string cond::DbSession::classNameForItem( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - std::string ret(""); - if( !oid.isInvalid() ){ - ora::Container cont = storage().containerHandle( oid.containerId() ); - ret = cont.realClassName(); - } - return ret; -} - -void cond::DbSession::flush(){ - storage().flush(); -} - -cond::PoolTokenParser::PoolTokenParser( ora::Database& db ): - m_db( db ){ -} - -ora::OId cond::PoolTokenParser::parse( const std::string& poolToken ){ - std::pair oidData = parseToken( poolToken ); - if( oidData.first.empty() ){ - throwException("Could not resolve Container name from token=\""+poolToken+"\".","PoolTokenParser::parse"); - } - ora::Container cont = m_db.containerHandle( oidData.first ); - return ora::OId( cont.id(), oidData.second ); -} - -std::string cond::PoolTokenParser::className( const std::string& oraToken ){ - ora::OId oid; - oid.fromString( oraToken ); - ora::Container cont = m_db.containerHandle( oid.containerId() ); - return cont.className(); -} - -cond::PoolTokenWriter::PoolTokenWriter( ora::Database& db ): - m_db( db ){ -} - -std::string cond::PoolTokenWriter::write( const ora::OId& oid ){ - ora::Container cont = m_db.containerHandle( oid.containerId() ); - return writeToken( cont.name(), oid.containerId(), oid.itemId(), cont.className() ); -} diff --git a/CondCore/DBCommon/src/DbTransaction.cc b/CondCore/DBCommon/src/DbTransaction.cc deleted file mode 100644 index dc355aae04655..0000000000000 --- a/CondCore/DBCommon/src/DbTransaction.cc +++ /dev/null @@ -1,68 +0,0 @@ -// local includes -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/ORA/interface/Transaction.h" -// coral & pool includes -#include "RelationalAccess/ISessionProxy.h" -#include "RelationalAccess/ITransaction.h" - -cond::DbTransaction::DbTransaction( ora::Transaction& dbTrans, bool owned ): - m_dbTrans( dbTrans ),m_readOnly(true),m_clients(0),m_owned(owned ){ -} - -cond::DbTransaction::~DbTransaction(){ - if( m_owned ) rollback(); -} - -int cond::DbTransaction::start(bool readOnly){ - if(!m_clients){ - m_dbTrans.start( readOnly ); - m_readOnly = readOnly; - } else { - if(readOnly != m_readOnly) - return -1; - } - ++m_clients; - return m_clients; -} - -int cond::DbTransaction::commit(){ - if(!m_clients) return -1; - else{ - --m_clients; - if(m_clients == 0){ - m_dbTrans.commit(); - } - } - return m_clients; -} - -bool cond::DbTransaction::forceCommit(){ - bool doCommit = false; - if(m_clients){ - m_dbTrans.commit(); - doCommit = true; - } - m_clients = 0; - return doCommit; -} - -bool cond::DbTransaction::rollback(){ - bool doRollBack = false; - if(m_clients){ - m_dbTrans.rollback(); - doRollBack = true; - } - m_clients = 0; - return doRollBack; -} - -int cond::DbTransaction::isActive() const { - if(!m_dbTrans.isActive()) return 0; - return m_clients; -} - -bool cond::DbTransaction::isReadOnly() const -{ - return m_dbTrans.isActive( true ); -} - diff --git a/CondCore/DBCommon/src/Exception.cc b/CondCore/DBCommon/src/Exception.cc deleted file mode 100644 index 3ba297e1a77c6..0000000000000 --- a/CondCore/DBCommon/src/Exception.cc +++ /dev/null @@ -1,21 +0,0 @@ -#include "CondCore/DBCommon/interface/Exception.h" -cond::Exception::Exception( const std::string& message ):cms::Exception("Conditions",message){} -cond::Exception::~Exception() throw(){} - -cond::noDataForRequiredTimeException::noDataForRequiredTimeException( -const std::string& from, const std::string& rcd, const std::string& current ): - cond::Exception(from+": no data available in "+rcd+" at time "+current){} -cond::noDataForRequiredTimeException::~noDataForRequiredTimeException() throw(){} - -cond::RefException::RefException( const std::string& from, const std::string& msg): - cond::Exception(std::string("Error in building cond::Ref ")+from+" "+msg){} - -cond::TransactionException::TransactionException( const std::string& from, const std::string& msg): - cond::Exception(std::string("Transaction Error ")+from+" "+msg){} - -namespace cond { - void throwException( std::string const& message, - std::string const& methodName ){ - throw Exception( methodName + ": " + message ); - } -} diff --git a/CondCore/DBCommon/src/FileUtils.cc b/CondCore/DBCommon/src/FileUtils.cc deleted file mode 100644 index a91b15d11d63c..0000000000000 --- a/CondCore/DBCommon/src/FileUtils.cc +++ /dev/null @@ -1,53 +0,0 @@ -#include "CondCore/DBCommon/interface/FileUtils.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include -#include - -bool cond::FileReader::read(const std::string& fileName){ - /**struct stat st; - if (stat(inputFileName.c_str(), &st) < 0){ - seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); - log << seal::Msg::Error << "File \"" << inputFileName << "\" not found." << seal::flush; - return false; - } - - std::vector buf(st.st_size, 0); - int fd = open(inputFileName.c_str(), O_RDONLY); - if (fd < 0){ - seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); - log << seal::Msg::Error << "File \"" << inputFileName << "\" cannot be open." << seal::flush; - close(fd); - return false; - } - - if (read(fd, &buf[0], st.st_size) != st.st_size){ - seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); - log << seal::Msg::Error << "File \"" << inputFileName << "\" cannot be open for reading." << seal::flush; - close(fd); - return false; - } - std::string content(&buf[0], &buf[0]+st.st_size); - **/ - std::ifstream inputFile; - inputFile.open (fileName.c_str()); - if(!inputFile.good()){ - std::stringstream msg; - msg << "File \"" << fileName << "\" cannot be open."; - inputFile.close(); - throw cond::Exception(msg.str()); - } - // get pointer to associated buffer object - std::filebuf* pbuf=inputFile.rdbuf(); - // get file size using buffer's members - long size=pbuf->pubseekoff (0,std::ios::end,std::ios::in); - pbuf->pubseekpos (0,std::ios::in); - // allocate memory to contain file data - char* buffer=new char[size+1]; - // get file data - pbuf->sgetn (buffer,size); - inputFile.close(); - buffer[size]=0; - m_content += buffer; - delete [] buffer; - return true; -} diff --git a/CondCore/DBCommon/src/FipProtocolParser.cc b/CondCore/DBCommon/src/FipProtocolParser.cc deleted file mode 100644 index 9203db80f286e..0000000000000 --- a/CondCore/DBCommon/src/FipProtocolParser.cc +++ /dev/null @@ -1,14 +0,0 @@ -#include "CondCore/DBCommon/interface/FipProtocolParser.h" -#include "FWCore/ParameterSet/interface/FileInPath.h" -cond::FipProtocolParser::FipProtocolParser(){} -cond::FipProtocolParser::~FipProtocolParser(){} - -std::string -cond::FipProtocolParser::getRealConnect(const std::string& fipConnect) const{ - std::string connect("sqlite_file:"); - std::string::size_type pos=fipConnect.find(':'); - std::string fipLocation=fipConnect.substr(pos+1); - edm::FileInPath fip(fipLocation); - connect.append( fip.fullPath() ); - return connect; -} diff --git a/CondCore/DBCommon/src/IOVInfo.cc b/CondCore/DBCommon/src/IOVInfo.cc deleted file mode 100644 index 78241f3287317..0000000000000 --- a/CondCore/DBCommon/src/IOVInfo.cc +++ /dev/null @@ -1,24 +0,0 @@ -#include "CondCore/DBCommon/interface/IOVInfo.h" - -#include -#include -#include -#include -namespace cond { - - std::string userInfo() { - // this are really static stuff - std::ostringstream user_info; - char * user= ::getenv("USER"); - std::vector hname(1024,'\0'); - char * hostname = &hname.front(); - ::gethostname(hostname, 1024); - char * pwd = ::getenv("PWD"); - if (user) { user_info<< "USER=" << user <<";" ;} else { user_info<< "USER="<< "??;";} - if (hostname[0] != '\0') {user_info<< "HOSTNAME=" << hostname <<";";} - else { user_info<< "HOSTNAME="<< "??;";} - if (pwd) {user_info<< "PWD=" << pwd <<";";} else {user_info<< "PWD="<< "??;";} - return user_info.str(); - } - -} diff --git a/CondCore/DBCommon/src/LogDBNames.cc b/CondCore/DBCommon/src/LogDBNames.cc deleted file mode 100644 index 9ab5024b3c8b1..0000000000000 --- a/CondCore/DBCommon/src/LogDBNames.cc +++ /dev/null @@ -1,9 +0,0 @@ -#include "LogDBNames.h" -std::string -cond::LogDBNames::SequenceTableName(){ - return std::string("COND_SEQUENCE_TABLE"); -} -std::string -cond::LogDBNames::LogTableName(){ - return std::string("COND_LOG_TABLE"); -} diff --git a/CondCore/DBCommon/src/LogDBNames.h b/CondCore/DBCommon/src/LogDBNames.h deleted file mode 100644 index 1d53cfad1fe28..0000000000000 --- a/CondCore/DBCommon/src/LogDBNames.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CondCore_DBCommon_LogDBNames_h -#define CondCore_DBCommon_LogDBNames_h -#include -namespace cond{ - class LogDBNames{ - public: - static std::string SequenceTableName(); - static std::string LogTableName(); - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/src/Logger.cc b/CondCore/DBCommon/src/Logger.cc deleted file mode 100644 index 92fcbdd6426eb..0000000000000 --- a/CondCore/DBCommon/src/Logger.cc +++ /dev/null @@ -1,345 +0,0 @@ -#include "CondCore/DBCommon/interface/Logger.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" -#include "CondCore/DBCommon/interface/SequenceManager.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/ORA/interface/PoolToken.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/ITable.h" -#include "RelationalAccess/ITableDataEditor.h" -#include "RelationalAccess/IQuery.h" -#include "RelationalAccess/ICursor.h" -#include "RelationalAccess/TableDescription.h" -#include "RelationalAccess/ITablePrivilegeManager.h" -#include "CoralBase/Attribute.h" -#include "CoralBase/AttributeList.h" -#include "CoralBase/AttributeSpecification.h" -#include "LogDBNames.h" -#include //no i/o just types - -#include -#include -namespace cond{ - template - std::string to_string(const T& t){ - std::stringstream ss; - ss<() ); - description.setPrimaryKey( std::vector( 1, std::string("LOGID"))); - description.insertColumn(std::string("EXECTIME"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("EXECTIME")); - - description.insertColumn(std::string("IOVTAG"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("IOVTAG")); - - description.insertColumn(std::string("IOVTIMETYPE"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("IOVTIMETYPE")); - - description.insertColumn(std::string("PAYLOADCLASS"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("PAYLOADCLASS")); - - description.insertColumn(std::string("PAYLOADTOKEN"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("PAYLOADTOKEN")); - - description.insertColumn(std::string("PAYLOADINDEX"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("PAYLOADINDEX")); - - description.insertColumn(std::string("LASTSINCE"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("LASTSINCE")); - - description.insertColumn(std::string("DESTINATIONDB"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("DESTINATIONDB")); - - description.insertColumn(std::string("PROVENANCE"), - coral::AttributeSpecification::typeNameForType() ); - description.insertColumn(std::string("USERTEXT"), - coral::AttributeSpecification::typeNameForType() ); - description.insertColumn(std::string("EXECMESSAGE"), - coral::AttributeSpecification::typeNameForType() ); - m_sessionHandle.nominalSchema().createTable( description ); - m_logTableExists=true; - trans.commit(); -} -void -cond::Logger::logOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadClass, - const std::string& payloadToken, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince - ){ - cond::DbScopedTransaction trans( m_sessionHandle ); - trans.start(false); - //aquireutctime - //using namespace boost::posix_time; - boost::posix_time::ptime p=boost::posix_time::microsec_clock::universal_time(); - std::string now=cond::to_string(p.date().year())+"-"+cond::to_string(p.date().month())+"-"+cond::to_string(p.date().day())+"-"+cond::to_string(p.time_of_day().hours())+":"+cond::to_string(p.time_of_day().minutes())+":"+cond::to_string(p.time_of_day().seconds()); - //aquireentryid - if(!m_sequenceManager){ - m_sequenceManager=new cond::SequenceManager(m_sessionHandle,cond::LogDBNames::SequenceTableName()); - } - unsigned long long targetLogId=m_sequenceManager->incrementId(LogDBNames::LogTableName()); - //insert log record with the new id - this->insertLogRecord(targetLogId,now,destDB,payloadClass,payloadToken,userlogInfo,iovtag,iovtimetype,payloadIdx,lastSince,"OK"); - trans.commit(); -} -void -cond::Logger::logFailedOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadClass, - const std::string& payloadToken, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage - ){ - cond::DbScopedTransaction trans( m_sessionHandle ); - trans.start(false); - //aquireutctime - boost::posix_time::ptime p=boost::posix_time::microsec_clock::universal_time(); - std::string now=cond::to_string(p.date().year())+"-"+cond::to_string(p.date().month())+"-"+cond::to_string(p.date().day())+"-"+cond::to_string(p.time_of_day().hours())+":"+cond::to_string(p.time_of_day().minutes())+":"+cond::to_string(p.time_of_day().seconds()); - //aquireentryid - if(!m_sequenceManager){ - m_sequenceManager=new cond::SequenceManager(m_sessionHandle,cond::LogDBNames::SequenceTableName()); - } - unsigned long long targetLogId=m_sequenceManager->incrementId(LogDBNames::LogTableName()); - //insert log record with the new id - this->insertLogRecord(targetLogId,now,destDB,payloadClass,payloadToken,userlogInfo,iovtag,iovtimetype,payloadIdx,lastSince,exceptionMessage); - trans.commit(); -} - -void -cond::Logger::LookupLastEntryByProvenance(const std::string& provenance, - LogDBEntry& logentry, - bool filterFailedOp) const{ - //construct where - std::string whereClause=cond::LogDBNames::LogTableName(); - whereClause+=".PROVENANCE=:provenance"; - if(filterFailedOp){ - whereClause+=std::string(" AND "); - whereClause+=cond::LogDBNames::LogTableName(); - whereClause+=std::string(".EXECMESSAGE=:execmessage"); - } - coral::AttributeList BindVariableList; - BindVariableList.extend("provenance",typeid(std::string) ); - BindVariableList.extend("execmessage",typeid(std::string) ); - BindVariableList["provenance"].data()=provenance; - BindVariableList["execmessage"].data()="OK"; - m_sessionHandle.transaction().start(true); - { - std::auto_ptr query(m_sessionHandle.nominalSchema().tableHandle( cond::LogDBNames::LogTableName() ).newQuery()); - // construct select - query->addToOutputList( "LOGID" ); - query->defineOutputType( "LOGID", "unsigned long long" ); - query->addToOutputList( "DESTINATIONDB" ); - query->addToOutputList( "PROVENANCE" ); - query->addToOutputList( "USERTEXT" ); - query->addToOutputList( "IOVTAG" ); - query->addToOutputList( "IOVTIMETYPE" ); - query->addToOutputList( "PAYLOADINDEX" ); - query->defineOutputType( "PAYLOADINDEX", "unsigned int" ); - query->addToOutputList( "LASTSINCE" ); - query->defineOutputType( "LASTSINCE", "unsigned long long" ); - query->addToOutputList( "PAYLOADCLASS" ); - query->addToOutputList( "PAYLOADTOKEN" ); - query->addToOutputList( "EXECTIME" ); - query->addToOutputList( "EXECMESSAGE" ); - - query->setCondition( whereClause, BindVariableList ); - query->addToOrderList( cond::LogDBNames::LogTableName()+".LOGID desc" ); - query->limitReturnedRows(); - coral::ICursor& cursor = query->execute(); - if( cursor.next() ) { - const coral::AttributeList& row = cursor.currentRow(); - logentry.logId=row["LOGID"].data(); - logentry.destinationDB=row["DESTINATIONDB"].data(); - logentry.provenance=row["PROVENANCE"].data(); - logentry.usertext=row["USERTEXT"].data(); - logentry.iovtag=row["IOVTAG"].data(); - logentry.iovtimetype=row["IOVTIMETYPE"].data(); - logentry.payloadIdx=row["PAYLOADINDEX"].data(); - logentry.lastSince=row["LASTSINCE"].data(); - logentry.payloadClass=row["PAYLOADCLASS"].data(); - logentry.payloadToken=row["PAYLOADTOKEN"].data(); - logentry.exectime=row["EXECTIME"].data(); - logentry.execmessage=row["EXECMESSAGE"].data(); - } - } - m_sessionHandle.transaction().commit(); -} -void -cond::Logger::LookupLastEntryByTag( const std::string& iovtag, - const std::string & connectionStr, - cond::LogDBEntry& logentry, - bool filterFailedOp) const{ - coral::AttributeList BindVariableList; - BindVariableList.extend("IOVTAG",typeid(std::string) ); - BindVariableList["IOVTAG"].data()=iovtag; - std::string whereClause(""); - whereClause+=std::string("IOVTAG=:IOVTAG"); - if(connectionStr!=""){ - whereClause+=std::string(" AND "); - whereClause+=std::string("DESTINATIONDB=:DESTINATIONDB"); - BindVariableList.extend("DESTINATIONDB",typeid(std::string) ); - BindVariableList["DESTINATIONDB"].data()=connectionStr; - } - if(filterFailedOp){ - whereClause+=std::string(" AND "); - whereClause+=std::string("EXECMESSAGE=:EXECMESSAGE"); - BindVariableList.extend("EXECMESSAGE",typeid(std::string) ); - BindVariableList["EXECMESSAGE"].data()="OK"; - } - m_sessionHandle.transaction().start(true); - { - std::auto_ptr query( m_sessionHandle.nominalSchema().tableHandle(cond::LogDBNames::LogTableName()).newQuery() ); - // construct select - query->addToOutputList( "LOGID" ); - query->defineOutputType( "LOGID", "unsigned long long" ); - query->addToOutputList( "DESTINATIONDB" ); - query->addToOutputList( "PROVENANCE" ); - query->addToOutputList( "USERTEXT" ); - query->addToOutputList( "IOVTAG" ); - query->addToOutputList( "IOVTIMETYPE" ); - query->addToOutputList( "PAYLOADINDEX" ); - query->defineOutputType( "PAYLOADINDEX", "unsigned int" ); - query->addToOutputList( "LASTSINCE" ); - query->defineOutputType( "LASTSINCE", "unsigned long long" ); - query->addToOutputList( "PAYLOADCLASS" ); - query->addToOutputList( "PAYLOADTOKEN" ); - query->addToOutputList( "EXECTIME" ); - query->addToOutputList( "EXECMESSAGE" ); - - query->setCondition( whereClause, BindVariableList ); - query->addToOrderList( "LOGID DESC" ); - query->limitReturnedRows(); - coral::ICursor& cursor = query->execute(); - if( cursor.next() ) { - const coral::AttributeList& row = cursor.currentRow(); - logentry.logId=row["LOGID"].data(); - logentry.destinationDB=row["DESTINATIONDB"].data(); - logentry.provenance=row["PROVENANCE"].data(); - logentry.usertext=row["USERTEXT"].data(); - logentry.iovtag=row["IOVTAG"].data(); - logentry.iovtimetype=row["IOVTIMETYPE"].data(); - logentry.payloadIdx=row["PAYLOADINDEX"].data(); - logentry.lastSince=row["LASTSINCE"].data(); - logentry.payloadClass=row["PAYLOADCLASS"].data(); - logentry.payloadToken=row["PAYLOADTOKEN"].data(); - logentry.exectime=row["EXECTIME"].data(); - logentry.execmessage=row["EXECMESSAGE"].data(); - - } - } - m_sessionHandle.transaction().commit(); -} -void -cond::Logger::LookupLastEntryByTag( const std::string& iovtag, - LogDBEntry& logentry, - bool filterFailedOp ) const{ - LookupLastEntryByTag(iovtag,"",logentry,filterFailedOp); -} -void -cond::Logger::insertLogRecord(unsigned long long logId, - const std::string& utctime, - const std::string& destDB, - const std::string& payloadClass, - const std::string& payloadToken, - const cond::UserLogInfo& userLogInfo, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage){ - try{ - coral::AttributeList rowData; - rowData.extend("LOGID"); - rowData.extend("EXECTIME"); - rowData.extend("DESTINATIONDB"); - rowData.extend("PAYLOADCLASS"); - rowData.extend("PAYLOADTOKEN"); - rowData.extend("PROVENANCE"); - rowData.extend("USERTEXT"); - rowData.extend("IOVTAG"); - rowData.extend("IOVTIMETYPE"); - rowData.extend("PAYLOADINDEX"); - rowData.extend("LASTSINCE"); - rowData.extend("EXECMESSAGE"); - rowData["LOGID"].data< unsigned long long >() = logId; - rowData["EXECTIME"].data< std::string >() = utctime; - rowData["DESTINATIONDB"].data< std::string >() = destDB; - rowData["PAYLOADCLASS"].data< std::string >() = payloadClass; - std::string ptok = payloadToken; - if( payloadToken.empty() ) ptok = "NA"; - rowData["PAYLOADTOKEN"].data< std::string >() = ptok; - rowData["PROVENANCE"].data< std::string >() = userLogInfo.provenance; - rowData["USERTEXT"].data< std::string >() = userLogInfo.usertext; - rowData["IOVTAG"].data< std::string >() = iovtag; - rowData["IOVTIMETYPE"].data< std::string >() = iovtimetype; - rowData["PAYLOADINDEX"].data< unsigned int >() = payloadIdx; - rowData["LASTSINCE"].data< unsigned long long >() = lastSince; - rowData["EXECMESSAGE"].data< std::string >() = exceptionMessage; - m_sessionHandle.nominalSchema().tableHandle(cond::LogDBNames::LogTableName()).dataEditor().insertRow(rowData); - }catch(const std::exception& er){ - throw cond::Exception(std::string(er.what())); - } -} - -cond::Logger::~Logger(){ - if( m_sequenceManager ){ - delete m_sequenceManager; - m_sequenceManager=0; - } -} diff --git a/CondCore/DBCommon/src/SQLReport.cc b/CondCore/DBCommon/src/SQLReport.cc deleted file mode 100644 index f687bfe865d12..0000000000000 --- a/CondCore/DBCommon/src/SQLReport.cc +++ /dev/null @@ -1,27 +0,0 @@ -#include "CondCore/DBCommon/interface/SQLReport.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "RelationalAccess/IMonitoringReporter.h" -#include - -constexpr char SQLREPORT_DEFAULT_FILENAME[] = "sqlreport.out"; - -void cond::SQLReport::reportForConnection(const std::string& connectionString){ - m_report << "-- connection: "<< connectionString << std::endl; - m_connection.monitoringReporter().reportToOutputStream( connectionString, m_report ); -} - -bool cond::SQLReport::putOnFile(std::string fileName){ - std::ofstream outFile; - if(fileName.empty()) fileName.append(SQLREPORT_DEFAULT_FILENAME); - outFile.open(fileName.c_str()); - if(!outFile.good()){ - std::stringstream msg; - msg << "Cannot open the output file \""< -cond::SequenceManager::SequenceManager(cond::DbSession& coraldb, - const std::string& sequenceTableName): - m_coraldb(coraldb), - m_sequenceTableName( sequenceTableName ), - m_tableToId(), - m_sequenceTableExists( false ), - m_whereClause( std::string("REFTABLE_NAME")+" =:"+std::string("REFTABLE_NAME")), - m_whereData( 0 ), - m_setClause( std::string("IDVALUE")+" = "+std::string("IDVALUE")+" + 1"), - m_started( false ) -{ - m_whereData = new coral::AttributeList; - m_whereData->extend(std::string("REFTABLE_NAME")); - init(); -} -void -cond::SequenceManager::init(){ - m_sequenceTableExists=m_coraldb.nominalSchema().existsTable(m_sequenceTableName) ; - m_started=true; -} -cond::SequenceManager::~SequenceManager() -{ - delete m_whereData; -} -unsigned long long -cond::SequenceManager::incrementId( const std::string& tableName ){ - std::map< std::string, unsigned long long >::iterator iSequence = m_tableToId.find( tableName ); - coral::ISchema& schema=m_coraldb.nominalSchema(); - if ( iSequence == m_tableToId.end() ) { - // Make sure that the sequence table exists. - if ( ! m_sequenceTableExists ) { - throw cond::Exception("SequenceManager::incrementId"); - } - // Lock the entry in the table. - unsigned long long lastIdUsed = 0; - if ( ! ( this->lockEntry( schema, tableName, lastIdUsed ) ) ) { - // Create the entry in the table if it does not exist. - coral::AttributeList rowData; - rowData.extend("REFTABLE_NAME"); - rowData.extend("IDVALUE"); - coral::AttributeList::iterator iAttribute = rowData.begin(); - iAttribute->data< std::string >() = tableName; - ++iAttribute; - unsigned long long startingIdValue = lastIdUsed; - iAttribute->data< unsigned long long >() = startingIdValue; - try{ - schema.tableHandle( m_sequenceTableName ).dataEditor().insertRow( rowData ); - m_tableToId.insert( std::make_pair( tableName, startingIdValue ) ); - return startingIdValue; - }catch(const coral::DataEditorException& er){ - this->lockEntry( schema, tableName, lastIdUsed ); - ++lastIdUsed; - iSequence = m_tableToId.insert( std::make_pair( tableName, lastIdUsed ) ).first; - m_whereData->begin()->data() = tableName; - schema.tableHandle(m_sequenceTableName).dataEditor().updateRows(m_setClause,m_whereClause,*m_whereData ); - return lastIdUsed; - //startingIdValue = lastIdUsed+1; - //m_tableToId.insert( std::make_pair( tableName, startingIdValue ) ); - }catch(std::exception& er){ - throw cond::Exception(er.what()); - } - - } - // Add the entry into the map. - iSequence = m_tableToId.insert( std::make_pair( tableName, lastIdUsed ) ).first; - } - // Increment the oid transiently - unsigned long long& oid = iSequence->second; - this->lockEntry( schema, tableName, oid ); - ++oid; - // Increment the oid in the database as well - - m_whereData->begin()->data() = tableName; - schema.tableHandle(m_sequenceTableName).dataEditor().updateRows(m_setClause,m_whereClause,*m_whereData ); - - return oid; -} -/* -void -cond::SequenceManager::updateId( const std::string& tableName, - unsigned long long lastId ){ - // Make sure that the sequence table exists. - if ( ! m_sequenceTableExists ) { - throw; - } - bool update = false; - coral::IQuery* query = m_coraldb.nominalSchema().tableHandle( m_sequenceTableName ).newQuery(); - query->limitReturnedRows( 1, 0 ); - query->addToOutputList( std::string("IDVALUE") ); - query->defineOutputType( std::string("IDVALUE"),coral::AttributeSpecification::typeNameForType() ); - m_whereData->begin()->data< std::string >() = tableName; - query->setCondition( m_whereClause, *m_whereData ); - coral::ICursor& cursor = query->execute(); - if ( cursor.next() ) { - update = true; - } - delete query; - - coral::AttributeList rowData; - rowData.extend( std::string("IDVALUE") ); - rowData.extend( std::string("REFTABLE_NAME") ); - coral::AttributeList::iterator iAttribute = rowData.begin(); - iAttribute->data< unsigned long long >() = lastId; - ++iAttribute; - iAttribute->data< std::string >() = tableName; - coral::ISchema& schema= m_coraldb.nominalSchema(); - if ( update ) { - // Update the entry in the table - std::string setClause(std::string("IDVALUE")+" =: "+std::string("IDVALUE")); - schema.tableHandle( m_sequenceTableName ).dataEditor().updateRows( setClause,m_whereClause,rowData ); - m_tableToId.erase( tableName ); - } else { - schema.tableHandle( m_sequenceTableName ).dataEditor().insertRow( rowData ); - } - m_tableToId.insert( std::make_pair( tableName, lastId ) ); -} -*/ -void -cond::SequenceManager::clear() -{ - m_tableToId.clear(); -} -bool -cond::SequenceManager::existSequencesTable(){ - return m_sequenceTableExists; -} -void -cond::SequenceManager::createSequencesTable() -{ - coral::ISchema& schema= m_coraldb.nominalSchema(); - coral::TableDescription description( "CONDSEQ" ); - description.setName(m_sequenceTableName); - description.insertColumn(std::string("REFTABLE_NAME"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("REFTABLE_NAME")); - description.insertColumn(std::string("IDVALUE"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("IDVALUE")); - description.setPrimaryKey( std::vector< std::string >( 1, std::string("REFTABLE_NAME"))); - schema.createTable( description ).privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select ); - m_sequenceTableExists=true; -} - -bool -cond::SequenceManager::lockEntry( coral::ISchema& schema, - const std::string& sequenceName, - unsigned long long& lastId ){ - std::auto_ptr< coral::IQuery > query( schema.tableHandle(m_sequenceTableName).newQuery()); - query->limitReturnedRows( 1, 0 ); - query->addToOutputList( std::string("IDVALUE") ); - query->defineOutputType( std::string("IDVALUE"), coral::AttributeSpecification::typeNameForType() ); - query->setForUpdate(); - m_whereData->begin()->data< std::string >() = sequenceName; - query->setCondition( m_whereClause, *m_whereData ); - coral::ICursor& cursor = query->execute(); - if ( cursor.next() ) { - lastId = cursor.currentRow().begin()->data< unsigned long long >(); - return true; - }else { - cursor.close(); - return false; - } -} diff --git a/CondCore/DBCommon/src/TechnologyProxyFactory.cc b/CondCore/DBCommon/src/TechnologyProxyFactory.cc deleted file mode 100644 index 69d0da9f33975..0000000000000 --- a/CondCore/DBCommon/src/TechnologyProxyFactory.cc +++ /dev/null @@ -1,3 +0,0 @@ -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -EDM_REGISTER_PLUGINFACTORY(cond::TechnologyProxyFactory,"DBTechnologyPlugin"); - diff --git a/CondCore/DBCommon/src/Time.cc b/CondCore/DBCommon/src/Time.cc deleted file mode 100644 index 0ee3ca46fef92..0000000000000 --- a/CondCore/DBCommon/src/Time.cc +++ /dev/null @@ -1 +0,0 @@ -#include "CondCore/DBCommon/interface/Time.h" diff --git a/CondCore/DBCommon/test/BuildFile.xml b/CondCore/DBCommon/test/BuildFile.xml deleted file mode 100644 index f70dceb09e719..0000000000000 --- a/CondCore/DBCommon/test/BuildFile.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CondCore/DBCommon/test/classes.h b/CondCore/DBCommon/test/classes.h deleted file mode 100644 index ce14cbeb65c42..0000000000000 --- a/CondCore/DBCommon/test/classes.h +++ /dev/null @@ -1 +0,0 @@ -#include "CondCore/DBCommon/test/testCondObj.h" diff --git a/CondCore/DBCommon/test/classes_def.xml b/CondCore/DBCommon/test/classes_def.xml deleted file mode 100644 index f48f00d96cd6c..0000000000000 --- a/CondCore/DBCommon/test/classes_def.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/CondCore/DBCommon/test/testBlobStreaming.cpp b/CondCore/DBCommon/test/testBlobStreaming.cpp deleted file mode 100644 index 7855e9383b715..0000000000000 --- a/CondCore/DBCommon/test/testBlobStreaming.cpp +++ /dev/null @@ -1,116 +0,0 @@ -// -// unit test, include files as they exists only in the plugin... -// -#include "CondCore/DBCommon/plugins/BlobStreamingService.cc" -#include "CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc" - -#include -#include -#include -#include - -namespace test { - namespace BlobStreaming { - int test() { - - using namespace cond; - - BlobStreamingService streamer; - - // white box tests... - for (size_t i=0; i!=BlobStreamingService::nVariants; ++i) - std::cout << i << " " << std::hex << BlobStreamingService::variantIds[i].first << "-" - << BlobStreamingService::variantIds[i].second << std::dec << std::endl; - - std::vector crap(1024); - for(size_t i=0; i!=crap.size(); ++i) - crap[i] = i%256; - crap[3]=5; crap[10]=123; - - BlobStreamingService::Variant id = BlobStreamingService::findVariant(&crap.front()); - std::cout << "shall be zero " << id << std::endl; - - *reinterpret_cast(&crap.front()) = BlobStreamingService::variantIds[BlobStreamingService::COMPRESSED_TBUFFER]; - id = BlobStreamingService::findVariant(&crap.front()); - std::cout << "shall be one " << id << std::endl; - - boost::shared_ptr blob1 = BlobStreamingService::compress(&crap.front(), crap.size()); - unsigned long long s = *reinterpret_cast((unsigned char*)(blob1->startingAddress())+ BlobStreamingService::m_idsize); - std::cout << "compressed " << blob1->size() << " " << s << std::endl; - - boost::shared_ptr blob2 = BlobStreamingService::expand(*blob1); - std::cout << "expanded (shall be " << crap.size() << ") "<< blob2->size() << std::endl; - std::vector crap2(1024); - ::memcpy(&crap2.front(),blob2->startingAddress(),blob2->size()); - if (crap!=crap2) std::cout << "compress - expansion failed" << std::endl; - - // back-box test - - std::vector vf(1024); - for(size_t i=0; i!=vf.size(); ++i) - vf[i] = float(i)+float(i)/1000.; - - edm::TypeWithDict vType = edm::TypeWithDict( typeid(std::vector) ); - - { - // old mode - cond::TBufferBlobStreamingService tstreamer; - boost::shared_ptr blob = tstreamer.write(&vf,vType); - std::cout << "old format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be zero " << id << std::endl; - - //void * p; - std::vector vf2; - streamer.read(*blob,&vf2,vType); - //std::vector const & vf2 = *reinterpret_cast const *>(p); - if (vf!=vf2) std::cout << "reading old format failed" << std::endl; - } - { - // new mode - boost::shared_ptr blob = streamer.write(&vf,vType); - std::cout << "new format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be one " << id << std::endl; - std::vector vf2; - streamer.read(*blob,&vf2,vType); - if (vf!=vf2) std::cout << "reading new format failed" << std::endl; - } - - // CBLOB... - std::vector vc = crap; - - edm::TypeWithDict cType = edm::TypeWithDict( typeid(std::vector) ); - - { - // old mode - cond::TBufferBlobStreamingService tstreamer; - boost::shared_ptr blob = tstreamer.write(&vc,cType); - std::cout << "old format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be zero " << id << std::endl; - - //void * p; - std::vector vc2; - streamer.read(*blob,&vc2,cType); - if (vc!=vc2) std::cout << "reading old format failed" << std::endl; - } - { - // new mode - boost::shared_ptr blob = streamer.write(&vc,cType); - std::cout << "new format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be two " << id << std::endl; - std::vector vc2; - streamer.read(*blob,&vc2,cType); - if (vc!=vc2) std::cout << "reading new format failed" << std::endl; - } - - return 0; - } - } -} - -int main() { - return test::BlobStreaming::test(); -} diff --git a/CondCore/DBCommon/test/testCipher.cc b/CondCore/DBCommon/test/testCipher.cc deleted file mode 100644 index 0f73e4a84641e..0000000000000 --- a/CondCore/DBCommon/test/testCipher.cc +++ /dev/null @@ -1,33 +0,0 @@ -#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/Cipher.h" -#include - -int main(){ - cond::KeyGenerator gen; - // empty string to encode - std::string empty(""); - std::string k0 = gen.makeWithRandomSize( 100 ); - cond::Cipher c_en( k0 ); - std::string e = c_en.b64encrypt( empty ); - cond::Cipher c_de( k0 ); - std::string d = c_de.b64decrypt(e); - if( empty != d ){ - std::cout <<"##### Error: encoded ["< -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel(coral::Error); - connection.configure(); - try{ - cond::DbSession sourceSession = connection.createSession(); - sourceSession.open("sqlite_file:source.db"); - boost::shared_ptr myobj( new testCondObj ); - myobj->data.insert(std::make_pair(1,"strangestring1")); - myobj->data.insert(std::make_pair(100,"strangestring2")); - sourceSession.transaction().start(false); - sourceSession.createDatabase(); - std::string token = sourceSession.storeObject(myobj.get(), "mycontainer"); - std::cout<<"token "< myinstance = sourceSession.getTypedObject( token ); - std::cout<<"mem pointer "<data[1]<data[100]< newRef = destSession.getTypedObject( t ); - destSession.transaction().commit(); - std::cout<<"committed"< -#include -#include - -int main() { - std::string monitoringServiceName = "COND/Services/SQLMonitoringService"; - std::string authServiceName = "COND/Services/XMLAuthenticationService"; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::CoralServiceManager m_pluginManager; - std::string authpath("/afs/cern.ch/cms/DB/conddb"); - std::string pathenv(std::string("CORAL_AUTH_PATH=")+authpath); - ::putenv(const_cast(pathenv.c_str())); - coral::MessageStream::setMsgVerbosity( coral::Debug ); - coral::Context::instance().loadComponent("CORAL/Services/ConnectionService"); - coral::Context::instance().loadComponent(monitoringServiceName, &m_pluginManager); - coral::Context::instance().loadComponent(authServiceName, &m_pluginManager); - //coral::Context::instance().PropertyManager().property("AuthenticationFile")->set(std::string("/build/gg/key.dat")); - coral::IHandle connectionService=coral::Context::instance().query(); - connectionService->configuration().setAuthenticationService( authServiceName ); - connectionService->configuration().setMonitoringService( monitoringServiceName ); - connectionService->configuration().setMonitoringLevel(coral::monitor::Trace); - std::string connectionString("oracle://cms_orcoff_prep/CMS_COND_UNIT_TESTS"); - - coral::ISessionProxy* session = connectionService->connect( connectionString ); - session->transaction().start(); - // creates a dummy table to be looked up - std::string T1("TEST_DROP_ME"); - session->nominalSchema().dropIfExistsTable( T1 ); - coral::TableDescription descr; - descr.setName( T1 ); - descr.insertColumn("N_X",coral::AttributeSpecification::typeNameForType()); - descr.insertColumn("N_S",coral::AttributeSpecification::typeNameForType()); - session->nominalSchema().createTable( descr ); - session->nominalSchema().dropIfExistsTable( T1 ); - session->transaction().commit(); - delete session; - connectionService->monitoringReporter().report(); - std::cout << "Available reporter : " << std::endl; - std::set< std::string > rep = connectionService->monitoringReporter().monitoredDataSources(); - std::set< std::string >::iterator iter; - for ( iter = rep.begin( ); iter != rep.end( ); iter++ ) - std::cout << "reporter : " << *iter << std::endl; - std::cout << "SQL Monitoring report for session" << std::endl; - connectionService->monitoringReporter().reportToOutputStream( connectionString, std::cout ); - - - return 0; - -} diff --git a/CondCore/DBCommon/test/testDbConnection.cc b/CondCore/DBCommon/test/testDbConnection.cc deleted file mode 100644 index 045d92f1cd7dd..0000000000000 --- a/CondCore/DBCommon/test/testDbConnection.cc +++ /dev/null @@ -1,66 +0,0 @@ -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include -#include - -void enableStatus( bool flag ){ - if( flag ){ - std::cout << " ENABLED;"; - } else { - std::cout << " DISABLED;"; - } -} - -void dumpConnectionConfiguration( const cond::DbConnectionConfiguration& conf ){ - std::cout << " Connection Sharing: "; - enableStatus( conf.isConnectionSharingEnabled() ); - std::cout << std::endl; - std::cout << " Connection TimeOut: "< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr("sqlite_file:testDbScopedTransaction.db"); - std::string tok0(""); - try { - cond::DbSession s0 = conn->createSession(); - delete conn; - s0.open( connStr ); - s0.transaction().start(); - std::cout << "Transaction active at beginning A="< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr("sqlite_file:testDbSession.db"); - { - std::cout << "######### test 0"<createSession(); - session.close(); - try { - session.nominalSchema(); - std::cout << "ERROR: expected exception not thrown (0)"<createSession(); - session.open( connStr ); - s = session; - if(!s.isOpen()){ - std::cout << "ERROR: s should be open now..."< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr0("sqlite_file:testDbSessionIO0.db"); - std::string connStr1("sqlite_file:testDbSessionIO1.db"); - cond::DbSession s0; - { - std::cout << "######### test 0"<createSession(); - session.open( connStr0 ); - s0 = session; - if(!s0.isOpen()){ - std::cout << "ERROR: s0 should be open now..."<createSession(); - delete conn; - s1.open( connStr1 ); - std::string tok0(""); - std::string tok1(""); - try { - std::cout << "######### test 2"< data( new int(100) ); - s0.createDatabase(); - tok0 = s0.storeObject( data.get(),"cont0"); - std::cout << "Stored object with id = "< sdata( new std::string("blabla") ); - s1.createDatabase(); - tok1 = s1.storeObject(sdata.get(),"cont1"); - std::cout << "Stored object with id = "< result=rschema.listTables(); - for(std::set::iterator it=result.begin(); it!=result.end(); ++it){ - std::cout<<"table names: "<<*it< read0 = s0.getTypedObject( tok0 ); - std::cout << "Object with id="< read1= s1.getTypedObject( tok1 ); - std::cout << "Object with id="< read2= s0.getTypedObject( tok2 ); - std::cout << "Object with id="< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr("sqlite_file:testDbTransaction.db"); - std::string tok0(""); - try { - cond::DbSession s0 = conn->createSession(); - delete conn; - s0.open( connStr ); - std::cout << "Transaction active at beginning="< -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - // - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:testMultipleConnection0.db" ); - session.transaction().start(false); - session.transaction().commit(); - boost::shared_ptr myobj( new testCondObj ); - myobj->data.insert(std::make_pair(10,"ten")); - myobj->data.insert(std::make_pair(2,"two")); - session.transaction().start(false); - session.createDatabase(); - session.storeObject(myobj.get(), "testCondObjContainer"); - session.transaction().commit(); - cond::DbSession session2 = connection.createSession(); - session2.open( "sqlite_file:testMultipleConnection1.db" ); - session2.transaction().start(false); - coral::ISchema& schema = session2.nominalSchema(); - schema.dropIfExistsTable( "mytest" ); - coral::TableDescription description0; - description0.setName( "mytest" ); - description0.insertColumn( "ID",coral::AttributeSpecification::typeNameForId( typeid(int) ) ); - description0.insertColumn( "X",coral::AttributeSpecification::typeNameForId( typeid(float) ) ); - description0.insertColumn( "Y",coral::AttributeSpecification::typeNameForId( typeid(float) ) ); - description0.insertColumn( "ORDER",coral::AttributeSpecification::typeNameForId( typeid(int) ) ); - std::vector idx_cols; - idx_cols.push_back("ORDER"); - description0.createIndex("IDX1",idx_cols,false); - schema.createTable( description0 ); - std::set result=schema.listTables(); - for(std::set::iterator it=result.begin(); it!=result.end(); ++it){ - std::cout<<"table names: "<<*it< -#include -//#include -//#include - -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:testSequenceManager.db" ); - session.transaction().start(false); - cond::SequenceManager sequenceGenerator(session,"mysequenceDepot"); - if( !sequenceGenerator.existSequencesTable() ){ - sequenceGenerator.createSequencesTable(); - } - unsigned long long targetId=sequenceGenerator.incrementId("MYLOGDATA"); - std::cout<<"targetId for table MYLOGDATA "< -#include - - -#include -#include -void wait ( int seconds ) -{ - clock_t endwait; - endwait=clock()+seconds*CLOCKS_PER_SEC; - while (clock() < endwait) {} -} -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configuration().setPoolAutomaticCleanUp( false ); - connection.configuration().setConnectionTimeOut(0); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:testSingleConnection.db" ); - boost::shared_ptr myobj( new testCondObj ); - myobj->data.insert(std::make_pair(10,"ten")); - myobj->data.insert(std::make_pair(2,"two")); - session.transaction().start(false); - session.createDatabase(); - std::cout<<"waiting for 5 sec in pool transaction..."< result=session.nominalSchema().listTables(); - session.transaction().commit(); - for(std::set::iterator it=result.begin(); it!=result.end(); ++it){ - std::cout<<"table name "<<*it< - -struct Connections { - const char * conStr; - bool readOnly; -}; - -int main(){ - try { - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - std::vector psets; - edm::ParameterSet pSet; - pSet.addParameter("@service_type",std::string("SiteLocalConfigService")); - psets.push_back(pSet); - edm::ServiceToken services(edm::ServiceRegistry::createSet(psets)); - edm::ServiceRegistry::Operate operate(services); - - std::cout<<"testing Connection Handler "< -#include -#include "DataFormats/Provenance/interface/Timestamp.h" -int main() { - std::cout << cond::userInfo() << std::endl; - ::timeval tv; - gettimeofday(&tv,0); - std::cout<<"sec "< -#include -//#include -//#include -#include - -namespace cond{ - class TokenBuilder{ - public: - TokenBuilder(): m_token("") { - } - - ~TokenBuilder() { - } - - void set( const std::string& dictLib, - const std::string& className, - const std::string& containerName, - int pkcolumnValue=0) { - - ora::SharedLibraryName libName; - edmplugin::SharedLibrary shared( libName(dictLib) ); - m_token = writeToken(containerName, 0, pkcolumnValue, className); - } - - std::string const & tokenAsString() const { - return m_token; - } - private: - std::string m_token; - }; -}//ns cond - -int main(){ - cond::TokenBuilder tk; - tk.set("CondFormatsCalibration", - "Pedestals", - "Pedestals", - 0); - std::string const tok1 = tk.tokenAsString(); - tk.set("CondFormatsCalibration", - "Pedestals", - "Pedestals", - 1); - std::string const tok2 = tk.tokenAsString(); - std::string constr("sqlite_file:unittest_DBLogger.db"); - //std::string constr("oracle://devdb10/cms_xiezhen_dev"); - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( constr ); - cond::Logger mylogger( session ); - cond::UserLogInfo a; - a.provenance="me"; - mylogger.createLogDBIfNonExist(); - mylogger.logOperationNow(a,constr,std::string("Pedestals"),tok1,"mytag1","runnumber",0,1); - std::cout<<"1. waiting"< namespace cond{ class UnregisteredRecordException : public Exception{ diff --git a/CondCore/DBOutputService/interface/PoolDBOutputService.h b/CondCore/DBOutputService/interface/PoolDBOutputService.h index 5a9fbe6a65723..6a51ab31b5c95 100644 --- a/CondCore/DBOutputService/interface/PoolDBOutputService.h +++ b/CondCore/DBOutputService/interface/PoolDBOutputService.h @@ -2,9 +2,6 @@ #define CondCore_PoolDBOutputService_h #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" #include "FWCore/Utilities/interface/TypeID.h" -#include "CondCore/DBCommon/interface/Logger.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" -//#include "CondCore/DBCommon/interface/TagInfo.h" #include "CondCore/CondDB/interface/Session.h" #include #include @@ -51,7 +48,6 @@ namespace cond{ // std::string tag( const std::string& recordName ); bool isNewTagRequest( const std::string& recordName ); - const cond::Logger& queryLog() const; // template @@ -146,6 +142,7 @@ namespace cond{ void setLogHeaderForRecord(const std::string& recordName, const std::string& provenance, const std::string& usertext); + // // Retrieve tag information of the data // @@ -201,8 +198,6 @@ namespace cond{ std::vector m_currentTimes; cond::persistency::Session m_session; - std::string m_logConnectionString; - std::auto_ptr m_logdb; bool m_dbstarted; std::map m_callbacks; diff --git a/CondCore/DBOutputService/src/PoolDBOutputService.cc b/CondCore/DBOutputService/src/PoolDBOutputService.cc index 79cd5cd1355aa..6e35b4e4494f7 100644 --- a/CondCore/DBOutputService/src/PoolDBOutputService.cc +++ b/CondCore/DBOutputService/src/PoolDBOutputService.cc @@ -1,7 +1,5 @@ #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "CondCore/DBOutputService/interface/Exception.h" -//#include "CondCore/DBCommon/interface/TagInfo.h" -//#include "CondCore/DBCommon/interface/IOVInfo.h" #include "CondCore/CondDB/interface/ConnectionPool.h" #include "DataFormats/Provenance/interface/EventID.h" #include "DataFormats/Provenance/interface/Timestamp.h" @@ -10,8 +8,6 @@ #include "FWCore/ServiceRegistry/interface/GlobalContext.h" #include "FWCore/ServiceRegistry/interface/SystemBounds.h" #include "CondCore/CondDB/interface/Exception.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbSession.h" // #include #include @@ -36,19 +32,14 @@ cond::service::PoolDBOutputService::fillRecord( edm::ParameterSet & pset) { m_callbacks.insert(std::make_pair(thisrecord.m_idName,thisrecord)); - // *** THE NEW LOGGING has still to be defined and implemented. - if( !m_logConnectionString.empty() ){ - cond::UserLogInfo userloginfo; - m_logheaders.insert(std::make_pair(thisrecord.m_idName,userloginfo)); - } + cond::UserLogInfo userloginfo; + m_logheaders.insert(std::make_pair(thisrecord.m_idName,userloginfo)); } cond::service::PoolDBOutputService::PoolDBOutputService(const edm::ParameterSet & iConfig,edm::ActivityRegistry & iAR ): m_timetypestr(""), m_currentTimes{}, m_session(), - m_logConnectionString(""), - m_logdb(), m_dbstarted( false ), m_callbacks(), m_closeIOV(false), @@ -66,15 +57,6 @@ cond::service::PoolDBOutputService::PoolDBOutputService(const edm::ParameterSet std::string connectionString = iConfig.getParameter("connect"); m_session = connection.createSession( connectionString, true ); - if( iConfig.exists("logconnect") ){ - m_logConnectionString = iConfig.getUntrackedParameter("logconnect"); - cond::DbConnection conn; - conn.configuration().setParameters( connectionPset ); - conn.configure(); - cond::DbSession logSession = conn.createSession(); - m_logdb.reset( new cond::Logger( logSession ) ); - } - typedef std::vector< edm::ParameterSet > Parameters; Parameters toPut=iConfig.getParameter("toPut"); for(Parameters::iterator itToPut = toPut.begin(); itToPut != toPut.end(); ++itToPut) @@ -127,11 +109,6 @@ cond::service::PoolDBOutputService::initDB( bool ) try{ if( !m_session.existsDatabase() ) m_session.createDatabase(); - //init logdb if required - if(!m_logConnectionString.empty()){ - m_logdb->connect( m_logConnectionString ); - m_logdb->createLogDBIfNonExist(); - } } catch( const std::exception& er ){ cond::throwException( std::string(er.what()),"PoolDBOutputService::initDB" ); } @@ -220,28 +197,16 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa cond::throwException( myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV"); } std::string iovToken; - if( withlogging && m_logConnectionString.empty() ) - cond::throwException("Log db was not set from PoolDBOutputService::createNewIOV", - "PoolDBOutputService::createNewIOV"); try{ // FIX ME: synchronization type and description have to be passed as the other parameters? cond::persistency::IOVEditor editor = m_session.createIov( payloadType, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY ); editor.setDescription( "New Tag" ); editor.insert( firstSinceTime, firstPayloadId ); - editor.flush(); + cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + editor.flush( a.usertext ); myrecord.m_isNewTag=false; - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime); - } }catch(const std::exception& er){ - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logFailedOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime,std::string(er.what())); - } cond::throwException(std::string(er.what()) + " from PoolDBOutputService::createNewIOV ", "PoolDBOutputService::createNewIOV"); } @@ -261,10 +226,6 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa cond::throwException( myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV"); } std::string iovToken; - if( withlogging && m_logConnectionString.empty() ) - cond::throwException("Log db was not set from PoolDBOutputService::createNewIOV", - "PoolDBOutputService::createNewIOV"); - std::string payloadType(""); try{ // FIX ME: synchronization type and description have to be passed as the other parameters? @@ -272,19 +233,10 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa editor.setDescription( "New Tag" ); payloadType = editor.payloadType(); editor.insert( firstSinceTime, firstPayloadId ); - editor.flush(); + cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + editor.flush( a.usertext ); myrecord.m_isNewTag=false; - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime); - } }catch(const std::exception& er){ - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logFailedOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime,std::string(er.what())); - } cond::throwException(std::string(er.what()) + " from PoolDBOutputService::createNewIOV ", "PoolDBOutputService::createNewIOV"); } @@ -303,27 +255,15 @@ cond::service::PoolDBOutputService::appendSinceTime( const std::string& payloadI cond::throwException(std::string("Cannot append to non-existing tag ") + myrecord.m_tag, "PoolDBOutputService::appendSinceTime"); } - if( withlogging && m_logConnectionString.empty() ) - cond::throwException("Log db was not set from PoolDBOutputService::createNewIOV", - "PoolDBOutputService::createNewIOV"); std::string payloadType(""); try{ cond::persistency::IOVEditor editor = m_session.editIov( myrecord.m_tag ); payloadType = editor.payloadType(); editor.insert( time, payloadId ); - editor.flush(); + cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + editor.flush( a.usertext ); - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logOperationNow(a,destconnect,payloadType,payloadId,myrecord.m_tag,myrecord.timetypestr(),0,time); - } }catch(const std::exception& er){ - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logFailedOperationNow(a,destconnect,payloadType,payloadId,myrecord.m_tag,myrecord.timetypestr(),0,time,std::string(er.what())); - } cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime"); } @@ -369,7 +309,7 @@ cond::service::PoolDBOutputService::closeIOV(Time_t lastTill, const std::string& } cond::persistency::IOVEditor editor = m_session.editIov( myrecord.m_tag ); editor.setEndOfValidity( lastTill ); - editor.flush(); + editor.flush("Tag closed."); scope.close(); } @@ -382,13 +322,6 @@ cond::service::PoolDBOutputService::setLogHeaderForRecord(const std::string& rec myloginfo.usertext=usertext; } -// -const cond::Logger& -cond::service::PoolDBOutputService::queryLog()const{ - if( !m_logdb.get() ) throw cond::Exception("Log database is not set from PoolDBOutputService::queryLog"); - return *m_logdb; -} - // Still required. void cond::service::PoolDBOutputService::tagInfo(const std::string& recordName,cond::TagInfo_t& result ){ diff --git a/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc b/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc index ec76625a71378..7e5274c038fb8 100644 --- a/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc +++ b/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc @@ -2,7 +2,7 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CondFormats/Calibration/interface/Pedestals.h" #include "IOVPayloadEndOfJob.h" diff --git a/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc b/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc index fc63c4587f8ef..efd69f13fef53 100644 --- a/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc +++ b/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc @@ -5,9 +5,9 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +//#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Exception.h" +//#include "CondCore/DBCommon/interface/DbTransaction.h" #include "CondFormats/Calibration/interface/Pedestals.h" #include "MyDataAnalyzer.h" @@ -33,7 +33,6 @@ void MyDataAnalyzer::endJob(){ return; } try{ - mydbservice->setLogHeaderForRecord(m_record,"mynullsource","this is zhen's dummy test"); std::string tag=mydbservice->tag(m_record); Pedestals* myped=new Pedestals; if( mydbservice->isNewTagRequest(m_record) ){ diff --git a/CondCore/EgammaPlugins/BuildFile.xml b/CondCore/EgammaPlugins/BuildFile.xml index 71e165168411a..0d3e2df72c15c 100644 --- a/CondCore/EgammaPlugins/BuildFile.xml +++ b/CondCore/EgammaPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/HIPlugins/BuildFile.xml b/CondCore/HIPlugins/BuildFile.xml index e8e4e794a498d..5fb85ac08fc62 100644 --- a/CondCore/HIPlugins/BuildFile.xml +++ b/CondCore/HIPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/MetaDataService/BuildFile.xml b/CondCore/MetaDataService/BuildFile.xml deleted file mode 100644 index b64fed96cc695..0000000000000 --- a/CondCore/MetaDataService/BuildFile.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/CondCore/MetaDataService/doc/MetaDataService.doc b/CondCore/MetaDataService/doc/MetaDataService.doc deleted file mode 100644 index 0bf7ce03bb662..0000000000000 --- a/CondCore/MetaDataService/doc/MetaDataService.doc +++ /dev/null @@ -1,44 +0,0 @@ - -/*! - -\page CondCore_MetaDataService Package CondCore/MetaDataService - -
- - - -Source code (CVS tag: @CVS_TAG@) - -Administrative privileges - -
- -\section desc Description - - -Package handles iov metadata - -\subsection interface Public interface - - -- MetaDataExceptions -- MetaData -- MetaDataNames - -\subsection modules Modules - -None - - -\subsection tests Unit tests and examples - -- testMetaData : functionality test - -\section status Status and planned development - -Stable - -
-Last updated: -@DATE@ Author: Z.Xie -*/ - diff --git a/CondCore/MetaDataService/interface/MetaData.h b/CondCore/MetaDataService/interface/MetaData.h deleted file mode 100644 index 25d02c065eebd..0000000000000 --- a/CondCore/MetaDataService/interface/MetaData.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef CondCore_MetaDataService_METADATA_H -#define CondCore_MetaDataService_METADATA_H -#include -#include -#include "CondCore/DBCommon/interface/Time.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "MetaDataEntry.h" -// -// Package: MetaDataService -// Class : MetaData -// -/**\class MetaData MetaData.h CondCore/MetaDataService/interface/MetaDataService.h - Description: class for handling IOV metadata -*/ -// -// Author: Zhen Xie -// -namespace cond{ - class MetaData { - public: - // constructor - explicit MetaData( cond::DbSession& userSession ); - // destructor - ~MetaData(); - // add metadata entry - bool addMapping(const std::string& name, const std::string& token,cond::TimeType timetype=cond::runnumber); - // replace iov token associated with a given tag - //bool replaceToken(const std::string& name, const std::string& newtoken); - // if given iov tag exists - bool hasTag( const std::string& name ) const; - // list all tags - void listAllTags( std::vector& result ) const; - // list all entries in the metadata table - //void listAllEntries( std::vector& result ) const; - // get iov token associated with given tag - const std::string getToken( const std::string& tagname ) const; - // get the metadata table entry by tag name - //void getEntryByTag( const std::string& tagname, cond::MetaDataEntry& result )const; - // delete all entries in the metadata table - void deleteAllEntries(); - // delete metadata entry selected by iov token - //void deleteEntryByToken( const std::string& token ); - // delete metadata entry selected by tag name - void deleteEntryByTag( const std::string& tag ); - private: - // create metadata table - //void createTable(const std::string& tabname); - mutable cond::DbSession m_userSession; - }; -} -#endif - diff --git a/CondCore/MetaDataService/interface/MetaDataEntry.h b/CondCore/MetaDataService/interface/MetaDataEntry.h deleted file mode 100644 index 15deae681d586..0000000000000 --- a/CondCore/MetaDataService/interface/MetaDataEntry.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef CondCore_MetaDataService_MetaDataEntry_H -#define CondCore_MetaDataService_MetaDataEntry_H -#include -#include "CondCore/DBCommon/interface/Time.h" -namespace cond{ - class MetaDataEntry{ - public: - std::string tagname; - std::string iovtoken; - cond::TimeType timetype; - }; -} -#endif diff --git a/CondCore/MetaDataService/interface/MetaDataExceptions.h b/CondCore/MetaDataService/interface/MetaDataExceptions.h deleted file mode 100644 index 44cc10a279d0c..0000000000000 --- a/CondCore/MetaDataService/interface/MetaDataExceptions.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef COND_METADATAEXCEPTIONS_H -#define COND_METADATAEXCEPTIONS_H -#warning "obsolete" -#include "CondCore/DBCommon/interface/Exception.h" -#endif diff --git a/CondCore/MetaDataService/src/MetaData.cc b/CondCore/MetaDataService/src/MetaData.cc deleted file mode 100644 index 5ff78172bb7c6..0000000000000 --- a/CondCore/MetaDataService/src/MetaData.cc +++ /dev/null @@ -1,103 +0,0 @@ -#include "CondCore/MetaDataService/interface/MetaData.h" -#include "CondCore/ORA/interface/Database.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "RelationalAccess/SchemaException.h" -#include -//#include - - -namespace { - - std::string mdErrorPrefix(const std::string& source, const std::string& name) { - return source+std::string(": metadata entry \"")+name+std::string("\" "); - } - - - void mdError(const std::string& source, const std::string& name, const std::string& mess) { - throw cond::Exception(mdErrorPrefix(source,name)+mess); - } - - void mdDuplicateEntryError(const std::string& source, const std::string& name) { - mdError(source, name, "Already exists"); - } - - void mdNoEntry(const std::string& source, const std::string& name) { - mdError(source, name, "does not exists"); - } - -} - - -cond::MetaData::MetaData(cond::DbSession& userSession):m_userSession( userSession ){ -} -cond::MetaData::~MetaData(){ -} -bool -cond::MetaData::addMapping(const std::string& name, - const std::string& iovtoken, - cond::TimeType ){ - try{ - ora::OId oid; - oid.fromString( iovtoken ); - m_userSession.storage().setObjectName( name, oid ); - }catch( const coral::DuplicateEntryInUniqueKeyException& er ){ - mdDuplicateEntryError("addMapping",name); - }catch(std::exception& er){ - mdError("MetaData::addMapping",name,er.what()); - } - return true; -} - -const std::string -cond::MetaData::getToken( const std::string& name ) const{ - bool ok=false; - std::string iovtoken(""); - try{ - ora::OId oid; - ok = m_userSession.storage().getItemId( name, oid ); - if(ok) { - iovtoken = oid.toString(); - } - }catch(const std::exception& er){ - mdError("MetaData::getToken", name,er.what() ); - } - if (!ok) mdNoEntry("MetaData::getToken", name); - return iovtoken; -} - -bool cond::MetaData::hasTag( const std::string& name ) const{ - bool result=false; - try{ - ora::OId oid; - result = m_userSession.storage().getItemId( name, oid ); - }catch(const std::exception& er){ - mdError("MetaData::hasTag", name, er.what() ); - } - return result; -} - -void -cond::MetaData::listAllTags( std::vector& result ) const{ - try{ - m_userSession.storage().listObjectNames( result ); - }catch(const std::exception& er){ - throw cond::Exception( std::string("MetaData::listAllTags: " )+er.what() ); - } -} - -void -cond::MetaData::deleteAllEntries(){ - try{ - m_userSession.storage().eraseAllNames(); - }catch(const std::exception& er){ - throw cond::Exception( std::string("MetaData::deleteAllEntries: " )+er.what() ); - } -} - -void cond::MetaData::deleteEntryByTag( const std::string& tag ){ - try{ - m_userSession.storage().eraseObjectName( tag ); - }catch(const std::exception& er){ - throw cond::Exception( std::string("MetaData::deleteEntryByTag: " )+er.what() ); - } -} diff --git a/CondCore/MetaDataService/test/BuildFile.xml b/CondCore/MetaDataService/test/BuildFile.xml deleted file mode 100644 index 38335f2bbf7e0..0000000000000 --- a/CondCore/MetaDataService/test/BuildFile.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/CondCore/MetaDataService/test/testMetaData.cpp b/CondCore/MetaDataService/test/testMetaData.cpp deleted file mode 100644 index c1aeb96b0b132..0000000000000 --- a/CondCore/MetaDataService/test/testMetaData.cpp +++ /dev/null @@ -1,153 +0,0 @@ -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/MetaDataService/interface/MetaData.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include "FWCore/PluginManager/interface/SharedLibrary.h" - -#include "CondCore/DBCommon/interface/Time.h" -#include -#include -#include -#include -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - try{ - cond::DbConnection connection; - connection.configuration().setPoolAutomaticCleanUp( false ); - connection.configure(); - cond::DbSession coralDb = connection.createSession(); - coralDb.open("sqlite_file:meta.db"); - - //test errors - coralDb.transaction().start(false); - if(coralDb.storage().exists()){ - coralDb.storage().drop(); - } - coralDb.createDatabase(); - - coralDb.transaction().commit(); - - coralDb.transaction().start(true); - cond::MetaData metadata(coralDb); - if(metadata.hasTag("crap")) std::cout << "ERROR: wrong assertion" << std::endl; - /** - try { - cond::MetaDataEntry result; - metadata.getEntryByTag("crap", result); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - **/ - try { - metadata.getToken("crap"); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - try { - std::vector alltags; - metadata.listAllTags(alltags); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - - coralDb.transaction().commit(); - - - coralDb.transaction().start(false); - std::string t1("token1"); - metadata.addMapping("mytest1",t1); - coralDb.transaction().commit(); - - //test errors - coralDb.transaction().start(true); - if(metadata.hasTag("crap")) std::cout << "wrong: crap shall not be there" << std::endl; - /** - try { - cond::MetaDataEntry result; - metadata.getEntryByTag("crap", result); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - **/ - try { - metadata.getToken("crap"); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - coralDb.transaction().commit(); - - - - std::string t2("token2"); - coralDb.transaction().start(false); - metadata.addMapping("mytest2",t2,cond::timestamp); - coralDb.transaction().commit(); - - coralDb.transaction().start(true); - if(!metadata.hasTag("mytest1")) std::cout << "wrong: mytest1 IS there" << std::endl; - std::string tok1=metadata.getToken("mytest1"); - cond::MetaDataEntry r1; - /** - metadata.getEntryByTag("mytest1",r1); - **/ - coralDb.transaction().commit(); - - std::cout<<"got token1 "< alltags; - metadata.listAllTags(alltags); - coralDb.transaction().commit(); - - std::copy (alltags.begin(), - alltags.end(), - std::ostream_iterator(std::cout,"\n") - ); - - }catch(cond::Exception& er){ - std::cout< #include @@ -79,7 +78,7 @@ namespace popcon { cond::TagInfo_t m_tagInfo; - cond::LogDBEntry m_logDBEntry; + cond::LogDBEntry_t m_logDBEntry; bool m_close; Time_t m_lastTill; diff --git a/CondCore/PopCon/interface/PopConSourceHandler.h b/CondCore/PopCon/interface/PopConSourceHandler.h index 3df83c9b877d0..c3c870286937a 100644 --- a/CondCore/PopCon/interface/PopConSourceHandler.h +++ b/CondCore/PopCon/interface/PopConSourceHandler.h @@ -1,13 +1,8 @@ #ifndef PopConSourceHandler_H #define PopConSourceHandler_H -//#include "CondCore/DBCommon/interface/DbSession.h" -//#include "CondCore/DBCommon/interface/DbTransaction.h" - #include "CondCore/CondDB/interface/Session.h" #include "CondCore/CondDB/interface/Time.h" -//#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" #include #include @@ -108,11 +103,11 @@ namespace popcon { } // return last successful log entry for the tag in question - cond::LogDBEntry const & logDBEntry() const { return *m_logDBEntry; } + cond::LogDBEntry_t const & logDBEntry() const { return *m_logDBEntry; } // FIX ME void initialize (const cond::persistency::Session& dbSession, - cond::TagInfo_t const & tagInfo, cond::LogDBEntry const & logDBEntry) { + cond::TagInfo_t const & tagInfo, cond::LogDBEntry_t const & logDBEntry) { m_session = dbSession; m_tagInfo = &tagInfo; m_logDBEntry = &logDBEntry; @@ -121,7 +116,7 @@ namespace popcon { // this is the only mandatory interface std::pair operator()(const cond::persistency::Session& session, cond::TagInfo_t const & tagInfo, - cond::LogDBEntry const & logDBEntry) const { + cond::LogDBEntry_t const & logDBEntry) const { const_cast(this)->initialize(session, tagInfo, logDBEntry); return std::pair(&(const_cast(this)->returnData()), userTextLog()); } @@ -181,7 +176,7 @@ namespace popcon { cond::TagInfo_t const * m_tagInfo; - cond::LogDBEntry const * m_logDBEntry; + cond::LogDBEntry_t const * m_logDBEntry; protected: diff --git a/CondCore/PopCon/src/PopCon.cc b/CondCore/PopCon/src/PopCon.cc index 46bc02bfb5164..a11b60e5423ce 100644 --- a/CondCore/PopCon/src/PopCon.cc +++ b/CondCore/PopCon/src/PopCon.cc @@ -58,13 +58,13 @@ namespace popcon { m_tagInfo.lastPayloadToken = last.payloadId; } - if( m_IsDestDbCheckedInQueryLog ) { - m_dbService->queryLog().LookupLastEntryByTag( m_tag, connectionStr, m_logDBEntry ); - std::cout <<" ------ log info searched in the same db: "<< connectionStr << "------" <queryLog().LookupLastEntryByTag( m_tag, m_logDBEntry ); - std::cout <<" ------ log info found in another db "<< "------" <queryLog().LookupLastEntryByTag( m_tag, connectionStr, m_logDBEntry ); + //std::cout <<" ------ log info searched in the same db: "<< connectionStr << "------" <queryLog().LookupLastEntryByTag( m_tag, m_logDBEntry ); + //std::cout <<" ------ log info found in another db "<< "------" < - diff --git a/CondCore/RecoMuonPlugins/BuildFile.xml b/CondCore/RecoMuonPlugins/BuildFile.xml index b061a4f9de476..4c426375ab24a 100644 --- a/CondCore/RecoMuonPlugins/BuildFile.xml +++ b/CondCore/RecoMuonPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/TagCollection/BuildFile.xml b/CondCore/TagCollection/BuildFile.xml deleted file mode 100644 index 5ac9b41863fa0..0000000000000 --- a/CondCore/TagCollection/BuildFile.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/CondCore/TagCollection/data/CRAFT_30X.conf b/CondCore/TagCollection/data/CRAFT_30X.conf deleted file mode 100644 index 506e729a98479..0000000000000 --- a/CondCore/TagCollection/data/CRAFT_30X.conf +++ /dev/null @@ -1,293 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerGeometry_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerGeometryErrors_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelLorentzAngle_v02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelQuality_v03{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripGain_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripThreshold_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadChannel_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadChannel_HotStrip_CRAFT_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_CRAFT31X_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - DT_vDrift_CRAFT_V02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_CRAFT_KillAllME42{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v9.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v6.07_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v2.27_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalLUTCorrs_v1.01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - HcalZSThresholds_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - EcalPedestals_v5_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_AllCruzet_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_v16{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact_CRUZET{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_v1{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - runinfo_31X_test{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=RunInfo,recordname=RunInfoRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE CRAFT08_31X_V1] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerGeometry_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerGeometryErrors_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadChannel_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadChannel_HotStrip_CRAFT_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_CRAFT31X_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=noise_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=DT_vDrift_CRAFT_V02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_CRAFT_KillAllME42,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v9.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v6.07_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v2.27_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v5_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_AllCruzet_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_v16,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact_CRUZET,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_v1,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - RunInfo{parent=Calibration,tagname=runinfo_31X_test,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/data/GR09_31X.conf b/CondCore/TagCollection/data/GR09_31X.conf deleted file mode 100644 index f2329489dc927..0000000000000 --- a/CondCore/TagCollection/data/GR09_31X.conf +++ /dev/null @@ -1,297 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerGeometry_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerGeometryErrors_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelLorentzAngle_v02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelQuality_v03{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripGain_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripThreshold_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadChannel_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadChannel_HotStrip_CRAFT_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_CRAFT31X_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - DT_vDrift_CRAFT_V02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_CRAFT_KillAllME42{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCBadStrips_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadStrips,recordname=CSCBadStripsRcd}; - CSCBadWires_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadWires,recordname=CSCBadWiresRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v7.02_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v7.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v2.08_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.02_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v2.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalLUTCorrs_v1.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - HcalZSThresholds_v1.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - EcalPedestals_v5_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_AllCruzet_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_v16{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact_2009_V02{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_v1{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - runinfo_31X_test{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=RunInfo,recordname=RunInfoRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE GR09_31X] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerGeometry_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerGeometryErrors_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadChannel_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadChannel_HotStrip_CRAFT_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_CRAFT31X_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=noise_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=DT_vDrift_CRAFT_V02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_CRAFT_KillAllME42,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadStrips{parent=Calibration,tagname=CSCBadStrips_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadWires{parent=Calibration,tagname=CSCBadWires_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v7.02_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v7.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v2.08_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.02_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v2.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v5_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_AllCruzet_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_v16,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact_2009_V02,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_v1,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - RunInfo{parent=Calibration,tagname=runinfo_31X_test,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/data/GlobalTag.db b/CondCore/TagCollection/data/GlobalTag.db deleted file mode 100644 index af6c04d803b19..0000000000000 Binary files a/CondCore/TagCollection/data/GlobalTag.db and /dev/null differ diff --git a/CondCore/TagCollection/data/GlobalTag.db_30x b/CondCore/TagCollection/data/GlobalTag.db_30x deleted file mode 100644 index 8d2796d2590cd..0000000000000 Binary files a/CondCore/TagCollection/data/GlobalTag.db_30x and /dev/null differ diff --git a/CondCore/TagCollection/data/GlobalTag.db_31Xpre4 b/CondCore/TagCollection/data/GlobalTag.db_31Xpre4 deleted file mode 100644 index 4df1e912f6ffb..0000000000000 Binary files a/CondCore/TagCollection/data/GlobalTag.db_31Xpre4 and /dev/null differ diff --git a/CondCore/TagCollection/data/IDEAL_30X.conf b/CondCore/TagCollection/data/IDEAL_30X.conf deleted file mode 100644 index d7c3efd2ddffc..0000000000000 --- a/CondCore/TagCollection/data/IDEAL_30X.conf +++ /dev/null @@ -1,307 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerIdealGeometry210_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerIdealGeometryErrors210_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTIdealGeometry200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCIdealGeometry310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_ideal_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_ideal_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelGainCalibrationSim_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineSimRcd}; - SiPixelGainCalibrationSim_hlt_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTSimRcd}; - SiPixelLorentzAngle_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelLorentzAngleSim_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleSimRcd}; - SiPixelQuality_v03_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripApvGain_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripApvGain_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainSimRcd}; - SiStripNoises_Ideal_DecMode_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripLorentzAngle_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleSimRcd}; - SiStripThreshold_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadComponents_realisticMC_31X_v1{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadFiber_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0Fake_20X_Sept15_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_IDEAL_V01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTTtrig,recordname=DTTtrigRcd}; - DT_dead_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - DT_noise_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - vDrift_CSA08_S156_V2fix_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_none_FiveLiveME42PLUS_v2{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCBadStrips_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadStrips,recordname=CSCBadStripsRcd}; - CSCBadWires_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadWires,recordname=CSCBadWiresRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v8.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v4.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v2.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalZSThresholds_v1.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - HcalLUTCorrs_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - EcalPedestals_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_n_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstantsMC_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsMCRcd}; - EcalIntercalibConstants_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact10ddu31X_V01{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE MC_31X_V1] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerIdealGeometry210_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerIdealGeometryErrors210_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometry{parent=Calibration,tagname=DTIdealGeometry200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCIdealGeometry310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_ideal_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_ideal_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelGainHLTSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_hlt_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangleSim{parent=Calibration,tagname=SiPixelLorentzAngleSim_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripApvGain_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripGainsSim{parent=Calibration,tagname=SiStripApvGain_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoises_Ideal_DecMode_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangleSim{parent=Calibration,tagname=SiStripLorentzAngle_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadComponents_realisticMC_31X_v1,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadFiber_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0Fake_20X_Sept15_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_IDEAL_V01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTDeadFlag{parent=Calibration,tagname=DT_dead_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=DT_noise_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=vDrift_CSA08_S156_V2fix_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_none_FiveLiveME42PLUS_v2,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadStrips{parent=Calibration,tagname=CSCBadStrips_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadWires{parent=Calibration,tagname=CSCBadWires_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v8.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v4.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v2.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_n_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibMC{parent=Calibration,tagname=EcalIntercalibConstantsMC_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact10ddu31X_V01,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/data/STARTUP_30X.conf b/CondCore/TagCollection/data/STARTUP_30X.conf deleted file mode 100644 index 73bea07e1f09a..0000000000000 --- a/CondCore/TagCollection/data/STARTUP_30X.conf +++ /dev/null @@ -1,307 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerCRAFTScenario310_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerCRAFTScenarioErrors310_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTCRAFTScenario310_v2_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCCRAFTScenario310me42_v2_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_startup_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_startup_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelGainCalibrationSim_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineSimRcd}; - SiPixelGainCalibrationSim_hlt_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTSimRcd}; - SiPixelLorentzAngle_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelLorentzAngleSim_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleSimRcd}; - SiPixelQuality_v03_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripApvGain_StartUp_31X_v3{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripApvGain_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainSimRcd}; - SiStripNoises_Ideal_DecMode_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_StartUp_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripLorentzAngle_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleSimRcd}; - SiStripThreshold_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadComponents_realisticMC_31X_v1{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadFiber_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0Fake_20X_Sept15_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_STARTUP_smearing12ns_mc{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - DT_dead_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - DT_noise_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - vDrift_CSA08_S156_V2fix_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_none_FiveLiveME42PLUS_v2{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCBadStrips_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadStrips,recordname=CSCBadStripsRcd}; - CSCBadWires_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadWires,recordname=CSCBadWiresRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v8.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v4.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v2.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalZSThresholds_v1.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - HcalLUTCorrs_v1.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - EcalPedestals_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_n_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstantsMC_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsMCRcd}; - EcalIntercalibConstants_avg1_startup_10percentEE{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_STARTUP{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact10ddu31X_V01{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_STARTUP{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE STARTUP_31X_V1] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerCRAFTScenario310_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerCRAFTScenarioErrors310_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometry{parent=Calibration,tagname=DTCRAFTScenario310_v2_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCCRAFTScenario310me42_v2_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_startup_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_startup_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelGainHLTSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_hlt_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangleSim{parent=Calibration,tagname=SiPixelLorentzAngleSim_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripApvGain_StartUp_31X_v3,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripGainsSim{parent=Calibration,tagname=SiStripApvGain_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoises_Ideal_DecMode_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_StartUp_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangleSim{parent=Calibration,tagname=SiStripLorentzAngle_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadComponents_realisticMC_31X_v1,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadFiber_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0Fake_20X_Sept15_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_STARTUP_smearing12ns_mc,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - DTDeadFlag{parent=Calibration,tagname=DT_dead_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=DT_noise_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=vDrift_CSA08_S156_V2fix_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_none_FiveLiveME42PLUS_v2,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadStrips{parent=Calibration,tagname=CSCBadStrips_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadWires{parent=Calibration,tagname=CSCBadWires_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v8.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v4.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v2.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_n_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibMC{parent=Calibration,tagname=EcalIntercalibConstantsMC_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_avg1_startup_10percentEE,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_STARTUP,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact10ddu31X_V01,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_STARTUP,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/doc/TagCollection.doc b/CondCore/TagCollection/doc/TagCollection.doc deleted file mode 100644 index 6db0692ec1555..0000000000000 --- a/CondCore/TagCollection/doc/TagCollection.doc +++ /dev/null @@ -1,39 +0,0 @@ - -/*! - -\page CondCore_TagCollection Package CondCore/TagCollection - -
- - - -Source code (CVS tag: @CVS_TAG@) - -Administrative privileges - -
- -\section desc Description - -Package to manage high level super tags - -\subsection interface Public interface - - - -\subsection modules Modules - - - -\subsection tests Unit tests and examples - -Unknown - -\section status Status and planned development - -testing - -
-Last updated: -@DATE@ Author: Z.Xie -*/ - diff --git a/CondCore/TagCollection/interface/Exception.h b/CondCore/TagCollection/interface/Exception.h deleted file mode 100644 index e73a3a81ad42f..0000000000000 --- a/CondCore/TagCollection/interface/Exception.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CondCore_TagCollection_Exception_h -#define CondCore_TagCollection_Exception_h -#include "CondCore/DBCommon/interface/Exception.h" -#include -namespace cond{ - class nonExistentGlobalTagInventoryException : public Exception{ - public: - nonExistentGlobalTagInventoryException( const std::string& source ) : Exception( source+std::string(": global tag inventory does not exist") ){ - } - virtual ~nonExistentGlobalTagInventoryException() throw(){ - } - }; - - class nonExistentGlobalTagException : public Exception{ - public: - nonExistentGlobalTagException( const std::string& source , const std::string& globaltagName ) : Exception( source+std::string(": global tag: "+globaltagName+" does not exist") ){ - } - virtual ~nonExistentGlobalTagException() throw(){ - } - }; -} -#endif diff --git a/CondCore/TagCollection/interface/PfnEditor.h b/CondCore/TagCollection/interface/PfnEditor.h deleted file mode 100644 index 39cc2d64ad03a..0000000000000 --- a/CondCore/TagCollection/interface/PfnEditor.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef CondCore_TagCollection_PfnEditor -#define CondCore_TagCollection_PfnEditor - - -#include - -namespace cond{ - - // edit the pfn accordind to rules given in its constructor - class PfnEditor { - public: - PfnEditor(); - PfnEditor(std::string const & ipre, - std::string const & ipos); - - std::string operator()(std::string const & pfn) const; - - private: - std::string prefix; - std::string postfix; - bool off; - }; - - -} -#endif // CondCore_TagCollection_PfnEditor - diff --git a/CondCore/TagCollection/interface/TagCollectionRetriever.h b/CondCore/TagCollection/interface/TagCollectionRetriever.h deleted file mode 100644 index 5b35d9b498d91..0000000000000 --- a/CondCore/TagCollection/interface/TagCollectionRetriever.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef CondCore_TagCollection_TagCollectionRetriever_h -#define CondCore_TagCollection_TagCollectionRetriever_h -// -// Package: CondCore/TagCollection -// Class: TagCollectionRetriever -// -/**\class TagCollectionRetriever TagCollectionRetriever.h CondCore/TagCollection/interface/TagCollectionRetriever.h - Description: utility class to retrieve tag collection from db with given tag tree and node -*/ -// -// Author: Zhen Xie -// - -#include -#include -#include "CondCore/DBCommon/interface/TagMetadata.h" -#include "CondCore/TagCollection/interface/PfnEditor.h" -#include "CondCore/DBCommon/interface/DbSession.h" -namespace cond{ - class TagCollectionRetriever{ - public: - /// constructor - explicit TagCollectionRetriever( cond::DbSession& coraldb ); - TagCollectionRetriever( cond::DbSession& coraldb, - std::string const & prefix, - std::string const & postfix); - /// destructor - ~TagCollectionRetriever(); - - bool existsTagDatabase(); - - bool existsTagCollection( const std::string& globaltag ); - - bool selectTagCollection( const std::string& globaltag, - std::set& result); - /** - given global tag return the basic tag collection. The global tag has the format TreeName::NodeName - */ - void getTagCollection( const std::string& globaltag, - std::set& result); - private: - /// parse global tag string returns result in pair - std::pair parseglobaltag(const std::string& globaltag); - cond::DbSession m_coraldb; - PfnEditor pfnEditor; - - }; -}//ns cond -#endif diff --git a/CondCore/TagCollection/interface/TagDBNames.h b/CondCore/TagCollection/interface/TagDBNames.h deleted file mode 100644 index a30669e76d3ce..0000000000000 --- a/CondCore/TagCollection/interface/TagDBNames.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef COND_TAGDBNAMES_H -#define COND_TAGDBNAMES_H -#include -namespace cond{ - extern const std::string tagTreeTablePrefix; - extern const std::string tagInventoryTable; -} -#endif diff --git a/CondCore/TagCollection/python/CommonUtils.py b/CondCore/TagCollection/python/CommonUtils.py deleted file mode 100644 index cb7ee23357fb5..0000000000000 --- a/CondCore/TagCollection/python/CommonUtils.py +++ /dev/null @@ -1,112 +0,0 @@ - -def inventoryTableName(): - return 'TAGINVENTORY_TABLE' -def inventoryIDTableName(): - return 'TAGINVENTORY_IDS' -def treeTableName(treename): - return 'TAGTREE_TABLE_'+str.upper(treename) -def treeIDTableName(treename): - return 'TAGTREE_'+str.upper(treename)+'_IDS' -def commentTableName(): - return 'ENTRYCOMMENT_TABLE' - -import coral -def dropAllTreeTables(dbsession): - """drop all tagtree related tables - """ - try: - dbsession.transaction().start(False) - tablelist = dbsession.nominalSchema().listTables() - for tname in tablelist: - if tname.find('TAGTREE_') != -1: - dbsession.nominalSchema().dropTable(tname) - dbsession.transaction().commit() - except Exception as e: - raise Exception(str(e)) - -def tagInTrees(dbsession,tagname,pfn=''): - """returns the tree names which contain the given tag - select tagid from taginventory_table where tagname=tagname - select count(*) from tablename where tablename.tagid=tagid - """ - try: - dbsession.transaction().start(True) - invquery = dbsession.nominalSchema().tableHandle(inventoryTableName()).newQuery() - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tagname','string') - conditionbindDict['tagname'].setData(tagname) - condition='tagname = :tagname' - if len(pfn) !=0 : - condition+=' AND pfn = :pfn' - conditionbindDict.extend('pfn','string') - conditionbindDict['pfn'].setData(pfn) - invquery.setCondition(condition,conditionbindDict) - invquery.addToOutputList('tagid') - invquery.addToOutputList('pfn') - cursor = invquery.execute() - tagidmap={} - while ( next(cursor) ): - tagid=cursor.currentRow()['tagid'].data() - pfn=cursor.currentRow()['pfn'].data() - tagidmap[pfn]=tagid - cursor.close() - dbsession.transaction().commit() - del invquery - if len(tagidmap)==0: - return tagidmap - - result={} - treetablelist=[] - dbsession.transaction().start(True) - tablelist = dbsession.nominalSchema().listTables() - for t in tablelist: - if t.find('TAGTREE_TABLE_')!= -1: - treetablelist.append(t) - for (pfn,tagid) in tagidmap.items(): - result[pfn]=[] - condition='tagid = :tagid' - for t in treetablelist: - conditionBind=coral.AttributeList() - conditionBind.extend('tagid','unsigned long') - conditionBind['tagid'].setData(tagid) - q=dbsession.nominalSchema().tableHandle(t).newQuery() - q.addToOutputList('count(*)','count') - myresult=coral.AttributeList() - myresult.extend('count','unsigned long') - q.defineOutput(myresult) - q.setCondition(condition,conditionBind) - cr=q.execute() - while (next(cr)): - if cr.currentRow()['count'].data()!=0: - result[pfn].append(t[len('TAGTREE_TABLE_'):]) - cr.close() - del q - dbsession.transaction().commit() - return result - except Exception as e: - raise Exception(str(e)) - -if __name__ == "__main__": - #context = coral.Context() - #context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testInventory.db', - accessMode = coral.access_Update ) - try: - print 'TEST 1' - intrees=tagInTrees(session,'Tracker_Geometry_CRUZET3') - print intrees - print 'TEST 2' - hello=tagInTrees(session,'Tracker_Geometry_CRUZ3') - print hello - print 'TEST 3' - kitty=tagInTrees(session,'Tracker_Geometry_CRUZET3','pfnme') - print kitty - print 'TEST 4' - mikey=tagInTrees(session,'Tracker_Geometry_CRUZET3','frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT') - print mikey - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session diff --git a/CondCore/TagCollection/python/DBCopy.py b/CondCore/TagCollection/python/DBCopy.py deleted file mode 100644 index c1c1fbaf2f62f..0000000000000 --- a/CondCore/TagCollection/python/DBCopy.py +++ /dev/null @@ -1,302 +0,0 @@ -from __future__ import absolute_import -import coral -from . import CommonUtils, TagTree, tagInventory - -class DBCopy(object): - - def __init__( self, sourcesession, destsession, rowcachesize=1024 ): - self.__sourcesession=sourcesession - self.__destsession=destsession - self.__rowcachesize=rowcachesize - - def resetrowcachesize( self, newrowcachesize): - self.__rowcachesize=newrowcachesize - - def copyInventory( self ): - """copy entire inventory. The original inventory in the source db will be wiped. - """ - inv=tagInventory.tagInventory(self.__destsession) - inv.createInventoryTable() - dest_transaction=self.__destsession.transaction() - source_transaction=self.__sourcesession.transaction() - try: - dest_transaction.start(False) - #copy inventory table - data=coral.AttributeList() - my_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.inventoryTableName()).dataEditor() - source_transaction.start(True) - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.inventoryTableName()).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - my_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=my_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while (next(cursor) ): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - #copy inventory id table - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.inventoryIDTableName()).newQuery() - my_ideditor=self.__destsession.nominalSchema().tableHandle(CommonUtils.inventoryIDTableName()).dataEditor() - iddata=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - my_ideditor.rowBuffer(iddata) - source_query.defineOutput(iddata) - bulkOperation=my_ideditor.bulkInsert(iddata,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - #copy comment table if exists - if self.__sourcesession.nominalSchema().existsTable(CommonUtils.commentTableName()): - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.commentTableName()).newQuery() - my_commenteditor=self.__destsession.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - commentdata=coral.AttributeList() - qcondition=coral.AttributeList() - qcondition.extend('tablename','string') - qcondition['tablename'].setData(CommonUtils.commentTableName()) - source_query.setCondition('tablename = :tablename',qcondition) - source_query.setRowCacheSize(self.__rowcachesize) - my_commenteditor.rowBuffer(commentdata) - source_query.defineOutput(commentdata) - bulkOperation=my_commenteditor.bulkInsert(commentdata,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - source_transaction.commit() - dest_transaction.commit() - except Exception as e: - source_transaction.rollback() - dest_transaction.rollback() - raise Exception(str(e)) - - def copyTrees( self, treenames ): - """copy tree from an external source. - Merge inventory if existing in the destination - """ - allleafs=[] - for treename in treenames: - t=TagTree.tagTree(self.__sourcesession,treename) - allleafs.append(t.getAllLeaves()) - #create a unique tag list - merged={} - for s in allleafs: - for x in s: - merged[x.tagid]=1 - sourceinv=tagInventory.tagInventory(self.__sourcesession) - sourcetags=sourceinv.getAllEntries() - entries=[] - for i in merged.keys(): - for n in sourcetags: - if n.tagid==i: - entry={} - entry['tagid']=i - entry['tagname']=n.tagname - entry['pfn']=n.pfn - entry['recordname']=n.recordname - entry['objectname']=n.objectname - entry['labelname']=n.labelname - entries.append(entry) - inv=tagInventory.tagInventory(self.__destsession) - tagiddict=inv.bulkInsertEntries(entries) - dest_transaction=self.__destsession.transaction() - source_transaction=self.__sourcesession.transaction() - #copy table contents - try: - for treename in treenames: - desttree=TagTree.tagTree(self.__destsession,treename) - desttree.createTagTreeTable() - dest_transaction.start(False) - source_transaction.start(True) - #copy tree tables - data=coral.AttributeList() - dest_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.treeTableName(treename)).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.treeTableName(treename)).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - dest_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=dest_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - #copy id tables - iddata=coral.AttributeList() - dest_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.treeIDTableName(treename)).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.treeIDTableName(treename)).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - dest_editor.rowBuffer(iddata) - source_query.defineOutput(iddata) - bulkOperation=dest_editor.bulkInsert(iddata,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - #copy comment tables if exist - if self.__sourcesession.nominalSchema().existsTable(CommonUtils.commentTableName()): - data=coral.AttributeList() - dest_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.commentTableName()).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('tablename = :tablename',conditionData) - conditionData.extend('tablename','string') - conditionData['tablename'].setData(CommonUtils.treeTableName(treename)) - source_query.setRowCacheSize(self.__rowcachesize) - dest_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=dest_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - source_transaction.commit() - dest_transaction.commit() - #fix leaf node links - desttree.replaceLeafLinks(tagiddict) - except Exception as e: - source_transaction.rollback() - dest_transaction.rollback() - raise Exception(str(e)) - - - def copyDB( self ): - """copy all globaltag related tables from an external source. - The destination database must be empty. If not so, it will be cleaned implicitly. Inventory are implicitly copied as well. - """ - dest_transaction=self.__destsession.transaction() - source_transaction=self.__sourcesession.transaction() - tablelist=[] - alltablelist=[] - trees=[] - try: - source_transaction.start(True) - tablelist=list(self.__sourcesession.nominalSchema().listTables()) - source_transaction.commit() - except Exception as e: - source_transaction.rollback() - raise Exception(str(e)) - try: - i = tablelist.index(CommonUtils.inventoryTableName()) - alltablelist.append(CommonUtils.inventoryTableName()) - except ValueError: - raise 'Error: '+CommonUtils.inventoryTableName()+' does not exist in the source' - try: - i = tablelist.index(CommonUtils.inventoryIDTableName()) - alltablelist.append(CommonUtils.inventoryIDTableName()) - except ValueError: - raise 'Error: '+CommonUtils.inventoryIDTableName()+' does not exist' - - try: - i = tablelist.index(CommonUtils.commentTableName()) - alltablelist.append(CommonUtils.commentTableName()) - except ValueError: - pass - - for tablename in tablelist: - posbeg=tablename.find('TAGTREE_TABLE_') - if posbeg != -1: - treename=tablename[posbeg+len('TAGTREE_TABLE_'):] - trees.append(treename) - for tree in trees: - try: - tablelist.index(CommonUtils.treeIDTableName(tree)) - except ValueError: - print 'non-existing id table for tree ',tree - continue - alltablelist.append(CommonUtils.treeTableName(tree)) - alltablelist.append(CommonUtils.treeIDTableName(tree)) - #schema preparation - inv=tagInventory.tagInventory(self.__destsession) - inv.createInventoryTable() - for treename in trees: - t=TagTree.tagTree(self.__destsession,treename) - t.createTagTreeTable() - #copy table contents - try: - for mytable in alltablelist: - dest_transaction.start(False) - source_transaction.start(True) - data=coral.AttributeList() - my_editor=self.__destsession.nominalSchema().tableHandle(mytable).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(mytable).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - my_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=my_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - source_transaction.commit() - dest_transaction.commit() - except Exception as e: - source_transaction.rollback() - dest_transaction.rollback() - raise Exception(str(e)) - -if __name__ == "__main__": - #context = coral.Context() - #context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - - sourcesession = svc.connect( 'sqlite_file:source.db', - accessMode = coral.access_Update ) - destsession = svc.connect( 'sqlite_file:dest.db', - accessMode = coral.access_Update ) - try: - dbcp=DBCopy(sourcesession,destsession,1024) - print "TEST copyInventory" - dbcp.copyInventory() - print "TEST copytrees" - treenames=['CRUZET3_V2H'] - dbcp.copyTrees(treenames) - del sourcesession - del destsession - except Exception as e: - print "Failed in unit test" - print str(e) - del sourcesession - del destsession - - sourcesession = svc.connect( 'sqlite_file:source.db', - accessMode = coral.access_Update ) - destsession = svc.connect( 'sqlite_file:dest2.db', - accessMode = coral.access_Update ) - try: - dbcp=DBCopy(sourcesession,destsession,1024) - print "TEST full dbCopy" - dbcp.copyDB() - del sourcesession - del destsession - except Exception as e: - print "Failed in unit test" - print str(e) - del sourcesession - del destsession diff --git a/CondCore/TagCollection/python/DBImpl.py b/CondCore/TagCollection/python/DBImpl.py deleted file mode 100644 index 030f47d8494e1..0000000000000 --- a/CondCore/TagCollection/python/DBImpl.py +++ /dev/null @@ -1,84 +0,0 @@ -from __future__ import absolute_import -import coral -from . import IdGenerator - -class DBImpl(object): - """Class wrap up all the database operations.\n - """ - def __init__( self , schema): - """Input: coral schema handle. - """ - self.__schema = schema - def existRow( self, tableName, condition, conditionbindDict): - """Return true if one row fulfills the selection criteria - """ - try: - tableHandle = self.__schema.tableHandle(tableName) - query = tableHandle.newQuery() - query.setCondition(condition,conditionbindDict) - cursor = query.execute() - result=False - while ( next(cursor) ): - result=True - cursor.close() - del query - return result - except Exception as e: - raise Exception(str(e)) - def insertOneRow( self, tableName, tabrowDefDict, tabrowValueDict ): - """Insert row - """ - try: - tableHandle = self.__schema.tableHandle(tableName) - editor = tableHandle.dataEditor() - inputData = coral.AttributeList() - for name,type in tabrowDefDict.items(): - # print name, type - inputData.extend( name, type ) - inputData[name].setData(tabrowValueDict[name]) - editor.insertRow( inputData ) - except Exception as e: - raise Exception(str(e)) - def bulkInsert( self, tableName, tabrowDefDict, bulkinput): - """Bulk insert bulkinput=[{}] - """ - try: - dataEditor=self.__schema.tableHandle(tableName).dataEditor() - insertdata=coral.AttributeList() - for (columnname,columntype) in tabrowDefDict.items(): - insertdata.extend(columnname,columntype) - - bulkOperation=dataEditor.bulkInsert(insertdata,len(bulkinput)) - for valuedict in bulkinput: - for (columnname,columnvalue) in valuedict.items(): - insertdata[columnname].setData(columnvalue) - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - except Exception as e: - raise Exception(str(e)) - def deleteRows( self, tableName, condition, conditionbindDict ): - """Delete row(s) - """ - try: - tableHandle = self.__schema.tableHandle(tableName) - editor = tableHandle.dataEditor() - editor.deleteRows( condition, conditionbindDict ) - except Exception as e: - raise Exception(str(e)) - - def dropTable( self, tableName ): - """Drop specified table. - """ - self.__schema.dropIfExistsTable( tableName ) - def tableExists( self, tableName ): - """Tell whether table exists - """ - try: - self.__schema.tableHandle(tableName) - return True - except coral.Exception as e: - return False - -if __name__ == "__main__": - pass diff --git a/CondCore/TagCollection/python/IdGenerator.py b/CondCore/TagCollection/python/IdGenerator.py deleted file mode 100644 index 14b326837c191..0000000000000 --- a/CondCore/TagCollection/python/IdGenerator.py +++ /dev/null @@ -1,107 +0,0 @@ -from __future__ import absolute_import -import coral -from . import DBImpl -class IdGenerator(object): - """Manages the autoincremental ID values.\n - Input: coral.schema object - """ - def __init__( self , schema ): - self.__schema = schema - self.__idTableColumnName = 'nextID' - self.__idTableColumnType = 'unsigned long' - def getNewID( self, IDtableName): - """Return the ID value in the specified ID table.\n - Input: ID table name - """ - try: - query = self.__schema.tableHandle(IDtableName).newQuery() - query.addToOutputList(self.__idTableColumnName) - query.setForUpdate() #lock it - cursor = query.execute() - result = 0 - while ( next(cursor) ): - result = cursor.currentRow()[self.__idTableColumnName].data() - del query - return result - except Exception as e: - raise Exception(str(e)) - def incrementNextID( self, IDtableName ): - """Set the nextID in the IDTableName to current id value + 1 .\n - Input: ID table name. - """ - try: - tableHandle = self.__schema.tableHandle(IDtableName) - query = tableHandle.newQuery() - query.addToOutputList(self.__idTableColumnName) - query.setForUpdate() #lock it - cursor = query.execute() - result = 0 - while ( next(cursor) ): - result = cursor.currentRow()[0].data() - del query - dataEditor = tableHandle.dataEditor() - inputData = coral.AttributeList() - inputData.extend( 'newid', self.__idTableColumnType ) - inputData['newid'].setData(result+1) - dataEditor.updateRows('nextID = :newid','',inputData) - except Exception as e: - raise Exception(str(e)) - #def getIDTableName( self, tableName ): - # """Returns the ID table name associated with given table.\n - # No check on the existence of the table.\n - # Input: data table name - # Output: ID table name - # """ - # return tableName+'_IDs' - def createIDTable( self, idtableName, deleteOld=True ): - """Create ID table 'tableName_ID' for the given table.\n - Input: name of the table which needs new associated id table - Output: name of the id table created - """ - dbop=DBImpl.DBImpl(self.__schema) - try: - if dbop.tableExists(idtableName) is True: - if deleteOld is True: - dbop.dropTable(idtableName) - else: - return - description = coral.TableDescription(); - description.setName(idtableName) - description.insertColumn(self.__idTableColumnName, self.__idTableColumnType) - idtableHandle=self.__schema.createTable( description ) - idtableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - inputData = coral.AttributeList() - editor = idtableHandle.dataEditor() - editor.rowBuffer( inputData ) - inputData[self.__idTableColumnName].setData(1) - editor.insertRow( inputData ) - except Exception as e: - raise Exception(str(e)) -if __name__ == "__main__": - idtableName = 'TagTreeTable_IDS' - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:data.db', accessMode = coral.access_Update ) - transaction = session.transaction() - try: - transaction.start() - schema = session.nominalSchema() - generator=IdGenerator(schema) - generator.createIDTable( idtableName ) - transaction.commit() - transaction.start(True) - result=generator.getNewID(idtableName) - print 'new id ',result - transaction.commit() - transaction.start(False) - generator.incrementNextID(idtableName) - print 'new id ',generator.getNewID(idtableName) - transaction.commit() - del session - except coral.Exception as e: - transaction.rollback() - print str(e) - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session diff --git a/CondCore/TagCollection/python/Node.py b/CondCore/TagCollection/python/Node.py deleted file mode 100644 index 3086ada78a1be..0000000000000 --- a/CondCore/TagCollection/python/Node.py +++ /dev/null @@ -1,64 +0,0 @@ -class Node(object): - def __init__( self ): - """__init__ - """ - self.__dict__.setdefault('nodeid',0) - self.__dict__.setdefault('nodelabel','ROOT') - self.__dict__.setdefault('lft',0) - self.__dict__.setdefault('rgt',0) - self.__dict__.setdefault('parentid',0) - self.__dict__.setdefault('globalsince',0) - self.__dict__.setdefault('globaltill',0) - self.__dict__.setdefault('tagid',0) - def __repr__( self ): - """__repr__ - """ - return self.__dict__.__repr__() - def __setattr__( self, name, value ): - if not name in self.__dict__: - raise AttributeError("Unknown attribute "+name) - self.__dict__[name]=value - def __getattr__( self, name ): - if not name in self.__dict__: - raise AttributeError("Unknown attribute "+name) - return self.__dict__[name] - def empty( self ): - if self.__dict__['nodelabel']=='': - return True - return False -class LeafNode(Node): - """The leaf node - """ - def __init__( self ): - """__init__ - """ - super(Node,self).__init__() - super(Node,self).__setattr__( 'tagid',0 ) - self.__dict__.setdefault('tagname','') - #self.__dict__.setdefault('tagid',0) - self.__dict__.setdefault('pfn','') - self.__dict__.setdefault('recordname','') - self.__dict__.setdefault('objectname','') - self.__dict__.setdefault('labelname','') - def __repr__( self ): - """__repr__ - """ - if self.tagname=='': - return '' - return self.__dict__.__repr__() -if __name__ == "__main__": - node=Node() - node.nodeid=1 - print node.nodeid - print node.nodelabel - print node.lft - try: - node.foreign='a' - except AttributeError: - print 'caught right exception' - except Exception as er: - print 'unexpected error' - print str(er) - leaf=LeafNode() - print leaf.__class__.__name__,'isLeaf',str(leaf.tagid) - print node.__class__.__name__,'isLeaf',str(node.tagid) diff --git a/CondCore/TagCollection/python/TagTree.py b/CondCore/TagCollection/python/TagTree.py deleted file mode 100644 index 47969b2dcab67..0000000000000 --- a/CondCore/TagCollection/python/TagTree.py +++ /dev/null @@ -1,646 +0,0 @@ -from __future__ import absolute_import -import os -import coral -from . import IdGenerator, Node, DBImpl -class tagTree(object): - """Class manages tag tree. Note: tree name is not case sensitive. - Tree name is always converted to upper case - """ - def __init__( self, session, treename ): - self.__session = session - self.__tagTreeTableName = 'TAGTREE_TABLE_'+str.upper(treename) - self.__tagTreeIDs = 'TAGTREE_'+str.upper(treename)+'_IDS' - self.__tagInventoryTableName = 'TAGINVENTORY_TABLE' - self.__tagTreeTableColumns = {'nodeid':'unsigned long', 'nodelabel':'string', 'lft':'unsigned long', 'rgt':'unsigned long', 'parentid':'unsigned long', 'tagid':'unsigned long', 'globalsince':'unsigned long long', 'globaltill':'unsigned long long'} - self.__tagTreeTableNotNullColumns = ['nodelabel','lft','rgt','parentid'] - self.__tagTreeTableUniqueColumns = ['nodelabel'] - self.__tagTreeTablePK = ('nodeid') - def existTagTreeTable( self ): - """Check if tree table exists - """ - transaction=self.__session.transaction() - try: - transaction.start(True) - schema = self.__session.nominalSchema() - result=schema.existsTable(self.__tagTreeTableName) - transaction.commit() - #print result - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return result - def createTagTreeTable( self ): - """Create tag tree table. Existing table will be deleted. - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - schema = self.__session.nominalSchema() - schema.dropIfExistsTable( self.__tagTreeTableName ) - description = coral.TableDescription(); - description.setName( self.__tagTreeTableName ) - for columnName, columnType in self.__tagTreeTableColumns.items(): - description.insertColumn(columnName, columnType) - for columnName in self.__tagTreeTableNotNullColumns : - description.setNotNullConstraint(columnName,True) - for columnName in self.__tagTreeTableUniqueColumns : - description.setUniqueConstraint(columnName) - description.setPrimaryKey( self.__tagTreeTablePK ) - #description.createForeignKey('tagid_FK','tagid',self.__tagInventoryTableName,'tagid') - self.__tagTreeTableHandle = schema.createTable( description ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - #create also the associated id table - generator=IdGenerator.IdGenerator(self.__session.nominalSchema()) - generator.createIDTable(self.__tagTreeIDs,True) - transaction.commit() - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def importFromTree( self, sourcetreename ): - """fill up this tree by cloning from the given source tree - in the SAME database - """ - sourcetagTreeTableName = 'TAGTREE_TABLE_'+str.upper(sourcetreename) - sourcetagTreeIDs = 'TAGTREE_'+str.upper(sourcetreename)+'_IDS' - - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - r1=schema.existsTable(sourcetagTreeTableName) - r2=schema.existsTable(sourcetagTreeIDs) - r3=schema.existsTable(self.__tagTreeTableName) - r4=schema.existsTable(self.__tagTreeIDs) - transaction.commit() - if r1 and r2 is False: - raise "source tag tree doesn't exist "+str(sourcetreename) - if r3 and r4 is True: - transaction.start(False) - schema.truncateTable(self.__tagTreeTableName) - schema.truncateTable(self.__tagTreeIDs) - transaction.commit() - else: - self.createTagTreeTable() - transaction.start(False) - schema.truncateTable(self.__tagTreeIDs) - transaction.commit() - nresult=0 - try: - transaction.start(False) - insertwtQuery=schema.tableHandle(self.__tagTreeTableName).dataEditor().insertWithQuery() - insertwtQuery.query().addToTableList(sourcetagTreeTableName) - nresult=insertwtQuery.execute() - transaction.commit() - del insertwtQuery - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - #print nresult,' rows copied from ',sourcetagTreeTableName - - try: - transaction.start(False) - insertwtQuery=schema.tableHandle(self.__tagTreeIDs).dataEditor().insertWithQuery() - insertwtQuery.query().addToTableList(sourcetagTreeIDs) - nresult=insertwtQuery.execute() - transaction.commit() - del insertwtQuery - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - #print nresult,' rows copied from ',sourcetagTreeIDs - - def replaceLeafLinks(self, leafnodelinks ): - """modify the tagid link in leafnodes - Input: {oldtagid:newtagid , oldtagid:newtagid} - This function does not check if the nodes are all really leafs. User has to check before passing the input argument - """ - if len(leafnodelinks.keys())==0: - raise 'TagTree::replaceLeafLinks: empty input ' - - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - try: - updateAction="tagid = :newtagid" - updateCondition="tagid = :oldtagid" - updateData=coral.AttributeList() - updateData.extend('newtagid','unsigned long') - updateData.extend('oldtagid','unsigned long') - mybulkOperation=schema.tableHandle(self.__tagTreeTableName).dataEditor().bulkUpdateRows("tagid = :newtagid","tagid = :oldtagid",updateData,1000) - for oldtagid in leafnodelinks.keys(): - updateData['newtagid'].setData(leafnodelinks[oldtagid]) - updateData['oldtagid'].setData(oldtagid) - mybulkOperation.processNextIteration() - mybulkOperation.flush() - transaction.commit() - del mybulkOperation - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def insertNode( self, node, parentLabel='ROOT' ): - """Append a new node to specified parent. \n - Silently ignore duplicate entry \n - Input: new node. \n - Input: name of the parent node. \n - Output: result nodeid - """ - nodeid=node.nodeid - nodelabel=node.nodelabel - parentid=0 - tagid=node.tagid - lft=1 - rgt=2 - globalsince=node.globalsince - globaltill=node.globaltill - duplicate=False - transaction=self.__session.transaction() - try: - if parentLabel != 'ROOT': - parentNode=self.getNode(parentLabel) - if parentNode.empty(): - raise ValueError("non-existing parent node "+parentLabel) - parentid=parentNode.nodeid - lft=parentNode.rgt - rgt=parentNode.rgt+1 - ##start readonly transaction - transaction.start(False) - condition='nodelabel=:nodelabel' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('nodelabel','string') - conditionbindDict['nodelabel'].setData(nodelabel) - dbop=DBImpl.DBImpl(self.__session.nominalSchema()) - duplicate=dbop.existRow(self.__tagTreeTableName,condition,conditionbindDict) - if duplicate is False: - generator=IdGenerator.IdGenerator(self.__session.nominalSchema()) - nodeid=generator.getNewID(self.__tagTreeIDs) - if duplicate is False: - tabrowValueDict={'nodeid':nodeid, 'nodelabel':nodelabel, - 'lft':lft, 'rgt':rgt, 'parentid':parentid, - 'tagid':tagid, 'globalsince':globalsince, - 'globaltill':globaltill - } - if parentLabel != 'ROOT': - self.__openGap(self.__session.nominalSchema().tableHandle(self.__tagTreeTableName),parentNode.rgt,1 ) - dbop.insertOneRow(self.__tagTreeTableName, - self.__tagTreeTableColumns, - tabrowValueDict) - generator.incrementNextID(self.__tagTreeIDs) - transaction.commit() - return nodeid - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def renameNodes( self, nodenamemap): - """ - rename selected nodes \n - Input: {oldnodename:newnodename} - Output: [renamednodeid] - """ - transaction=self.__session.transaction() - allnodes={} - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - query.addToOutputList('nodelabel') - cursor = query.execute() - while ( next(cursor) ): - nodelabel=cursor.currentRow()['nodelabel'].data() - if nodelabel in nodenamemap: - allnodes[nodelabel]=nodenamemap[nodelabel] - else: - allnodes[nodelabel]=nodelabel - transaction.commit() - del query - if len(allnodes.values())!=len(set(allnodes.values())): - raise "new node labels are not unique in the tree" - transaction.start(False) - editor = schema.tableHandle(self.__tagTreeTableName).dataEditor() - inputData = coral.AttributeList() - inputData.extend('oldnodelabel','string') - inputData.extend('newnodelabel','string') - for nodelabelpair in nodenamemap.items(): - inputData['oldnodelabel'].setData(nodelabelpair[0]) - inputData['newnodelabel'].setData(nodelabelpair[1]) - editor.updateRows( "nodelabel = :newnodelabel", "nodelabel = :oldnodelabel", inputData ) - transaction.commit() - except coral.Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - - def getNodeById( self, nodeid ): - """return result of query "select * from treetable where nodeid=:nodeid" in Node structure \n - Input: id of the node to get.\n - Output: selected node - """ - result=Node.Node() - transaction=self.__session.transaction() - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - condition = 'nodeid =:nodeid' - conditionData = coral.AttributeList() - conditionData.extend( 'nodeid','unsigned int' ) - conditionData['nodeid'].setData(nodeid) - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - result.tagid=cursor.currentRow()['tagid'].data() - result.nodeid=cursor.currentRow()['nodeid'].data() - result.nodelabel=cursor.currentRow()['nodelabel'].data() - result.lft=cursor.currentRow()['lft'].data() - result.rgt=cursor.currentRow()['rgt'].data() - result.parentid=cursor.currentRow()['parentid'].data() - result.globalsince=cursor.currentRow()['globalsince'].data() - result.globaltill=cursor.currentRow()['globaltill'].data() - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def getNode( self, label='ROOT' ): - """return result of query "select * from treetable where nodelabel=label" in Node structure \n - Input: name of the node to get. Default to 'ROOT' \n - Output: selected node - """ - result=Node.Node() - if label=='ROOT': - return result - transaction=self.__session.transaction() - try: - transaction.start(True) - query=self.__session.nominalSchema().tableHandle(self.__tagTreeTableName).newQuery() - condition = 'nodelabel =:nodelabel' - conditionData = coral.AttributeList() - conditionData.extend( 'nodelabel','string' ) - query.setCondition( condition, conditionData) - conditionData['nodelabel'].setData(label) - cursor = query.execute() - while ( next(cursor) ): - result.tagid=cursor.currentRow()['tagid'].data() - result.nodeid=cursor.currentRow()['nodeid'].data() - result.nodelabel=cursor.currentRow()['nodelabel'].data() - result.lft=cursor.currentRow()['lft'].data() - result.rgt=cursor.currentRow()['rgt'].data() - result.parentid=cursor.currentRow()['parentid'].data() - result.globalsince=cursor.currentRow()['globalsince'].data() - result.globaltill=cursor.currentRow()['globaltill'].data() - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def getPath( self, label ): - """Get the path to arrive from ROOT to the given node.\n - Input: labe of the node - Output: list of the labels of the nodes in the path - query "SELECT nodelabel FROM treetable WHERE lft<%s AND rgt>%s ORDER BY lft ASC" - """ - result=[] - lft=0 - rgt=0 - try: - me=self.getNode(label) - lft=me.lft - rgt=me.rgt - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - query.addToOutputList('nodelabel') - condition = 'lft <:lft AND rgt>:rgt' - conditionData = coral.AttributeList() - conditionData.extend( 'lft','unsigned long' ) - conditionData.extend( 'rgt','unsigned long' ) - conditionData['lft'].setData(lft) - conditionData['rgt'].setData(rgt) - query.setCondition( condition, conditionData) - query.addToOrderList( 'lft' ) - cursor = query.execute() - while ( next(cursor) ): - resultNodeLabel = cursor.currentRow()['nodelabel'].data() - result.append( resultNodeLabel ) - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def getAllLeaves( self ): - """Get all leaf nodes.\n - Output: list of leaf nodes - Query "SELECT * FROM treetable WHERE lft=rgt-1" - """ - result=[] - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - condition = 'lft=rgt-1' - conditionData = coral.AttributeList() - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - resultNode=Node.Node() - resultNode.tagid=cursor.currentRow()['tagid'].data() - resultNode.nodeid=cursor.currentRow()['nodeid'].data() - resultNode.nodelabel=cursor.currentRow()['nodelabel'].data() - resultNode.lft=cursor.currentRow()['lft'].data() - resultNode.rgt=cursor.currentRow()['rgt'].data() - resultNode.parentid=cursor.currentRow()['parentid'].data() - resultNode.globalsince=cursor.currentRow()['globalsince'].data() - resultNode.globaltill=cursor.currentRow()['globaltill'].data() - result.append( resultNode ) - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - def getSubtree( self, label='ROOT' ): - """Get the tree under node(included) with specified label. - Input: node label - Output: subtree in list of Node - Query "SELECT p1.* FROM treetable AS p1, treetable AS p2 WHERE p1.lft BETWEEN p2.lft AND p2.rgt AND p2.nodelabel=%s ORDER BY p1.lft ASC" - """ - result=[] - try: - if label=='ROOT' : - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - for columnName in self.__tagTreeTableColumns: - query.addToOutputList(columnName) - cursor = query.execute() - while ( next(cursor) ): - resultNode=Node.Node() - resultNode.tagid=cursor.currentRow()['tagid'].data() - resultNode.nodeid=cursor.currentRow()['nodeid'].data() - resultNode.nodelabel=cursor.currentRow()['nodelabel'].data() - resultNode.lft=cursor.currentRow()['lft'].data() - resultNode.rgt=cursor.currentRow()['rgt'].data() - resultNode.parentid=cursor.currentRow()['parentid'].data() - resultNode.globalsince=cursor.currentRow()['globalsince'].data() - resultNode.globaltill=cursor.currentRow()['globaltill'].data() - result.append(resultNode) - transaction.commit() - del query - return result - else: - me=self.getNode(label) - parentlft=me.lft - parentrgt=me.rgt - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.newQuery() - query.addToTableList( self.__tagTreeTableName,'p1' ) - query.addToTableList( self.__tagTreeTableName,'p2' ) - for columnname in self.__tagTreeTableColumns.keys(): - query.addToOutputList( 'p1.'+columnname ) - condition = 'p1.lft BETWEEN p2.lft AND p2.rgt AND p2.nodelabel = :nodelabel' - query.addToOrderList( "p1.lft" ); - conditionData = coral.AttributeList() - conditionData.extend( 'nodelabel','string' ) - conditionData['nodelabel'].setData(label) - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - resultNode=Node.Node() - resultNode.tagid=cursor.currentRow()['p1.tagid'].data() - resultNode.nodeid=cursor.currentRow()['p1.nodeid'].data() - resultNode.nodelabel=cursor.currentRow()['p1.nodelabel'].data() - resultNode.lft=cursor.currentRow()['p1.lft'].data() - resultNode.rgt=cursor.currentRow()['p1.rgt'].data() - resultNode.parentid=cursor.currentRow()['p1.parentid'].data() - resultNode.globalsince=cursor.currentRow()['p1.globalsince'].data() - resultNode.globaltill=cursor.currentRow()['p1.globaltill'].data() - result.append(resultNode) - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def nChildren( self, label='ROOT' ): - """Number of children nodes of the given node - Input: label of the parent node - Output: number of children - """ - if label is 'ROOT' : - #"select count(*) from tagTreeTable" - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - query.addToOutputList('count(*)', 'ct') - mycounts=coral.AttributeList() - mycounts.extend('ct', 'unsigned long'); - query.defineOutput( mycounts ); - cursor = query.execute(); - while ( next(cursor) ): - n= cursor.currentRow()['ct'].data() - transaction.commit() - del query - return n - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - else: - me=self.getNode(label) - return int((me.rgt-me.lft)/2) - def deleteSubtree( self, label='ROOT' ): - """Delete the subtree under the specified node(included).\n - Input: label of the top node - query: DELETE FROM treetable WHERE lft >=%me.lft AND rgt<=%me.rgt - __closeGap() - """ - transaction=self.__session.transaction() - try: - if label=='ROOT' : - transaction.start(False) - self.__session.nominalSchema().dropIfExistsTable(self.__tagTreeTableName) - self.__session.nominalSchema().dropIfExistsTable(self.__tagTreeIDs) - #editor = tableHandle.dataEditor() - #conditionData = coral.AttributeList() - #editor.deleteRows('',conditionData) - #idtableHandle = self.__session.nominalSchema().tableHandle(self.__tagTreeIDs) - #ideditor = idtableHandle.dataEditor() - #ideditor.deleteRows('',conditionData) - transaction.commit() - else : - myparent=self.getNodeById(self.getNode(label).nodeid) - parentlft=myparent.lft - parentrgt=myparent.rgt - n=self.nChildren(label) - transaction.start(False) - tableHandle = self.__session.nominalSchema().tableHandle(self.__tagTreeTableName) - editor = tableHandle.dataEditor() - condition = 'lft >= :parentlft AND rgt <= :parentrgt' - conditionData = coral.AttributeList() - conditionData.extend('parentlft','unsigned long') - conditionData.extend('parentrgt','unsigned long') - conditionData['parentlft'].setData(parentlft) - conditionData['parentrgt'].setData(parentrgt) - editor.deleteRows( condition, conditionData ) - self.__closeGap(tableHandle,parentlft,parentrgt,n) - transaction.commit() - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def deleteNode( self, label ): - """ - DELETE FROM treetable WHERE nodename=label - """ - assert (label !='ROOT') - transaction=self.__session.transaction() - try: - myparent=self.getNodeById(self.getNode(label).nodeid) - parentlft=myparent.lft - parentrgt=myparent.rgt - transaction.start(False) - tableHandle = self.__session.nominalSchema().tableHandle(self.__tagTreeTableName) - editor = tableHandle.dataEditor() - condition = 'nodelabel = :nodelabel' - conditionData = coral.AttributeList() - conditionData.extend('nodelabel','string') - conditionData['nodelabel'].setData(label) - editor.deleteRows( condition, conditionData ) - self.__closeGap(tableHandle,parentlft,parentrgt,1) - transaction.commit() - except Exception as er: - print str(er) - transaction.rollback() - raise Exception(str(er)) - def __openGap(self,tableHandle,parentrgt,n): - """Update the parent node after inserting. Must be called inside update transaction.\n - Input: rootrgt is the rgt of the parent node. \n - Input: n is the number of positions to add - """ - delta=2*n - inputData = coral.AttributeList() - inputData.extend('parentrgt','unsigned long') - inputData['parentrgt'].setData(parentrgt) - editor = tableHandle.dataEditor() - setClause = 'lft=lft+'+str(delta) - condition = 'lft>:parentrgt' - editor.updateRows(setClause, condition, inputData) - setClause = 'rgt=rgt+'+str(delta) - condition = 'rgt>=:parentrgt' - editor.updateRows(setClause, condition, inputData) - def __closeGap(self, tableHandle,parentlft,parentrgt,n): - """Update the node lft rgt values after removing. Must be called inside update transaction.\n - """ - assert (parentlft!=0 and parentrgt!=0 and n!=0) - assert (parentrgt>parentlft) - delta=2*n - editor = tableHandle.dataEditor() - setClause1 = 'lft=lft-'+str(delta) - condition1 = 'lft>'+str(parentrgt) - inputData =coral.AttributeList() - editor.updateRows(setClause1,condition1,inputData) - setClause2 = 'rgt=rgt-'+str(delta) - condition2 = 'rgt>'+str(parentrgt) - editor.updateRows(setClause2,condition2,inputData) -if __name__ == "__main__": - os.putenv( "CORAL_AUTH_PATH", "." ) - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testTree.db', - accessMode = coral.access_Update ) - #session = svc.connect( 'oracle://devdb10/cms_xiezhen_dev', - # accessMode = coral.access_Update ) - try: - #create a tree named 'mytest' - mytree=tagTree(session,'mytest2') - mytree.createTagTreeTable() - mynode=Node.Node() - mynode.nodelabel='A' - mynode.globalsince=1 - mynode.globaltill=10 - mytree.insertNode(mynode,'ROOT') - result=mytree.getNode('A') - print result - mynode=Node.Node() - mynode.nodelabel='AC1' - mynode.globalsince=2 - mynode.globaltill=5 - mytree.insertNode(mynode,'A') - result=mytree.getNode('A') - print result - result=mytree.getNode('AC1') - print result - result=mytree.getPath('AC1') - print result - result=mytree.getAllLeaves() - print 'all leafs',result - mynode=Node.Node() - mynode.nodelabel='AB2' - mynode.globalsince=3 - mynode.globaltill=7 - mytree.insertNode(mynode,'A') - result=mytree.getNode('A') - print 'Node A ',result - result=mytree.getNode('AB2') - print 'Node AB2 ',result - result=mytree.getPath('AB2') - print 'Path to AB2 ',result - allleafs=mytree.getAllLeaves() - print 'all leaves again',allleafs - print 'number of children ',mytree.nChildren('A') - print 'number of children ',mytree.nChildren('ROOT') - result=mytree.getSubtree('A') - print 'subtree of A ',result - newtree=tagTree(session,'mynewtest') - newtree.importFromTree('mytest2') - newlinks={} - for l in allleafs: - newlinks[l.tagid]=1234 - newtree.replaceLeafLinks(newlinks) - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session diff --git a/CondCore/TagCollection/python/__init__.py b/CondCore/TagCollection/python/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/CondCore/TagCollection/python/cacheconfigParser.py b/CondCore/TagCollection/python/cacheconfigParser.py deleted file mode 100644 index ca9f2149f5ffc..0000000000000 --- a/CondCore/TagCollection/python/cacheconfigParser.py +++ /dev/null @@ -1,60 +0,0 @@ -from xml.dom.minidom import parse,parseString,getDOMImplementation,Node - -class cacheconfigParser(object): - def __init__(self): - self.__configstr='' - self.__configfile='' - ###parse result - self.__parameterDict={} - def handleFrontierConnect(self,dom): - #print 'handleFrontierConnect' - nodelist=dom.getElementsByTagName('frontier-connect')[0].childNodes - #print nodelist - for node in nodelist: - if node.nodeType!=Node.TEXT_NODE and node.nodeType!=Node.COMMENT_NODE: - tagname=node.tagName - attrs=node.attributes - for attrName in attrs.keys(): - attrNode=attrs.get(attrName) - attrValue=attrNode.nodeValue - if tagname in self.__parameterDict: - self.__parameterDict[tagname].append((attrName,attrValue)) - else: - valuelist=[] - valuelist.append((attrName,attrValue)) - self.__parameterDict[tagname]=valuelist - def parse(self,filename): - """ - Parse an XML file by name - """ - dom=parse(filename) - self.handleFrontierConnect(dom) - dom.unlink() - def parseString(self,strbuff): - dom=parseString(strbuff) - self.handleFrontierConnect(dom) - dom.unlink() - def proxylist(self): - return self.__parameterDict['proxy'] - def serverlist(self): - return self.__parameterDict['server'] - def parameterdict(self): - return self.__parameterDict -if __name__ == '__main__': - mydocstr="""""" - p=cacheconfigParser() - p.parseString(mydocstr) - print 'proxies' - print p.proxylist() - print 'servers' - print p.serverlist() - print 'parameterdict' - print p.parameterdict() - - p.parse('/afs/cern.ch/cms/SITECONF/CERN/JobConfig/site-local-config.xml') - print 'proxies' - print p.proxylist() - print 'servers' - print p.serverlist() - print 'parameterdict' - print p.parameterdict() diff --git a/CondCore/TagCollection/python/connectstrParser.py b/CondCore/TagCollection/python/connectstrParser.py deleted file mode 100644 index a719ad16ff110..0000000000000 --- a/CondCore/TagCollection/python/connectstrParser.py +++ /dev/null @@ -1,112 +0,0 @@ -from __future__ import absolute_import -import re -class connectstrParser(object): - def __init__(self,connectstr): - self.__connectstr=connectstr - self.__pattern=re.compile('(^[\w]+)(://)(.+)(/)(.+)') - self.__protocol='' - self.__schemaname='' - self.__servicename='' - self.__servlettotranslate=[] - def parse(self): - result=re.match(self.__pattern,self.__connectstr) - if result is not None: - protocol=result.group(1) - if protocol!='frontier' and protocol!='oracle': - raise 'unsupported technology',protocol - self.__protocol=protocol - self.__schemaname=result.group(5) - self.__servicename=result.group(3) - if self.__protocol=='frontier': - if self.__servicename.find('(')==-1: - if self.__servicename.find('/')==-1: - self.__servlettotranslate.append(self.__servicename) - elif self.__servicename.find('/') == -1: - self.__servlettotranslate.append(self.__servicename.split('(',1)[0]) - self.__servlettotranslate.append('('+self.__servicename.split('(',1)[1]) - - def protocol(self): - return self.__protocol - def schemaname(self): - return self.__schemaname - def service(self): - return self.__servicename - def needsitelocalinfo(self): - if self.__protocol=='frontier': - if len(self.__servlettotranslate)==0: - return False - else : - return True - else: - return False - def servlettotranslate(self): - """return a list, first is the servlet name, second is whatever additional parameter, if any. - """ - return self.__servlettotranslate - def fullfrontierStr(self,schemaname,parameterDict): - if len(parameterDict)==0: - raise 'empty frontier parameters, cannot construct full connect string' - result='frontier://' - for k,v in parameterDict.items(): - ##if attr name=url, concatenate; if attrname=value discard - if k=='load' and v[0][0]=='balance': - result+='(loadbalance='+v[0][1]+')' - continue - for (attrname,attrvalue) in v: - if attrname=='url': - if k=='server': - fields=attrvalue.rsplit('/') - if len(fields)>3: - fields[-1]=self.servlettotranslate()[0] - attrvalue='/'.join(fields) - result+='('+k+'url='+attrvalue+')' - else: - result+='('+k+'='+attrvalue+')' - if len(self.servlettotranslate())>1: - result+=self.servlettotranslate()[1] - result+='/'+schemaname - return result -if __name__ == '__main__': - from . import cacheconfigParser - o='oracle://cms_orcoff_prep/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(o) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 1' - f1='frontier://cmsfrontier.cern.ch:8000/LumiPrep/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f1) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 2' - f2='frontier://(serverurl=cmsfrontier.cern.ch:8000/LumiPrep/CMS_LUMI_DEV_OFFLINE)' - parser=connectstrParser(f2) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 3' - f3='frontier://(proxyurl=http://cmst0frontier.cern.ch:3128)(proxyurl=http://cmst0frontier.cern.ch:3128)(proxyurl=http://cmst0frontier1.cern.ch:3128)(proxyurl=http://cmst0frontier2.cern.ch:3128)(serverurl=http://cmsfrontier.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier.cern.ch:8000)/LumiPrep)(serverurl=http://cmsfrontier1.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier2.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier3.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier4.cern.ch:8000/LumiPrep)/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f3) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 4' - f4='frontier://LumiPrep/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f4) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo(),parser.servlettotranslate() - if parser.needsitelocalinfo(): - sitelocalconfig='/afs/cern.ch/cms/SITECONF/CERN/JobConfig/site-local-config.xml' - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - print 'full frontier string' - print parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict()) - print 'case 5' - f5='frontier://LumiPrep(otherparameter=value)/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f5) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo(),parser.servlettotranslate() - print parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict()) - print 'case 6' - f6='frontier://LumiCalc/CMS_LUMI_PROD' - parser=connectstrParser(f6) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo(),parser.servlettotranslate() - print parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict()) diff --git a/CondCore/TagCollection/python/entryComment.py b/CondCore/TagCollection/python/entryComment.py deleted file mode 100644 index 0ae725c774a8e..0000000000000 --- a/CondCore/TagCollection/python/entryComment.py +++ /dev/null @@ -1,256 +0,0 @@ -from __future__ import absolute_import -import coral -from . import DBImpl -from . import CommonUtils - -class entryComment(object): - """Class add optional comment on given entry in a given table\n - """ - def __init__( self, session ): - """Input: coral schema handle. - """ - self.__session = session - self.__entryCommentTableColumns={'entryid':'unsigned long','tablename':'string','comment':'string'} - self.__entryCommentTableNotNullColumns=['entryid','tablename'] - self.__entryCommentTablePK=('entryid','tablename') - - def existCommentTable(self): - """Check if entry comment table exists - """ - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - result=schema.existsTable(CommonUtils.commentTableName()) - transaction.commit() - #print result - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return result - - def createEntryCommentTable(self): - """Create entry comment able.Existing table will be deleted. - """ - try: - transaction=self.__session.transaction() - transaction.start() - schema = self.__session.nominalSchema() - schema.dropIfExistsTable(CommonUtils.commentTableName()) - description = coral.TableDescription() - description.setName(CommonUtils.commentTableName()) - for columnName, columnType in self.__entryCommentTableColumns.items(): - description.insertColumn(columnName,columnType) - for columnName in self.__entryCommentTableNotNullColumns: - description.setNotNullConstraint(columnName,True) - description.setPrimaryKey(self.__entryCommentTablePK) - tablehandle=schema.createTable(description) - tablehandle.privilegeManager().grantToPublic(coral.privilege_Select) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def insertComment( self, tablename, entryid,comment ): - """insert comment on the given entry of given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - tabrowValueDict={'entryid':entryid,'tablename':tablename,'comment':comment} - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - dbop.insertOneRow(CommonUtils.commentTableName(),self.__entryCommentTableColumns,tabrowValueDict) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def bulkinsertComments( self, tableName,bulkinput): - """bulk insert comments for a given table - bulkinput [{'entryid':unsigned long, 'tablename':string,'comment':string}] - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - dbop.bulkInsert(CommonUtils.commentTableName(),self.__entryCommentTableColumns,bulkinput) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def getCommentForId( self, tableName, entryid ): - """get comment for given id in given table - """ - transaction=self.__session.transaction() - comment='' - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(CommonUtils.commentTableName()).newQuery() - condition='entryid = :entryid AND tablename = :tablename' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('entryid','unsigned long') - conditionbindDict.extend('tablename','string') - conditionbindDict['entryid'].setData(entryid) - conditionbindDict['tablename'].setData(tableName) - query.addToOutputList('comment') - query.setCondition(condition,conditionbindDict) - cursor=query.execute() - if next(cursor): - comment=cursor.currentRow()['comment'].data() - cursor.close() - transaction.commit() - del query - return comment - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getCommentsForTable( self, tableName ): - """get all comments for given table - result=[(entryid,comment)] - """ - transaction=self.__session.transaction() - result=[] - - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(CommonUtils.commentTableName()).newQuery() - condition='tablename = :tablename' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tablename','string') - conditionbindDict['tablename'].setData(tableName) - query.addToOutputList('entryid') - query.addToOutputList('comment') - query.setCondition(condition,conditionbindDict) - cursor=query.execute() - while next(cursor): - comment=cursor.currentRow()['comment'].data() - entryid=cursor.currentRow()['entryid'].data() - result.append((entryid,comment)) - cursor.close() - transaction.commit() - del query - return result - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def modifyCommentForId( self, tableName, entryid, newcomment ): - """replace comment for given entry for given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - editor = self.__session.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - inputData = coral.AttributeList() - inputData.extend('newcomment','string') - inputData.extend('entryid','unsigned long') - inputData.extend('tablename','string') - inputData['newcomment'].setData(newcomment) - inputData['entryid'].setData(entryid) - inputData['tablename'].setData(tableName) - editor.updateRows( "comment = :newcomment", "entryid = :entryid AND tablename = :tablename", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def replaceId( self, tableName, oldentryid, newentryid ): - """replace entryid in given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - editor = self.__session.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - inputData = coral.AttributeList() - inputData.extend('newentryid','unsigned long') - inputData.extend('oldentryid','unsigned long') - inputData.extend('tablename','string') - inputData['newentryid'].setData(newentryid) - inputData['oldentryid'].setData(oldentryid) - inputData['tablename'].setData(tableName) - editor.updateRows( "entryid = :newentryid", "entryid = :oldentryid AND tablename = :tablename", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def deleteCommentForId( self, tablename, entryid): - """delete selected comment entry - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - dbop=DBImpl.DBImpl(self.__session.nominalSchema()) - condition='tablename = :tablename AND entryid = :entryid' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tablename','string') - conditionbindDict.extend('entryid','unsigned long') - conditionbindDict['tablename'].setData(tablename) - conditionbindDict['entryid'].setData(entryid) - dbop.deleteRows(CommonUtils.commentTableName(),condition,conditionbindDict) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def clearAllEntriesForTable( self, tablename ): - """delete all entries related with given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - dbop=DBImpl.DBImpl(self.__session.nominalSchema()) - condition='tablename = :tablename' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tablename','string') - conditionbindDict['tablename'].setData(tablename) - dbop.deleteRows(CommonUtils.commentTableName(),condition,conditionbindDict) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - -if __name__ == "__main__": - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testentryComment.db', - accessMode = coral.access_Update ) - try: - entrycomment=entryComment(session) - print "test create entrycomment table" - entrycomment.createEntryCommentTable() - print "test insert one comment" - entrycomment.insertComment(CommonUtils.inventoryTableName(),12,'comment1') - entrycomment.insertComment(CommonUtils.treeTableName('ABCTREE'),12,'comment1') - print "test bulk insert" - bulkinput=[] - bulkinput.append({'entryid':21,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment'}) - bulkinput.append({'entryid':22,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment2'}) - bulkinput.append({'entryid':23,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment3'}) - bulkinput.append({'entryid':24,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment4'}) - entrycomment.bulkinsertComments(CommonUtils.inventoryTableName(),bulkinput) - print "test getCommentsForTable ",CommonUtils.inventoryTableName() - results=entrycomment.getCommentsForTable(CommonUtils.inventoryTableName()) - print results - result=entrycomment.getCommentForId(CommonUtils.inventoryTableName(),23) - print result - entrycomment.modifyCommentForId(CommonUtils.inventoryTableName(),23, 'mynewcomment' ) - print entrycomment.getCommentForId(CommonUtils.inventoryTableName(),23) - print 'test replaceid' - entrycomment.replaceId(CommonUtils.inventoryTableName(),23,33 ) - print entrycomment.getCommentForId(CommonUtils.inventoryTableName(),33) - print 'test deletecomment for id' - entrycomment.deleteCommentForId(CommonUtils.inventoryTableName(), 24) - print entrycomment.getCommentsForTable(CommonUtils.inventoryTableName()) - print 'clearAllEntriesForTable' - entrycomment.clearAllEntriesForTable(CommonUtils.inventoryTableName()) - print entrycomment.getCommentsForTable(CommonUtils.inventoryTableName()) - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session - diff --git a/CondCore/TagCollection/python/exporter.py b/CondCore/TagCollection/python/exporter.py deleted file mode 100644 index 129c52eb8b5d0..0000000000000 --- a/CondCore/TagCollection/python/exporter.py +++ /dev/null @@ -1,313 +0,0 @@ -''' -exporter(sourceSession,destSession[,rowCachesize]) -Input parameter sourceSession : session proxy for source schema providing logical service name & access mode -Input parameter destSession : session proxy for destination schema providing logical service name & access mode -Input parameter rowCachesize : the number of rows to be cached at the client side, default value =100 -Output paramter : the exporter object -''' -from __future__ import absolute_import - -import os -import coral -import time -import math -from .multivaluedict import mseqdict -from .listobjects import listobjects,listschema,listtables,listtableset - -class exporter: - "exporter class for CoralTools" - m_sourceSession = 0 - m_destSession = 0 - m_rowCachesize = 100 - - def __init__( self,sourceSession,destSession,rowCachesize=100 ): - try: - - self.m_sourceSession = sourceSession - self.m_destSession = destSession - self.m_rowCachesize = rowCachesize - - self.m_sourceSession.transaction().start() - self.m_destSession.transaction().start() - - except Exception as e: - raise Exception("Error in Initializer: " + str(e)) - -#Copies the schema objects from source to destination, without copying data. - def copyschema(self ): - try: - - listsourceTable=listschema( self.m_sourceSession.nominalSchema() ) - listdestTable=listobjects( self.m_destSession.nominalSchema() ) - self._checktable(listsourceTable,listdestTable) - - for key,value in listsourceTable.items(): - iTable = key - print iTable - self._copytablelayout(iTable) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copyschema SUCCESS" - - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copyschema method: " + str(e)) - return False - -#Copies the schema objects from source to destination, including data. - def copydata(self,rowCount=-1 ): - try: - - self.m_sourceSession.transaction().start() - self.m_destSession.transaction().start() - - listsourceTable=listschema( self.m_sourceSession.nominalSchema() ) - listdestTable=listobjects( self.m_destSession.nominalSchema() ) - self._checktable(listsourceTable,listdestTable) - - selectionclause="" - selectionparameters=coral.AttributeList() - for key,value in listsourceTable.items(): - iTable = key - print iTable - currentCount = 0 - self._copytablelayout(iTable) - self._copydatalayout(iTable,selectionclause,selectionparameters,currentCount,rowCount) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copydata SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copydata method: " + str(e)) - return False - -#Copies the specified table schema without copying data. - def copytableschema(self,tablename ): - try: - - iTable="" - listsourceTable=listtables( self.m_sourceSession.nominalSchema(),tablename ) - listdestTable=listtables(self.m_destSession.nominalSchema(),tablename ) - self._checktable(listsourceTable,listdestTable) - - for key,value in listsourceTable.items(): - iTable = key - print iTable - self._copytablelayout(iTable) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytableschema SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytableschema method: " + str(e)+" : "+iTable) - return False - -#Copies the specified table schema including data. - def copytabledata(self,tablename,selectionclause,selectionparameters,rowCount=-1 ): - try: - - iTable="" - listsourceTable=listtables( self.m_sourceSession.nominalSchema(),tablename ) - listdestTable=listtables( self.m_destSession.nominalSchema(),tablename ) - - currentCount = 0 - for key,value in listsourceTable.items(): - iTable = key - print iTable - tableexists = self._checkdata(iTable,listdestTable) - - if not tableexists: - self._copytablelayout(iTable) - - self._copydatalayout(iTable,selectionclause,selectionparameters,currentCount,rowCount) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytabledata SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytabledata method: " + str(e)+" : " + iTable) - return False - -#Copies the specified list of tables ordered by hierarchy without copying data. - def copytablelistschema(self,tableset ): - try: - - iTable="" - listsourceTable=listtableset( self.m_sourceSession.nominalSchema(),tableset ) - listdestTable=listtableset( self.m_destSession.nominalSchema(),tableset ) - self._checktable(listsourceTable,listdestTable) - - for key,value in listsourceTable.items(): - iTable = key - print iTable - self._copytablelayout(iTable) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytablelistschema SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytablelistschema method: " + str(e)+" : "+iTable) - return False - -#Copies the specified list of tables ordered by hierarchy including data. - def copytablelistdata(self,tablelist,rowCount=-1): - try: - - iTable="" - tableset=[] - for table in tablelist: - i=0 - for parameter in table: - if i==0: - tableset.append(parameter) - i=i+1 - - listsourceTable=listtableset( self.m_sourceSession.nominalSchema(),tableset ) - listdestTable=listtableset( self.m_destSession.nominalSchema(),tableset ) - for key,value in listsourceTable.items(): - iTable = key - print iTable - currentCount = 0 - selectionclause="" - selectionparameters=coral.AttributeList() - for table in tablelist: - i=0 - for parameter in table: - if i==0: - table=parameter - if table==iTable: - if i==1: - selectionclause = parameter - if i==2: - selectionparameters = parameter - i=i+1 - - tableexists = self._checkdata(iTable,listdestTable) - - if not tableexists: - self._copytablelayout(iTable) - - self._copydatalayout(iTable,selectionclause,selectionparameters,currentCount,rowCount) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytablelistdata SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytablelistdata method: " + str(e) + " : "+ iTable) - return False - -#Copies the schema objects from source to destination - def _copytablelayout(self,iTable ): - try: - - description = self.m_sourceSession.nominalSchema().tableHandle( iTable ).description() - table = self.m_destSession.nominalSchema().createTable( description ) - - return True - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Copies the data from source to destination - def _copydatalayout(self,iTable,selectionclause,selectionparameters,currentCount,rowCount ): - try: - data=coral.AttributeList() - sourceEditor = self.m_sourceSession.nominalSchema().tableHandle( iTable ).dataEditor() - destEditor = self.m_destSession.nominalSchema().tableHandle( iTable ).dataEditor() - - sourceEditor.rowBuffer(data) - sourcequery = self.m_sourceSession.nominalSchema().tableHandle( iTable ).newQuery() - sourcequery.setCondition(selectionclause,selectionparameters) - sourcequery.setRowCacheSize(self.m_rowCachesize) - sourcequery.defineOutput(data) - - bulkOperation = destEditor.bulkInsert(data,self.m_rowCachesize ) - - cursor=sourcequery.execute() - - for row in cursor: - currentCount = currentCount+1 - bulkOperation.processNextIteration() - if currentCount == rowCount: - bulkOperation.flush() - self.m_destSession.transaction().commit() - self.m_destSession.transaction().start() - currentCount = 0 - bulkOperation.flush() - del bulkOperation - del sourcequery - - return True - - except Exception as e: - raise Exception (" " + str(e)) - return False - - #Checks if table exists in destination schema - def _checktable(self,listsourceTable,listdestTable ): - try: - - for key,value in listsourceTable.items(): - table=key - for key,value in listdestTable.items(): - if key==table: - raise Exception( "Table exists in Destination Schema : " ) - - return True - - except Exception as e: - raise Exception (" " + str(e) + table) - return False - -#Checks if data exists in the table in destination schema - def _checkdata(self,iTable,listdestTable ): - try: - - foundtable=False - founddata=False - for key,value in listdestTable.items(): - if key==iTable: - counter=0 - # Run a query on the destination table - query = self.m_destSession.nominalSchema().tableHandle( iTable ).newQuery() - cursor = query.execute() - foundtable=True - for row in cursor: - counter=counter+1 - del query - if (counter > 0): - founddata=True - - return foundtable - - except Exception as e: - raise Exception (" " + str(e) + iTable) - return False - - def __del__( self ): - print "" diff --git a/CondCore/TagCollection/python/listobjects.py b/CondCore/TagCollection/python/listobjects.py deleted file mode 100644 index 774df6129a5ce..0000000000000 --- a/CondCore/TagCollection/python/listobjects.py +++ /dev/null @@ -1,412 +0,0 @@ -from __future__ import absolute_import -import os -import coral -from .multivaluedict import mseqdict - -''' -dumpobjectlist(schema) -Dumps the list of tables and views grouped and ordered by hierarchy, specifying the existing constraints and indexes. -Input parameter schema : a schema object, obtained by the sessionproxy object -Output paramter : none -''' -def dumpobjectlist( schema ): - try: - - dTableInfo=listobjects( schema ) - - print "--------------------------------------" - print "Listing Table Description " - print "--------------------------------------" - for key,value in dTableInfo.items(): - tableName= key - _printTableInfo(schema,tableName) - - print "Listing View Information" - print "--------------------------------------" - for viewName in schema.listViews(): - _printViewInfo(schema,viewName) - - except Exception as e: - raise Exception ("Error in dumpobjectlist method: " + str(e)) - return False - -#Returns the list of tables ordered by hierarchy -def listobjects( schema ): - try: - - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dRefTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - - for tableName in listOfTableNames: - - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - #Add referenced tablename to dictionary - dRefTable.append (tableName, foreignKey.referencedTableName()) - columnNamesR = foreignKey.referencedColumnNames() - - #For retrieving the tables in order of dependency - r1=mseqdict( [], {}) - r2=mseqdict( [], {}) - - for rTable, refTable in dRefTable.items(): - for table in refTable: - r1.append(table,'') - r1.append(rTable,'') - - for rTable, refTable in r1.items(): - test=rTable - for rTable1, refTable1 in dRefTable.items(): - if rTable1==test: - for table in refTable1: - if rTable1!=table: - r2.append(table,'') - - for key,value in r2.items(): - r1.remove(key,'') - dTable.remove(key,'') - - for key,value in r1.items(): - dTable.remove(key,'') - - for key,value in dTable.items(): - dCopyTable.append(key,'') - - for key,value in r2.items(): - dCopyTable.append(key,'') - - for key,value in r1.items(): - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#For printing the Table Information -def _printTableInfo( schema,tableName ): - try: - - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfColumns = table.description().numberOfColumns() - print "Table " , tableName - print "Columns : " , numberOfColumns - for i in range(0, numberOfColumns): - column = table.description().columnDescription( i ) - print "" , column.name() , " (" , column.type() , ")" - if ( column.isUnique() ): - print " UNIQUE"; - if ( column.isNotNull() ): - print " NOT NULL" - - if ( table.description().hasPrimaryKey() ): - columnNames = table.description().primaryKey().columnNames() - print "" - print "Primary key defined for column :" - for iColumn in columnNames: - print " ",iColumn , " " - - numberOfUniqueConstraints = table.description().numberOfUniqueConstraints() - print "" - print "Unique Constraints : " , numberOfUniqueConstraints - for i in range( 0, numberOfUniqueConstraints ): - uniqueConstraint = table.description().uniqueConstraint( i ) - print "" , uniqueConstraint.name() , " defined for column" - columnNames = uniqueConstraint.columnNames() - for iColumn in columnNames: - print " ",iColumn - - numberOfIndices = table.description().numberOfIndices() - print "" - print "Index : " , numberOfIndices - for i in range(0, numberOfIndices ): - index = table.description().index( i ) - print "" , index.name() - if ( index.isUnique() ): - print " (UNIQUE)" - print " defined for column" - columnNames = index.columnNames() - for iColumn in columnNames: - print " ",iColumn - - numberOfForeignKeys = table.description().numberOfForeignKeys() - print "" - print "Foreign Keys : " , numberOfForeignKeys - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - print "" , foreignKey.name() , " defined for column" - columnNames = foreignKey.columnNames() - for iColumn in columnNames: - print " ",iColumn - print " references -> " , foreignKey.referencedTableName() , "on Column "; - columnNamesR = foreignKey.referencedColumnNames() - for iColumn in columnNamesR: - print " ",iColumn - - print "--------------------------------------" - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#For printing the View Information -def _printViewInfo( schema,viewName ): - try: - - view = schema.viewHandle(viewName ) - numberOfColumns = view.numberOfColumns() - print "View " , view.name() - print "has", " ", numberOfColumns , " columns :" - for i in range( 0,numberOfColumns ): - column = view.column( i ) - print "" , column.name(), " (", column.type() , ")" - if ( column.isUnique() ): - print " UNIQUE" - if ( column.isNotNull() ): - print " NOT NULL" - - print " definition string : " , view.definition() - - print "--------------------------------------" - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Returns the list of tables ordered by hierarchy and checks for circular dependency between tables in source schema -def listschema( schema ): - try: - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dRefTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - dCircTable=mseqdict( [], {}) - - for tableName in listOfTableNames: - - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - #Add referenced tablename to dictionary - dRefTable.append (tableName, foreignKey.referencedTableName()) - dCircTable.append (tableName, foreignKey.referencedTableName()) - columnNamesR = foreignKey.referencedColumnNames() - - #For checking circular dependency between the tables - d1=mseqdict( [], {}) - d2=mseqdict( [], {}) - - for rTable, refTable in dCircTable.items(): - for table in refTable: - d1.append(rTable,table) - - dCircTable.swap() - for rTable, refTable in dCircTable.items(): - for table in refTable: - d2.append(rTable,table) - - for key,value in d1.items(): - firsttable=key - secondtable=value - for key,value in d2.items(): - if key==firsttable and value==secondtable: - raise Exception ("Circular Dependency exists between tables : "+firsttable,secondtable) - - #For retrieving the tables in order of dependency - r1=mseqdict( [], {}) - r2=mseqdict( [], {}) - - for rTable, refTable in dRefTable.items(): - for table in refTable: - r1.append(table,'') - r1.append(rTable,'') - - for rTable, refTable in r1.items(): - test=rTable - for rTable1, refTable1 in dRefTable.items(): - if rTable1==test: - for table in refTable1: - if rTable1!=table: - r2.append(table,'') - - for key,value in r2.items(): - r1.remove(key,'') - dTable.remove(key,'') - - for key,value in r1.items(): - dTable.remove(key,'') - - for key,value in dTable.items(): - dCopyTable.append(key,'') - - for key,value in r2.items(): - dCopyTable.append(key,'') - - for key,value in r1.items(): - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Returns the tablename for the specified table schema -def listtables( schema,tablename ): - try: - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - - for tableName in listOfTableNames: - if tablename==tableName: - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - columnNamesR = foreignKey.referencedColumnNames() - - for key,value in dTable.items(): - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Returns the list of tables ordered by hierarchy for the specified list of tables and also checks for circular dependency between the tables -def listtableset( schema,tableset ): - try: - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dCircTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - dTempTable=mseqdict( [], {}) - - for table in listOfTableNames: - for tableName in tableset: - if tableName==table: - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - #Add referenced tablename to dictionary - dTable.append (tableName, foreignKey.referencedTableName()) - dCircTable.append (tableName, foreignKey.referencedTableName()) - columnNamesR = foreignKey.referencedColumnNames() - - #For checking circular dependency between the tables - d1=mseqdict( [], {}) - d2=mseqdict( [], {}) - - for rTable, refTable in dCircTable.items(): - for table in refTable: - d1.append(rTable,table) - - dCircTable.swap() - for rTable, refTable in dCircTable.items(): - for table in refTable: - d2.append(rTable,table) - - for key,value in d1.items(): - firsttable=key - secondtable=value - for key,value in d2.items(): - if key==firsttable and value==secondtable: - raise Exception ("Circular Dependency exists between tables : "+firsttable,secondtable) - - #For retrieving the tables in order of dependency - r1=mseqdict( [], {}) - r2=mseqdict( [], {}) - - for rTable, refTable in dTable.items(): - for table in refTable: - r1.append(table,'') - r1.append(rTable,'') - - for rTable, refTable in r1.items(): - test=rTable - for rTable1, refTable1 in dTable.items(): - if rTable1==test: - for table in refTable1: - if rTable1!=table: - r2.append(table,'') - - for key,value in r2.items(): - r1.remove(key,'') - - for key,value in r2.items(): - dTempTable.append(key,'') - - for key,value in r1.items(): - dTempTable.append(key,'') - - for key,value in dTempTable.items(): - iTable= key - for table in tableset: - if table==iTable: - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -if __name__ == "__main__": - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:source.db', - accessMode = coral.access_Update ) - session.transaction().start(True) - schema=session.nominalSchema() - print 'TEST listobjects' - print listobjects(schema) - print 'TEST dumpobjectlist' - dumpobjectlist(schema) - print 'TEST listtables' - print listtables(schema,'TAGINVENTORY_TABLE') - - session.transaction().commit() - del session diff --git a/CondCore/TagCollection/python/multivaluedict.py b/CondCore/TagCollection/python/multivaluedict.py deleted file mode 100644 index 6727612cf8233..0000000000000 --- a/CondCore/TagCollection/python/multivaluedict.py +++ /dev/null @@ -1,180 +0,0 @@ -# Sequential Dictionary Class # -''' -msedict - multiple value dictionary, keeps multiple values per key -You can slice, add, sort with dictionaries. The functional operations map, filter, reduce can also be used . -The dictionary can also be used like a stack with push and pop. It can be used to Split , reverse and swap keys and values. -''' -from __future__ import absolute_import - -from .seqvaluedict import seqdict #Sequential Single Value Dictionary -from UserList import UserList - -class MyUserList(UserList): - from UserList import UserList - def __init__(self,parent,liste=None): - UserList.__init__(self,liste) - self.parent = parent #remember parent for call-back - def __delitem__(self, i): - del self.data[i] - if self.data==[]: #call-back, deletes item of parent - index = self.parent.values().index([]) - del self.parent[index:index+1] - -class mseqdict(seqdict): #Sequential Multiple Value Dictionary - def __init__(self,List=[],Dict={}): - self.list = [] - self.dict = {} - if not List: - pass - elif type(List)==type({}): - for key,value in List.items(): - self.__setitem__(key,value) - elif List and not Dict: #dict.items() - for key,value in List: - if isinstance(value,MyUserList): - for v in value: - self.__setitem__(key,v) - else: - self.__setitem__(key,value) - elif type(List)==type(Dict)==type([]): - for key,value in map(None,List,Dict): - self.__setitem__(key,value) - else: - if isinstance(Dict.values()[0],MyUserList): - self.dict = Dict - self.list = List - else: - for key in List: - value = Dict[key] - if type(value)==type([]): - for v in value: - self.__setitem__(key,v) - else: - self.__setitem__(key,value) - def __setitem__(self,key,value): - if key not in self.dict: - self.list.append(key) - if isinstance(value,MyUserList): - self.dict[key] = value - else: - self.dict[key]=MyUserList(self,[value]) - else: - values = self.dict[key] - if isinstance(value,MyUserList): - for v in value: - if not v in values: - values.extend(MyUserList(self,[v])) - else: - if not value in values: - values.extend(MyUserList(self,[value])) - def __delitem__(self, key): - del self.dict[key] - self.list.remove(key) - - def append(self,key,value): - self.__setitem__(key,value) - def __setslice__(self,start,stop,newdict): - start = max(start,0); stop = max(stop,0) - delindexes = [] - for key in newdict.keys(): - if key in self.dict: - index = self.list.index(key) - delindexes.append(index) - if index < start: - start = start - 1 - stop = stop - 1 - elif index >= stop: - pass - else: - stop = stop - 1 - else: - self.dict[key]=UserList(self) - delindexes.sort() - delindexes.reverse() - for index in delindexes: - key = self.list[index] - #del self.dict[key] - del self.list[index] - self.list[start:stop] = newdict.list[:] - self.update(newdict.dict) - def copy(self): - values = map(lambda x:x[:],self.values()) - return self.__class__(self.list,values) - def count(self,value): - vallist = self.dict.values() - return map(lambda x,y=value:x.count(y),vallist).count(1) - def filter(self,function,filtervalues=0): - if filtervalues == 1: #consider key and all keyvalues at once - dict = self.__class__() - for key,values in self.items(): - if function(key,values): - dict[key]=values - return dict - elif filtervalues == 2: #consider key and every keyvalue for itself - dict = self.__class__() - for key,values in self.items(): - for value in values: - if function(key,value): - dict[key]=value - return dict - else: #consider key only - liste=filter(function,self.list) - dict = {} - for i in liste: - dict[i]=self.dict[i] - return self.__class__(liste,dict) - def map(self,function,mapvalues=2): - if mapvalues == 1: #consider key and all keyvalues at once - dict = self.__class__() - for key,values in self.items(): - k,v = function(key,values) - dict[k]=v - return dict - else: #if mapvalues!=1: #consider key and every keyvalue for itself - dict = self.__class__() - for key,values in self.items(): - for value in values: - k,v = function(key,value) - dict[k]=v - return dict - def pop(self,key='...None',value='...None'): - if value=='...None': - if key=='...None': - pos = -1 - key = self.list[pos] - else: - pos = self.list.index(key) - tmp = self.dict[key] - del self.dict[key] - return {self.list.pop(pos):tmp} - else: - val = self.dict[key] - index = val.index(value) - tmp = val[index] - del val[index] - return {key:tmp} - def remove(self,key,value='...None'): - if value=='...None': - del self[key] - else: - index = self[key].index(value) - del self[key][index] - def sort(self,func1=None,func2=None): - if not func1: - self.list.sort() - else: - self.list.sort(*[func1]) - if func2: - for value in self.values(): - value.sort(*[func2]) - - def swap(self): - tmp = self.__class__() - for key,values in self.items(): - for value in values: - tmp[value]=key - self.list,self.dict = tmp.list,tmp.dict - del tmp - - def __repr__(self):return 'mseqdict(\n%s,\n%s)'%(self.list,self.dict) - diff --git a/CondCore/TagCollection/python/seqvaluedict.py b/CondCore/TagCollection/python/seqvaluedict.py deleted file mode 100644 index b91c4fcb32bf7..0000000000000 --- a/CondCore/TagCollection/python/seqvaluedict.py +++ /dev/null @@ -1,175 +0,0 @@ -# Sequential Dictionary Class # -''' -The sequential dictionary is a combination of a list and a dictionary so you can do most operations defined with lists . -seqdict - single value dictionary , keeps one value for one key -''' -from functools import reduce - -class seqdict: - def __init__(self,List=[],Dict={}): - if type(List)==type({}): - self.list = List.keys() - self.dict = List.copy() - elif List and not Dict: - self.list=[] - self.dict={} - for i,j in List: - self.list.append(i) - self.dict[i]=j - elif type(List)==type(Dict)==type([]): - self.list = List - self.dict = {} - for key,value in map(None,List,Dict): - self.dict[key] = value - else: - self.list,self.dict = List[:],Dict.copy() - - def append(self,key,value): - if key in self.dict: - self.list.remove(key) - self.list.append(key) - self.dict[key]=value - def check(self): - if len(self.dict)==len(self.list): - l1=self.list[:];l1.sort() - l2=self.dict.keys();l2.sort() - return l1==l2 - return -1 - def clear(self): - self.list=[];self.dict={} - def copy(self): - if self.__class__ is seqdict: - return self.__class__(self.list,self.dict) - import copy - return copy.copy(self) - def __cmp__(self,other): - return cmp(self.dict,other.dict) or cmp(self.list,other.list) - def __getitem__(self,key): - if type(key)==type([]): - newdict={} - for i in key: - newdict[i]=self.dict[i] - return self.__class__(key,newdict) - return self.dict[key] - def __setitem__(self,key,value): - if key not in self.dict: - self.list.append(key) - self.dict[key]=value - def __delitem__(self, key): - del self.dict[key] - self.list.remove(key) - def __getslice__(self,start,stop): - start = max(start,0); stop = max(stop,0) - newdict = self.__class__() - for key in self.list[start:stop]: - newdict.dict[key]=self.dict[key] - newdict.list[:]=self.list[start:stop] - return newdict - def __setslice__(self,start,stop,newdict): - start = max(start,0); stop = max(stop,0) - delindexes = [] - for key in newdict.keys(): - if key in self.dict: - index = self.list.index(key) - delindexes.append(index) - if index < start: - start = start - 1 - stop = stop - 1 - elif index >= stop: - pass - else: - stop = stop - 1 - delindexes.sort() - delindexes.reverse() - for index in delindexes: - key = self.list[index] - del self.dict[key] - del self.list[index] - for key in self.list[start:stop]: - del self.dict[key] - self.list[start:stop] = newdict.list[:] - self.update(newdict.dict) - def __delslice__(self, start, stop): - start = max(start, 0); stop = max(stop, 0) - for key in self.list[start:stop]: - del self.dict[key] - del self.list[start:stop] - def __add__(self,other): - newdict = self.__class__() - for key,value in self.items()+other.items(): - newdict.append(key,value) - return newdict - def __radd__(self,other): - newdict = self.__class__() - for key,value in other.items()+self.items(): - newdict.append(key,value) - return newdict - def count(self,value): - vallist = self.dict.values() - return vallist.count(value) - def extend(self,other): - self.update(other) - def filter(self,function): - liste=filter(function,self.list) - dict = {} - for i in liste: - dict[i]=self.dict[i] - return self.__class__(liste,dict) - def get(self, key, failobj=None): - return self.dict.get(key, failobj) - def index(self,key):return self.list.index(key) - def insert(self,i,x):self.__setslice__(i,i,x) - def items(self):return map(None,self.list,self.values()) - def has_key(self,key):return key in self.dict - def keys(self):return self.list - def map(self,function): - return self.__class__(map(function,self.items())) - def values(self): - nlist = [] - for key in self.list: - nlist.append(self.dict[key]) - return nlist - def __len__(self):return len(self.list) - def pop(self,key=None): - if key==None: - pos = -1 - key = self.list[pos] - else: - pos = self.list.index(key) - tmp = self.dict[key] - del self.dict[key] - return {self.list.pop(pos):tmp} - def push(self,key,value): - self.append(key,value) - def reduce(self,function,start=None): - return reduce(function,self.items(),start) - def remove(self,key): - del self.dict[key] - self.list.remove(key) - def reverse(self):self.list.reverse() - def sort(self,*args):self.list.sort(*args) - def split(self,function,Ignore=None): - splitdict = seqdict() #self.__class__() - for key in self.list: - skey = function(key) - if skey != Ignore: - if skey not in splitdict: - splitdict[skey] = self.__class__() - splitdict[skey][key] = self.dict[key] - return splitdict - def swap(self): - tmp = self.__class__(map(lambda x_y:(x_y[1],x_y[0]),self.items())) - self.list,self.dict = tmp.list,tmp.dict - def update(self,newdict): - for key,value in newdict.items(): - self.__setitem__(key,value) - def slice(self,From,To=None,Step=1): - From = self.list.index(From) - if To:To = self.list.index(To) - else : - To = From + 1 - List = range(From,To,Step) - def getitem(pos,self=self):return self.list[pos] - return self.__getitem__(map(getitem,List)) - def __repr__(self):return 'seqdict(\n%s,\n%s)'%(self.list,self.dict) - diff --git a/CondCore/TagCollection/python/tagInventory.py b/CondCore/TagCollection/python/tagInventory.py deleted file mode 100644 index 01df3a3659ca2..0000000000000 --- a/CondCore/TagCollection/python/tagInventory.py +++ /dev/null @@ -1,546 +0,0 @@ -from __future__ import absolute_import -import coral -from . import CommonUtils, IdGenerator, Node, DBImpl -class tagInventory(object): - """Class manages tag inventory - """ - def __init__( self , session ): - """Input: coral session handle - """ - self.__session = session - self.__tagInventoryTableName=CommonUtils.inventoryTableName() - self.__tagInventoryIDName=CommonUtils.inventoryIDTableName() - self.__tagInventoryTableColumns = {'tagid':'unsigned long', 'tagname':'string', 'pfn':'string','recordname':'string', 'objectname':'string', 'labelname':'string'} - self.__tagInventoryTableNotNullColumns = ['tagname','pfn','recordname','objectname'] - #self.__tagInventoryTableUniqueColumns = ['tagname'] - self.__tagInventoryTablePK = ('tagid') - def dropme( self ): - """Drop inventory related tables - """ - try: - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - schema.dropIfExistsTable( self.__tagInventoryIDName ) - schema.dropIfExistsTable( self.__tagInventoryTableName ) - transaction.commit() - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return - - def existInventoryTable( self ): - """Check if inventory table exists - """ - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - result=schema.existsTable(self.__tagInventoryTableName) - transaction.commit() - #print result - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return result - def createInventoryTable( self ): - """Create tag inventory table. Existing table will be deleted. - """ - try: - transaction=self.__session.transaction() - transaction.start() - schema = self.__session.nominalSchema() - schema.dropIfExistsTable( self.__tagInventoryTableName ) - description = coral.TableDescription(); - description.setName( self.__tagInventoryTableName ) - for columnName, columnType in self.__tagInventoryTableColumns.items(): - description.insertColumn(columnName, columnType) - for columnName in self.__tagInventoryTableNotNullColumns : - description.setNotNullConstraint(columnName,True) - #for columnName in self.__tagInventoryTableUniqueColumns : - #description.setUniqueConstraint(columnName) - #combinedunique1=('pfn','recordname','objectname','labelname') - #description.setUniqueConstraint(combinedunique1) - #combinedunique2=('tagname','pfn') - #description.setUniqueConstraint(combinedunique2) - description.setPrimaryKey( self.__tagInventoryTablePK ) - self.__tagInventoryTableHandle = schema.createTable( description ) - self.__tagInventoryTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - #create also the associated id table - generator=IdGenerator.IdGenerator(schema) - generator.createIDTable(self.__tagInventoryIDName,True) - transaction.commit() - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def addEntry( self, leafNode ): - """Add entry into the inventory.\n - Input: base tag info. If identical data found already exists, do nothing - Output: tagid. if tagid=0, there's no new entry added, i.e.no new tagid - - """ - tagid=0 - transaction=self.__session.transaction() - duplicate=False - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagInventoryTableName).newQuery() - condition='tagname=:tagname' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tagname','string') - conditionbindDict['tagname'].setData(leafNode.tagname) - if len(leafNode.pfn)!=0: - condition+=' AND pfn=:pfn' - conditionbindDict.extend('pfn','string') - conditionbindDict['pfn'].setData(leafNode.pfn) - query.setCondition(condition,conditionbindDict) - #duplicate=dbop.existRow(self.__tagInventoryTableName,condition,conditionbindDict) - cursor=query.execute() - while( next(cursor) ): - duplicate=True - tagid=cursor.currentRow()['tagid'].data() - cursor.close() - transaction.commit() - del query - #transaction.commit() - if duplicate is False: - transaction.start(False) - generator=IdGenerator.IdGenerator(schema) - tagid=generator.getNewID(self.__tagInventoryIDName) - tabrowValueDict={'tagid':tagid,'tagname':leafNode.tagname,'objectname':leafNode.objectname,'pfn':leafNode.pfn,'labelname':leafNode.labelname,'recordname':leafNode.recordname} - dbop=DBImpl.DBImpl(schema) - dbop.insertOneRow(self.__tagInventoryTableName, - self.__tagInventoryTableColumns, - tabrowValueDict) - generator.incrementNextID(self.__tagInventoryIDName) - transaction.commit() - return tagid - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def addEntriesReplaceService( self, newservicename ): - """ clone all existing entries only servicename in pfn are different - return collection of new (oldtagid,newtagid) pair - """ - newtaglinks=[] - transaction=self.__session.transaction() - try: - results=[] - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - cursor=query.execute() - while next(cursor): - tagid=cursor.currentRow()['tagid'].data() - tagname=cursor.currentRow()['tagname'].data() - pfn=cursor.currentRow()['pfn'].data() - (servicename,schemaname)=pfn.rsplit('/',1) - newpfn=('/').join([newservicename,schemaname]) - #k=(' ').join([tagname,newpfn]) - objname=cursor.currentRow()['objectname'].data() - redname=cursor.currentRow()['recordname'].data() - labname=cursor.currentRow()['labelname'].data() - #return a tuple - r=(tagid,tagname,newpfn,objname,redname,labname) - results.append(r) - transaction.commit() - del query - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - inv=tagInventory(self.__session) - try: - for r in results: - nd=Node.LeafNode() - oldtagid=r[0] - nd.tagname=r[1] - nd.pfn=r[2] - nd.objectname=r[3] - nd.recordname=r[4] - #if not r.items()[1][2] is None: - nd.labelname=r[5] - n=inv.addEntry(nd) - if n==0: - raise "addEntry returns 0" - newtaglinks.append((oldtagid,n)) - return newtaglinks - except Exception as e: - print str(e) - raise Exception(str(e)) - - def modifyEntriesReplaceService( self, newservicename ): - """ replace all existing entries replace service name in pfn - no change in other parameters - """ - transaction=self.__session.transaction() - try: - allpfns=[] - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - query.addToOutputList('pfn') - cursor=query.execute() - while next(cursor): - pfn=cursor.currentRow()['pfn'].data() - allpfns.append(pfn) - transaction.commit() - del query - except Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - try: - transaction.start(False) - editor = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).dataEditor() - inputData = coral.AttributeList() - inputData.extend('newpfn','string') - inputData.extend('oldpfn','string') - for pfn in allpfns: - (servicename,schemaname)=pfn.rsplit('/',1) - newpfn=('/').join([newservicename,schemaname]) - inputData['newpfn'].setData(newpfn) - inputData['oldpfn'].setData(pfn) - editor.updateRows( "pfn = :newpfn", "pfn = :oldpfn", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def cloneEntry( self, sourcetagid, pfn ): - """ clone an existing entry with different pfn parameter - Input: sourcetagid, pfn. - Output: tagid of the new entry. Return 0 in case no new entry created or required entry already exists. - """ - newtagid=sourcetagid - if len(pfn)==0: - return newtagid - try: - nd=self.getEntryById(sourcetagid) - if nd.tagid==0: - return newtagid - oldpfn=nd.pfn - if oldpfn==pfn: - return nd.tagid - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - generator=IdGenerator.IdGenerator(schema) - newtagid=generator.getNewID(self.__tagInventoryIDName) - tabrowValueDict={'tagid':newtagid,'tagname':nd.tagname,'objectname':nd.objectname,'pfn':pfn,'labelname':nd.labelname,'recordname':nd.recordname} - dbop=DBImpl.DBImpl(schema) - dbop.insertOneRow(self.__tagInventoryTableName, - self.__tagInventoryTableColumns, - tabrowValueDict) - generator.incrementNextID(self.__tagInventoryIDName) - transaction.commit() - return newtagid - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def getEntryByName( self, tagName, pfn ): - """Get basic tag from inventory by tagName+pfn. pfn can be empty\n - Input: tagname,pfn - Output: leafNode - throw if more than one entry is found. - """ - leafnode = Node.LeafNode() - transaction=self.__session.transaction() - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - conditionData = coral.AttributeList() - condition = "tagname=:tagname" - conditionData.extend( 'tagname','string' ) - conditionData['tagname'].setData(tagName) - if len(pfn)!=0 : - condition += " AND pfn=:pfn" - conditionData.extend( 'pfn','string' ) - conditionData['pfn'].setData(pfn) - query.setCondition(condition,conditionData) - cursor = query.execute() - counter=0 - while ( next(cursor) ): - if counter > 0 : - raise ValueError("tagName "+tagName+" is not unique, please further specify parameter pfn") - counter+=1 - leafnode.tagid=cursor.currentRow()['tagid'].data() - leafnode.tagname=cursor.currentRow()['tagname'].data() - leafnode.objectname=cursor.currentRow()['objectname'].data() - leafnode.pfn=cursor.currentRow()['pfn'].data() - leafnode.labelname=cursor.currentRow()['labelname'].data() - leafnode.recordname=cursor.currentRow()['recordname'].data() - transaction.commit() - del query - return leafnode - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getEntryById( self, tagId ): - """Get basic tag from inventory by id.\n - Input: tagid - Output: leafNode - """ - leafnode = Node.LeafNode() - transaction=self.__session.transaction() - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - condition = "tagid=:tagid" - conditionData = coral.AttributeList() - conditionData.extend( 'tagid','unsigned long' ) - conditionData['tagid'].setData(tagId) - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - #print 'got it' - leafnode.tagid=cursor.currentRow()['tagid'].data() - leafnode.tagname=cursor.currentRow()['tagname'].data() - leafnode.objectname=cursor.currentRow()['objectname'].data() - leafnode.pfn=cursor.currentRow()['pfn'].data() - leafnode.labelname=cursor.currentRow()['labelname'].data() - leafnode.recordname=cursor.currentRow()['recordname'].data() - transaction.commit() - del query - return leafnode - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getAllEntries( self ): - """Get all entries in the inventory - Output: list of leafNode objects - """ - result=[] - transaction=self.__session.transaction() - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - cursor = query.execute() - while ( next(cursor) ): - leafnode = Node.LeafNode() - leafnode.tagid=cursor.currentRow()['tagid'].data() - leafnode.tagname=cursor.currentRow()['tagname'].data() - leafnode.objectname=cursor.currentRow()['objectname'].data() - leafnode.pfn=cursor.currentRow()['pfn'].data() - leafnode.recordname=cursor.currentRow()['recordname'].data() - leafnode.labelname=cursor.currentRow()['labelname'].data() - result.append(leafnode) - transaction.commit() - del query - return result - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getIDsByName( self, name ): - """get tagids correspond to a given tag name - """ - transaction=self.__session.transaction() - ids=[] - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - condition='tagname = :tagname' - conditionBindData=coral.AttributeList() - conditionBindData.extend('tagname','string') - conditionBindData['tagname'].setData(name) - query.addToOutputList(tagid) - query.setCondition(condition,conditionBindData) - cursor = query.execute() - while ( next(cursor) ): - tagid=cursor.currentRow()['tagid'].data() - ids.append(tagid) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - return ids - def deleteAllEntries( self ): - """Delete all entries in the inventory - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - inputData = coral.AttributeList() - dbop.deleteRows(self.__tagInventoryTableName, - '', - inputData) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def deleteEntryByName( self, tagname ): - """Delete entry with given tag name - """ - try: - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - inputData = coral.AttributeList() - inputData.extend( "tagname","string" ) - inputData[0].setData(tagname) - dbop.deleteRows(self.__tagInventoryTableName, - 'tagname=:tagname', - inputData) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def replaceTagLabel( self, tagname, label ): - """Replace the run time label of the given tag - """ - try: - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - inputData = coral.AttributeList() - inputData.extend( "labelname","string" ) - inputData.extend( "tagname", "string" ) - inputData[0].setData(label) - inputData[1].setData(tagname) - editor = schema.tableHandle(self.__tagInventoryTableName).dataEditor() - editor.updateRows( "labelname=:labelname", "tagname=:tagname", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def bulkInsertEntries( self, entries ): - """insert a chunk of entries. - Input: entries [{tagid:unsigned long, tagname:string , pfn:string , recordname:string , objectname:string, labelname:string }] - Output: {oldtagid:newtagid} of the inserted entries. If tag already exists, old tagid is returned - """ - transaction=self.__session.transaction() - results={} - ihad=[] - try: - if self.existInventoryTable(): - ihad=self.getAllEntries() - else: - self.createInventoryTable() - #clean input list removing duplicates - for e in entries: - for n in ihad: - if n.tagname==e['tagname'] and n.pfn==e['pfn']: - results[n.tagid]=n.tagid - entries.remove(e) - transaction.start(False) - query=self.__session.nominalSchema().tableHandle(self.__tagInventoryIDName).newQuery() - query.addToOutputList('nextID') - query.setForUpdate() - cursor = query.execute() - nextid=0 - while next(cursor): - nextid=cursor.currentRow()[0].data() - idEditor = self.__session.nominalSchema().tableHandle(self.__tagInventoryIDName).dataEditor() - inputData = coral.AttributeList() - inputData.extend( 'delta', 'unsigned long' ) - - delta=len(entries) - if nextid==0: - nextid=1 - delta=1 - - inputData['delta'].setData(delta) - idEditor.updateRows('nextID = nextID + :delta','',inputData) - - dataEditor=self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).dataEditor() - insertdata=coral.AttributeList() - insertdata.extend('tagid','unsigned long') - insertdata.extend('tagname','string') - insertdata.extend('pfn','string') - insertdata.extend('recordname','string') - insertdata.extend('objectname','string') - insertdata.extend('labelname','string') - bulkOperation=dataEditor.bulkInsert(insertdata,delta) - for entry in entries: - insertdata['tagid'].setData(nextid) - insertdata['tagname'].setData(entry['tagname']) - insertdata['pfn'].setData(entry['pfn']) - insertdata['recordname'].setData(entry['recordname']) - insertdata['objectname'].setData(entry['objectname']) - insertdata['labelname'].setData(entry['labelname']) - bulkOperation.processNextIteration() - results[entry['tagid']]=nextid - nextid=nextid+1 - bulkOperation.flush() - transaction.commit() - del bulkOperation - del query - return results - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - -if __name__ == "__main__": - #context = coral.Context() - #context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testInventory.db', - accessMode = coral.access_Update ) - try: - inv=tagInventory(session) - inv.createInventoryTable() - tagentry=Node.LeafNode() - tagentry.tagname='ecalpedestalsfromonline' - tagentry.objectname='EcalPedestals' - tagentry.pfn='oracle://devdb10/CMS_COND_ECAL' - tagentry.recordname='EcalPedestalsRcd' - tagentry.labelname='' - inv.addEntry(tagentry) - tagentry.tagname='crap' - tagentry.objectname='MyPedestals' - tagentry.pfn='oracle://devdb10/CMS_COND_ME' - tagentry.recordname='MyPedestalsRcd' - tagentry.labelname='mylabel' - inv.addEntry(tagentry) - result=inv.getAllEntries() - print 'get all##\t',result - result=inv.getEntryByName('ecalpedestalsfromonline','oracle://devdb10/CMS_COND_ECAL') - print 'get ecalpedestalsfromonline##\t',result - result=inv.getEntryByName('crap','oracle://devdb10/CMS_COND_ME') - print 'get crap##\t',result - result=inv.getEntryById(0) - print 'get by id 0##\t',result - inv.deleteEntryByName('ecalpedestalsfromonline') - print 'TESTING getEntryByName' - result=inv.getEntryByName('ecalpedestalsfromonline','oracle://devdb10/CMS_COND_ECAL') - print 'get ecalpedestalsfromonline##\t',result - result=inv.getEntryByName('crap','oracle://devdb10/CMS_COND_ME') - print 'get crap##\t',result - print 'TESTING cloneEntry' - newid=inv.cloneEntry(result.tagid,'fontier://crap/crap') - print 'newid ',newid - print 'TESTING addEntriesReplaceService' - newtagids=inv.addEntriesReplaceService('oracle://cms_orcoff_int') - print 'new tag ids ',newtagids - print 'TESTING modifyEntriesReplaceService' - inv.modifyEntriesReplaceService('oracle://cms_orcoff_int9r') - print 'TESTING bulkInsertEntries' - entries=[] - entries.append({'tagid':10,'tagname':'tag1','pfn':'dbdb','recordname':'myrcd','objectname':'bobo','labelname':''}) - entries.append({'tagid':11,'tagname':'tag2','pfn':'dbdb','recordname':'mdrcd','objectname':'bobo','labelname':''}) - entries.append({'tagid':12,'tagname':'tag3','pfn':'dbdb','recordname':'ndrcd','objectname':'bobo','labelname':''}) - entries.append({'tagid':13,'tagname':'tag4','pfn':'dbdb','recordname':'ndrcd','objectname':'bobo','labelname':''}) - a=inv.bulkInsertEntries(entries) - print a - del session - - except Exception as e: - print "Failed in unit test" - print str(e) - del session - diff --git a/CondCore/TagCollection/scripts/CRUZET3_V2H.conf b/CondCore/TagCollection/scripts/CRUZET3_V2H.conf deleted file mode 100644 index aa3e3e7e17a01..0000000000000 --- a/CondCore/TagCollection/scripts/CRUZET3_V2H.conf +++ /dev/null @@ -1,152 +0,0 @@ -[COMMON] -connect=sqlite_file:dbtoconf.db -#connect=oracle://cms_orcoff_int2r/CMS_COND_20X_GLOBALTAG -#connect=oracle://cms_orcon_prod/CMS_COND_20X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - Tracker_Geometry_CRUZET3{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd}; - Tracker_GeometryErr_CRUZET3{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=GlobalPositionRcd}; - V2_trivial_TBuffer_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - trivial_LorentzAngle_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiStripGain_Ideal_20X{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripPedestals_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripLorentzAngle_Ideal_20X{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripBadChannel_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - t0_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTT0,recordname=DTT0Rcd}; - tTrig_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - CSCDBGains_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCChamberIndex{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCChamberIndex,recordname=CSCChamberIndexRcd}; - CSCDDUMap{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - hcal_pedestals_fC_v6.00_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - hcal_widths_fC_v6.00_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - official_emap_v5.01{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - hcal_gains_v2.00_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - qie_normalmode_v6.00{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - hcal_respcorr_trivial_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - EcalPedestals_v2_online{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_CosmGain200{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_FromCruzet3_v1_online{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_CosmGain200{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_1_8_0_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - EarlyCollision_5p3cm_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - SiPixelFedCablingMap_PIB_fed20ch10{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - map_CRUZET{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CSCTPParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1CSCTPParameters,recordname=L1CSCTPParametersRcd}; - L1EmEtScale_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctJetCounterNegativeEta_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterNegativeEtaRcd}; - L1GctJetCounterPositiveEta_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterPositiveEtaRcd}; - L1GctJetEtCalibrationFunction_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetEtCalibrationFunction,recordname=L1GctJetCalibFunRcd}; - L1GctJetFinderParams_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtStableParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1JetEtScale_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuDTEtaPatternLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuGMTParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1RCTParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1TriggerKeyList_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - L1TriggerKey_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd} - -[TAGTREE CRUZET3_V2H] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=Tracker_Geometry_CRUZET3,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - TrackerGeometryErrors{parent=Calibration,tagname=Tracker_GeometryErr_CRUZET3,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - PixelGain{parent=Calibration,tagname=V2_trivial_TBuffer_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL}; - PixelLangle{parent=Calibration,tagname=trivial_LorentzAngle_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_Ideal_20X,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_Ideal_20X,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripBad{parent=Calibration,tagname=SiStripBadChannel_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - DTT0{parent=Calibration,tagname=t0_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - DTTrig{parent=Calibration,tagname=tTrig_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - DTStatusFlag{parent=Calibration,tagname=noise_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCChambIndex{parent=Calibration,tagname=CSCChamberIndex,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - HCALPedestals{parent=Calibration,tagname=hcal_pedestals_fC_v6.00_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=hcal_widths_fC_v6.00_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALEmap{parent=Calibration,tagname=official_emap_v5.01,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALGain{parent=Calibration,tagname=hcal_gains_v2.00_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALQie{parent=Calibration,tagname=qie_normalmode_v6.00,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=hcal_respcorr_trivial_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v2_online,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_CosmGain200,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_FromCruzet3_v1_online,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_CosmGain200,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_1_8_0_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=EarlyCollision_5p3cm_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BEAMSPOT}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_PIB_fed20ch10,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - DTROMap{parent=Calibration,tagname=map_CRUZET,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - L1CSCTPParameters{parent=Calibration,tagname=L1CSCTPParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetCounterNegativeEta{parent=Calibration,tagname=L1GctJetCounterNegativeEta_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetCounterPositiveEta{parent=Calibration,tagname=L1GctJetCounterPositiveEta_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetEtCalibrationFunction{parent=Calibration,tagname=L1GctJetEtCalibrationFunction_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T} diff --git a/CondCore/TagCollection/scripts/CRUZET3_V2P.conf b/CondCore/TagCollection/scripts/CRUZET3_V2P.conf deleted file mode 100644 index a319e4c806f4e..0000000000000 --- a/CondCore/TagCollection/scripts/CRUZET3_V2P.conf +++ /dev/null @@ -1,152 +0,0 @@ -[COMMON] -connect=sqlite_file:CRUZET3.db -#connect=oracle://cms_orcoff_int2r/CMS_COND_20X_GLOBALTAG -#connect=oracle://cms_orcon_prod/CMS_COND_20X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - Tracker_Geometry_CRUZET3{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd}; - Tracker_GeometryErr_CRUZET3{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=GlobalPositionRcd}; - V2_trivial_TBuffer_mc{pfn=frontier://PromptProd/CMS_COND_20X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - trivial_LorentzAngle_mc{pfn=frontier://PromptProd/CMS_COND_20X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiStripGain_Ideal_20X{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripPedestals_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripLorentzAngle_Ideal_20X{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripBadChannel_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - t0_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTT0,recordname=DTT0Rcd}; - tTrig_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - CSCDBGains_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCChamberIndex{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCChamberIndex,recordname=CSCChamberIndexRcd}; - CSCDDUMap{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - hcal_pedestals_fC_v6.00_hlt{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - hcal_widths_fC_v6.00_hlt{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - official_emap_v5.01{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - hcal_gains_v2.00_hlt{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - qie_normalmode_v6.00{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - hcal_respcorr_trivial_mc{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - EcalPedestals_v2_online{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_CosmGain200{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_FromCruzet3_v1_online{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_CosmGain200{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://PromptProd/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://PromptProd/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_1_8_0_mc{pfn=frontier://PromptProd/CMS_COND_20X_BTAU,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - EarlyCollision_5p3cm_mc{pfn=frontier://PromptProd/CMS_COND_20X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - SiPixelFedCablingMap_PIB_fed20ch10{pfn=frontier://PromptProd/CMS_COND_20X_PIXEL,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - map_CRUZET{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://PromptProd/CMS_COND_20X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CSCTPParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1CSCTPParameters,recordname=L1CSCTPParametersRcd}; - L1EmEtScale_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctJetCounterNegativeEta_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterNegativeEtaRcd}; - L1GctJetCounterPositiveEta_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterPositiveEtaRcd}; - L1GctJetEtCalibrationFunction_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetEtCalibrationFunction,recordname=L1GctJetCalibFunRcd}; - L1GctJetFinderParams_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtStableParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1JetEtScale_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuDTEtaPatternLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuGMTParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1RCTParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1TriggerKeyList_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - L1TriggerKey_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd} - -[TAGTREE CRUZET3_V2P] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=Tracker_Geometry_CRUZET3,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - TrackerGeometryErrors{parent=Calibration,tagname=Tracker_GeometryErr_CRUZET3,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - PixelGain{parent=Calibration,tagname=V2_trivial_TBuffer_mc,pfn=frontier://PromptProd/CMS_COND_20X_PIXEL}; - PixelLangle{parent=Calibration,tagname=trivial_LorentzAngle_mc,pfn=frontier://PromptProd/CMS_COND_20X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_Ideal_20X,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_Ideal_20X,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripBad{parent=Calibration,tagname=SiStripBadChannel_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - DTT0{parent=Calibration,tagname=t0_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - DTTrig{parent=Calibration,tagname=tTrig_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - DTStatusFlag{parent=Calibration,tagname=noise_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCChambIndex{parent=Calibration,tagname=CSCChamberIndex,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - HCALPedestals{parent=Calibration,tagname=hcal_pedestals_fC_v6.00_hlt,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=hcal_widths_fC_v6.00_hlt,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALEmap{parent=Calibration,tagname=official_emap_v5.01,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALGain{parent=Calibration,tagname=hcal_gains_v2.00_hlt,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALQie{parent=Calibration,tagname=qie_normalmode_v6.00,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=hcal_respcorr_trivial_mc,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v2_online,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_CosmGain200,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_FromCruzet3_v1_online,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_CosmGain200,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://PromptProd/CMS_COND_20X_BTAU}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://PromptProd/CMS_COND_20X_BTAU}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_1_8_0_mc,pfn=frontier://PromptProd/CMS_COND_20X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=EarlyCollision_5p3cm_mc,pfn=frontier://PromptProd/CMS_COND_20X_BEAMSPOT}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_PIB_fed20ch10,pfn=frontier://PromptProd/CMS_COND_20X_PIXEL}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - DTROMap{parent=Calibration,tagname=map_CRUZET,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://PromptProd/CMS_COND_20X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - L1CSCTPParameters{parent=Calibration,tagname=L1CSCTPParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetCounterNegativeEta{parent=Calibration,tagname=L1GctJetCounterNegativeEta_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetCounterPositiveEta{parent=Calibration,tagname=L1GctJetCounterPositiveEta_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetEtCalibrationFunction{parent=Calibration,tagname=L1GctJetEtCalibrationFunction_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T} diff --git a/CondCore/TagCollection/scripts/cmscond_schema_globaltag b/CondCore/TagCollection/scripts/cmscond_schema_globaltag deleted file mode 100755 index 420a5c45c208c..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_schema_globaltag +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python -import os,coral -from optparse import OptionParser, Option, OptionValueError -from CondCore.TagCollection import tagInventory,TagTree,CommonUtils - -class globaltagSchemaCreator: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -C, --create: create tables. - -D, --drop: drop tables related to tree with given name. - -T, --Tree=treename: - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__verbose=False - self.__mode=0 # 1 is to create; -1 is to drop - self.__treename='' - - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-C","--create",action="store_true",dest="create",help="create tables. With -T option, it creates tables related to the given tree and inventory tables are created if not existant; with no -T option, only inventory tables are created ") - self.__parser.add_option("-D","--drop",action="store_true",dest="drop",help="drop tables. With -T option, tables related to the given tree are droped; with no -T option, all tables are droped.") - self.__parser.add_option("-T","--tree",action="store",dest="treename",help="treename") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(create=False) - self.__parser.set_defaults(drop=False) - self.__parser.set_defaults(treename='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not options.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=self.__parser.values.connectstring - - if not options.drop and not options.create: - raise OptionValueError("option -%s or -%s is required"%('C','D')) - if options.drop and options.create: - raise OptionValueError("option -%s and -%s are exclusive"%('C','D')) - if options.drop: - self.__mode=-1 - if options.create: - self.__mode=1 - if options.treename: - self.__treename=self.__parser.values.treename - - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - if self.__mode==-1: - if len(self.__treename)!=0: - print 'Drop tables related to '+self.__treename - else: - print 'Drop all tables' - else: - if len(self.__treename)!=0: - print 'Create tables related to '+self.__treename - else: - print 'Create tag inventory tables' - - def act(self): - """Do action - """ - svc = coral.ConnectionService() - session=svc.connect(self.__connectstring,accessMode=coral.access_Update) - if self.__mode==1: #create - inv=tagInventory.tagInventory(session) - if inv.existInventoryTable() is False: - inv.createInventoryTable() - if len(self.__treename)!=0: - tt=TagTree.tagTree(session,self.__treename) - if tt.existTagTreeTable() is False: - tt.createTagTreeTable() - else: - print 'tree '+treename+' already exists. Do nothing' - return - if self.__mode==-1: #drop - if len(self.__treename) != 0: - tt=TagTree.tagTree(session,self.__treename) - tt.deleteSubtree('ROOT') - else: - #delete inventory and all trees - inv=tagInventory.tagInventory(session) - inv.dropme() - CommonUtils.dropAllTreeTables(session) - del session -if __name__ == "__main__": - schemamanager=globaltagSchemaCreator() - schemamanager.parsecmdln() - schemamanager.act() diff --git a/CondCore/TagCollection/scripts/cmscond_tagdb_export b/CondCore/TagCollection/scripts/cmscond_tagdb_export deleted file mode 100755 index 525b44b774349..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagdb_export +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -import coral -from optparse import OptionParser, Option, OptionValueError -from CondCore.TagCollection import DBCopy,tagInventory,TagTree - -class tagdbExporter: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -s, --source=source: source db connect string (required). - -d, --dest=dest: destination db connect string (required). - -P, --path=authpath: path to authentication file - -a, --all: copy all tag db, existing tag db content is wiped.(default if no -a, -I, -T options are specified) - -I, --inventory: copy only the inventory, existing inventoru is wiped. - -T, --tree=tree: copy selected tree. Inventory is updated accordingly. - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser(option_class=MyOption) - self.__source='' - self.__dest='' - self.__all=False - self.__inv=False - self.__tree='' - self.__authpath='' - self.__verbose=False - - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-s","--source",action="store",dest="source",type="string",help="source db connect string (required)") - self.__parser.add_option("-d","--dest",action="store",dest="dest",type="string",help="destination db connect string (required).") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication file") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="copy all tag db, existing tag db content is wiped.(default if no -a, -I, -T options are specified)") - self.__parser.add_option("-I","--inventory",action="store_true",dest="inventory",help="copy only the inventory, existing inventoru is wiped.") - self.__parser.add_option("-T","--tree",action="store",dest="tree",type="string",help="copy selected tree. Inventory is updated accordingly.") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(verbose=False) - - (options, args) = self.__parser.parse_args() - if !options.source and !options.dest: - raise OptionValueError("option -%s and -%s are required"%('s','d')) - if !options.all and !options.inventory and !options.tree: - self.__all=True - elif options.all: - self.__all=True - elif options.inventory: - self.__inventory=True - elif options.tree: - self.__tree=self.__parser.values.tree - raise OptionValueError("options -%s, -%s and -%s are exclusive"%('a','I','T')) - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - self.__verbose=self.__parser.values.verbose - - if self.__parser.values.verbose is True: - print 'source: ',self.__source - print 'dest: ',self.__dest - print 'authpath: ',self.__authpath - print 'all: ',self.__all - print 'inventory: ',self.__inv - print 'tree: ',self.__tree - def exportDB(self): - """export db according to cmdline options - """ - sourcesession=svc.connect(self.__source,accessMode=coral.access_Update) - destsession=svc.connect(self.__dest,accessMode = coral.access_Update) - try: - dbcp=DBCopy(sourcesession,destsession,1024) - if self.__all: - dbcp.copyDB() - elif self.__inv: - dbcp.copyInventory() - elif len(self.__tree) != 0: - dbcp.copyTrees([self.__tree]) - del sourcesession - del destsession - except Exception, e: - print str(e) - del sourcesession - del destsession -if __name__ == "__main__": - tagexporter=tagdbExporter() - tagexporter.parsecmdln() - tagexporter.exportDB() diff --git a/CondCore/TagCollection/scripts/cmscond_tagintrees b/CondCore/TagCollection/scripts/cmscond_tagintrees deleted file mode 100755 index 9f87a50c0bd57..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagintrees +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -import os,coral -from ConfigParser import ConfigParser -from optparse import OptionParser, Option, OptionValueError -from CondCore.TagCollection import CommonUtils,connectstrParser,cacheconfigParser - -def update_frontier_connection(conn_str): - '''updates frontier connection with proxy server information''' - parser=connectstrParser.connectstrParser(conn_str) - parser.parse() - if parser.needsitelocalinfo(): - sitelocalconfig = os.environ.get('$CMS_PATH', '/afs/cern.ch/cms/' ) + "SITECONF/CERN/JobConfig/site-local-config.xml" - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - #print "full frontier string: " + str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) - return str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) #str because default unicode - return str(conn_str) - -class tagInTrees: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag: tag to print on detail(optional) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tag='' - self.__pfn='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tag",action="store",dest="tag",type="string",help="tag to print") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tag='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=update_frontier_connection(self.__parser.values.connectstring) - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__tag=self.__parser.values.tag - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tag: ',self.__tag - def printme(self): - """ - print requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_ReadOnly ) - try: - intrees=CommonUtils.tagInTrees(session,self.__tag) - del session - for (iP,iT) in intrees.items(): - print "\t%s\t%s"%('# Tag #',self.__tag) - print "\t%s\t%s"%('# pfn #',iP) - print '\t# Trees #', iT - print '\n' - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagprinter=tagInTrees() - tagprinter.parsecmdln() - tagprinter.printme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_add b/CondCore/TagCollection/scripts/cmscond_taginventory_add deleted file mode 100755 index 6498a4b6b320c..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_add +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,CommonUtils,entryComment -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result -def converttagdata(value): - mytagdata={} - startbrack=value.find('{') - endbrack=value.find('}') - metadatastr=value[startbrack+1:endbrack] - mytagdata['tagname']=value[0:startbrack] - metadatalist=metadatastr.split(',') - for pair in metadatalist: - mydata=pair.split('=',1) - mytagdata[mydata[0]]=mydata[1] - return mytagdata -def converttagcollection(value): - cleanvalue=stripws(value) - mytagcollection=[] - taglist=cleanvalue.split(';') - for tagdata in taglist: - mytagcollection.append(converttagdata(tagdata)) - return mytagcollection -def check_tagdata(option, opt, value): - try: - return converttagcollection(value) - except ValueError: - raise OptionValueError( - "option %s: invalid tagdata: %r" % (opt, value)) -class MyOption (Option): - TYPES = Option.TYPES + ("tagdata",) - TYPE_CHECKER = copy(Option.TYPE_CHECKER) - TYPE_CHECKER["tagdata"] = check_tagdata - -class tagInventoryBuilder: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -f, --file=filename: configuration file. -t will not be considered together with the -f option. The connect parameter will be overwritten by option -c. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag=tagdata: \"tag1{pfn=string,objectname=string, recordname=string, labelname=string};tag2{...}\" - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser(option_class=MyOption) - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__tagcollection=[] - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-f","--file",action="store",dest="filename",help="populate the inventory from the given file. -t will not be considered together with the -f option. The connect parameter will be overwritten by option -c.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tagdata",action="store",dest="tagdata",type="tagdata",help=" \"tagname{pfn:string,objectname:string,recordname:string, labelname:string}\" ") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tagdata=[]) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if options.filename and options.connectstring: - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - if self.__parser.values.filename!='': - configparser=ConfigParser() - configparser.read(self.__parser.values.filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get("COMMON","connect") - data=stripws(configparser.get("TAGINVENTORY",'tagdata')) - self.__tagcollection=converttagcollection(data) - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - else: - self.__connectstring=self.__parser.values.connectstring - data=stripws(self.__parser.values.tagdata) - self.__tagcollection=converttagcollection(data) - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tagdata: ',self.__tagcollection - def addEntries(self): - """ - Add entries in the tag inventory - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - inv=tagInventory.tagInventory(session) - #print 'about to create table' - if inv.existInventoryTable() is False: - inv.createInventoryTable() - if len(self.__tagcollection)!=0: - for item in self.__tagcollection: - tagentry=Node.LeafNode() - tagentry.tagname=item['tagname'] - tagentry.objectname=item['objectname'] - tagentry.pfn=item['pfn'] - tagentry.recordname=item['recordname'] - if item.has_key('labelname'): - tagentry.labelname=item['labelname'] - else: - tagentry.labelname='' - tagid=inv.addEntry(tagentry) - if item.has_key('comment'): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - entrycomment.insertComment(CommonUtils.inventoryTableName(),tagid,item['comment']) - del session - except Exception, e: - print str(e) - del session -if __name__ == "__main__": - tagbuilder=tagInventoryBuilder() - tagbuilder.parsecmdln() - tagbuilder.addEntries() - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_delete b/CondCore/TagCollection/scripts/cmscond_taginventory_delete deleted file mode 100755 index 2abcaaa97024a..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_delete +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,CommonUtils,entryComment -class tagInventoryDelete: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -a, --all: print all - -t, --tag: tag to print - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tag='' - self.__all=True - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" -# parser = OptionParser(option_class=MyOption) -# self.__parser.add_option("-f","--file",action="store",dest="filename",help="configuration file") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="delete all entries") - self.__parser.add_option("-t","--tag",action="store",dest="tag",type="string",help="tag to delete") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tag='') - self.__parser.set_defaults(all=True) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=self.__parser.values.connectstring - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__all=self.__parser.values.all - self.__tag=self.__parser.values.tag - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'print all: ',self.__all - print 'tag: ',self.__tag - def deleteme(self): - """ - delete requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - inv=tagInventory.tagInventory(session) - try: - if self.__all is True: - inv.deleteAllEntries() - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - entrycomment.clearAllEntriesForTable(CommonUtils.inventoryTableName()) - else: - inv.deleteEntryByName(self.__tag) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - ids=inv.getIDsByName(self.__tag) - for id in id: - entrycomment.deleteCommentForId(CommonUtils.inventoryTableName(),id) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagdelete=tagInventoryDelete() - tagdelete.parsecmdln() - tagdelete.deleteme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_label b/CondCore/TagCollection/scripts/cmscond_taginventory_label deleted file mode 100755 index 49c6bb439b192..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_label +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import tagInventory -class tagInventoryLabel: - def __init__(self): - """ - Attach a runtime label to a tag in the inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag=tagname: tag associated with the label(required) - -l, --label=label: label name(required) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tagname='' - self.__label='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tag",action="store",dest="tagname",type="string",help="tag associated with the label(required)") - self.__parser.add_option("-l","--label",action="store",dest="label",type="string",help="label name(required). Existing label will be replaced.") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tagname='') - self.__parser.set_defaults(label='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - self.__connectstring=self.__parser.values.connectstring - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - if len(self.__parser.values.tagname)==0 : - raise Exception, 'non-empty tag must be provided with option -t' - self.__tagname=self.__parser.values.tagname - self.__label=self.__parser.values.label - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tagname: ',self.__tagname - print 'label: ',self.__label - def addLabel(self): - """ - Attach label to a tag in the inventory - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - inv=tagInventory.tagInventory(session) - if inv.existInventoryTable() is False: - raise Exception, 'non-existent tag inventory' - inv.replaceTagLabel(self.__tagname,self.__label) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagbuilder=tagInventoryLabel() - tagbuilder.parsecmdln() - tagbuilder.addLabel() - - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_list b/CondCore/TagCollection/scripts/cmscond_taginventory_list deleted file mode 100755 index e6bdeed2a08c3..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_list +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,connectstrParser,cacheconfigParser - -def update_frontier_connection(conn_str): - '''updates frontier connection with proxy server information''' - parser=connectstrParser.connectstrParser(conn_str) - parser.parse() - if parser.needsitelocalinfo(): - sitelocalconfig = os.environ.get('$CMS_PATH', '/afs/cern.ch/cms/' ) + "SITECONF/CERN/JobConfig/site-local-config.xml" - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - #print "full frontier string: " + str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) - return str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) #str because default unicode - return str(conn_str) - -class tagInventoryPrinter: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag: tag to print on detail(optional) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tag='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tag",action="store",dest="tag",type="string",help="tag to print") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tag='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=update_frontier_connection(self.__parser.values.connectstring) - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__tag=self.__parser.values.tag - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tag: ',self.__tag - def printme(self): - """ - print requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_ReadOnly ) - inv=tagInventory.tagInventory(session) - try: - result=inv.getAllEntries() - if len(self.__tag)==0: - print '%s\t%s\t%s'%('#ID#','#Name#','#pfn#') - for r in result: - print '%s\t%s\t%s'%(r.tagid,r.tagname,r.pfn) - else: - print '%s\t%s\t%s\t%s\t%s\t%s'%('#ID#','#Name#','#pfn#','#objectname#','#recordname#','#label#') - for item in result: - if item.tagname==self.__tag: - print '%s\t%s\t%s\t%s\t%s\t%s'%(item.tagid,item.tagname,item.pfn,item.objectname,item.recordname,item.labelname) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagprinter=tagInventoryPrinter() - tagprinter.parsecmdln() - tagprinter.printme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_add b/CondCore/TagCollection/scripts/cmscond_tagtree_add deleted file mode 100755 index 8db689601d57d..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_add +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,TagTree,tagInventory,CommonUtils,entryComment -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result - -def convertnodedata(mynodevalue): - mynodedata={} -# datastr=('').join(value.split(' ')) - startbrack=mynodevalue.find('{') - endbrack=mynodevalue.find('}') - metagdatastr=mynodevalue[startbrack+1:endbrack] - mynodedata['nodelabel']=mynodevalue[0:startbrack] - metadatalist=metagdatastr.split(',') - for pair in metadatalist: - mydata=pair.split('=',1) - mynodedata[mydata[0]]=mydata[1] - #print 'mynodedata' - return mynodedata - -def convertnodecollection(value): - cleanvalue=stripws(value) - mynodecollection=[] - nodelist=cleanvalue.split(';') - for nodedata in nodelist: - mynodecollection.append(convertnodedata(nodedata)) - return mynodecollection - -def check_nodedata(option, opt, value): - try: - return convertnodecollection(value) - except ValueError: - raise OptionValueError( - "option %s: invalid nodedata: %r" % (opt, value)) -class MyOption (Option): - TYPES = Option.TYPES + ("nodedata",) - TYPE_CHECKER = copy(Option.TYPE_CHECKER) - TYPE_CHECKER["nodedata"] = check_nodedata - -class tagTreeBuilder: - def __init__(self): - """ - Class add node to an existing tag tree - usage: %prog [options] - -f, --file=filename: use file to populate the tag tree. -l will not be considered together with the -f option. The connect parameter will be overwritten by option -c. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: name of the tree to create(required). Note: the tree name is case insensitive, it is always internally converted to uppercase. - -n, --node=node: one or a collection of non-leaf node(s) to attach to the tree. \"node1{parent=string,globalsince=unsigned long long,globaltill=unsigned long long};node2{...}\". - -l, --leafnode=leafnode: one or a collection of leaf node(s) to attach to the tree. \"node1{parent=string,tagname=string};node2{...}\". - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser(option_class=MyOption) - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__treename='' - self.__nodecollection=[] - self.__leafcollection=[] - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-f","--file",action="store",dest="filename",help="populate the tag tree from the given file. -l will not be considered together with the -f option. The connect parameter will be overwritten by option -c.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="name of the tree to create(required). Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-n","--nodedata",action="store",dest="nodedata",type="nodedata",help="one or a collection of non-leaf node(s) to attach to the tree. \"node1{parent=string,globalsince=unsigned long long,globaltill=unsigned long long};node2{...}\"") - self.__parser.add_option("-l","--leafdata",action="store",dest="leafdata",type="nodedata",help=" one or a collection of leaf node(s) to attach to the tree. \"node1{parent=string,tagname=string};node2{...}\" ") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='') - self.__parser.set_defaults(nodedata=[]) - self.__parser.set_defaults(leafdata=[]) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.treename: - raise OptionValueError("option -%s --%s is required "%('T','tree')) - self.__treename=str.upper(self.__parser.values.treename) - if options.filename and options.connectstring: - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - - if self.__parser.values.filename!='': - treesection=' '.join(['TAGTREE',self.__treename]) - #print treesection - configparser=ConfigParser() - configparser.read(self.__parser.values.filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get('COMMON','connect') - if configparser.has_option(treesection, 'nodedata'): - nodedata=stripws(configparser.get(treesection,'nodedata')) - self.__nodecollection=convertnodecollection(nodedata) - if configparser.has_option(treesection, 'leafdata'): - leafdata=stripws(configparser.get(treesection,'leafdata')) - self.__leafcollection=convertnodecollection(leafdata) - #print self.__leafcollection - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - else: - self.__connectstring=self.__parser.values.connectstring - if self.__parser.nodedata: - nodedata=stripws(self.__parser.values.nodedata) - self.__nodecollection=convertnodedata(nodedata) - if self.__parser.leafdata: - leafdata=stripws(self.__parser.values.leafdata) - self.__leafcollection=convertnodedata(leafdata) - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tree: ',self.__treename - print 'nodecollection: ',self.__nodecollection - print 'leafcollection: ',self.__leafcollection - - def addEntries(self): - """ - Add nodes in the tag tree - """ - if len(self.__nodecollection)==0 and len(self.__leafcollection)==0: - print 'empty data, do nothing' - return - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - mytree=TagTree.tagTree(session,self.__treename) - if mytree.existTagTreeTable() is False: - raise Exception,'non-existing tag tree table, use cmscond_tagtree_createroot to create the table and tree root first' - for item in self.__nodecollection: - mynode=Node.Node() - mynode.globalsince=0 - mynode.globaltill=0 - mynode.tagid=0 - mynode.nodelabel=item['nodelabel'] - if item.has_key('globalsince'): - mynode.globalsince=nodedata['globalsince'] - if item.has_key('globaltill'): - mynode.globaltill=nodedata['globaltill'] - if not item.has_key('parent'): - raise KeyError,'no parent parameter for'+mynode.nodelabel - newnodeid=mytree.insertNode(mynode,item['parent']) - if item.has_key('comment'): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - entrycomment.insertComment(CommonUtils.treeTableName(self.__treename),newnodeid ,item['comment']) - if len(self.__leafcollection)!=0: - inv=tagInventory.tagInventory(session) - for leafdata in self.__leafcollection: - myleaf=Node.Node() - myleaf.globalsince=0 - myleaf.globaltill=0 - myleaf.tagid=0 - myleaf.nodelabel=leafdata['nodelabel'] - # print 'again ',myleaf.nodelabel - if leafdata.has_key('tagname') is False: - raise ValueError, "tagname is not specified for the leaf node "+myleaf.nodelabel - tagname=leafdata['tagname'] - mypfn='' - if leafdata.has_key('pfn') is True: - mypfn=leafdata['pfn'] - # print 'leafdata pfn ',mypfn - result=inv.getEntryByName(tagname,mypfn) - if result.tagid == 0: - raise ValueError, "unknown tag \'"+leafdata['tagname']+" "+leafdata['pfn']+"\' in the inventory" - myleaf.tagid=result.tagid - if not leafdata.has_key('parent'): - raise KeyError,'no parent parameter for'+myleaf.nodelabel - newnodeid=mytree.insertNode(myleaf,leafdata['parent']) - if leafdata.has_key('comment'): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - entrycomment.insertComment(CommonUtils.treeTableName(self.__treename),newnodeid,item['comment']) - del session - except Exception, e: - print str(e) - del session -if __name__ == "__main__": - tagtreebuilder=tagTreeBuilder() - tagtreebuilder.parsecmdln() - tagtreebuilder.addEntries() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_clone b/CondCore/TagCollection/scripts/cmscond_tagtree_clone deleted file mode 100755 index e56f989c3e633..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_clone +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -#from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,TagTree,tagInventory,CommonUtils,entryComment - -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result - -def copycomments(session,sourcetreename,desttreename): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - session.transaction().start(False) - data=coral.AttributeList() - editor=session.nominalSchema().tableHandle(CommonUtils.treeTableName(desttreename)).dataEditor() - query=session.nominalSchema().tableHandle(CommonUtils.treeTableName(sourcetreename)).newQuery() - conditionData=coral.AttributeList() - query.setCondition('',conditionData) - query.setRowCacheSize(2048) - editor.rowBuffer(data) - query.defineOutput(data) - bulkOperation=editor.bulkInsert(data,2048) - cursor=query.execute() - while (cursor.next() ): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del query - session.transaction().commit() - -class tagTreeClone: - def __init__(self): - """ - Class clone an existing tree to a new one only changing pfn in leaf nodes. - usage: %prog [options] - -f, --file=filename: configuration file (required). The connect parameter will be overwritten by option -c if present. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: name of the tree to clone(required) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__filename='' - self.__sourcetreename='' - self.__targettreename='' - self.__realclone=False - self.__service_replace='' - self.__schema_replace='' - self.__connect_replace='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n " - self.__parser.add_option("-f","--file",action="store",dest="filename",help="configuration file for input(required). The connect parameter will be overwritten by option -c if present.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="name of the tree to create(required). Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.treename: - raise OptionValueError("option -%s --%s is required "%('T','tree')) - if not self.__parser.values.filename: - raise OptionValueError("option -%s --%s is required "%('f','file')) - self.__sourcetreename=self.__parser.values.treename.upper() - self.__filename=self.__parser.values.filename - if os.path.exists(self.__filename)==False: - print 'non-existing input file ',self.__filename - return - if options.filename and options.connectstring: - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - - clonesection=' '.join(['CLONE',self.__sourcetreename]) - configparser=ConfigParser() - configparser.read(self.__filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get("COMMON","connect") - sections=configparser.sections() - if not clonesection in sections: - print 'section ', clonesection, 'not found in ',self.__filename - print 'do nothing' - return - self.__targettreename=stripws(configparser.get(clonesection,'target')) - try: - self.__service_replace=stripws(configparser.get(clonesection,'service_replace')) - except NoOptionError: - pass - - try: - self.__schema_replace=stripws(configparser.get(clonesection,'schema_replace')) - except NoOptionError: - pass - - try: - self.__connect_replace=stripws(configparser.get(clonesection,'connect_replace')) - except NoOptionError: - pass - - if self.__parser.values.verbose is True: - print 'config file: ',self.__filename - print 'connect: ',self.__connectstring - print 'sourcetree: ',self.__sourcetreename - print 'targettree: ',self.__targettreename - print 'service_replace: ',self.__service_replace - print 'schema_replace: ',self.__schema_replace - print 'connect_replace: ',self.__connect_replace - if len(self.__service_replace)==0 and len(self.__schema_replace)==0 and len(self.__connect_replace)==0: - self.__realclone=True - - def clonetree(self): - """ - Create a clone tree - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session=svc.connect( self.__connectstring,accessMode = coral.access_Update ) - allLeafs=[] - try: - newtree=TagTree.tagTree(session,self.__targettreename) - newtree.importFromTree(self.__sourcetreename) - allLeafs=newtree.getAllLeaves() - if self.__realclone is True: - copycomments(session,self.__sourcetreename,self.__targettreename) - del session - return - #the rest don't know how to handle comments yet - if len(self.__service_replace) != 0: - inv=tagInventory.tagInventory(session) - newtaglinks=inv.addEntriesReplaceService(self.__service_replace) - leafreplacement={} - for leaf in allLeafs: - oldtagid=leaf.tagid - newtagid=0 - for item in newtaglinks: - if item[0]==oldtagid: - newtagid=item[1] - if newtagid == 0: - raise "no replacement tagid found for tagid ",oldtagid - leafreplacement[oldtagid]=newtagid - newtree.replaceLeafLinks(leafreplacement) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagtreeclone=tagTreeClone() - tagtreeclone.parsecmdln() - tagtreeclone.clonetree() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_createroot b/CondCore/TagCollection/scripts/cmscond_tagtree_createroot deleted file mode 100755 index b756edff6689a..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_createroot +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -#from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,TagTree,tagInventory -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result -class tagTreeRootBuilder: - def __init__(self): - """ - Class add node in the tag tree - usage: %prog [options] - -f, --file=filename: configuration file. The connect parameter will be overwritten by option -c. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: name of the tree to create(required). Note: the tree name is case insensitive, it is always internally converted to uppercase. - -r, --rootname=rootnodename(default 'All') - -a, --all: attach all tags in the inventory as leafs under the root - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__rootname='' - self.__treename='' - self.__all=False - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-f","--file",action="store",dest="filename",help="configuration file. The connect parameter will be overwritten by option -c.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="name of the tree to create(required). Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-r","--rootname",action="store",dest="rootname",type="string",help="root node name (default \'All\')") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="attach all tags in the inventory as leafs under the root(optional). Note: the leafnode names in this case are identical to the tag name") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(rootname='All') - self.__parser.set_defaults(all=False) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - - if not self.__parser.values.treename: - raise OptionValueError("option -%s --%s is required "%('T','tree')) - self.__treename=self.__parser.values.treename - if options.filename and options.connectstring: - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - self.__all=self.__parser.values.all - if self.__parser.values.filename!='': - configparser=ConfigParser() - configparser.read(self.__parser.values.filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get("COMMON","connect") - sections=configparser.sections() - for section in sections: - treesection=' '.join(['TAGTREE',str.upper(self.__treename)]) - self.__rootname=stripws(configparser.get(treesection,'root')) - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - else: - self.__connectstring=self.__parser.values.connectstring - self.__rootname=self.__parser.values.rootname - if self.__parser.values.verbose is True: - print 'connect: ',self.__connectstring - print 'tree: ',self.__treename - print 'root: ',self.__rootname - - def createRootNode(self): - """ - Create root node for the the given tree - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - mytree=TagTree.tagTree(session,self.__treename) - if mytree.existTagTreeTable() is False: - mytree.createTagTreeTable() - mynode=Node.Node() - mynode.nodelabel=self.__rootname - mynode.globalsince=0 - mynode.globaltill=4294967295 - mynode.tagid=0 - mytree.insertNode(mynode,'ROOT') - if self.__all is True: - inv=tagInventory.tagInventory(session) - result=inv.getAllEntries() - for tag in result: - myleaf=Node.Node() - myleaf.nodelabel=tag.tagname - myleaf.tagid=tag.tagid - mytree.insertNode(myleaf,self.__rootname) - except Exception, e: - print str(e) - del session -if __name__ == "__main__": - tagtreerootbuilder=tagTreeRootBuilder() - tagtreerootbuilder.parsecmdln() - tagtreerootbuilder.createRootNode() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_delete b/CondCore/TagCollection/scripts/cmscond_tagtree_delete deleted file mode 100755 index 6e0bac4a46948..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_delete +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node -from CondCore.TagCollection import TagTree,CommonUtils,entryComment -class tagTreeDelete: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: tree to delete. Note: the tree name is case insensitive, it is always internally converted to uppercase. - -a, --all: print all - -n, --node: root node of the branch to delete - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__branch='' - self.__node='' - self.__all=True - self.__treename='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="delete the tree with given name. Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="delete all tag trees") - self.__parser.add_option("-b","--branch",action="store",dest="branch",help="root node of the branch to delete") - self.__parser.add_option("-n","--node",action="store",dest="node",help="delete a single node. The rest of the tree will be rearranged") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(branch='') - self.__parser.set_defaults(node='') - self.__parser.set_defaults(all=False) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - if self.__parser.values.treename and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','T')) - if self.__parser.values.branch and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','b')) - if self.__parser.values.node and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','n')) - if self.__parser.values.node and self.__parser.values.branch: - raise OptionValueError("option -%s and -%s are exclusive"%('b','n')) - self.__treename=self.__parser.values.treename - self.__all=self.__parser.values.all - self.__branch=self.__parser.values.branch - self.__node=self.__parser.values.node - self.__connectstring=self.__parser.values.connectstring - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__all=self.__parser.values.all - self.__verbose=self.__parser.values.verbose - if not self.__parser.values.treename and not self.__parser.values.all: - self.__all=True - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - if self.__all is True: - print 'delete all: ',self.__all - else: - print 'delete tree: ',self.__treename - if len(self.__branch)==0 and len(self.__node)==0: - print 'delete from root' - if len(self.__branch)!=0: - print 'delete branch',self.__branch - if len(self.__node)!= 0: - print 'delete node: ',self.__node - def deleteme(self): - """ - delete requested tag tree and selected branch or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - #try: - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - if self.__all is True: - transaction=session.transaction() - transaction.start(True) - schema=session.nominalSchema() - tablelist=schema.listTables() - treelist=[] - for tablename in tablelist: - if tablename.find("TAGTREE_TABLE_") != -1: - treelist.append(tablename[len("TAGTREE_TABLE_"):]) - transaction.commit() - for treename in treelist: - tree=TagTree.tagTree(session,treename) - tree.deleteSubtree( 'ROOT' ) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - entrycomment.clearAllEntriesForTable(CommonUtils.treeTableName(treename)) - del session - return - tree=TagTree.tagTree(session,self.__treename) - if self.__branch=='' and self.__node=='': - tree.deleteSubtree( 'ROOT' ) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - entrycomment.clearAllEntriesForTable(CommonUtils.treeTableName(self.__treename)) - else: - if self.__branch != '': - print self.__branch - tree.deleteSubtree(self.__branch) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - nodes=tree.getSubtree(self.__branch) - for node in nodes: - entrycomment.deleteCommentForId(CommonUtils.treeTableName(self.__treename),node.nodeid) - - if self.__node != '': - tree.deleteNode(self.__node) - if entrycomment.existCommentTable() is True: - node=getNode(self.__node) - entrycomment.deleteCommentForId(CommonUtils.treeTableName(self.__treename),node.nodeid) - del session - #except Exception, e: - # print str(e) -if __name__ == "__main__": - tagdelete=tagTreeDelete() - tagdelete.parsecmdln() - tagdelete.deleteme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_list b/CondCore/TagCollection/scripts/cmscond_tagtree_list deleted file mode 100755 index 7b886005a2ed1..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_list +++ /dev/null @@ -1,209 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,TagTree,connectstrParser,cacheconfigParser - -def update_frontier_connection(conn_str): - '''updates frontier connection with proxy server information''' - parser=connectstrParser.connectstrParser(conn_str) - parser.parse() - if parser.needsitelocalinfo(): - sitelocalconfig = os.environ.get('$CMS_PATH', '/afs/cern.ch/cms/' ) + "SITECONF/CERN/JobConfig/site-local-config.xml" - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - #print "full frontier string: " + str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) - return str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) #str because default unicode - return str(conn_str) - -class tagTreePrinter: - def __init__(self): - """ - Class print/list tag tree - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -a, --all: print overview of all trees (default) - -T, --tree=treename: name of the tree. Note: the tree name is case insensitive, it is always internally converted to uppercase. - -l, --leaf: print only leaf nodes - -n, --node: root node of the branch to print - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__node='' - self.__leafonly=False - self.__verbose=False - self.__treename='' - self.__all=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="print overview of all trees(default)") - self.__parser.add_option("-l","--leaf",action="store_true",dest="leaf",help="print leaf nodes only") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="Print overview of the tree with given name. Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-n","--node",action="store",dest="node",type="string",help="root node of the branch to print. Exclusive with -a option") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(all=False) - self.__parser.set_defaults(leaf=False) - self.__parser.set_defaults(treename='') - self.__parser.set_defaults(node='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - - if self.__parser.values.treename and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','T')) - if self.__parser.values.node and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','n')) - self.__treename=self.__parser.values.treename - self.__all=self.__parser.values.all - self.__connectstring=update_frontier_connection(self.__parser.values.connectstring) - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__leaf=self.__parser.values.leaf - self.__node=self.__parser.values.node - self.__verbose=self.__parser.values.verbose - if not self.__parser.values.treename and not self.__parser.values.all: - self.__all=True - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - if self.__all is True: - print 'print all' - else: - print 'print tree: ',self.__treename - print 'print node: ',self.__node - if self.__leaf is True: - print 'print leaf only' - def printme(self): - """ - print requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_ReadOnly ) - inv=tagInventory.tagInventory(session) - if self.__all is True: - transaction=session.transaction() - transaction.start(True) - schema=session.nominalSchema() - tablelist=schema.listTables() - treelist=[] - for tablename in tablelist: - if tablename.find("TAGTREE_TABLE_") != -1: - treelist.append(tablename[len("TAGTREE_TABLE_"):]) - transaction.commit() - for treename in treelist: - print 'tree: ',treename - mytree=TagTree.tagTree(session,treename) - if self.__leaf is True: - result=mytree.getAllLeaves() - print '%s\t%s\t%s\t%s\t%s\t%s\t%s'%('#ID#','#leafNode#','#parent#','#tagname#','#record#','#object#','#pfn#') - for r in result: - if r.parentid != 0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - tagcontent=inv.getEntryById(r.tagid) - print '%s\t%s\t%s\t%s\t%s\t%s\t%s'%(r.nodeid,r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.pfn) - else: - print ' root:%s'%(r.nodelabel) - else: - result=mytree.getSubtree('ROOT') - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if r.tagid != 0: - tagcontent=inv.getEntryById(r.tagid) - print ' leafnode:%s parent:%s tag:%s record:%s object:%s label:%s pfn:%s'%(r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.labelname,tagcontent.pfn) - else: - print ' node:%s parent:%s'%(r.nodelabel,parentname) - - else: - print ' root:%s'%(r.nodelabel) - del session - return - #list node - mytree=TagTree.tagTree(session,self.__treename) - try: - if self.__leaf is True : - result=mytree.getAllLeaves() - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if self.__node is not '': - if self.__node == parentname: - print 'leafnode:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'leafnode:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'root:%s'%(r.nodelabel) - else: - if self.__node=='': - result=mytree.getSubtree('ROOT') - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if r.tagid != 0: - tagcontent=inv.getEntryById(r.tagid) - print ' leafnode:%s parent:%s tag:%s record:%s object:%s label:%s pfn:%s'%(r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.labelname,tagcontent.pfn) - else: - print 'node:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'root:%s'%(r.nodelabel) - else: - result=mytree.getSubtree(self.__node) - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if r.tagid != 0: - tagcontent=inv.getEntryById(r.tagid) - print ' leafnode:%s parent:%s tag:%s record:%s object:%s label:%s pfn:%s'%(r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.labelname,tagcontent.pfn) - else: - print 'node:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'node:%s'%(r.nodelabel) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagprinter=tagTreePrinter() - tagprinter.parsecmdln() - tagprinter.printme() - - diff --git a/CondCore/TagCollection/scripts/createglobaltag b/CondCore/TagCollection/scripts/createglobaltag deleted file mode 100755 index 21afd6c3619d9..0000000000000 --- a/CondCore/TagCollection/scripts/createglobaltag +++ /dev/null @@ -1,17 +0,0 @@ - -if [ "$#" != "2" ]; then - echo "Usage: $0 " - exit 1 -fi - - -echo "Executing : cmscond_taginventory_add -f $1" -cmscond_taginventory_add -f $1 -sleep 2 - -echo "Executing : cmscond_tagtree_createroot -f $1 -T $2 ....." -cmscond_tagtree_createroot -f $1 -T $2 -sleep 2 - -echo "Executing : cmscond_tagtree_add -f $1 -T $2 ....." -cmscond_tagtree_add -f $1 -T $2 diff --git a/CondCore/TagCollection/scripts/dbtoconf.cfg b/CondCore/TagCollection/scripts/dbtoconf.cfg deleted file mode 100644 index 43709894f9e9f..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoconf.cfg +++ /dev/null @@ -1,11 +0,0 @@ -[Common] - -Account: CMS_COND_21X_GLOBALTAG -#Conn_string_gtag: sqlite_file:CRUZET3.db -Conn_string_gtag: frontier://cmsfrontier:8000/FrontierInt/CMS_COND_21X_GLOBALTAG -Globtag: IDEAL_V5 -Confoutput: IDEAL_V5.conf -#AuthPath: /afs/cern.ch/cms/DB/conddb -#Conn_rep: frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0) -#Conn_rep: frontier://PromptProd -#Tag_rep: CRUZET3_V2H diff --git a/CondCore/TagCollection/scripts/dbtoconf.py b/CondCore/TagCollection/scripts/dbtoconf.py deleted file mode 100755 index 730915c2ec727..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoconf.py +++ /dev/null @@ -1,223 +0,0 @@ -#!/usr/bin/env python -import os,string,sys,commands,time,ConfigParser - -MAXRETRIES=10 # number of retries before giving up - -CONFIGFILE='dbtoconf.cfg' -CONFIG = ConfigParser.ConfigParser() -print 'Reading configuration file from ',CONFIGFILE -CONFIG.read(CONFIGFILE) - -# this is for [COMMON] part of the myconf.conf - -print " " -print "dbtoconf.py:" -ACCOUNT=CONFIG.get('Common','Account') -CONNSTRINGGLOBTAG=CONFIG.get('Common','Conn_string_gtag') -GLOBTAG=CONFIG.get('Common','Globtag') -CONFFILE=CONFIG.get('Common','Confoutput') -AUTHPATH='' -try: - AUTHPATH=CONFIG.get('Common','AuthPath') -except: - print "WARNING: No authpath fount in config file" - -CONNREP='' -try: - CONNREP=CONFIG.get('Common','Conn_rep') -except: - print "WARNING: No CONN_REP fount in config file" - -TAGREP='' -try: - TAGREP=CONFIG.get('Common','Tag_rep') -except: - print "WARNING: No TAG_REP fount in config file" - -print -print "Configuration:" -print "================================" -print "Account:",ACCOUNT -print "CONNSTRING:",CONNSTRINGGLOBTAG -print "GLOBALTAG:",GLOBTAG -print "CONF OUTPUT:",CONFFILE -print "Auth. Path:",AUTHPATH -print "Conn. replacement:",CONNREP -print "TAG replacement:",TAGREP -print "================================" - -# this is for tags -TMPTAG='tmptag.list' - - -def myparser(input,parstag): - if input.find(parstag)!=-1: - first=input.split(parstag) - second=first[1].split() - out=second[0] - else: - out='-1' - return out - -# main start here -###################################### -# initialization - - - - - -root='' -node='' -globparent='' -leafnode=[] -parent=[] -tag=[] -pfn=[] -object=[] -record=[] -connstring=[] -account=[] -label=[] - -os.system('rm -f '+TMPTAG) -tagtree_cmd = 'cmscond_tagtree_list -c '+CONNSTRINGGLOBTAG+' -T '+GLOBTAG -if AUTHPATH != '': - tagtree_cmd += ' -P ' + AUTHPATH - -os.system(tagtree_cmd +' > '+TMPTAG) - -nlines=0 -tmp=open(TMPTAG,'r') -while tmp: - line=tmp.readline() - if len(line)==0: - break - nlines=nlines+1 - line=string.strip(line) - if line.find('leafnode')==-1: - out=myparser(line,'root:') - if out!='-1': - root=out - out=myparser(line,'node:') - if out!='-1': - node=out - out=myparser(line,'parent:') - if out!='-1': - globparent=out - else: - leafnode.append(myparser(line,'leafnode:')) - parent.append(myparser(line,'parent:')) - tag.append(myparser(line,'tag:')) - pfn.append(myparser(line,'pfn:')) - record.append(myparser(line,'record:')) - label.append(myparser(line,'label:')) - object.append(myparser(line,'object:')) - connstring.append(myparser(line,'pfn:').split('/CMS_COND')[0]) - account.append('CMS_COND'+myparser(line,'pfn:').split('/CMS_COND')[1]) -# print nlines,line - -tmp.close() -print 'Read '+str(nlines)+' lines...' -print 'Read ',len(leafnode),' leafnodes' -print 'Read ',len(parent),' parent' -print 'Read ',len(tag),' tag' -print 'Read ',len(pfn),' pfn' - -if len(leafnode)!=len(parent) or len(leafnode)!=len(tag) or len(leafnode)!=len(pfn): - print "# of leafnodes different from parent/tag/pfn" - sys.exit() - -#output -#print root,node,globparent - - -# for i in range(0,len(leafnode)): -# command='cmscond_taginventory_list -c '+CONNSTRINGGLOBTAG+' -t '+tag[i] -# if AUTHPATH != '': -# command += ' -P ' + AUTHPATH - -# # print "COMMAND=",command -# # put in a loop until it succeed -# for ntime in range(0,MAXRETRIES): -# fullout=commands.getoutput(command) -# # 'cmscond_taginventory_list -c'+CONNSTRINGGLOBTAG+' -t '+tag[i]) -# linesout=fullout.split('\n') -# # print fullout -# # print len(linesout) -# if(len(linesout)>1): -# # success -# break -# print "Try: ",ntime, ".....",tag[i] -# time.sleep(0.5) -# if(len(linesout)<=1): -# print "Unable to get information on tag:",tag[i]," after ", MAXRETRIES, "retries" -# print "Giving up here..." -# sys.exit(1) - -# # print tag[i] -# for i2 in range(0,len(linesout)): -# # print linesout[i2] -# if linesout[i2].split()[2]==pfn[i]: -# #same pfn and tag -# object.append(linesout[i2].split()[3]) -# record.append(linesout[i2].split()[4]) -# if CONNREP!='': -# connstring.append(CONNREP) -# else: -# connstring.append(pfn[i].split('/CMS_COND')[0]) -# account.append('CMS_COND'+pfn[i].split('/CMS_COND')[1]) -# #print "TAG: " + tag[i] + " LABEL: " + linesout[i2].split()[5] -# label.append(linesout[i2].split()[5]) - -# print "Leafnode:",i,leafnode[i] -# print "Parent=",parent[i] -# print "Tag=",tag[i] -# print "Pfn=",pfn[i] -# print "Object=",object[i] -# print "Record=",record[i] -# print "Connstring=",connstring[i] -# print "Account=",account[i] -# print "==================================" - - -# open output conf file -conf=open(CONFFILE,'w') -conf.write('[COMMON]\n') -conf.write('connect=sqlite_file:' + GLOBTAG + '.db\n') -conf.write('#connect=oracle://cms_orcoff_int2r/'+ACCOUNT+'\n') -conf.write('#connect=oracle://cms_orcon_prod/'+ACCOUNT+'\n') -conf.write('\n') -conf.write('[TAGINVENTORY]\n') -conf.write('tagdata=\n') -for iline in range(0,len(leafnode)): - # print iline - if label[iline] == 'None': - outline=' '+tag[iline]+'{pfn='+connstring[iline]+'/'+account[iline]+',objectname='+object[iline]+',recordname='+record[iline]+'}' - else: - outline=' '+tag[iline]+'{pfn='+connstring[iline]+'/'+account[iline]+',objectname='+object[iline]+',recordname='+record[iline]+',labelname='+label[iline]+'}' - - if iline != len(leafnode)-1: - outline=outline+';' - outline=outline+'\n' - conf.write(outline) - -conf.write("\n") -if TAGREP=='': - conf.write('[TAGTREE '+GLOBTAG+']\n') -else: - conf.write('[TAGTREE '+TAGREP+']\n') - -conf.write('root='+root+'\n') -conf.write('nodedata='+node+'{parent='+globparent+'}\n') -conf.write('leafdata=\n') -for ileaf in range(0,len(leafnode)): - outline=' '+leafnode[ileaf]+'{parent='+parent[ileaf]+',tagname='+tag[ileaf]+',pfn='+connstring[ileaf]+'/'+account[ileaf]+'}' - if ileaf!=len(leafnode)-1: - outline=outline+';' - outline=outline+'\n' - conf.write(outline) - -conf.close() - -print CONFFILE+' ready. Plase have a look' diff --git a/CondCore/TagCollection/scripts/dbtoweb.cfg b/CondCore/TagCollection/scripts/dbtoweb.cfg deleted file mode 100644 index 2ed9f282fd4e2..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoweb.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[Common] - -Account: CMS_COND_31X_GLOBALTAG -Conn_string_gtag: frontier://cmsfrontier:8000/PromptProd/CMS_COND_31X_GLOBALTAG -#Conn_string_gtag: sqlite_file:GlobalTag.db -#AuthPath: /afs/cern.ch/cms/DB/conddb -Globtag: All -#Globtag: GR09_P_V6 -Rootdir: ./web_gt_31X -HTMLName: web_gt_31X.html diff --git a/CondCore/TagCollection/scripts/dbtoweb.py b/CondCore/TagCollection/scripts/dbtoweb.py deleted file mode 100755 index c0b43ca71d49c..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoweb.py +++ /dev/null @@ -1,276 +0,0 @@ -#!/usr/bin/env python -import os,string,sys,commands,time,ConfigParser,operator - -from operator import itemgetter -MAXRETRIES=10 # number of retries before giving up - -CONFIGFILE='dbtoweb.cfg' -CONFIG = ConfigParser.ConfigParser() -print 'Reading configuration file from ',CONFIGFILE -CONFIG.read(CONFIGFILE) - -# this is for [COMMON] part of the myconf.conf - -print " " -print "dbtoconf.py:" -ACCOUNT=CONFIG.get('Common','Account') -CONNSTRINGGLOBTAG=CONFIG.get('Common','Conn_string_gtag') -GLOBTAG=CONFIG.get('Common','Globtag') -ROOTDIR=CONFIG.get('Common','Rootdir') -HTMLNAME=CONFIG.get('Common','HTMLName') - -AUTHPATH='' -try: - AUTHPATH=CONFIG.get('Common','AuthPath') -except: - print "WARNING: No authpath fount in config file" - - -print -print "Configuration:" -print "================================" -print "Account:",ACCOUNT -print "CONNSTRING:",CONNSTRINGGLOBTAG -print "Auth. Path:",AUTHPATH -print "GLOBALTAG:",GLOBTAG -print "Root dir:",ROOTDIR - -print "================================" - - -def myparser(input,parstag): - out='-1' - - if input.find(parstag)!=-1: - first=input.split(parstag) - second=first[1].split() -# print second - if (len(second)>=1): - out=second[0] - - return out - - - -def single(currgtag): - - root='' - node='' - globparent='' - leafnode=[] - parent=[] - tag=[] - pfn=[] - object=[] - record=[] - connstring=[] - account=[] - - htmltag=open(currgtag+'.html','w') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('

Tag List for Global Tag: '+currgtag+'

\n') - htmltag.write('

The first time you access a tag below you have to login (HN credentials)
') - htmltag.write('Then you can come back here and access all tags

\n') - - - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - - - TMPTAG=commands.getoutput('mktemp') - os.system('cmscond_tagtree_list -c '+CONNSTRINGGLOBTAG+' -T '+currgtag+' > '+TMPTAG) -# os.system('cat '+TMPTAG) - nlines=0 - tmp=open(TMPTAG,'r') - while tmp: - line=tmp.readline() - if len(line)==0: - break - nlines=nlines+1 - line=string.strip(line) - if line.find('leafnode')==-1: - out=myparser(line,'root:') - if out!='-1': - root=out - out=myparser(line,'node:') - if out!='-1': - node=out - out=myparser(line,'parent:') - if out!='-1': - globparent=out - else: - leafnode.append(myparser(line,'leafnode:')) - parent.append(myparser(line,'parent:')) - tag.append(myparser(line,'tag:')) - pfn.append(myparser(line,'pfn:')) - - # print nlines,line - - tmp.close() - print 'Read '+str(nlines)+' lines...' - print 'Read ',len(leafnode),' leafnodes' - print 'Read ',len(parent),' parent' - print 'Read ',len(tag),' tag' - print 'Read ',len(pfn),' pfn' - - if len(leafnode)!=len(parent) or len(leafnode)!=len(tag) or len(leafnode)!=len(pfn): - print "# of leafnodes different from parent/tag/pfn" - sys.exit() - - #output - #print root,node,globparent - #`create dictionary - tagdict={} - for i in range(0,len(leafnode)): - tagdict[i]=pfn[i] - - sortindex=sorted(tagdict.items(), key=itemgetter(1)) - - # print tagdict - # for i in range(0,len(leafnode)): - # print sortindex[i][0] - - print 'Scanning tags:' - for i in range(0,len(leafnode)): - index=sortindex[i][0] - #lm - # command='cmscond_list_iov -c '+pfn[i].replace('frontier:','frontier://cmsfrontier:8000')+' -t '+tag[i] - # - # for ntime in range(0,MAXRETRIES): - # fullout=commands.getoutput(command) - # if fullout.count(tag[i])>=1: - # # success - # break - # print "Try: ",ntime, ".....",tag[i] - # time.sleep(0.5) - # if fullout.count(tag[i])<1: - # print "Unable to get information on tag:",tag[i]," after ", MAXRETRIES, "retries" - # print "Giving up here..." - # sys.exit(1) - - # adding tag to tag list page with link to condweb page - # first define needed parameters - TEMP=pfn[index].split('/') - ACCOUNT=TEMP[len(TEMP)-1] - TEMP=ACCOUNT.split('_') - DET=TEMP[len(TEMP)-1] - HREFSTRING='https://cmsweb.cern.ch/conddb/IOVManagement/get_iovs?det='+DET+'&service=cms_orcoff_prod&schema='+ACCOUNT+'&viacache=CHECKED&sel_tag='+tag[index]+'&tags=Display+IOV+for+selected+tags&destTag=&firstSince=&lastTill=' -# print 'href= '+HREFSTRING - - - htmltag.write('\n') -# htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - # open output file - #lm - #taginfo=open(tag[i],'w') - #taginfo.write(pfn[i]+'\n') - #taginfo.write('========================================================\n') - #taginfo.write(fullout) - #taginfo.close() -# -# print '%-50s - %-30s' % (pfn[i],tag[i]) - os.system('rm -f '+TMPTAG) - htmltag.write('
TagSource
'+tag[i]+''+tag[index]+''+pfn[index]+'
\n') - htmltag.write('

This list was created on: '+time.ctime()+'

\n') - htmltag.write('\n\n') - htmltag.close() - return 'done' - -# main start here -###################################### -# initialization -# first change to root dir -TOBECREATED=0 -try: - if not os.path.exists(ROOTDIR): - os.mkdir(ROOTDIR) - os.chdir(ROOTDIR) - TOBECREATED=1 - BASEDIR=os.getcwd() - print 'ROOTDIR created, current dir= '+BASEDIR - else: - os.chdir(ROOTDIR) - BASEDIR=os.getcwd() - print 'ROOTDIR exists already, current dir= '+BASEDIR -except: - print "ERROR: it is impossible to chdir in",ROOTDIR - sys.exit(1) - -HTMLTMP=HTMLNAME+'.tmp' -if TOBECREATED==1 : - htmlroot=open(HTMLTMP,'w') -else: - os.system('head -n -4 '+HTMLNAME+' > '+HTMLTMP) - htmlroot=open(HTMLTMP,'a') - -if TOBECREATED==1: - # create root html - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('

Global Tag List:

\n') - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - - -treelist=[] - -if GLOBTAG=="All" : - # need to create a list of trees - TMPTAGLIST=commands.getoutput('mktemp') - os.system('cmscond_tagtree_list -c '+CONNSTRINGGLOBTAG+' > '+TMPTAGLIST) - ntrees=0 - tmplist=open(TMPTAGLIST,'r') - while tmplist: - line=tmplist.readline() - if len(line)==0: - break - line=string.strip(line) - if line.find('tree:')!=1: - out=myparser(line,'tree:') - if out!='-1': - treelist.append(out) - ntrees=ntrees+1 - tmplist.close() - os.system('rm -f '+TMPTAGLIST) -else: - treelist.append(GLOBTAG) - -print "Found trees:" -for tree in range(0,len(treelist)): - print str(tree)+': Tree= '+treelist[tree] - # adding global tag to main page - htmlroot.write('\n') - file=treelist[tree]+'/'+treelist[tree]+'.html' - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - - # start creating files - os.chdir(BASEDIR) - TREEDIR=BASEDIR+'/'+treelist[tree] - if not os.path.exists(TREEDIR): - os.mkdir(TREEDIR) - os.chdir(TREEDIR) - print 'TREEDIR created, current dir is '+os.getcwd() - - single(treelist[tree]) - os.chdir(BASEDIR) - -htmlroot.write('
Global TagSource
'+treelist[tree]+''+ACCOUNT+'
\n') -htmlroot.write('

This list was created on: '+time.ctime()+'

\n') -htmlroot.write('\n\n') -htmlroot.close() -print 'A new root html has been created: ' -print BASEDIR+'/'+HTMLTMP -print 'Please check and replace (in case)' -# os.system('cp '+HTMLTMP+' '+HTMLNAME+' ; rm -f '+HTMLTMP) diff --git a/CondCore/TagCollection/scripts/listoftags b/CondCore/TagCollection/scripts/listoftags deleted file mode 100755 index 303531df99868..0000000000000 --- a/CondCore/TagCollection/scripts/listoftags +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh -if [ "$2" == "" ]; then - NAME=`basename $0` - echo "Usage: $NAME " - echo - echo "Examples" - echo - echo "Read the PHYS14_25_V1 global tag from Oracle:" - echo " $NAME oracle://cms_orcon_adg/CMS_COND_31X_GLOBALTAG PHYS14_25_V1" - echo - echo "Read the PHYS14_25_V1 global tag from Frontier:" - echo " $NAME frontier://FrontierProd/CMS_COND_31X_GLOBALTAG PHYS14_25_V1" - exit 1 -fi - -CONNECT=$1 -TREE=$2 -cmscond_tagtree_list -c $CONNECT -P /afs/cern.ch/cms/DB/conddb -T $TREE \ - | grep 'leafnode' \ - | awk '{print $4,$6,$1,$3}' \ - | sed -e 's/\ - -examples of usage: -listoftags sqlite_file:CRUZET.db CRUZET3_V2P ---> to get a list of all tags in CRUZET3_V2P -listoftags frontier://cmsfrontier.cern.ch:8000/FrontierProd/CMS_COND_20X_GLOBALTAG CRUZET3_V2P ---> the same from frontier - -============================================================================================================== -createglobaltag: - -create a new global tag based on an external configuration file - -it calls the taginventory_add, tagtree_createroot, tagtree_add in sequence and perform all needed actions. -For a configuration example look at CRUZET3_V2P.conf file. For a detailed explanation, please have a look at -https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideTagCollectionConcept. - -execute as: -createglobaltag - -examples of usage: -createglobaltag CRUZET3_V2P.conf CRUZET3_V2P - -remarks: -- multiple tags can be present in a single configuration file -- the tag inventory list is automatically checked against the DB repository to avoid repeated entries -=============================================================================================================== -dbtoconf.py - -create a conf file from an existing global tag with possibility to replace connect string and/or tagname. -The parameters to dbtoconf are given by a dbtoconf.cfg file - -execute as: -dbtoconf.py - -explanation of cfg (using as example dbtoconf.cfg): -############################################################################################# -[Common] - -# Account is the account from which you should get the global tag -Account: CMS_COND_20X_GLOBALTAG - -# Conn_string_gtag is the connect string for the DB to look for -Conn_string_gtag: sqlite_file:CRUZET3.db -#Conn_string_gtag: frontier://cmsfrontier:8000/PromptProd/CMS_COND_20X_GLOBALTAG - -# Globtag is the tag to read and put in conf -Globtag: CRUZET3_V2P - -#Confoutput is the output configuration file -Confoutput: CRUZET3_V2H.conf - -#AuthPath is the authorization path -#AuthPath: /afs/cern.ch/cms/DB/conddb - -# Conn_rep is useful to replace the connect string. An use case is to get a new global tag as a copy -# of an existing one, replacing only the connect string -Conn_rep: frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0) -#Conn_rep: frontier://PromptProd - -#Tag_rep is the new name of the tag in case a replacemnet string is given -Tag_rep: CRUZET3_V2H -############################################################################################# diff --git a/CondCore/TagCollection/src/PfnEditor.cc b/CondCore/TagCollection/src/PfnEditor.cc deleted file mode 100644 index 8dd00e8b728a4..0000000000000 --- a/CondCore/TagCollection/src/PfnEditor.cc +++ /dev/null @@ -1,29 +0,0 @@ -#include "CondCore/TagCollection/interface/PfnEditor.h" - -namespace cond{ - - PfnEditor::PfnEditor() : off(true){} - - PfnEditor::PfnEditor(std::string const & ipre, - std::string const & ipos) : - prefix(ipre), - postfix(ipos), - off(prefix.empty() && postfix.empty()) - {} - - - std::string PfnEditor::operator()(std::string const & pfn) const { - if (off) return pfn; - // FIXME ad-hoc - if (pfn.find("FrontierInt")!=std::string::npos) return pfn; - if (pfn.find("FrontierPrep")!=std::string::npos) return pfn; - if (pfn.find("sqlite")!=std::string::npos) return pfn; - - size_t pos=std::string::npos; - if (!prefix.empty()) pos = pfn.rfind('/'); - return prefix + ( (pos == std::string::npos) ? pfn : - pfn.substr(pos+1) - ) + postfix; - } - -} diff --git a/CondCore/TagCollection/src/TagCollectionRetriever.cc b/CondCore/TagCollection/src/TagCollectionRetriever.cc deleted file mode 100644 index e7988fb7daac6..0000000000000 --- a/CondCore/TagCollection/src/TagCollectionRetriever.cc +++ /dev/null @@ -1,164 +0,0 @@ -// -// Package: CondCore/TagCollection -// Class: TagCollectionRetriever -// -// Author: Zhen Xie -// -#include "CondCore/TagCollection/interface/TagCollectionRetriever.h" -#include "CondCore/TagCollection/interface/TagDBNames.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/ITable.h" -#include "RelationalAccess/IQuery.h" -#include "RelationalAccess/ICursor.h" -#include "CoralBase/AttributeList.h" -#include "CoralBase/Attribute.h" -#include "RelationalAccess/SchemaException.h" -#include "CondCore/TagCollection/interface/Exception.h" - -cond::TagCollectionRetriever::TagCollectionRetriever( cond::DbSession& coraldb ): - m_coraldb(coraldb) -{} - - -cond::TagCollectionRetriever::TagCollectionRetriever( cond::DbSession& coraldb, - std::string const & prefix, - std::string const & postfix) : - m_coraldb(coraldb), pfnEditor(prefix,postfix) -{} - - - -cond::TagCollectionRetriever::~TagCollectionRetriever(){} - -bool cond::TagCollectionRetriever::existsTagDatabase(){ - return m_coraldb.nominalSchema().existsTable(cond::tagInventoryTable); -} - -#include -bool cond::TagCollectionRetriever::existsTagCollection( const std::string& globaltag ){ - if(!existsTagDatabase()){ - throw cond::nonExistentGlobalTagInventoryException("TagCollectionRetriever::selectTagCollection"); - } - std::pair treenodepair=parseglobaltag(globaltag); - std::string treename=treenodepair.first; - std::string nodename=treenodepair.second; - std::string treetablename(cond::tagTreeTablePrefix); - if( !treename.empty() ){ - for(unsigned int i=0; i& result){ - if(!selectTagCollection( globaltag, result ) ) - throw cond::nonExistentGlobalTagException("TagCollectionRetriever::getTagCollection",globaltag); -} - -bool -cond::TagCollectionRetriever::selectTagCollection( const std::string& globaltag, - std::set& result){ - if(!m_coraldb.nominalSchema().existsTable(cond::tagInventoryTable)){ - throw cond::nonExistentGlobalTagInventoryException("TagCollectionRetriever::selectTagCollection"); - } - std::pair treenodepair=parseglobaltag(globaltag); - std::string treename=treenodepair.first; - std::string nodename=treenodepair.second; - //std::cout<<"treename "<addToTableList( treetablename, "p1" ); - query->addToTableList( treetablename, "p2" ); - query->addToOutputList( "p1.tagid" ); - query->setRowCacheSize( 100 ); - coral::AttributeList bindData; - bindData.extend( "nodelabel",typeid(std::string) ); - bindData.extend( "tagid",typeid(unsigned int) ); - bindData["tagid"].data()=0; - bindData["nodelabel"].data()=nodename; - query->setCondition( "p1.lft BETWEEN p2.lft AND p2.rgt AND p2.nodelabel = :nodelabel AND p1.tagid <> :tagid", bindData ); - coral::AttributeList qresult; - qresult.extend("tagid", typeid(unsigned int)); - query->defineOutput(qresult); - std::vector leaftagids; - leaftagids.reserve(100); - coral::ICursor& cursor = query->execute(); - while( cursor.next() ) { - const coral::AttributeList& row = cursor.currentRow(); - leaftagids.push_back(row["tagid"].data()); - } - cursor.close(); - delete query; - std::vector::iterator it; - std::vector::iterator itBeg=leaftagids.begin(); - std::vector::iterator itEnd=leaftagids.end(); - coral::ITable& tagInventorytable=m_coraldb.nominalSchema().tableHandle(cond::tagInventoryTable); - for( it=itBeg; it!=itEnd; ++it ){ - coral::IQuery* leaftagquery=tagInventorytable.newQuery(); - leaftagquery->addToOutputList( "tagname" ); - leaftagquery->addToOutputList( "pfn" ); - leaftagquery->addToOutputList( "recordname" ); - leaftagquery->addToOutputList( "objectname" ); - leaftagquery->addToOutputList( "labelname" ); - coral::AttributeList myresult; - myresult.extend("tagname",typeid(std::string)); - myresult.extend("pfn",typeid(std::string)); - myresult.extend("recordname",typeid(std::string)); - myresult.extend("objectname",typeid(std::string)); - myresult.extend("labelname",typeid(std::string)); - leaftagquery->defineOutput( myresult ); - coral::AttributeList bindVariableList; - bindVariableList.extend("tagid",typeid(unsigned int)); - leaftagquery->setCondition( "tagid = :tagid",bindVariableList ); - leaftagquery->limitReturnedRows(1,0); - bindVariableList["tagid"].data()=*it; - coral::ICursor& cursor2 =leaftagquery->execute(); - if( cursor2.next() ){ - const coral::AttributeList& row = cursor2.currentRow(); - cond::TagMetadata tagmetadata; - std::string tagname=row["tagname"].data(); - tagmetadata.tag=tagname; - tagmetadata.pfn=pfnEditor(row["pfn"].data()); - tagmetadata.recordname=row["recordname"].data(); - tagmetadata.objectname=row["objectname"].data(); - tagmetadata.labelname=row["labelname"].data(); - if(! result.insert(tagmetadata).second ){ - throw cond::Exception("cond::TagCollectionRetriever::getTagCollection tag "+tagname+" from "+tagmetadata.pfn+" already exist, cannot insert in the tag collection "); - } - } - cursor2.close(); - delete leaftagquery; - } - return true; -} - -std::pair -cond::TagCollectionRetriever::parseglobaltag(const std::string& globaltag){ - std::pair result; - std::size_t pos=globaltag.find("::"); - if(pos==std::string::npos){ - result.first=""; - result.second=globaltag; - }else{ - result.first=globaltag.substr(0,pos); - result.second=globaltag.substr(pos+2); - } - return result; -} - diff --git a/CondCore/TagCollection/src/TagDBNames.cc b/CondCore/TagCollection/src/TagDBNames.cc deleted file mode 100644 index 62e883992579f..0000000000000 --- a/CondCore/TagCollection/src/TagDBNames.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "CondCore/TagCollection/interface/TagDBNames.h" -namespace cond { -const std::string tagTreeTablePrefix("TAGTREE_TABLE"); -const std::string tagInventoryTable("TAGINVENTORY_TABLE"); -} - diff --git a/CondCore/TagCollection/test/BuildFile.xml b/CondCore/TagCollection/test/BuildFile.xml deleted file mode 100644 index fe0379f9fa4ed..0000000000000 --- a/CondCore/TagCollection/test/BuildFile.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/CondCore/TagCollection/test/globtag.conf2 b/CondCore/TagCollection/test/globtag.conf2 deleted file mode 100644 index 31f3a917736cc..0000000000000 --- a/CondCore/TagCollection/test/globtag.conf2 +++ /dev/null @@ -1,10 +0,0 @@ -[COMMON] -connect=sqlite_file:GRUMMDB.db - -[TAGINVENTORY] -tagdata=TrackerIdealGeometry170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=TrackerAlignment,recordname=TrackerAlignmentRcd};TrackerIdealGeometryErrors170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=TrackerAlignmentError,recordname=TrackerAlignmentErrorRcd};DTIdealGeometry170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=DTAlignment,recordname=DTAlignmentRcd};DTIdealGeometryErrors170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=DTAlignmentError,recordname=DTAlignmentErrorRcd};CSCIdealGeometry170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=CSCAlignment,recordname=CSCAlignmentRcd};CSCIdealGeometryErrors170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=CSCAlignmentError,recordname=CSCAlignmentErrorRcd};V2_trivial_TBuffer{pfn=frontier://Frontier/CMS_COND_18X_PIXEL,objectname=SiPixelGainCalibration,recordname=SiPixelGainCalibrationRcd};CSA07_SiStrip_Ideal_Gain_v2{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd};SiStripNoise_Fake_PeakMode_18X{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripFakeNoise,recordname=SiStripFakeNoiseRcd};CSA07_SiStrip_Ideal_LAngle_v2{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd};GRENt0{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTT0Rcd,recordname=DTT0Rcd};GRENttrigTet{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTTrigRcd,recordname=DTTrigRcd};GRENnoise{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTStatusFlag,recordname=DTStatusFlagRcd};CSCDBGains_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBGains,recordname=CSCDBGainsRcd};CSCDBNoiseMatrix_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd};CSCDBCrosstalk_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd};CSCDBPedestals_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd};CSCChamberIndex{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCChamberIndex,recordname=CSCChamberIndexRcd};CSCDDUMap{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDDUMap,recordname=CSCDDUMapRcd};hcal_pedestals_fC_v2_grmm{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd};hcal_widths_fC_v2_grmm{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd};official_emap_v5_080208{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd};hcal_gains_v2_gren_reprocessing{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd};qie_normalmode_v3{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd};EcalPedestals_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalPedestals,recordname=EcalPedestalsRcd};EcalADCToGeVConstant_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd};EcalGainRatios_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd};EcalIntercalibConstants_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalIntercalibConstants,recordname=EcalIntercalibConstantsRcd};EcalWeightXtalGroups_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd};EcalTBWeights_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd};EcalLaserAlphas_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalLaserAlphas,recordname=EcalLaserAlphasRcd};EcalLaserAPDPNRatios_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd};EcalLaserAPDPNRatiosRef_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalLaserAPDPNRatiosRef,recordname=EcalLaserAPDPNRatiosRefRcd};probBTagPDF2D_tag{pfn=frontier://Frontier/CMS_COND_18X_BTAU,objectname=BTagTrackProbability2D,recordname=BTagTrackProbability2DRcd};probBTagPDF3D_tag{pfn=frontier://Frontier/CMS_COND_18X_BTAU,objectname=BTagTrackProbability3D,recordname=BTagTrackProbability3DRcd};MVAJetTags_CMSSW_1_7_0_pre1{pfn=frontier://Frontier/CMS_COND_18X_BTAU,objectname=BTauGenericMVAJetTagComputer,recordname=BTauGenericMVAJetTagComputerRcd};EarlyCollision{pfn=frontier://Frontier/CMS_COND_18X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd};SiPixelFedCablingMap_v1{pfn=frontier://Frontier/CMS_COND_18X_PIXEL,objectname=SiPixelFedCablingMapRcd,recordname=SiPixelFedCablingMapRcd};SiStripFedCabling_18X{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd};GRENmap_774{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd};RPCEMap_v2{pfn=frontier://Frontier/CMS_COND_18X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd};CSCChamberMap{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCChamberMap,recordname=CSCChamberMapRcd};CSCCrateMap{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCCrateMap,recordname=CSCCrateMapRcd} - -[TAGTREE GRUMM] -root=All -nodedata=Calibration{parent=All} -leafdata=TrackerGeometry{parent=Calibration,tagname=TrackerIdealGeometry170};TrackerGeometryErrors{parent=Calibration,tagname=TrackerIdealGeometryErrors170};DTGeometry{parent=Calibration,tagname=DTIdealGeometry170};DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors170};CSCGeometry{parent=Calibration,tagname=CSCIdealGeometry170};CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors170};PixelGain{parent=Calibration,tagname=V2_trivial_TBuffer};SiStripGain{parent=Calibration,tagname=CSA07_SiStrip_Ideal_Gain_v2};SiStripNoise{parent=Calibration,tagname=SiStripNoise_Fake_PeakMode_18X};SiStripLangle{parent=Calibration,tagname=CSA07_SiStrip_Ideal_LAngle_v2};DTT0{parent=Calibration,tagname=GRENt0};DTTrig{parent=Calibration,tagname=GRENttrigTet};DTNoise{parent=Calibration,tagname=GRENnoise};CSCGain{parent=Calibration,tagname=CSCDBGains_ideal};CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ideal};CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ideal};CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ideal};CSCChambIndex{parent=Calibration,tagname=CSCChamberIndex};CSCDDUMap{parent=Calibration,tagname=CSCDDUMap};HCALPedestals{parent=Calibration,tagname=hcal_pedestals_fC_v2_grmm};HCALPedWidths{parent=Calibration,tagname=hcal_widths_fC_v2_grmm};HCALEmap{parent=Calibration,tagname=official_emap_v5_080208};HCALGain{parent=Calibration,tagname=hcal_gains_v2_gren_reprocessing};HCALQie{parent=Calibration,tagname=qie_normalmode_v3};ECALPedestals{parent=Calibration,tagname=EcalPedestals_trivial};ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_trivial};ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_trivial};ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_trivial};ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_trivial};ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_trivial};ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_trivial};ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_trivial};ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_trivial};BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag};BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag};BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_1_7_0_pre1};BEAMSPOT{parent=Calibration,tagname=EarlyCollision};SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_v1};SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_18X};DTROMap{parent=Calibration,tagname=GRENmap_774};RPCCabling{parent=Calibration,tagname=RPCEMap_v2};CSCChambMap{parent=Calibration,tagname=CSCChamberMap};CSCCrateMap{parent=Calibration,tagname=CSCCrateMap} diff --git a/CondCore/TagCollection/test/globtag.conf4 b/CondCore/TagCollection/test/globtag.conf4 deleted file mode 100644 index a0da4c46ae80c..0000000000000 --- a/CondCore/TagCollection/test/globtag.conf4 +++ /dev/null @@ -1,25 +0,0 @@ -[COMMON] -connect=oracle://devdb10/cms_xiezhen_dev - -[TAGINVENTORY] -tagdata= - CSA07_SiStrip_Ideal_Gain_v2{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStrip_Ideal_Gain_v3{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiPixel_Ideal_Gain_v4{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SPixel_Ideal_Gain_v4{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SPixel_Ideal_Gain_v4{pfn=frontier://FrontierON/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd} - -[TAGTREE GRUMM] -root=All - -nodedata= - Calibration{parent=All}; - Alignment{parent=All}; - CableMap{parent=All} - -leafdata= - SiStripGain{parent=Calibration,tagname=CSA07_SiStrip_Ideal_Gain_v2,pfn=frontier://Frontier/CMS_COND_18X_STRIP}; - SiStripGainForAlign{parent=Alignment,tagname=CSA07_SiStrip_Ideal_Gain_v2}; - SiStripGainFor{parent=Alignment,tagname=SiPixel_Ideal_Gain_v4}; - SiStripFor{parent=Alignment,tagname=SiPixel_Ideal_Gain_v4}; - SiStripOn{parent=CableMap,tagname=SPixel_Ideal_Gain_v4,pfn=frontier://FrontierON/CMS_COND_18X_STRIP} diff --git a/CondCore/TagCollection/test/input.conf b/CondCore/TagCollection/test/input.conf deleted file mode 100644 index 9eae92df934c5..0000000000000 --- a/CondCore/TagCollection/test/input.conf +++ /dev/null @@ -1,36 +0,0 @@ -[COMMON] -connect=sqlite_file:pippo.db - -[TAGINVENTORY] -tagdata= - mytest{pfn=sqlite_file:mytest.db,objectname=Pedestals,recordname=PedestalsRcd,labelname=lab3d}; - mytest{pfn=sqlite_file:acopymytest.db,objectname=Pedestals,recordname=PedestalsRcd,labelname=lab3d}; - mypedestals{pfn=sqlite_file:mytest.db,objectname=Pedestals,recordname=PedestalsRcd,labelname=lab2}; - anothermytest{pfn=sqlite_file:mytest.db,objectname=Pedestals,recordname=anotherPedestalsRcd}; - frog{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd,objectname=Alig,recordname=AligRcd} - -[TAGTREE MYTREE1] -root=All -nodedata= - Calibration{parent=All,comment='Mar-2-17:55:55-2009'}; - Alignment{parent=All,comment='Mar-3'} - -leafdata= - EcalCalib{parent=Calibration,tagname=mytest,pfn=sqlite_file:mytest.db}; - HcalCalib{parent=Calibration,tagname=mypedestals}; - DTCalib{parent=Calibration,tagname=mytest,pfn=sqlite_file:acopymytest.db}; - MuonAlign{parent=Alignment,tagname=anothermytest}; - TAlign{parent=Alignment,tagname=frog} - -[TAGTREE MYTREE2] -root=All -nodedata= - CSACalibration{parent=All}; - CSAAlignment{parent=All} - -leafdata= - mytestoriginal{parent=Calibration,tagname=mytest,pfn=sqlite_file:mytest.db}; - mytestcopy{parent=Calibration,tagname=mytest,pfn=sqlite_file:acopymytest.db}; - mypedestals{parent=Calibration,tagname=mypedestals}; - anothermytest{parent=Alignment,tagname=anothermytest} - diff --git a/CondCore/TagCollection/test/testConfigParser.py b/CondCore/TagCollection/test/testConfigParser.py deleted file mode 100644 index a2897d080c34c..0000000000000 --- a/CondCore/TagCollection/test/testConfigParser.py +++ /dev/null @@ -1,10 +0,0 @@ -from ConfigParser import * - -config= ConfigParser() -config.read('input.conf') -for section in config.sections(): - print section - for option in config.options(section): - print " ", option, "=", config.get(section, option) -print config.get("COMMON", "connect") - diff --git a/CondCore/TagCollection/test/testExporter.py b/CondCore/TagCollection/test/testExporter.py deleted file mode 100644 index ec08ddc175e94..0000000000000 --- a/CondCore/TagCollection/test/testExporter.py +++ /dev/null @@ -1,103 +0,0 @@ -#Coral package:CoralTools -import os -import coral -from CondCore.TagCollection.exporter import exporter - -#os.environ["CORAL_AUTH_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" -#os.environ["CORAL_DBLOOKUP_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" - -try: - #Initialize Connection Service - svc = coral.ConnectionService() - - #open session proxy for source schema providing logical service name & access mode - sourceSession = svc.connect( 'sqlite_file:source.db', accessMode = coral.access_Update ) - - #open session proxy for destination schema providing logical service name & access mode - destSession = svc.connect( 'sqlite_file:dest.db', accessMode = coral.access_Update ) - - rowCachesize=1000 - exp=exporter( sourceSession,destSession,rowCachesize ) - - try: - print "copyschema() : Copies the schema objects from source to destination, without copying data." - exp.copyschema() - print "Tables created" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copydata(rowCount) : Copies the schema objects from source to destination, including data copy." - exp.copydata(rowCount=100) - print "Data copied" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytableschema(tablename) : Copies the specified table schema without copying data." - tablename = "T1" - exp.copytableschema(tablename) - print "Table created" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytabledata(tablename,selectionclause,selectionparameters,rowCount) : Copies the specified table schema, including data copy." - tablename = "T1" - selectionclause= "id >= :idmin and id < :idmax " - selectionparameters = coral.AttributeList() - selectionparameters.extend( "idmin","int") - selectionparameters.extend( "idmax","int") - selectionparameters["idmin"].setData(0) - selectionparameters["idmax"].setData(2) - exp.copytabledata(tablename,selectionclause,selectionparameters,rowCount=100) - print "Data copied" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytablelistschema(tablelist) : Copies the specified list of tables ordered by hierarchy without copying data." - tableset = ['T3','T1','T2'] - exp.copytablelistschema(tableset) - print "Tables created" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytablelistdata(tablelist,rowCount) : Copies the specified list of tables ordered by hierarchy, including data copy." - table1 = "T3" - selectionclause1= "id >= 4 and id < 8 " - - table2 = "T2" - selectionclause2= "id >= :idmin and id < :idmax " - selectionparameters2 = coral.AttributeList() - selectionparameters2.extend( "idmin","int") - selectionparameters2.extend( "idmax","int") - selectionparameters2["idmin"].setData(0) - selectionparameters2["idmax"].setData(34) - - table3 = "T1" - - tablelist1 = [table1,selectionclause1] - tablelist2 = [table2,selectionclause2,selectionparameters2] - tablelist3 = [table3] - - tablelist = [tablelist1,tablelist2,tablelist3] - exp.copytablelistdata(tablelist,rowCount=100) - print "Data copied " - except Exception as e: - print "Test Failed" - print str(e) - - del sourceSession - del destSession -except Exception as e: - print "Test FAILED" - print str(e) - - diff --git a/CondCore/TagCollection/test/testListDBObjects.py b/CondCore/TagCollection/test/testListDBObjects.py deleted file mode 100644 index 25636c265786a..0000000000000 --- a/CondCore/TagCollection/test/testListDBObjects.py +++ /dev/null @@ -1,29 +0,0 @@ -import os -import coral -from CondCore.TagCollection.listobjects import dumpobjectlist - -#os.environ["CORAL_AUTH_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" -#os.environ["CORAL_DBLOOKUP_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" - -try: - #Initialize Connection Service - svc = coral.ConnectionService() - - #open session proxy using MySQL technology providing logical service name & access mode - session = svc.connect( 'sqlite_file:my2test.db', accessMode = coral.access_Update ) - transaction = session.transaction() - transaction.start(True) - - schema = session.nominalSchema() - result = dumpobjectlist( schema ) - transaction.commit() - del session - - print "[SUCCESS] Test for dumpobjectlist passed." - -except Exception as e: - transaction.rollback() - print "Test FAILED" - print str(e) - - diff --git a/CondCore/TagCollection/test/testPfnEditor.cpp b/CondCore/TagCollection/test/testPfnEditor.cpp deleted file mode 100644 index af83e4dc84f5b..0000000000000 --- a/CondCore/TagCollection/test/testPfnEditor.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "CondCore/TagCollection/interface/PfnEditor.h" - -#include - -int err = 0; - -void error(char const * m) { - ++err; - std::cerr << m << std::endl; -} - -int main() { - - std::string det("STRIP"); - std::string cond("CMS_COND_31X_"); - std::string pfn("oracle://cmsarc_lb/CMS_COND_31X_STRIP"); - std::string pre1("oracle://cmsarc_lb/"); - std::string pre2("oracle://cmsprod/"); - - std::string post("_0911"); - - { - cond::PfnEditor ed("",""); - if (ed(pfn)!=pfn) - error("error adding null pre and null post"); - } - - { - cond::PfnEditor ed("",post); - if (ed(pfn)!=pfn+post) - error("error adding null pre and post"); - } - - { - cond::PfnEditor ed(pre2,""); - if (ed(pfn)!=pre2+cond+det) - error("error changing pre and null post"); - } - - { - cond::PfnEditor ed(pre2,post); - if (ed(pfn)!=pre2+cond+det+post) - error("error changing pre and post"); - } - - { - cond::PfnEditor ed(pre1+cond,post); - if (ed(det)!=pre1+cond+det+post) - error("error adding pre and post"); - } - - - return err; -} diff --git a/CondCore/TagCollection/test/testlonglong.py b/CondCore/TagCollection/test/testlonglong.py deleted file mode 100644 index 36b39eb40018d..0000000000000 --- a/CondCore/TagCollection/test/testlonglong.py +++ /dev/null @@ -1,69 +0,0 @@ -import os -import coral -os.putenv( "CORAL_AUTH_PATH", "." ) -svc = coral.ConnectionService() -session = svc.connect( 'sqlite_file:testcoral.db',accessMode = coral.access_Update ) -#session = svc.connect( 'oracle://devdb10/cms_xiezhen_dev',accessMode = coral.access_Update ) -TreeTableName = 'TAGTREE_TABLE' -TreeTableColumns = {'nodeid':'unsigned long', 'nodelabel':'string', 'lft':'unsigned long', 'rgt':'unsigned long', 'parentid':'unsigned long', 'tagid':'unsigned long', 'globalsince':'unsigned long long', 'globaltill':'unsigned long long'} -TreeTableValues = {'nodeid':1, 'nodelabel':'testtest', 'lft':5, 'rgt':6, 'parentid':4, 'tagid':2, 'globalsince':1235, 'globaltill':9457} -TreeTableNotNullColumns = ['nodelabel','lft','rgt','parentid'] -TreeTableUniqueColumns = ['nodelabel'] -TreeTablePK = ('nodeid') -transaction=session.transaction() -try: - transaction.start(False) - schema = session.nominalSchema() - schema.dropIfExistsTable( TreeTableName ) - description = coral.TableDescription(); - description.setName( TreeTableName ) - for columnName, columnType in TreeTableColumns.items(): - description.insertColumn(columnName, columnType) - for columnName in TreeTableNotNullColumns : - description.setNotNullConstraint(columnName,True) - for columnName in TreeTableUniqueColumns : - description.setUniqueConstraint(columnName) - description.setPrimaryKey( TreeTablePK ) - TreeTableHandle = schema.createTable( description ) - print 'created' - TreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - editor=TreeTableHandle.dataEditor() - inputData=coral.AttributeList() - for name,type in TreeTableColumns.items(): - inputData.extend(name,type) - inputData[name].setData(TreeTableValues[name]) - editor.insertRow(inputData) - transaction.commit() - transaction.start(True) - query=session.nominalSchema().tableHandle(TreeTableName).newQuery() - condition = 'nodelabel =:nodelabel' - conditionData = coral.AttributeList() - conditionData.extend( 'nodelabel','string' ) - query.setCondition( condition, conditionData) - conditionData['nodelabel'].setData('testtest') - cursor = query.execute() - while ( next(cursor) ): - tagid=cursor.currentRow()['tagid'].data() - print 'tagid',tagid - nodeid=cursor.currentRow()['nodeid'].data() - print 'nodeid',nodeid - nodelabel=cursor.currentRow()['nodelabel'].data() - print 'nodelabel',nodelabel - lft=cursor.currentRow()['lft'].data() - print 'lft',lft - rgt=cursor.currentRow()['rgt'].data() - print 'rgt',rgt - parentid=cursor.currentRow()['parentid'].data() - print 'parentid',parentid - globalsince=cursor.currentRow()['globalsince'].data() - print 'globalsince',globalsince - globaltill=cursor.currentRow()['globaltill'].data() - print 'globaltill',globaltill - transaction.commit() - del session -except Exception as e: - print "Failed in unit test" - print str(e) - transaction.rollback() - del session - diff --git a/CondCore/TagCollection/test/writeTestTagDB.cpp b/CondCore/TagCollection/test/writeTestTagDB.cpp deleted file mode 100644 index b6122f208d6cf..0000000000000 --- a/CondCore/TagCollection/test/writeTestTagDB.cpp +++ /dev/null @@ -1,206 +0,0 @@ -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/TagMetadata.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/ITable.h" -#include "RelationalAccess/TableDescription.h" -#include "RelationalAccess/ITableDataEditor.h" -#include "RelationalAccess/ITablePrivilegeManager.h" -#include "RelationalAccess/IBulkOperation.h" -#include "CoralBase/AttributeList.h" -#include "CoralBase/Attribute.h" -#include "CoralBase/AttributeSpecification.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - const std::string tagTreeTable("TAGTREE_TABLE_MYTREE1"); - const std::string tagInventoryTable("TAGINVENTORY_TABLE"); - try{ - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:tagDB.db" ); - session.transaction().start(false); - coral::TableDescription tagTreeTableDesc; - coral::TableDescription tagInventoryTableDesc; - tagTreeTableDesc.setName(tagTreeTable); - tagTreeTableDesc.insertColumn("nodeid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("nodelabel", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagTreeTableDesc.insertColumn("lft", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("rgt", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("parentid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("tagid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("globalsince", coral::AttributeSpecification::typeNameForId( typeid(unsigned long long) ) ); - tagTreeTableDesc.insertColumn("globaltill", coral::AttributeSpecification::typeNameForId( typeid(unsigned long long) ) ); - tagTreeTableDesc.insertColumn("comment", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - std::vector cols; - cols.push_back( "nodeid" ); - tagTreeTableDesc.setPrimaryKey( cols ); - tagTreeTableDesc.setNotNullConstraint( "nodelabel" ); - tagTreeTableDesc.setNotNullConstraint( "lft" ); - tagTreeTableDesc.setNotNullConstraint( "rgt" ); - tagTreeTableDesc.setNotNullConstraint( "tagid" ); - tagTreeTableDesc.setUniqueConstraint( "nodelabel" ); - coral::ITable& treetable=session.nominalSchema().createTable( tagTreeTableDesc ); - treetable.privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select); - - tagInventoryTableDesc.setName(tagInventoryTable); - tagInventoryTableDesc.insertColumn("tagid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagInventoryTableDesc.insertColumn("tagname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("pfn", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("recordname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("objectname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("labelname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("comment", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - std::vector pkcols; - pkcols.push_back( "tagid" ); - tagInventoryTableDesc.setPrimaryKey( pkcols ); - tagInventoryTableDesc.setNotNullConstraint( "tagname" ); - tagInventoryTableDesc.setNotNullConstraint( "pfn" ); - tagInventoryTableDesc.setNotNullConstraint( "recordname" ); - tagInventoryTableDesc.setNotNullConstraint( "objectname" ); - tagInventoryTableDesc.setNotNullConstraint( "labelname" ); - tagInventoryTableDesc.setUniqueConstraint( "tagname" ); - coral::ITable& inventorytable=session.nominalSchema().createTable( tagInventoryTableDesc ); - inventorytable.privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select); - std::cout<<"all tables are created"< > tagcollection; - std::string tagname; - cond::TagMetadata tagmetadata; - tagname="mytest"; - tagmetadata.pfn="sqlite_file:mytest.db"; - tagmetadata.recordname="PedestalsRcd"; - tagmetadata.objectname="Pedestals"; - tagmetadata.labelname="lab3d"; - tagcollection.push_back(std::pair(tagname,tagmetadata)); - tagname="mypedestals"; - tagmetadata.pfn="sqlite_file:mytest.db"; - tagmetadata.recordname="PedestalsRcd"; - tagmetadata.objectname="Pedestals"; - tagmetadata.labelname="lab2"; - tagcollection.push_back(std::pair(tagname,tagmetadata)); - tagname="anothermytest"; - tagmetadata.pfn="sqlite_file:mytest.db"; - tagmetadata.recordname="anotherPedestalsRcd"; - tagmetadata.objectname="Pedestals"; - tagmetadata.labelname=""; - tagcollection.push_back(std::pair(tagname,tagmetadata)); - - std::cout<<"populate tag inventory"< >::iterator itBeg=tagcollection.begin(); - std::vector< std::pair >::iterator itEnd=tagcollection.end(); - unsigned int tagid=0; - for(std::vector< std::pair >::iterator it=itBeg;it!=itEnd;++it) { - ++tagid; - data["tagid"].data() = tagid; - data["tagname"].data() = it->first; - data["pfn"].data() = it->second.pfn; - data["recordname"].data() = it->second.recordname; - data["objectname"].data() = it->second.objectname; - data["labelname"].data() = it->second.labelname; - rowInserter->processNextIteration(); - } - rowInserter->flush(); - delete rowInserter; - struct nodedata{ - unsigned int nodeid; - std::string nodelabel; - unsigned int lft; - unsigned int rgt; - unsigned int tagid; - }; - std::cout<<"building test tag tree"<()=1; - nodedata["nodelabel"].data()="All"; - nodedata["lft"].data()=1; - nodedata["rgt"].data()=12; - nodedata["parentid"].data()=0; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=0; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=2; - nodedata["nodelabel"].data()="Calibration"; - nodedata["lft"].data()=2; - nodedata["rgt"].data()=7; - nodedata["parentid"].data()=1; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=0; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=3; - nodedata["nodelabel"].data()="Alignment"; - nodedata["lft"].data()=8; - nodedata["rgt"].data()=11; - nodedata["parentid"].data()=1; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=0; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=4; - nodedata["nodelabel"].data()="mycalib11"; - nodedata["lft"].data()=3; - nodedata["rgt"].data()=4; - nodedata["parentid"].data()=2; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=1; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=5; - nodedata["nodelabel"].data()="mycalib2"; - nodedata["lft"].data()=5; - nodedata["rgt"].data()=6; - nodedata["parentid"].data()=2; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=2; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=6; - nodedata["nodelabel"].data()="myalign1"; - nodedata["lft"].data()=9; - nodedata["rgt"].data()=10; - nodedata["parentid"].data()=3; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=3; - treeInserter->processNextIteration(); - treeInserter->flush(); - session.transaction().commit(); - delete treeInserter; - }catch(const cond::Exception& er){ - std::cout<<"error "< - - diff --git a/CondCore/Utilities/bin/BuildFile.xml b/CondCore/Utilities/bin/BuildFile.xml index 91e931aa723cc..95623f0ef3e73 100644 --- a/CondCore/Utilities/bin/BuildFile.xml +++ b/CondCore/Utilities/bin/BuildFile.xml @@ -2,7 +2,7 @@ - + diff --git a/CondCore/Utilities/bin/cmscond_authentication_manager.cpp b/CondCore/Utilities/bin/cmscond_authentication_manager.cpp index a6c5ec78f2ec0..0a5cd5bc56f7c 100644 --- a/CondCore/Utilities/bin/cmscond_authentication_manager.cpp +++ b/CondCore/Utilities/bin/cmscond_authentication_manager.cpp @@ -1,8 +1,8 @@ -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/CredentialStore.h" +//#include "CondCore/CondDB/interface/DbSession.h" +//#include "CondCore/CondDB/interface/DbScopedTransaction.h" +#include "CondCore/CondDB/interface/Auth.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/CredentialStore.h" #include "CondCore/Utilities/interface/Utilities.h" // #include "RelationalAccess/AuthenticationCredentials.h" @@ -96,7 +96,7 @@ int cond::AuthenticationManager::execute(){ std::string authPath(""); if( hasOptionValue("authPath") ) authPath = getOptionValue("authPath"); if( authPath.empty() ){ - const char* authEnv = ::getenv( Auth::COND_AUTH_PATH ); + const char* authEnv = ::getenv( auth::COND_AUTH_PATH ); if(authEnv){ authPath += authEnv; } else { @@ -161,8 +161,8 @@ int cond::AuthenticationManager::execute(){ if( update_princ ){ bool adminOpt = hasOptionValue("admin"); std::string key = getOptionValue("key"); - DecodingKey pk; - pk.init( key, Auth::COND_KEY ); + auth::DecodingKey pk; + pk.init( key, auth::COND_KEY ); credDb.updatePrincipal( pk.principalName(), pk.principalKey(), adminOpt ); return 0; } @@ -360,7 +360,7 @@ int cond::AuthenticationManager::execute(){ xmlFile.openConnectionEntry( connectStr ); started = true; connections.insert( connectStr ); - std::pair defRoleKey(connectStr,Auth::COND_DEFAULT_ROLE); + std::pair defRoleKey(connectStr,auth::COND_DEFAULT_ROLE); std::map< std::pair, coral::AuthenticationCredentials* >::const_iterator iDef = creds.find( defRoleKey ); if( iDef != creds.end() ){ xmlFile.addCredentialEntry( iDef->second->valueForItem( coral::IAuthenticationCredentials::userItem() ), @@ -368,7 +368,7 @@ int cond::AuthenticationManager::execute(){ } } const std::string& role = iEntry->first.second; - if( role != Auth::COND_DEFAULT_ROLE ){ + if( role != auth::COND_DEFAULT_ROLE ){ xmlFile.openRoleEntry( role ); xmlFile.addCredentialEntry( iEntry->second->valueForItem( coral::IAuthenticationCredentials::userItem() ), iEntry->second->valueForItem( coral::IAuthenticationCredentials::passwordItem() ) ); @@ -379,6 +379,8 @@ int cond::AuthenticationManager::execute(){ return 0; } + std::cout <<"ERROR: no command specified."< diff --git a/CondCore/Utilities/bin/cmscond_create_key.cpp b/CondCore/Utilities/bin/cmscond_key_mgr.cpp similarity index 59% rename from CondCore/Utilities/bin/cmscond_create_key.cpp rename to CondCore/Utilities/bin/cmscond_key_mgr.cpp index 980b963a053e9..98c7ea24e8dd2 100644 --- a/CondCore/Utilities/bin/cmscond_create_key.cpp +++ b/CondCore/Utilities/bin/cmscond_key_mgr.cpp @@ -1,8 +1,8 @@ #include "CondCore/Utilities/interface/Utilities.h" -#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/Cipher.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/DecodingKey.h" +#include "CondCore/CondDB/interface/Cipher.h" +#include "CondCore/CondDB/interface/Auth.h" +#include "CondCore/CondDB/interface/Exception.h" #include #include @@ -10,33 +10,33 @@ #include namespace cond { - class CreateKeyUtilities : public Utilities { + class KeyMgrUtilities : public Utilities { public: - CreateKeyUtilities(); - ~CreateKeyUtilities(); + KeyMgrUtilities(); + ~KeyMgrUtilities(); int execute() override; }; } -cond::CreateKeyUtilities::CreateKeyUtilities():Utilities("cmscond_create_key"){ +cond::KeyMgrUtilities::KeyMgrUtilities():Utilities("cmscond_key_mgr"){ addOption("create","c","creating from input file data"); addOption("read","r","read data from input file"); addOption("generate","g","generate a new key when not specified"); addOption("dump_template","d","dump an input file template"); } -cond::CreateKeyUtilities::~CreateKeyUtilities(){ +cond::KeyMgrUtilities::~KeyMgrUtilities(){ } -int cond::CreateKeyUtilities::execute(){ +int cond::KeyMgrUtilities::execute(){ std::string inFile(""); if( hasOptionValue("create") ) { inFile = getOptionValue("create"); size_t keySize = 0; - if( hasOptionValue("generate") ) keySize = Auth::COND_AUTHENTICATION_KEY_SIZE; + if( hasOptionValue("generate") ) keySize = auth::COND_AUTHENTICATION_KEY_SIZE; if(!inFile.empty()){ - DecodingKey key; - key.init( DecodingKey::FILE_NAME, Auth::COND_KEY, false ); + auth::DecodingKey key; + key.init( auth::DecodingKey::FILE_NAME, auth::COND_KEY, false ); key.createFromInputFile( inFile, keySize ); if( hasDebug() ) key.list( std::cout ); key.flush(); @@ -48,8 +48,8 @@ int cond::CreateKeyUtilities::execute(){ if( hasOptionValue("read") ) { inFile = getOptionValue("read"); if(!inFile.empty()){ - DecodingKey key; - key.init( inFile, Auth::COND_KEY ); + auth::DecodingKey key; + key.init( inFile, auth::COND_KEY ); key.list( std::cout ); return 0; } @@ -57,7 +57,7 @@ int cond::CreateKeyUtilities::execute(){ } if( hasOptionValue("dump_template") ) { - std::cout < diff --git a/CondCore/Utilities/interface/CondDBTools.h b/CondCore/Utilities/interface/CondDBTools.h index dfac3367a7e0b..39ffe66352def 100644 --- a/CondCore/Utilities/interface/CondDBTools.h +++ b/CondCore/Utilities/interface/CondDBTools.h @@ -2,7 +2,6 @@ #define Utilities_CondDBTools_h #include "CondCore/CondDB/interface/Time.h" -#include "CondCore/DBCommon/interface/DbSession.h" // #include diff --git a/CondCore/Utilities/interface/Utilities.h b/CondCore/Utilities/interface/Utilities.h index 364219dcd844c..d37d4759dfee0 100644 --- a/CondCore/Utilities/interface/Utilities.h +++ b/CondCore/Utilities/interface/Utilities.h @@ -1,8 +1,7 @@ #ifndef Utilities_Utilities_h #define Utilities_Utilities_h -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/DbSession.h" +#include "CondCore/CondDB/interface/Exception.h" #include #include #include @@ -12,7 +11,7 @@ namespace edm { } namespace cond { - class DbConnection; + //class DbConnection; class UtilitiesError : public Exception { public: @@ -28,16 +27,10 @@ namespace cond { virtual int execute(); int run( int argc, char** argv ); - + + void addConnectOption( std::string const& fullName, std::string const& shortName, std::string const& helpEntry ); void addAuthenticationOptions(); - void addConnectOption(); - void addConnectOption(const std::string& connectionOptionName, - const std::string& shortName, - const std::string& helpEntry ); - void addLogDBOption(); - void addDictionaryOption(); void addConfigFileOption(); - void addSQLOutputOption(); template void addOption(const std::string& fullName, const std::string& shortName, @@ -56,13 +49,13 @@ namespace cond { bool hasOptionValue(const std::string& fullName); bool hasDebug(); void initializePluginManager(); - cond::DbSession openDbSession( const std::string& connectionParameterName, bool readOnly=false ); - cond::DbSession openDbSession( const std::string& connectionParameterName, const std::string& role, bool readOnly=false ); + //cond::DbSession openDbSession( const std::string& connectionParameterName, bool readOnly=false ); + //cond::DbSession openDbSession( const std::string& connectionParameterName, const std::string& role, bool readOnly=false ); protected: - cond::DbSession newDbSession( const std::string& connectionString, bool readOnly=false ); - cond::DbSession newDbSession( const std::string& connectionString, const std::string& role, bool readOnly=false ); - void initializeForDbConnection(); + //cond::DbSession newDbSession( const std::string& connectionString, bool readOnly=false ); + //cond::DbSession newDbSession( const std::string& connectionString, const std::string& role, bool readOnly=false ); + //void initializeForDbConnection(); private: @@ -80,8 +73,8 @@ namespace cond { boost::program_options::options_description m_options; boost::program_options::positional_options_description m_positionalOptions; boost::program_options::variables_map m_values; - cond::DbConnection* m_dbConnection; - std::set m_dbSessions; + //cond::DbConnection* m_dbConnection; + //std::set m_dbSessions; }; diff --git a/CondCore/Utilities/src/CondDBTools.cc b/CondCore/Utilities/src/CondDBTools.cc index bea6f874b0352..2a9ddeee84a51 100644 --- a/CondCore/Utilities/src/CondDBTools.cc +++ b/CondCore/Utilities/src/CondDBTools.cc @@ -3,7 +3,6 @@ #include "CondCore/CondDB/interface/ConnectionPool.h" // #include "CondCore/CondDB/src/DbCore.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" // #include #include diff --git a/CondCore/Utilities/src/Utilities.cc b/CondCore/Utilities/src/Utilities.cc index f7e4f8841974e..76ea02745c423 100644 --- a/CondCore/Utilities/src/Utilities.cc +++ b/CondCore/Utilities/src/Utilities.cc @@ -4,18 +4,18 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" //local includes -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/SQLReport.h" +//#include "CondCore/DBCommon/interface/DbConnection.h" +//#include "CondCore/DBCommon/interface/SQLReport.h" #include "CondCore/Utilities/interface/Utilities.h" #include "FWCore/PluginManager/interface/PluginManager.h" #include "FWCore/PluginManager/interface/standard.h" #include "FWCore/PluginManager/interface/SharedLibrary.h" -#include "CondCore/ORA/interface/SharedLibraryName.h" +//#include "CondCore/ORA/interface/SharedLibraryName.h" #include #include #include -#include "CondCore/DBCommon/interface/Auth.h" +#include "CondCore/CondDB/interface/Auth.h" cond::UtilitiesError::UtilitiesError(const std::string& message ):Exception(message){ @@ -28,9 +28,7 @@ cond::Utilities::Utilities( const std::string& commandName, std::string(" [options] ")+positionalParameter +std::string(" \n")), m_positionalOptions(), - m_values(), - m_dbConnection(0), - m_dbSessions(){ + m_values(){ m_options.add_options() ("debug","switch on debug mode") ("help,h", "help message") @@ -43,7 +41,6 @@ cond::Utilities::Utilities( const std::string& commandName, cond::Utilities::~Utilities(){ - if(m_dbConnection) delete m_dbConnection; } int cond::Utilities::execute(){ @@ -69,26 +66,7 @@ int cond::Utilities::run( int argc, char** argv ){ std::cout << m_options < dictionaries = - m_values["dictionary"].as >(); - if(!dictionaries.empty()){ - ora::SharedLibraryName libName; - BOOST_FOREACH(std::string const & dict, dictionaries) - edmplugin::SharedLibrary( libName(dict) ); - } - } ret = execute(); - if(m_dbConnection){ - if(m_options.find_nothrow("sql",false) && m_values.count("sql")){ - cond::SQLReport report(*m_dbConnection); - for(std::set::const_iterator iSess = m_dbSessions.begin(); - iSess != m_dbSessions.end(); - iSess++) report.reportForConnection(*iSess); - report.putOnFile(); - } - } - }catch( cond::Exception& err ){ std::cout << err.what() << std::endl; ret = 1; @@ -100,36 +78,18 @@ int cond::Utilities::run( int argc, char** argv ){ return ret; } -void -cond::Utilities::addAuthenticationOptions(){ - addOption("authPath","P","path to authentication xml"); - addOption("user","u","user name"); - addOption("pass","p","password"); -} - -void -cond::Utilities::addConnectOption(){ - addOption("connect","c","connection string (required)"); - m_dbSessions.insert("connect"); -} - void cond::Utilities::addConnectOption(const std::string& connectionOptionName, const std::string& shortName, const std::string& helpEntry ){ addOption(connectionOptionName,shortName,helpEntry); - m_dbSessions.insert(connectionOptionName); } - void -cond::Utilities::addLogDBOption(){ - addConnectOption("logDB","l","logDB(optional"); -} - -void -cond::Utilities::addDictionaryOption(){ - addOption >("dictionary","D","data dictionaries (required if no plugin available)"); +cond::Utilities::addAuthenticationOptions(){ + addOption("authPath","P","path to authentication xml"); + addOption("user","u","user name"); + addOption("pass","p","password"); } void @@ -137,11 +97,6 @@ cond::Utilities::addConfigFileOption(){ addOption("configFile","f","configuration file(optional)"); } -void -cond::Utilities::addSQLOutputOption(){ - addOption("sql","S","dump the sql output (optional)"); -} - void cond::Utilities::parseCommand( int argc, char** argv ){ boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(m_options).positional(m_positionalOptions).run(), m_values); if(m_options.find_nothrow("configFile",false)){ @@ -203,6 +158,7 @@ void cond::Utilities::initializePluginManager(){ // dummy, to avoid to adapt non-CondCore clients } +/** void cond::Utilities::initializeForDbConnection(){ if(!m_dbConnection){ m_dbConnection = new cond::DbConnection(); @@ -269,6 +225,7 @@ cond::DbSession cond::Utilities::openDbSession( const std::string& connectionPar std::string connectionString = getOptionValue( connectionParameterName ); return newDbSession( connectionString, readOnly ); } +**/ std::string cond::Utilities::getValueIfExists(const std::string& fullName){ std::string val(""); diff --git a/CondFormats/Common/BuildFile.xml b/CondFormats/Common/BuildFile.xml index a412821acae1d..dbeed8c62f51f 100644 --- a/CondFormats/Common/BuildFile.xml +++ b/CondFormats/Common/BuildFile.xml @@ -3,10 +3,10 @@ + - diff --git a/CondFormats/Common/interface/IOVElement.h b/CondFormats/Common/interface/IOVElement.h deleted file mode 100644 index e1de14446efd3..0000000000000 --- a/CondFormats/Common/interface/IOVElement.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef Cond_IOVElement_h -#define Cond_IOVElement_h - -#include "CondFormats/Common/interface/Time.h" -#include "CondCore/ORA/interface/OId.h" -#include - -namespace cond { - - /** Element of an IOV Sequence - include the since time, token to the wrapper - */ - class IOVElement { - public: - IOVElement(): - m_sinceTime(0), - m_wrapper(""), - m_oid(){} - - explicit IOVElement(cond::Time_t it) : - m_sinceTime(it), - m_wrapper(""), - m_oid(){} - - IOVElement(cond::Time_t it, - std::string const& itoken): - m_sinceTime(it), - m_wrapper(""), - m_oid(){ - m_oid.fromString( itoken ); - } - - cond::Time_t sinceTime() const {return m_sinceTime;} - - std::string token() const { - return m_oid.toString(); - } - - bool operator==(IOVElement const & rh) const { - return sinceTime()==rh.sinceTime() - && token()==rh.token(); - } - - void swapToken( ora::ITokenParser& parser ) const { - if( !m_wrapper.empty() ){ - const_cast(this)->m_oid = parser.parse( m_wrapper ); - const_cast(this)->m_wrapper.clear(); - } - } - - void swapOId( ora::ITokenWriter& writer ) const { - if( !m_oid.isInvalid() ){ - const_cast(this)->m_wrapper = writer.write( m_oid ); - } - } - - private: - cond::Time_t m_sinceTime; - std::string m_wrapper; - ora::OId m_oid; -}; - - -} // ns cond - - -#endif diff --git a/CondFormats/Common/interface/IOVKeysDescription.h b/CondFormats/Common/interface/IOVKeysDescription.h index 909adc470f067..02cb190f2da17 100644 --- a/CondFormats/Common/interface/IOVKeysDescription.h +++ b/CondFormats/Common/interface/IOVKeysDescription.h @@ -1,8 +1,7 @@ #ifndef Cond_IOVKeysDescription_h #define Cond_IOVKeysDescription_h -#include "CondFormats/Serialization/interface/Serializable.h" - +#include "CondFormats/Common/interface/IOVDescription.h" #include "CondFormats/Common/interface/SmallWORMDict.h" #include diff --git a/CondFormats/Common/interface/IOVSequence.h b/CondFormats/Common/interface/IOVSequence.h deleted file mode 100644 index d8f7bc9066786..0000000000000 --- a/CondFormats/Common/interface/IOVSequence.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef Cond_IOVSequence_h -#define Cond_IOVSequence_h - -#include "CondFormats/Common/interface/UpdateStamp.h" -#include "CondFormats/Common/interface/IOVElement.h" -#include "CondFormats/Common/interface/Time.h" -#include "CondFormats/Common/interface/IOVProvenance.h" -#include "CondFormats/Common/interface/IOVDescription.h" -#include "CondFormats/Common/interface/IOVUserMetaData.h" - -#include "CondCore/ORA/interface/QueryableVector.h" - -#include -#include -#include - -namespace cond { - - /** a time order sequence of interval-of-validity - The time associated to each interval is the end-validity (till time) - the end of each interval is the begin of the next - it is a UpdateStamp by mixin (I'll regret..) - */ - class IOVSequence : public UpdateStamp{ - public: - typedef cond::IOVElement Item; - typedef ora::QueryableVector Container; - typedef Container::iterator iterator; - typedef Container::const_iterator const_iterator; - enum ScopeType { Unknown=-1, Obsolete, Tag, TagInGT, ChildTag, ChildTagInGT }; - - IOVSequence(); - - // the real default constructor... - explicit IOVSequence( cond::TimeType ttype ); - - // constructor for the editor - IOVSequence(int type, cond::Time_t till, std::string const& imetadata); - - ~IOVSequence(); - - IOVSequence(IOVSequence const & rh); - IOVSequence & operator=(IOVSequence const & rh); - - // append a new item, return position of last inserted entry - size_t add(cond::Time_t time, std::string const & token, std::string const& payloadClassName ); - - // remove last entry, return position of last entry still valid - size_t truncate(); - - // find IOV for which time is valid (this is not STANDARD std::find!) - const_iterator find(cond::Time_t time) const; - - // find IOV with a given since (this is not STANDARD std::find!) - const_iterator findSince(cond::Time_t time) const; - - // true if an iov with since==time already exists - bool exist(cond::Time_t time) const; - - cond::TimeType timeType() const { return cond::timeTypeSpecs[m_timetype].type;} - - // FIXME shall we cache it? - cond::Time_t firstSince() const { return iovs().front().sinceTime();} - - cond::Time_t lastTill() const { return m_lastTill;} - - void updateLastTill(cond::Time_t till) { m_lastTill=till;} - - void updateMetadata( const std::string& metadata, bool append=true ); - - void setScope( ScopeType type ) { m_scope = type;} - - public: - Container const & iovs() const; - - // if true the "sorted" sequence is not guaranted to be the same as in previous version - bool notOrdered() const { return m_notOrdered;} - - std::string const & metadata() const { return m_metadata;} - - std::set const& payloadClasses() const { return m_payloadClasses; } - - ScopeType scope() const { return m_scope;} - - void loadAll() const; - - public: - - // the real persistent container... - Container & piovs() { - m_iovs.load(); - return m_iovs; - } - Container const & piovs() const { - m_iovs.load(); - return m_iovs; - } - - void swapTokens( ora::ITokenParser& parser ) const; - void swapOIds( ora::ITokenWriter& writer ) const; - - private: - - // iovs is not in order: take action! - void disorder(); - - // sort the container in m_sorted - Container const & sortMe() const; - - private: - - Container m_iovs; - int m_timetype; - cond::Time_t m_lastTill; - bool m_notOrdered; - std::string m_metadata; // FIXME not used??? - std::set m_payloadClasses; - ScopeType m_scope; - - mutable Container * m_sorted; - -}; - -}//ns cond -#endif diff --git a/CondFormats/Common/interface/SequenceState.h b/CondFormats/Common/interface/SequenceState.h deleted file mode 100644 index c807ae6c6b399..0000000000000 --- a/CondFormats/Common/interface/SequenceState.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef Cond_SequenceState_h -#define Cond_SequenceState_h - -#include "CondFormats/Common/interface/Time.h" -#include - -namespace cond { - - class IOVSequence; - - /** capture the state of a IOV sequence at a given time - */ - class SequenceState { - public: - ~SequenceState(); - SequenceState(); - explicit SequenceState(IOVSequence const & seq); - - unsigned int size() const { return m_size; } - - int revision() const { return m_revision;} - - cond::Time_t timestamp() const { return m_timestamp;} - - std::string const & comment() const { return m_comment;} - - - private: - - unsigned int m_size; - int m_revision; - cond::Time_t m_timestamp; - std::string m_comment; - - }; - -} - -#endif diff --git a/CondFormats/Common/interface/UpdateStamp.h b/CondFormats/Common/interface/UpdateStamp.h deleted file mode 100644 index 896866a5f57a8..0000000000000 --- a/CondFormats/Common/interface/UpdateStamp.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef Cond_UpdateStamp_h -#define Cond_UpdateStamp_h - -#include "CondFormats/Serialization/interface/Serializable.h" - -#include "CondFormats/Common/interface/Time.h" -#include - - -// Unit test class for UpdateStamp -namespace { - class TestUpdateStamp; -} - -namespace cond { - - /** class to "stamp" a new version of an updateble persistent object - it includes a timestamp, a sequential revision number and a comment - no history in mantained at the moment - */ - class UpdateStamp { - friend class ::TestUpdateStamp; - - public: - // constrcutor creates and invalid stamp - UpdateStamp(); - - UpdateStamp(UpdateStamp const & rhs); - - virtual ~UpdateStamp(); - - // stamp and return current revision number; - int stamp( std::string const & icomment, bool append=false); - - int revision() const { return m_revision;} - - cond::Time_t timestamp() const { return m_timestamp;} - - std::string const & comment() const { return m_comment;} - - private: - - int m_revision; - cond::Time_t m_timestamp; - std::string m_comment; - - COND_SERIALIZABLE; -}; - -} // nc cond - -#endif diff --git a/CondFormats/Common/src/IOVSequence.cc b/CondFormats/Common/src/IOVSequence.cc deleted file mode 100644 index 273bb95cafcf6..0000000000000 --- a/CondFormats/Common/src/IOVSequence.cc +++ /dev/null @@ -1,165 +0,0 @@ -#include "CondFormats/Common/interface/IOVSequence.h" -#include "CondFormats/Common/interface/Time.h" -#include -#include - -namespace cond { - - IOVSequence::IOVSequence() : - m_iovs(), - m_timetype(-1), - m_lastTill(0), - m_notOrdered(false), - m_metadata(""), - m_payloadClasses(), - m_scope( Unknown ), - m_sorted(0) {} - - IOVSequence::IOVSequence( cond::TimeType ttype ) : - m_iovs(), - m_timetype(ttype), - m_lastTill(timeTypeSpecs[ttype].endValue), - m_notOrdered(false), - m_metadata(" "), - m_payloadClasses(), - m_scope( Unknown ), - m_sorted(0) {} - - IOVSequence::IOVSequence(int ttype, - cond::Time_t till, - std::string const& imetadata) : - m_iovs(), - m_timetype(ttype), - m_lastTill(till), - m_notOrdered(false), - m_metadata(imetadata), - m_payloadClasses(), - m_scope( Unknown ), - m_sorted(0) {} - - IOVSequence::~IOVSequence(){ - delete m_sorted; - } - - IOVSequence::IOVSequence(IOVSequence const & rh) : - UpdateStamp(rh), - m_iovs(rh.m_iovs), - m_timetype(rh.m_timetype), - m_lastTill(rh.m_lastTill), - m_notOrdered(rh.m_notOrdered), - m_metadata(rh.m_metadata), - m_payloadClasses(rh.m_payloadClasses), - m_scope( rh.m_scope ), - m_sorted(0) {} - - IOVSequence & IOVSequence::operator=(IOVSequence const & rh) { - delete m_sorted; m_sorted=0; - - m_iovs = rh.m_iovs; - m_timetype = rh.m_timetype; - m_lastTill=rh.m_lastTill; - m_notOrdered=rh.m_notOrdered; - m_metadata = rh.m_metadata; - m_payloadClasses = rh.m_payloadClasses; - m_scope = rh.m_scope; - return *this; - } - - - void IOVSequence::loadAll() const { - // m_provenance.get(); - // m_description.get(); - // m_userMetadata.get(); - m_iovs.load(); - } - - IOVSequence::Container const & IOVSequence::iovs() const { - if (m_sorted) return *m_sorted; - if (m_notOrdered) return sortMe(); - return m_iovs; - } - - IOVSequence::Container const & IOVSequence::sortMe() const { - m_iovs.load(); - delete m_sorted; // shall not be necessary; - Container * local = new Container(m_iovs); - std::sort(local->begin(), local->end(), boost::bind(std::less(), - boost::bind(&Item::sinceTime,_1), - boost::bind(&Item::sinceTime,_2) - ) ); - m_sorted = local; - return *m_sorted; - } - - - size_t IOVSequence::add(cond::Time_t time, - std::string const & token, - std::string const & payloadClassName ) { - if (!piovs().empty() && ( m_notOrdered || timelastTill()) return iovs().end(); - IOVSequence::const_iterator p = std::upper_bound(iovs().begin(),iovs().end(),Item(time), - boost::bind(std::less(), - boost::bind(&Item::sinceTime,_1), - boost::bind(&Item::sinceTime,_2) - ) - ); - return (p!=iovs().begin()) ? p-1 : iovs().end(); - } - - - IOVSequence::const_iterator IOVSequence::findSince(cond::Time_t time) const { - IOVSequence::const_iterator p = find(time); - return (p!=iovs().end() && (*p).sinceTime()==time) ? p : iovs().end(); - } - - bool IOVSequence::exist(cond::Time_t time) const { - return findSince(time)!=iovs().end(); - } - - void IOVSequence::updateMetadata( const std::string& metadata, - bool append ){ - std::string sep(". "); - if( !metadata.empty() ){ - if (append && !m_metadata.empty()) { - m_metadata += sep + metadata; - } - else m_metadata = metadata; - } - } - - void IOVSequence::disorder() { - m_notOrdered=true; - delete m_sorted; m_sorted=0; - } - - void IOVSequence::swapTokens( ora::ITokenParser& parser ) const { - for( IOVSequence::const_iterator iT = m_iovs.begin(); - iT != m_iovs.end(); ++iT ){ - iT->swapToken( parser ); - // adding the classname 'by hand' - std::string className = parser.className( iT->token() ); - const_cast(this)->m_payloadClasses.insert( className ); - } - } - - void IOVSequence::swapOIds( ora::ITokenWriter& writer ) const { - for( IOVSequence::const_iterator iT = m_iovs.begin(); - iT != m_iovs.end(); ++iT ){ - iT->swapOId( writer ); - } - } - -} - diff --git a/CondFormats/Common/src/SequenceState.cc b/CondFormats/Common/src/SequenceState.cc deleted file mode 100644 index e877115f92207..0000000000000 --- a/CondFormats/Common/src/SequenceState.cc +++ /dev/null @@ -1,16 +0,0 @@ -#include "CondFormats/Common/interface/SequenceState.h" -#include "CondFormats/Common/interface/IOVSequence.h" - -namespace cond { - - SequenceState::~SequenceState(){} - - SequenceState::SequenceState() : - m_size(0), m_revision(-1), m_timestamp(0), m_comment("not stamped"){} - - SequenceState::SequenceState(IOVSequence const & seq) : - m_size(seq.piovs().size()), m_revision(seq.revision()), - m_timestamp(seq.timestamp()), - m_comment(seq.comment()){} - -} diff --git a/CondFormats/Common/src/UpdateStamp.cc b/CondFormats/Common/src/UpdateStamp.cc deleted file mode 100644 index 4abf546ec0dde..0000000000000 --- a/CondFormats/Common/src/UpdateStamp.cc +++ /dev/null @@ -1,30 +0,0 @@ -#include "CondFormats/Common/interface/UpdateStamp.h" -#include "CondFormats/Common/interface/TimeConversions.h" - -namespace { - const std::string sep(". "); -} - -namespace cond { - - UpdateStamp::UpdateStamp() : - m_revision(-1), m_timestamp(0), m_comment("not stamped"){} - - UpdateStamp::UpdateStamp(UpdateStamp const & rhs) { - m_revision = rhs.m_revision; - m_timestamp = rhs.m_timestamp; - m_comment = rhs.m_comment; - } - - UpdateStamp::~UpdateStamp(){} - - // stamp and return current revision number; - int UpdateStamp::stamp(std::string const & icomment, bool append) { - m_revision++; - m_timestamp = cond::time::now(); - if (append && !icomment.empty()) m_comment += sep + icomment; - else m_comment = icomment; - return m_revision; - } - -} diff --git a/CondFormats/Common/src/classes_def.xml b/CondFormats/Common/src/classes_def.xml index d10a91c1d6d69..ba5ad159050e4 100644 --- a/CondFormats/Common/src/classes_def.xml +++ b/CondFormats/Common/src/classes_def.xml @@ -1,29 +1,9 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/CondFormats/Common/src/headers.h b/CondFormats/Common/src/headers.h index 4ef7032ea545e..79df8ad9bc923 100644 --- a/CondFormats/Common/src/headers.h +++ b/CondFormats/Common/src/headers.h @@ -1,4 +1,3 @@ -#include "CondFormats/Common/interface/IOVSequence.h" #include "CondFormats/Common/interface/GenericSummary.h" #include "CondFormats/Common/interface/FileBlob.h" #include "CondFormats/Common/interface/FileBlobCollection.h" @@ -6,6 +5,8 @@ #include "CondFormats/Common/interface/BaseKeyed.h" #include "CondFormats/Common/interface/IOVKeysDescription.h" +#include "CondFormats/Common/interface/IOVProvenance.h" +#include "CondFormats/Common/interface/IOVUserMetaData.h" #include "CondFormats/Common/interface/ConfObject.h" #include "CondFormats/Common/interface/DropBoxMetadata.h" diff --git a/CondFormats/Common/test/BuildFile.xml b/CondFormats/Common/test/BuildFile.xml index f78a11ebca799..6215c77da8c1d 100644 --- a/CondFormats/Common/test/BuildFile.xml +++ b/CondFormats/Common/test/BuildFile.xml @@ -1,12 +1,8 @@ - - - - @@ -15,7 +11,6 @@ - diff --git a/CondFormats/Common/test/ProduceDropBoxMetadata.py b/CondFormats/Common/test/ProduceDropBoxMetadata.py index b3afc8fc40160..d42827fd7634a 100644 --- a/CondFormats/Common/test/ProduceDropBoxMetadata.py +++ b/CondFormats/Common/test/ProduceDropBoxMetadata.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms process = cms.Process("myprocess") -process.load("CondCore.DBCommon.CondDBCommon_cfi") +process.load("CondCore.CondDB.CondDB_cfi") process.CondDBCommon.connect = 'sqlite_file:DropBoxMetadata.db' @@ -87,11 +87,11 @@ process.p = cms.Path(process.mywriter) -from CondCore.DBCommon.CondDBCommon_cfi import CondDBCommon -CondDBCommon.connect = "sqlite_file:DropBoxMetadata.db" +from CondCore.CondDB.CondDB_cfi import CondDB +CondDB.connect = "sqlite_file:DropBoxMetadata.db" process.PoolDBOutputService = cms.Service("PoolDBOutputService", - CondDBCommon, + CondDB, toPut = cms.VPSet(cms.PSet(record = cms.string('DropBoxMetadataRcd'), tag = cms.string('DropBoxMetadata'), timetype = cms.untracked.string('runnumber') diff --git a/CondFormats/Common/test/oldrunPayloadTest b/CondFormats/Common/test/oldrunPayloadTest index 1c5295296d136..b94d717f22971 100755 --- a/CondFormats/Common/test/oldrunPayloadTest +++ b/CondFormats/Common/test/oldrunPayloadTest @@ -20,7 +20,6 @@ sed -i "s/THEHEADER/$3/g" $1_test.cc echo "" > bfile echo "" >> bfile -echo "" >> bfile echo "" >> bfile echo "" >> bfile echo "" >> bfile diff --git a/CondFormats/Common/test/runAllPayloadsTest b/CondFormats/Common/test/runAllPayloadsTest index 5a2ef6d4a5952..a2bc86a41f647 100755 --- a/CondFormats/Common/test/runAllPayloadsTest +++ b/CondFormats/Common/test/runAllPayloadsTest @@ -20,7 +20,6 @@ sed -i "s/THECLASS/$class/g" ${cname}_test.cc sed -i "s/THEPACKAGE/$1/g" ${cname}_test.cc echo "" > bfile echo "" >> bfile -echo "" >> bfile echo "" >> bfile mv bfile BuildFile scramv1 b diff --git a/CondFormats/Common/test/runPayloadTest b/CondFormats/Common/test/runPayloadTest index df63f2380021a..6c86b076a01b0 100755 --- a/CondFormats/Common/test/runPayloadTest +++ b/CondFormats/Common/test/runPayloadTest @@ -22,7 +22,6 @@ sed -i "s/THEHEADER/$3/g" ${cname}_test.cc echo "" > bfile echo "" >> bfile -echo "" >> bfile echo "" >> bfile mv bfile BuildFile diff --git a/CondFormats/Common/test/testPayloadIO.cc b/CondFormats/Common/test/testPayloadIO.cc deleted file mode 100644 index dfbcf33111b76..0000000000000 --- a/CondFormats/Common/test/testPayloadIO.cc +++ /dev/null @@ -1,110 +0,0 @@ -// -// test Payload I/O -// -// requires a few sed.... - -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/TableDescription.h" -#include "CoralBase/AttributeSpecification.h" -#include "DataSvc/Ref.h" -#include - -#include - - -#ifdef ALLCLASSES -#include "CondFormats/THEPACKAGE/src/classes.h" -#else -#include "CondFormats/THEPACKAGE/interface/THEHEADER.h" -#endif - -typedef THECLASS Payload; - - - -int main(int argc, char** ) { -try{ - - // this is the correct container name following cms rules (container name = C++ type name) - // std::string className = cond::classNameForTypeId(typeid(THECLASS)); - - // for this test we use the class name THECLASS as typed by the user including space, typedefs etc - // this makes further mapping query easier at script level.... - std::string className("THECLASS"); - - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - - unsigned int nobjects=10; - std::vector payTok; - - - //write.... - { - cond::DbConnection conn; - conn.configure( cond::CmsDefaults ); - cond::DbSession session = conn.createSession(); - session.open("sqlite_file:test.db"); - - cond::DbScopedTransaction tr(session); - tr.start(false); - - unsigned int iw; - for (iw = 0; iw < nobjects; ++iw ) { - boost::shared_ptr payload(new Payload); - std::string pToken = session.storeObject(payload.get(),className); - payTok.push_back(pToken); - } - - tr.commit(); - if (payTok.size()!=nobjects) - throw std::string("not all object written!"); - - } - - //read.... - { - cond::DbConnection conn; - conn.configure( cond::CmsDefaults ); - cond::DbSession session = conn.createSession(); - session.open("sqlite_file:test.db"); - - cond::DbScopedTransaction tr(session); - tr.start(true); - - unsigned int ir; - for (ir = 0; ir < payTok.size(); ++ir ) { - boost::shared_ptr payload = session.getTypedObject(payTok[ir]); - Payload const & p = *payload; - } - - if (ir!=nobjects) - throw std::string("not all object read!"); - - tr.commit(); - - } - - - - //read - - - - } catch (const std::exception& e){ - std::cout << "ERROR: " << e.what() << std::endl; - throw; - } catch (const std::string& e){ - std::cout << "ERROR: " << e << std::endl; - throw; - } - - return 0; -} - diff --git a/CondFormats/Common/test/testSerializationCommon.cpp b/CondFormats/Common/test/testSerializationCommon.cpp index 1206ed96af2b8..a02465c2d6e2c 100644 --- a/CondFormats/Common/test/testSerializationCommon.cpp +++ b/CondFormats/Common/test/testSerializationCommon.cpp @@ -12,18 +12,11 @@ int main() testSerialization(); testSerialization(); testSerialization(); - //testSerialization(); not used in the future testSerialization(); testSerialization(); - //testSerialization(); not used in the future testSerialization(); testSerialization(); - //testSerialization(); abstract - testSerialization(); testSerialization(); - //testSerialization(); not used in the future - //testSerialization>(); not used in the future - //testSerialization>(); not used in the future testSerialization>(); //testSerialization, DropBoxMetadata::Parameters>>(); no const-key std::map template (we could provide it, but it is equivalent to a non-const key std::map, and looks unused/should be unused) testSerialization>(); @@ -32,7 +25,6 @@ int main() testSerialization>(); testSerialization, DropBoxMetadata::Parameters>>(); testSerialization>(); - //testSerialization>(); not used in the future return 0; } diff --git a/CondFormats/DTObjects/BuildFile.xml b/CondFormats/DTObjects/BuildFile.xml index fd479deead662..8878df8ad93e5 100644 --- a/CondFormats/DTObjects/BuildFile.xml +++ b/CondFormats/DTObjects/BuildFile.xml @@ -3,7 +3,6 @@ - diff --git a/CondFormats/DTObjects/test/BuildFile.xml b/CondFormats/DTObjects/test/BuildFile.xml index 0bac1c5e8a427..92298f994857e 100644 --- a/CondFormats/DTObjects/test/BuildFile.xml +++ b/CondFormats/DTObjects/test/BuildFile.xml @@ -1,10 +1,7 @@ - - - diff --git a/CondFormats/EcalObjects/test/BuildFile.xml b/CondFormats/EcalObjects/test/BuildFile.xml index 09609669b0bea..7c0e6dd21c2f8 100644 --- a/CondFormats/EcalObjects/test/BuildFile.xml +++ b/CondFormats/EcalObjects/test/BuildFile.xml @@ -3,10 +3,7 @@ - - - diff --git a/CondFormats/MFObjects/BuildFile.xml b/CondFormats/MFObjects/BuildFile.xml index 613293980e054..0049720db2e73 100644 --- a/CondFormats/MFObjects/BuildFile.xml +++ b/CondFormats/MFObjects/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/CondFormats/MFObjects/test/BuildFile.xml b/CondFormats/MFObjects/test/BuildFile.xml index 24728f0b3293a..76888cca3fee4 100644 --- a/CondFormats/MFObjects/test/BuildFile.xml +++ b/CondFormats/MFObjects/test/BuildFile.xml @@ -1,10 +1,7 @@ - - - diff --git a/CondFormats/PhysicsToolsObjects/test/BuildFile.xml b/CondFormats/PhysicsToolsObjects/test/BuildFile.xml index 046900bfd3c2c..6dda84e755684 100644 --- a/CondFormats/PhysicsToolsObjects/test/BuildFile.xml +++ b/CondFormats/PhysicsToolsObjects/test/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/CondTools/DT/interface/DTHVStatusHandler.h b/CondTools/DT/interface/DTHVStatusHandler.h index 3c0d6dd17d6e3..353eec395fcaa 100644 --- a/CondTools/DT/interface/DTHVStatusHandler.h +++ b/CondTools/DT/interface/DTHVStatusHandler.h @@ -20,7 +20,7 @@ // Collaborating Class Declarations -- //------------------------------------ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "CondFormats/DTObjects/interface/DTHVStatus.h" #include @@ -131,12 +131,9 @@ class DTHVStatusHandler: public popcon::PopConSourceHandler { long long int lastStamp; int maxPayload; - cond::DbConnection omds_conn; - cond::DbConnection util_conn; - cond::DbConnection buff_conn; - cond::DbSession omds_session; - cond::DbSession util_session; - cond::DbSession buff_session; + cond::persistency::Session omds_session; + cond::persistency::Session util_session; + cond::persistency::Session buff_session; std::string mapVersion; std::string splitVersion; diff --git a/CondTools/DT/interface/DTLVStatusHandler.h b/CondTools/DT/interface/DTLVStatusHandler.h index fa834eef5d55a..549858cdfad66 100644 --- a/CondTools/DT/interface/DTLVStatusHandler.h +++ b/CondTools/DT/interface/DTLVStatusHandler.h @@ -20,7 +20,7 @@ // Collaborating Class Declarations -- //------------------------------------ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "CondFormats/DTObjects/interface/DTLVStatus.h" #include @@ -60,10 +60,8 @@ class DTLVStatusHandler: public popcon::PopConSourceHandler { std::string bufferConnect; DTLVStatus* ccbStatus; - cond::DbConnection omds_conn; - cond::DbConnection buff_conn; - cond::DbSession omds_session; - cond::DbSession buff_session; + cond::persistency::Session omds_session; + cond::persistency::Session buff_session; }; diff --git a/CondTools/DT/plugins/BuildFile.xml b/CondTools/DT/plugins/BuildFile.xml index 61fed8e8a4471..677c3bb2f90e8 100644 --- a/CondTools/DT/plugins/BuildFile.xml +++ b/CondTools/DT/plugins/BuildFile.xml @@ -1,8 +1,5 @@ - - - diff --git a/CondTools/DT/src/DTHVStatusHandler.cc b/CondTools/DT/src/DTHVStatusHandler.cc index 8c4c3afcf2ff0..eaf84219aba53 100644 --- a/CondTools/DT/src/DTHVStatusHandler.cc +++ b/CondTools/DT/src/DTHVStatusHandler.cc @@ -18,8 +18,7 @@ #include "CondTools/DT/interface/DTHVAbstractCheck.h" #include "CondFormats/DTObjects/interface/DTHVStatus.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "DataFormats/MuonDetId/interface/DTWireId.h" @@ -74,9 +73,6 @@ DTHVStatusHandler::DTHVStatusHandler( const edm::ParameterSet& ps ) : bwdTime( ps.getParameter ( "bwdTime" ) ), fwdTime( ps.getParameter ( "fwdTime" ) ), minTime( ps.getParameter ( "minTime" ) ), - omds_conn(), - util_conn(), - buff_conn(), omds_session(), util_session(), buff_session(), @@ -104,38 +100,26 @@ void DTHVStatusHandler::getNewObjects() { // online DB connection - data std::cout << "configure omds DbConnection" << std::endl; + cond::persistency::ConnectionPool connection; // conn->configure( cond::CmsDefaults ); - omds_conn.configuration().setAuthenticationPath( onlineAuthentication ); - omds_conn.configure(); + connection.setAuthenticationPath( onlineAuthentication ); + connection.configure(); std::cout << "create omds DbSession" << std::endl; - omds_session = omds_conn.createSession(); - std::cout << "open omds session" << std::endl; - omds_session.open( onlineConnect ); + omds_session = connection.createSession( onlineConnect ); std::cout << "start omds transaction" << std::endl; omds_session.transaction().start(); std::cout << "" << std::endl; // online DB connection - util - std::cout << "configure util DbConnection" << std::endl; - // conn->configure( cond::CmsDefaults ); - util_conn.configuration().setAuthenticationPath( onlineAuthentication ); - util_conn.configure(); std::cout << "create util DbSession" << std::endl; - util_session = util_conn.createSession(); - std::cout << "open util session" << std::endl; - util_session.open( onlineConnect ); + util_session = connection.createSession( onlineConnect ); std::cout << "startutil transaction" << std::endl; util_session.transaction().start(); std::cout << "" << std::endl; // buffer DB connection - std::cout << "configure buffer DbConnection" << std::endl; - buff_conn.configuration().setAuthenticationPath( onlineAuthentication ); - buff_conn.configure(); std::cout << "create buffer DbSession" << std::endl; - buff_session = buff_conn.createSession(); - std::cout << "open buffer session" << std::endl; - buff_session.open( bufferConnect ); + buff_session = connection.createSession( bufferConnect ); std::cout << "start buffer transaction" << std::endl; buff_session.transaction().start(); diff --git a/CondTools/DT/src/DTLVStatusHandler.cc b/CondTools/DT/src/DTLVStatusHandler.cc index 10c705082d0a0..4b96dd5bf2712 100644 --- a/CondTools/DT/src/DTLVStatusHandler.cc +++ b/CondTools/DT/src/DTLVStatusHandler.cc @@ -16,7 +16,7 @@ #include "CondFormats/DTObjects/interface/DTLVStatus.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/ITable.h" @@ -46,8 +46,6 @@ DTLVStatusHandler::DTLVStatusHandler( const edm::ParameterSet& ps ): onlineAuthentication( ps.getParameter ( "onlineAuthentication" ) ), bufferConnect( ps.getParameter ( "bufferDB" ) ), - omds_conn(), - buff_conn(), omds_session(), buff_session() { std::cout << " PopCon application for DT DCS data (CCB status) export " @@ -67,25 +65,18 @@ void DTLVStatusHandler::getNewObjects() { // online DB connection std::cout << "configure omds DbConnection" << std::endl; - // conn->configure( cond::CmsDefaults ); - omds_conn.configuration().setAuthenticationPath( onlineAuthentication ); - omds_conn.configure(); + cond::persistency::ConnectionPool connection; + connection.setAuthenticationPath( onlineAuthentication ); + connection.configure(); std::cout << "create omds DbSession" << std::endl; - omds_session = omds_conn.createSession(); - std::cout << "open omds session" << std::endl; - omds_session.open( onlineConnect ); + omds_session = connection.createSession( onlineConnect ); std::cout << "start omds transaction" << std::endl; omds_session.transaction().start(); std::cout << "" << std::endl; // buffer DB connection - std::cout << "configure buffer DbConnection" << std::endl; - buff_conn.configuration().setAuthenticationPath( onlineAuthentication ); - buff_conn.configure(); std::cout << "create buffer DbSession" << std::endl; - cond::DbSession buff_session = buff_conn.createSession(); - std::cout << "open buffer session" << std::endl; - buff_session.open( bufferConnect ); + cond::persistency::Session buff_session = connection.createSession(bufferConnect); std::cout << "start buffer transaction" << std::endl; buff_session.transaction().start(); diff --git a/CondTools/DT/test/BuildFile.xml b/CondTools/DT/test/BuildFile.xml index 50525193e9d59..a5e62be822285 100644 --- a/CondTools/DT/test/BuildFile.xml +++ b/CondTools/DT/test/BuildFile.xml @@ -1,7 +1,6 @@ - @@ -14,6 +13,5 @@ - diff --git a/CondTools/Ecal/BuildFile.xml b/CondTools/Ecal/BuildFile.xml index 0440b7d22611a..e5322c664472b 100644 --- a/CondTools/Ecal/BuildFile.xml +++ b/CondTools/Ecal/BuildFile.xml @@ -1,4 +1,3 @@ - diff --git a/CondTools/Ecal/interface/ESDBCopy.h b/CondTools/Ecal/interface/ESDBCopy.h index 531730aef4da8..e87105146bb75 100644 --- a/CondTools/Ecal/interface/ESDBCopy.h +++ b/CondTools/Ecal/interface/ESDBCopy.h @@ -2,7 +2,7 @@ #define ESDBCOPY_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/interface/EcalCondHeader.h b/CondTools/Ecal/interface/EcalCondHeader.h index d08f567a51c98..03c86a1545b2e 100644 --- a/CondTools/Ecal/interface/EcalCondHeader.h +++ b/CondTools/Ecal/interface/EcalCondHeader.h @@ -11,7 +11,7 @@ * $Id: EcalCondHeader.h,v 1.2 2008/10/22 08:41:31 argiro Exp $ */ -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include struct EcalCondHeader { diff --git a/CondTools/Ecal/interface/EcalDBCopy.h b/CondTools/Ecal/interface/EcalDBCopy.h index 88925d1af5914..d378a0091f5c7 100644 --- a/CondTools/Ecal/interface/EcalDBCopy.h +++ b/CondTools/Ecal/interface/EcalDBCopy.h @@ -2,7 +2,7 @@ #define ECALDBCOPY_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/interface/EcalGetLaserData.h b/CondTools/Ecal/interface/EcalGetLaserData.h index 3b96b3f113421..6b4330e7860aa 100644 --- a/CondTools/Ecal/interface/EcalGetLaserData.h +++ b/CondTools/Ecal/interface/EcalGetLaserData.h @@ -2,7 +2,7 @@ #define ECALGETLASERDATA_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/interface/EcalTestDevDB.h b/CondTools/Ecal/interface/EcalTestDevDB.h index d9a78dc346089..4fe71d3393ae2 100644 --- a/CondTools/Ecal/interface/EcalTestDevDB.h +++ b/CondTools/Ecal/interface/EcalTestDevDB.h @@ -2,7 +2,7 @@ #define ECALTESTDEVDB_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc b/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc index 4288be6e30a71..1f84cd3d3bb40 100644 --- a/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc +++ b/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc @@ -7,7 +7,7 @@ */ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerHandler.h" #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerXMLTranslator.h" #include "CondTools/Ecal/interface/DOMHelperFunctions.h" diff --git a/CondTools/Ecal/plugins/StoreEcalCondition.cc b/CondTools/Ecal/plugins/StoreEcalCondition.cc index bc33ed780ee20..38cc3fe572a4e 100644 --- a/CondTools/Ecal/plugins/StoreEcalCondition.cc +++ b/CondTools/Ecal/plugins/StoreEcalCondition.cc @@ -3,7 +3,7 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" diff --git a/CondTools/Ecal/src/EcalLaserHandler.cc b/CondTools/Ecal/src/EcalLaserHandler.cc index cc16f31fed8d2..2fa35339870be 100644 --- a/CondTools/Ecal/src/EcalLaserHandler.cc +++ b/CondTools/Ecal/src/EcalLaserHandler.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc b/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc index 287648a64ce2f..69d7139eee959 100644 --- a/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc +++ b/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc b/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc index 65cf05a893ba8..ec97338ea9054 100644 --- a/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc +++ b/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc b/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc index 6dc70e88cd650..2339e43688169 100644 --- a/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc +++ b/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalTPGPedfromFile.cc b/CondTools/Ecal/src/EcalTPGPedfromFile.cc index 85e6ef8dc6ccb..ddf26bed56d02 100644 --- a/CondTools/Ecal/src/EcalTPGPedfromFile.cc +++ b/CondTools/Ecal/src/EcalTPGPedfromFile.cc @@ -3,7 +3,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Hcal/BuildFile.xml b/CondTools/Hcal/BuildFile.xml index 979f4b2c29897..e6871c0c7312a 100644 --- a/CondTools/Hcal/BuildFile.xml +++ b/CondTools/Hcal/BuildFile.xml @@ -8,10 +8,7 @@ - - - diff --git a/CondTools/Hcal/bin/BuildFile.xml b/CondTools/Hcal/bin/BuildFile.xml index 7e39d36cb8c12..b06ede29109e0 100644 --- a/CondTools/Hcal/bin/BuildFile.xml +++ b/CondTools/Hcal/bin/BuildFile.xml @@ -6,9 +6,6 @@ - - - diff --git a/CondTools/Hcal/plugins/BuildFile.xml b/CondTools/Hcal/plugins/BuildFile.xml index 0590b90ef04e0..bd27e846c1078 100644 --- a/CondTools/Hcal/plugins/BuildFile.xml +++ b/CondTools/Hcal/plugins/BuildFile.xml @@ -4,11 +4,8 @@ - - - diff --git a/CondTools/L1Trigger/BuildFile.xml b/CondTools/L1Trigger/BuildFile.xml index 1ff6867032899..a66917175bb09 100644 --- a/CondTools/L1Trigger/BuildFile.xml +++ b/CondTools/L1Trigger/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/CondTools/L1Trigger/interface/DataManager.h b/CondTools/L1Trigger/interface/DataManager.h index 826f5ae1d4af4..600c0d6220e83 100644 --- a/CondTools/L1Trigger/interface/DataManager.h +++ b/CondTools/L1Trigger/interface/DataManager.h @@ -2,8 +2,7 @@ #define CondTools_L1Trigger_DataManager_h #include "FWCore/Framework/interface/DataKeyTags.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include @@ -30,18 +29,18 @@ class DataManager bool isOMDS = false ); void setDebug( bool debug ) ; - cond::DbSession* dbSession() + cond::persistency::Session dbSession() { return session ; } - cond::DbConnection* dbConnection() - { return connection ; } protected: //Returns type object for provided type name - edm::eventsetup::TypeTag findType (const std::string & type) const; + edm::eventsetup::TypeTag findType (const std::string & type); // Database connection management - cond::DbSession * session; - cond::DbConnection * connection ; + cond::persistency::Session session; + +private: + bool debugFlag = false; }; } diff --git a/CondTools/L1Trigger/interface/Exception.h b/CondTools/L1Trigger/interface/Exception.h index 0aac07756937a..499cc5b8c0435 100644 --- a/CondTools/L1Trigger/interface/Exception.h +++ b/CondTools/L1Trigger/interface/Exception.h @@ -23,7 +23,7 @@ #include // user include files -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" // forward declarations diff --git a/CondTools/L1Trigger/interface/OMDSReader.h b/CondTools/L1Trigger/interface/OMDSReader.h index d4480c43e9c1c..f8cb95a7f8b19 100644 --- a/CondTools/L1Trigger/interface/OMDSReader.h +++ b/CondTools/L1Trigger/interface/OMDSReader.h @@ -118,7 +118,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // Assume data type of condition RHS is std::string const QueryResults basicQuery( @@ -130,7 +130,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // Assume data type of condition RHS is std::string @@ -143,7 +143,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // Assume data type of condition RHS is std::string const QueryResults basicQueryView( @@ -155,7 +155,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // For any data type of condition RHS. // Example usage, for an int key: @@ -170,7 +170,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // For any data type of condition RHS. // Example usage, for an int key: @@ -185,18 +185,18 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); template< class T > const QueryResults singleAttribute( const T& data ) const ; std::vector< std::string > columnNames( const std::string& schemaName, // for nominal schema, use "" - const std::string& tableName ) const ; + const std::string& tableName ); std::vector< std::string > columnNamesView( const std::string& schemaName, // for nominal schema, use "" - const std::string& viewName ) const ; + const std::string& viewName ); // ---------- static member functions -------------------- @@ -220,11 +220,12 @@ namespace l1t const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; coral::ITable& table = schema.tableHandle( tableName ) ; @@ -283,7 +284,7 @@ namespace l1t const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { std::vector< std::string > columnNames ; columnNames.push_back( columnName ) ; diff --git a/CondTools/L1Trigger/interface/WriterProxy.h b/CondTools/L1Trigger/interface/WriterProxy.h index 65a72b31e25b8..b4255b2d5de2e 100644 --- a/CondTools/L1Trigger/interface/WriterProxy.h +++ b/CondTools/L1Trigger/interface/WriterProxy.h @@ -8,8 +8,6 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -//#include "CondCore/DBCommon/interface/DbSession.h" -//#include "CondCore/DBCommon/interface/DbScopedTransaction.h" #include "CondTools/L1Trigger/interface/Exception.h" diff --git a/CondTools/L1Trigger/src/DataManager.cc b/CondTools/L1Trigger/src/DataManager.cc index d11b93340bb4b..26f7734ff4fdb 100644 --- a/CondTools/L1Trigger/src/DataManager.cc +++ b/CondTools/L1Trigger/src/DataManager.cc @@ -1,4 +1,5 @@ #include "CondTools/L1Trigger/interface/DataManager.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -10,8 +11,7 @@ namespace l1t { DataManager::DataManager() - : session( 0 ), - connection( 0 ) {} + : session( 0 ){} DataManager::DataManager (const std::string & connectString, const std::string & authenticationPath, @@ -25,36 +25,24 @@ namespace l1t const std::string & authenticationPath, bool isOMDS ) { - connection = new cond::DbConnection() ; setDebug( false ) ; + cond::persistency::ConnectionPool connection; + connection.setAuthenticationPath( authenticationPath ) ; + if( debugFlag ) connection.setMessageVerbosity( coral::Debug ); + else connection.setMessageVerbosity( coral::Error ) ; + connection.configure() ; - if( !isOMDS ) - { - connection->configuration().setConnectionSharing( true ) ; - connection->configuration().setReadOnlySessionOnUpdateConnections( - true ) ; - } - - connection->configuration().setAuthenticationPath( authenticationPath ) ; - connection->configure() ; - - session = new cond::DbSession( connection->createSession() ) ; - session->open( connectString, isOMDS ) ; + session = connection.createSession( connectString, isOMDS ); } DataManager::~DataManager () { // delete all in reverse direction - if( connection ) - connection->close() ; - if( session ) - session->close() ; + session.close() ; - delete connection ; - delete session ; } -edm::eventsetup::TypeTag DataManager::findType (const std::string & type) const +edm::eventsetup::TypeTag DataManager::findType (const std::string & type) { static edm::eventsetup::TypeTag defaultType; edm::eventsetup::TypeTag typeTag = edm::eventsetup::TypeTag::findType (type); @@ -69,13 +57,6 @@ edm::eventsetup::TypeTag DataManager::findType (const std::string & type) const void DataManager::setDebug( bool debug ) { - if( debug ) - { - connection->configuration().setMessageLevel( coral::Debug ) ; - } - else - { - connection->configuration().setMessageLevel( coral::Error ) ; - } + debugFlag = debug; } } diff --git a/CondTools/L1Trigger/src/DataWriter.cc b/CondTools/L1Trigger/src/DataWriter.cc index cb803ca2e6780..6a8653af8b361 100644 --- a/CondTools/L1Trigger/src/DataWriter.cc +++ b/CondTools/L1Trigger/src/DataWriter.cc @@ -2,7 +2,7 @@ #include "CondTools/L1Trigger/interface/DataWriter.h" #include "CondTools/L1Trigger/interface/Exception.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CondCore/CondDB/interface/Serialization.h" diff --git a/CondTools/L1Trigger/src/OMDSReader.cc b/CondTools/L1Trigger/src/OMDSReader.cc index 11208205cf35b..d2d6de0adbdaa 100644 --- a/CondTools/L1Trigger/src/OMDSReader.cc +++ b/CondTools/L1Trigger/src/OMDSReader.cc @@ -19,7 +19,6 @@ #include "CondTools/L1Trigger/interface/OMDSReader.h" #include "RelationalAccess/ITableDescription.h" #include "RelationalAccess/IColumn.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" // // constants, enums and typedefs @@ -43,7 +42,7 @@ namespace l1t const std::string& authenticationPath ) : DataManager( connectString, authenticationPath, true ) { - session->transaction().start( true ) ; + session.transaction().start( true ) ; } void @@ -51,7 +50,7 @@ namespace l1t const std::string& authenticationPath ) { DataManager::connect( connectString, authenticationPath, true ) ; - session->transaction().start( true ) ; + session.transaction().start( true ) ; } // OMDSReader::OMDSReader(const OMDSReader& rhs) @@ -90,11 +89,12 @@ OMDSReader::~OMDSReader() const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; coral::ITable& table = schema.tableHandle( tableName ) ; @@ -153,7 +153,7 @@ OMDSReader::~OMDSReader() const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { std::vector< std::string > columnNames ; columnNames.push_back( columnName ) ; @@ -164,11 +164,12 @@ OMDSReader::~OMDSReader() std::vector< std::string > OMDSReader::columnNames( const std::string& schemaName, - const std::string& tableName ) const + const std::string& tableName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; coral::ITable& table = schema.tableHandle( tableName ) ; const coral::ITableDescription& tableDesc = table.description() ; @@ -194,11 +195,12 @@ OMDSReader::~OMDSReader() const std::string& viewName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; // coral::IView& view = schema.viewHandle( viewName ) ; @@ -266,7 +268,7 @@ OMDSReader::~OMDSReader() const std::string& viewName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { std::vector< std::string > columnNames ; columnNames.push_back( columnName ) ; @@ -277,11 +279,12 @@ OMDSReader::~OMDSReader() std::vector< std::string > OMDSReader::columnNamesView( const std::string& schemaName, - const std::string& viewName ) const + const std::string& viewName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; std::set< std::string > views = schema.listViews (); std::vector< std::string > names ; diff --git a/CondTools/RPC/BuildFile.xml b/CondTools/RPC/BuildFile.xml index a1c30d78086a0..a345017172c37 100644 --- a/CondTools/RPC/BuildFile.xml +++ b/CondTools/RPC/BuildFile.xml @@ -2,10 +2,7 @@ - - - diff --git a/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h b/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h index 6dadfb2873b3f..d6237cc8c1d64 100644 --- a/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h +++ b/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h @@ -20,9 +20,7 @@ -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "RelationalAccess/ITable.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/IQuery.h" @@ -48,8 +46,7 @@ namespace popcon private: L1RPCHwConfig * disabledDevs; - cond::DbSession * session; - cond::DbConnection * connection ; + cond::persistency::Session session; std::string m_name; int m_dummy; int m_validate; diff --git a/CondTools/RPC/interface/RPCEMapSourceHandler.h b/CondTools/RPC/interface/RPCEMapSourceHandler.h index 117c17633d07f..5c4fe45b99f20 100644 --- a/CondTools/RPC/interface/RPCEMapSourceHandler.h +++ b/CondTools/RPC/interface/RPCEMapSourceHandler.h @@ -30,9 +30,7 @@ -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "RelationalAccess/ITable.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/IQuery.h" @@ -58,8 +56,7 @@ namespace popcon private: RPCEMap * eMap; - cond::DbSession * session; - cond::DbConnection * connection ; + cond::persistency::Session session; std::string m_name; int m_dummy; int m_validate; diff --git a/CondTools/RPC/plugins/BuildFile.xml b/CondTools/RPC/plugins/BuildFile.xml index a1bf179932b47..e7902be5488a3 100644 --- a/CondTools/RPC/plugins/BuildFile.xml +++ b/CondTools/RPC/plugins/BuildFile.xml @@ -1,8 +1,5 @@ - - - diff --git a/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc b/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc index b1bbad5a17eb9..6414ab6621a50 100644 --- a/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc +++ b/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc @@ -1,6 +1,7 @@ #include "CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "FWCore/ServiceRegistry/interface/Service.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" popcon::L1RPCHwConfigSourceHandler::L1RPCHwConfigSourceHandler(const edm::ParameterSet& ps): @@ -80,27 +81,23 @@ void popcon::L1RPCHwConfigSourceHandler::getNewObjects() void popcon::L1RPCHwConfigSourceHandler::ConnectOnlineDB(std::string connect, std::string authPath) { std::cout << "L1RPCHwConfigSourceHandler: connecting to " << connect << "..." << std::flush; - connection = new cond::DbConnection() ; + cond::persistency::ConnectionPool connection; // session->configuration().setAuthenticationMethod(cond::XML); - connection->configuration().setAuthenticationPath( authPath ) ; - connection->configure(); - session = new cond::DbSession(connection->createSession()); - session->open(connect,true) ; + connection.setAuthenticationPath( authPath ) ; + connection.configure(); + session = connection.createSession( connect,true ); std::cout << "Done." << std::endl; } void popcon::L1RPCHwConfigSourceHandler::DisconnectOnlineDB() { - connection->close() ; - delete connection ; - session->close(); - delete session ; + session.close(); } void popcon::L1RPCHwConfigSourceHandler::readHwConfig1() { - session->transaction().start( true ); - coral::ISchema& schema = session->nominalSchema(); + session.transaction().start( true ); + coral::ISchema& schema = session.nominalSchema(); std::string condition=""; coral::AttributeList conditionData; std::cout << std::endl <<"L1RPCHwConfigSourceHandler: start to build L1RPC Hw Config..." << std::flush << std::endl << std::endl; diff --git a/CondTools/RPC/src/RPCEMapSourceHandler.cc b/CondTools/RPC/src/RPCEMapSourceHandler.cc index a3f01fa5d9941..1636018b25bc3 100644 --- a/CondTools/RPC/src/RPCEMapSourceHandler.cc +++ b/CondTools/RPC/src/RPCEMapSourceHandler.cc @@ -1,6 +1,7 @@ #include "CondTools/RPC/interface/RPCEMapSourceHandler.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "FWCore/ServiceRegistry/interface/Service.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" popcon::RPCEMapSourceHandler::RPCEMapSourceHandler(const edm::ParameterSet& ps) : @@ -64,28 +65,23 @@ void popcon::RPCEMapSourceHandler::getNewObjects() void popcon::RPCEMapSourceHandler::ConnectOnlineDB(std::string connect, std::string authPath) { + cond::persistency::ConnectionPool connection; std::cout << "RPCEMapConfigSourceHandler: connecting to " << connect << "..." << std::flush; - connection = new cond::DbConnection() ; -// session->configuration().setAuthenticationMethod(cond::XML); - connection->configuration().setAuthenticationPath( authPath ) ; - connection->configure(); - session = new cond::DbSession(connection->createSession()); - session->open(connect,true) ; + connection.setAuthenticationPath( authPath ) ; + connection.configure(); + session = connection.createSession( connect,true ); std::cout << "Done." << std::endl; } void popcon::RPCEMapSourceHandler::DisconnectOnlineDB() { - connection->close() ; - delete connection ; - session->close(); - delete session ; + session.close(); } void popcon::RPCEMapSourceHandler::readEMap1() { - session->transaction().start( true ); - coral::ISchema& schema = session->nominalSchema(); + session.transaction().start( true ); + coral::ISchema& schema = session.nominalSchema(); std::string condition=""; coral::AttributeList conditionData; diff --git a/CondTools/RunInfo/BuildFile.xml b/CondTools/RunInfo/BuildFile.xml index ab36cdc2c9378..b440144a4391a 100644 --- a/CondTools/RunInfo/BuildFile.xml +++ b/CondTools/RunInfo/BuildFile.xml @@ -1,7 +1,4 @@ - - - diff --git a/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc b/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc index 650b92533fae0..db81641f1cb05 100644 --- a/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc +++ b/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc @@ -1,10 +1,9 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "CondFormats/Common/interface/TimeConversions.h" #include "CondTools/RunInfo/interface/FillInfoPopConSourceHandler.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbConnectionConfiguration.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "RelationalAccess/ISessionProxy.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/IQuery.h" #include "RelationalAccess/ICursor.h" @@ -75,20 +74,17 @@ void FillInfoPopConSourceHandler::getNewObjects() { } //retrieve the data from the relational database source - cond::DbConnection dbConnection; + cond::persistency::ConnectionPool connection; //configure the connection if( m_debug ) { - dbConnection.configuration().setMessageLevel( coral::Debug ); + connection.setMessageVerbosity( coral::Debug ); } else { - dbConnection.configuration().setMessageLevel( coral::Error ); + connection.setMessageVerbosity( coral::Error ); } - dbConnection.configuration().setPoolAutomaticCleanUp( false ); - dbConnection.configuration().setConnectionTimeOut( 0 ); - dbConnection.configuration().setAuthenticationPath( m_authpath ); - dbConnection.configure(); + connection.setAuthenticationPath( m_authpath ); + connection.configure(); //create a sessiom - cond::DbSession session = dbConnection.createSession(); - session.open( m_connectionString, true ); + cond::persistency::Session session = connection.createSession( m_connectionString, true ); //run the first query against the schema logging fill information coral::ISchema& runTimeLoggerSchema = session.nominalSchema(); //start the transaction against the fill logging schema @@ -283,7 +279,7 @@ void FillInfoPopConSourceHandler::getNewObjects() { continue; } //run the second and third query against the schema hosting detailed DIP information - coral::ISchema& beamCondSchema = session.schema( m_dipSchema ); + coral::ISchema& beamCondSchema = session.coralSession().schema( m_dipSchema ); //start the transaction against the DIP "deep" database backend schema session.transaction().start( true ); //prepare the WHERE clause for both queries @@ -408,8 +404,6 @@ void FillInfoPopConSourceHandler::getNewObjects() { session.transaction().commit(); //close the session session.close(); - //close the connection - dbConnection.close(); //store log information m_userTextLog = ss.str(); edm::LogInfo( m_name ) << "Transferring " << m_to_transfer.size() << " payload(s); from " << m_name << "::getNewObjects"; diff --git a/CondTools/RunInfo/src/L1TriggerScalerRead.cc b/CondTools/RunInfo/src/L1TriggerScalerRead.cc index 5f8f3531bd6e5..3974752bba101 100644 --- a/CondTools/RunInfo/src/L1TriggerScalerRead.cc +++ b/CondTools/RunInfo/src/L1TriggerScalerRead.cc @@ -15,7 +15,7 @@ #include "CoralBase/AttributeSpecification.h" //#include "SealBase/TimeInfo.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CoralBase/TimeStamp.h" diff --git a/CondTools/RunInfo/src/RunSummaryRead.cc b/CondTools/RunInfo/src/RunSummaryRead.cc index 0dc0be4562572..2ce15ac1ffcf1 100644 --- a/CondTools/RunInfo/src/RunSummaryRead.cc +++ b/CondTools/RunInfo/src/RunSummaryRead.cc @@ -15,7 +15,7 @@ #include "CoralBase/AttributeSpecification.h" //#include "SealBase/TimeInfo.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CoralBase/TimeStamp.h" diff --git a/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h b/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h index 7f0189ff45e6a..925ec0f80b660 100644 --- a/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h +++ b/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h @@ -6,8 +6,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" #include #include diff --git a/CondTools/SiStrip/plugins/BuildFile.xml b/CondTools/SiStrip/plugins/BuildFile.xml index e6db09fc799da..6ff926d8954f0 100644 --- a/CondTools/SiStrip/plugins/BuildFile.xml +++ b/CondTools/SiStrip/plugins/BuildFile.xml @@ -8,7 +8,6 @@ - diff --git a/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py b/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py index 83f8d25b76f69..48c2db1ba5174 100644 --- a/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py +++ b/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py @@ -1,12 +1,12 @@ import FWCore.ParameterSet.Config as cms -from CondCore.DBCommon.CondDBSetup_cfi import * +from CondCore.CondDB.CondDB_cfi import * +CondDB_prod = CondDB.clone( connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) print '# Conditions read from CMS_CONDITIONS via FrontierProd ' GlobalTag = cms.ESSource("PoolDBESSource", - CondDBSetup, - connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'), + CondDB_prod, globaltag = cms.string('UNSPECIFIED'), toGet = cms.VPSet( ), # hook to override or add single payloads ) diff --git a/DQM/L1TMonitor/src/L1TOMDSHelper.cc b/DQM/L1TMonitor/src/L1TOMDSHelper.cc index a610d51d28f55..12350a98c967e 100644 --- a/DQM/L1TMonitor/src/L1TOMDSHelper.cc +++ b/DQM/L1TMonitor/src/L1TOMDSHelper.cc @@ -29,30 +29,18 @@ bool L1TOMDSHelper::connect(string iOracleDB,string iPathCondDB,int &error){ error = NO_ERROR; // Initializing variables - bool SessionExists = false; bool SessionOpen = false; - bool ConnectionExists = false; - bool ConnectionOpen = false; bool out = false; m_omdsReader = new l1t::OMDSReader(); m_omdsReader->connect(m_oracleDB,m_pathCondDB); // Testing session - if(m_omdsReader->dbSession()){ - SessionExists = true; - if(m_omdsReader->dbSession()->isOpen()){SessionOpen = true;} - } + if(!m_omdsReader->dbSession().connectionString().empty()){SessionOpen = true;} - // Testing connection - if(m_omdsReader->dbConnection()){ - ConnectionExists = true; - if(m_omdsReader->dbSession()->isOpen()){ConnectionOpen = true;} - } - // Defining output and error message if needed - if (SessionExists && SessionOpen && ConnectionExists && ConnectionOpen){out = true;} - else if(!SessionExists || !ConnectionExists) {error = WARNING_DB_CONN_FAILED;} + if (SessionOpen){out = true;} + else {error = WARNING_DB_CONN_FAILED;} return out; diff --git a/DQM/RPCMonitorClient/BuildFile.xml b/DQM/RPCMonitorClient/BuildFile.xml index 8434033c6cc5a..3e24fe18562f1 100644 --- a/DQM/RPCMonitorClient/BuildFile.xml +++ b/DQM/RPCMonitorClient/BuildFile.xml @@ -18,7 +18,6 @@ - diff --git a/DQM/RPCMonitorClient/interface/RPCDBHandler.h b/DQM/RPCMonitorClient/interface/RPCDBHandler.h index 878f0d7d28b95..442523b88a77f 100644 --- a/DQM/RPCMonitorClient/interface/RPCDBHandler.h +++ b/DQM/RPCMonitorClient/interface/RPCDBHandler.h @@ -8,7 +8,6 @@ #include #include -#include "CondCore/DBCommon/interface/TagInfo.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" #include "CondFormats/RPCObjects/interface/RPCDQMObject.h" #include "CondFormats/DataRecord/interface/RPCDQMObjectRcd.h" diff --git a/DQM/RPCMonitorClient/src/RPCDBHandler.cc b/DQM/RPCMonitorClient/src/RPCDBHandler.cc index 090a464f8ebc9..e047e839f60a9 100644 --- a/DQM/RPCMonitorClient/src/RPCDBHandler.cc +++ b/DQM/RPCMonitorClient/src/RPCDBHandler.cc @@ -1,3 +1,4 @@ +#include "CondCore/CondDB/interface/Types.h" #include "DQM/RPCMonitorClient/interface/RPCDBHandler.h" RPCDBHandler::RPCDBHandler(const edm::ParameterSet& iConfig) : diff --git a/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc b/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc index a5dbc5505b082..06997ec75034a 100644 --- a/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc +++ b/Geometry/HcalCommonData/test/HcalRecNumberingTester.cc @@ -38,7 +38,6 @@ #include "Geometry/Records/interface/HcalRecNumberingRecord.h" #include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h" -#include "CoralBase/Exception.h" class HcalRecNumberingTester : public edm::one::EDAnalyzer<> { public: diff --git a/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc b/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc index 1aea844a97735..0764568eba030 100644 --- a/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc +++ b/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc @@ -38,7 +38,6 @@ #include "Geometry/Records/interface/HcalSimNumberingRecord.h" #include "Geometry/HcalCommonData/interface/HcalDDDSimConstants.h" -#include "CoralBase/Exception.h" class HcalSimNumberingTester : public edm::one::EDAnalyzer<> { public: diff --git a/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml b/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml index f74fcf16998b9..033c2eade7a39 100644 --- a/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml +++ b/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/JetMETCorrections/Modules/BuildFile.xml b/JetMETCorrections/Modules/BuildFile.xml index 9325c22e2f401..72af7c44de676 100644 --- a/JetMETCorrections/Modules/BuildFile.xml +++ b/JetMETCorrections/Modules/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/JetMETCorrections/Modules/plugins/BuildFile.xml b/JetMETCorrections/Modules/plugins/BuildFile.xml index cfc19860df15d..f5eb11060c010 100644 --- a/JetMETCorrections/Modules/plugins/BuildFile.xml +++ b/JetMETCorrections/Modules/plugins/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml b/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml index 765b9dc3d1a06..347075adbecbe 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml +++ b/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml @@ -1,7 +1,4 @@ - - - diff --git a/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml b/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml index d7c01efa12432..f9b5558fa717e 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml +++ b/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml @@ -3,7 +3,6 @@ - diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h index 7f09f2178e361..9d478d539382f 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h @@ -54,7 +54,7 @@ class L1GtPsbSetupConfigOnlineProd : static bool notPsbColumnName(const std::string& columnName); /// Creates a new PSB object from a GT_PSB_SETUP entry and adds. - void addPsbFromDb(const std::string& psbKey, std::vector& psbSetup) const; + void addPsbFromDb(const std::string& psbKey, std::vector& psbSetup); /// Creates a default valued PSB from an empty foreign key in the GT_SETUP table. void addDefaultPsb(const std::string& psbColumn, std::vector& psbSetup) const; diff --git a/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc b/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc index b55f25bf5270d..9f24983c4fb3c 100644 --- a/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc +++ b/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc @@ -113,7 +113,7 @@ bool L1GtPsbSetupConfigOnlineProd::notPsbColumnName(const std::string& columnNam } void L1GtPsbSetupConfigOnlineProd::addPsbFromDb(const std::string& psbKey, std::vector< - L1GtPsbConfig>& psbSetup) const { + L1GtPsbConfig>& psbSetup) { // SQL> describe gt_psb_setup; // (heavily pruned to just the stuff we need to set up a GtPsbConfig) diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc index c64730dbe277e..e089e7871a10b 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc @@ -185,7 +185,7 @@ L1CaloHcalScaleConfigOnlineProd::newObject( const std::string& objectKey ) std::string schemaName("CMS_HCL_HCAL_COND"); - coral::ISchema& schema = m_omdsReader.dbSession()->schema( schemaName ) ; + coral::ISchema& schema = m_omdsReader.dbSession().coralSession().schema( schemaName ) ; coral::IQuery* query = schema.newQuery(); ; diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc index 4176849af50ae..9ce13e0c0cee9 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc @@ -15,7 +15,6 @@ #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "CondCore/DBCommon/interface/Exception.h" class L1MuTriggerScaleKeysOnlineProd : public L1ObjectKeysOnlineProdBase { diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc index c7b2c4bbfd926..ee79e9a96eb6a 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc @@ -28,7 +28,7 @@ #include "FWCore/Framework/interface/ESHandle.h" // OMDS stuff -#include "RelationalAccess/ISession.h" +#include "RelationalAccess/ISessionProxy.h" #include "RelationalAccess/ITransaction.h" #include "RelationalAccess/IRelationalDomain.h" #include "RelationalAccess/ISchema.h" @@ -39,9 +39,7 @@ #include "CoralBase/Attribute.h" #include "CoralKernel/Context.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbConnectionConfiguration.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" // end OMDS stuff #include "CondFormats/RunInfo/interface/RunInfo.h" @@ -132,20 +130,18 @@ L1RCTOmdsFedVectorProducer::produce(const RunInfoRcd& iRecord) // DO THE DATABASE STUFF //make connection object - cond::DbConnection connection; + cond::persistency::ConnectionPool connection; //set in configuration object authentication path - connection.configuration().setAuthenticationPath(authpath); + connection.setAuthenticationPath(authpath); connection.configure(); //create session object from connection - cond::DbSession session = connection.createSession(); + cond::persistency::Session session = connection.createSession(connectionString,true ); - session.open(connectionString,true); - session.transaction().start(true); // (true=readOnly) - coral::ISchema& schema = session.schema("CMS_RUNINFO"); + coral::ISchema& schema = session.coralSession().schema("CMS_RUNINFO"); //condition coral::AttributeList conditionData; diff --git a/OnlineDB/CSCCondDB/BuildFile.xml b/OnlineDB/CSCCondDB/BuildFile.xml index 8989c694cff5a..078b5730fa7ae 100644 --- a/OnlineDB/CSCCondDB/BuildFile.xml +++ b/OnlineDB/CSCCondDB/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/OnlineDB/CSCCondDB/test/BuildFile.xml b/OnlineDB/CSCCondDB/test/BuildFile.xml index bdbb6f3091ed4..9a664129e78e5 100644 --- a/OnlineDB/CSCCondDB/test/BuildFile.xml +++ b/OnlineDB/CSCCondDB/test/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/OnlineDB/SiStripO2O/plugins/BuildFile.xml b/OnlineDB/SiStripO2O/plugins/BuildFile.xml index 868c861dc78cc..93352973e8f9b 100644 --- a/OnlineDB/SiStripO2O/plugins/BuildFile.xml +++ b/OnlineDB/SiStripO2O/plugins/BuildFile.xml @@ -4,7 +4,6 @@ - diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h index 066611a38b61e..57ee0e06b309c 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h index fc63378126213..76ef95c5cd416 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h index 0d114253847aa..df9ac56898e9c 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h index aefcfa3c89a59..2078b45941810 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/RecoBTag/PerformanceDB/plugins/BuildFile.xml b/RecoBTag/PerformanceDB/plugins/BuildFile.xml index 0618ec9fe8cf2..174635818fa14 100644 --- a/RecoBTag/PerformanceDB/plugins/BuildFile.xml +++ b/RecoBTag/PerformanceDB/plugins/BuildFile.xml @@ -11,7 +11,6 @@ - diff --git a/RecoHI/HiCentralityAlgos/BuildFile.xml b/RecoHI/HiCentralityAlgos/BuildFile.xml index d035747489468..d0c42e1fc95d0 100644 --- a/RecoHI/HiCentralityAlgos/BuildFile.xml +++ b/RecoHI/HiCentralityAlgos/BuildFile.xml @@ -15,7 +15,6 @@ - diff --git a/RecoHI/HiEvtPlaneAlgos/BuildFile.xml b/RecoHI/HiEvtPlaneAlgos/BuildFile.xml index 072bb484df156..ee95955bea069 100644 --- a/RecoHI/HiEvtPlaneAlgos/BuildFile.xml +++ b/RecoHI/HiEvtPlaneAlgos/BuildFile.xml @@ -16,7 +16,6 @@ - diff --git a/RecoHI/HiJetAlgos/plugins/BuildFile.xml b/RecoHI/HiJetAlgos/plugins/BuildFile.xml index 231e1009b5c6f..3df31073c0ba9 100644 --- a/RecoHI/HiJetAlgos/plugins/BuildFile.xml +++ b/RecoHI/HiJetAlgos/plugins/BuildFile.xml @@ -5,7 +5,6 @@ - diff --git a/RecoParticleFlow/PFClusterTools/test/BuildFile.xml b/RecoParticleFlow/PFClusterTools/test/BuildFile.xml index cc38b3c8d4a6d..3aa42b5339e1f 100644 --- a/RecoParticleFlow/PFClusterTools/test/BuildFile.xml +++ b/RecoParticleFlow/PFClusterTools/test/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml b/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml index dbbd40d427a54..be4673a455779 100644 --- a/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml +++ b/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml @@ -7,7 +7,6 @@ -