CMS 3D CMS Logo

DataManager.h

Go to the documentation of this file.
00001 #ifndef CondTools_L1Trigger_DataManager_h
00002 #define CondTools_L1Trigger_DataManager_h
00003 
00004 #include "FWCore/Framework/interface/DataKeyTags.h"
00005 
00006 #include "CondCore/DBCommon/interface/DBSession.h"
00007 #include "CondCore/DBCommon/interface/Connection.h"
00008 /* #include "CondCore/DBCommon/interface/CoralTransaction.h" */
00009 /* #include "CondCore/DBCommon/interface/PoolTransaction.h" */
00010 
00011 #include "CondCore/MetaDataService/interface/MetaData.h"
00012 
00013 #include <string>
00014 
00015 namespace l1t
00016 {
00017 
00018 /* Helper class that provides common objects required to access Pool and Coral DB's.
00019  * This class will initialize connections and makes sure that they are closed
00020  * when it is destroyed.
00021  * Connections are initialized, but user is still responsible for opening and commiting
00022  * them
00023  */
00024 class DataManager
00025 {
00026     public:
00027         explicit DataManager (const std::string & connect,
00028                               const std::string & authenticationPath,
00029                               bool isOMDS = false );
00030         virtual ~DataManager ();
00031 
00032         void setDebug( bool debug ) ;
00033 
00034     protected:
00035         /* Returns type object for provided type name
00036          */
00037         edm::eventsetup::TypeTag findType (const std::string & type) const;
00038 
00039         // Database connection management
00040 /*         cond::DBSession * poolSession; */
00041 /*         cond::DBSession * coralSession; */
00042         cond::DBSession * session;
00043         cond::Connection * connection ;
00044 /*         cond::CoralTransaction * coral; */
00045 /*         cond::PoolTransaction * pool; */
00046         cond::MetaData * metadata;
00047 };
00048 
00049 }
00050 
00051 #endif

Generated on Tue Jun 9 17:26:54 2009 for CMSSW by  doxygen 1.5.4