CMS 3D CMS Logo

RPCEMapSourceHandler.h

Go to the documentation of this file.
00001 #ifndef RPCEMAPSOURCEHANDLER
00002 #define RPCEMAPSOURCEHANDLER
00003 
00004 #include <vector>
00005 #include <string>
00006 #include <iostream>
00007 #include <typeinfo>
00008 
00009 #include "OnlineDB/Oracle/interface/Oracle.h"
00010 #include "FWCore/Framework/interface/MakerMacros.h"
00011 #include "CondCore/PopCon/interface/PopConSourceHandler.h"
00012 //#include "CondCore/PopCon/interface/LogReader.h"
00013 #include "FWCore/Framework/interface/ESHandle.h"
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "DataFormats/Common/interface/Handle.h"
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
00018 
00019 #include "CondFormats/RPCObjects/interface/RPCEMap.h"
00020 #include "CondFormats/DataRecord/interface/RPCEMapRcd.h"
00021 #include "CondFormats/RPCObjects/interface/RPCReadOutMapping.h"
00022 #include "CondFormats/RPCObjects/interface/DccSpec.h"
00023 #include "CondFormats/RPCObjects/interface/TriggerBoardSpec.h"
00024 #include "CondFormats/RPCObjects/interface/LinkConnSpec.h"
00025 #include "CondFormats/RPCObjects/interface/LinkBoardSpec.h"
00026 #include "CondFormats/RPCObjects/interface/ChamberLocationSpec.h"
00027 #include "CondFormats/RPCObjects/interface/FebLocationSpec.h"
00028 #include "CondFormats/RPCObjects/interface/FebConnectorSpec.h"
00029 #include "CondFormats/RPCObjects/interface/ChamberStripSpec.h"
00030 #include "CondFormats/RPCObjects/interface/DBSpecToDetUnit.h"
00031 
00032 #include "CondCore/DBCommon/interface/SessionConfiguration.h"
00033 #include "CondCore/DBCommon/interface/ConnectionConfiguration.h"
00034 #include "CondCore/DBCommon/interface/CoralTransaction.h"
00035 #include "CondCore/DBCommon/interface/DBSession.h"
00036 #include "CondCore/DBCommon/interface/Connection.h"
00037 #include "RelationalAccess/ITable.h"
00038 #include "RelationalAccess/ISchema.h"
00039 #include "RelationalAccess/IQuery.h"
00040 #include "RelationalAccess/ICursor.h"
00041 #include "CoralBase/AttributeList.h"
00042 #include "CoralBase/Attribute.h"
00043 #include "CoralBase/AttributeSpecification.h"
00044 
00045 using namespace std;
00046 using namespace oracle::occi;
00047 
00048 namespace popcon
00049 {
00050         class RPCEMapSourceHandler : public popcon::PopConSourceHandler<RPCEMap>
00051         {
00052 
00053                 public:
00054     RPCEMapSourceHandler(const edm::ParameterSet& ps);
00055     ~RPCEMapSourceHandler();
00056     void getNewObjects();
00057     std::string id() const {return m_name;}
00058     void ConnectOnlineDB(string connect, string authPath);
00059     void ConnectOnlineDB(string host, string sid, string user, string pass, int port);
00060     void DisconnectOnlineDB();
00061     void readEMap0();
00062     void readEMap1();
00063     int Compare2EMaps(Ref map1, RPCEMap* map2);
00064 
00065                 private:
00066     RPCEMap * eMap;
00067     Environment* env;
00068     Connection* conn;
00069     cond::DBSession * session;
00070     cond::Connection * connection ;
00071     cond::CoralTransaction * coralTr;
00072     std::string m_name;
00073     int m_validate;
00074     std::string m_connect;
00075     std::string m_authpath;
00076     std::string m_host;
00077     std::string m_sid;
00078     std::string m_user;
00079     std::string m_pass;
00080     int m_port;
00081 
00082   // utilities
00083     string IntToString(int num)
00084     {
00085       stringstream snum;
00086       snum << num << flush;
00087       return(snum.str());
00088     }
00089 
00090     typedef struct{int febId,chamberId,connectorId,lbInputNum,posInLocalEtaPart,posInCmsEtaPart;string localEtaPart,cmsEtaPart;} FEBStruct;
00091         };
00092 }
00093 #endif

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