CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/CondTools/RPC/interface/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 "FWCore/Framework/interface/MakerMacros.h"
00010 #include "CondCore/PopCon/interface/PopConSourceHandler.h"
00011 //#include "CondCore/PopCon/interface/LogReader.h"
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013 #include "FWCore/Framework/interface/Event.h"
00014 #include "DataFormats/Common/interface/Handle.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
00017 
00018 #include "CondFormats/RPCObjects/interface/RPCEMap.h"
00019 #include "CondFormats/DataRecord/interface/RPCEMapRcd.h"
00020 #include "CondFormats/RPCObjects/interface/RPCReadOutMapping.h"
00021 #include "CondFormats/RPCObjects/interface/DccSpec.h"
00022 #include "CondFormats/RPCObjects/interface/TriggerBoardSpec.h"
00023 #include "CondFormats/RPCObjects/interface/LinkConnSpec.h"
00024 #include "CondFormats/RPCObjects/interface/LinkBoardSpec.h"
00025 #include "CondFormats/RPCObjects/interface/ChamberLocationSpec.h"
00026 #include "CondFormats/RPCObjects/interface/FebLocationSpec.h"
00027 #include "CondFormats/RPCObjects/interface/FebConnectorSpec.h"
00028 #include "CondFormats/RPCObjects/interface/ChamberStripSpec.h"
00029 #include "CondFormats/RPCObjects/interface/DBSpecToDetUnit.h"
00030 
00031 
00032 
00033 #include "CondCore/DBCommon/interface/DbTransaction.h"
00034 #include "CondCore/DBCommon/interface/DbSession.h"
00035 #include "CondCore/DBCommon/interface/DbConnection.h"
00036 #include "RelationalAccess/ITable.h"
00037 #include "RelationalAccess/ISchema.h"
00038 #include "RelationalAccess/IQuery.h"
00039 #include "RelationalAccess/ICursor.h"
00040 #include "CoralBase/AttributeList.h"
00041 #include "CoralBase/Attribute.h"
00042 #include "CoralBase/AttributeSpecification.h"
00043 
00044 namespace popcon
00045 {
00046         class RPCEMapSourceHandler : public popcon::PopConSourceHandler<RPCEMap>
00047         {
00048 
00049                 public:
00050     RPCEMapSourceHandler(const edm::ParameterSet& ps);
00051     ~RPCEMapSourceHandler();
00052     void getNewObjects();
00053     std::string id() const {return m_name;}
00054     void ConnectOnlineDB(std::string connect, std::string authPath);
00055     void DisconnectOnlineDB();
00056     void readEMap1();
00057     int Compare2EMaps(Ref map1, RPCEMap* map2);
00058 
00059                 private:
00060     RPCEMap * eMap;
00061     cond::DbSession * session;
00062     cond::DbConnection * connection ;
00063     std::string m_name;
00064     int m_dummy;
00065     int m_validate;
00066     std::string m_connect;
00067     std::string m_authpath;
00068 
00069   // utilities
00070     std::string IntToString(int num)
00071     {
00072       std::stringstream snum;
00073       snum << num << std::flush;
00074       return(snum.str());
00075     }
00076 
00077     typedef struct{int febId,chamberId,connectorId,lbInputNum,posInLocalEtaPart,posInCmsEtaPart;std::string localEtaPart,cmsEtaPart;} FEBStruct;
00078         };
00079 }
00080 #endif