CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/CondTools/Ecal/interface/EcalTPGSlidingWindowHandler.h

Go to the documentation of this file.
00001 #ifndef ECAL_TPG_SLIDINGWINDOW_HANDLER_H
00002 #define ECAL_TPG_SLIDINGWINDOW_HANDLER_H
00003 
00004 #include <vector>
00005 #include <typeinfo>
00006 #include <string>
00007 #include <map>
00008 #include <iostream>
00009 #include <time.h>
00010 
00011 #include "CondCore/PopCon/interface/PopConSourceHandler.h"
00012 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
00013 
00014 
00015 #include "FWCore/ServiceRegistry/interface/Service.h"
00016 #include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
00017 #include "FWCore/Framework/interface/ESHandle.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 #include "FWCore/Framework/interface/MakerMacros.h"
00020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022 #include "DataFormats/Common/interface/Handle.h"
00023 #include "FWCore/Framework/interface/EventSetup.h"
00024 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
00025 
00026 
00027 
00028 #include "CondFormats/EcalObjects/interface/EcalTPGSlidingWindow.h"
00029 #include "CondFormats/DataRecord/interface/EcalTPGSlidingWindowRcd.h"
00030 
00031 #include "OnlineDB/EcalCondDB/interface/all_monitoring_types.h"
00032 #include "OnlineDB/Oracle/interface/Oracle.h"
00033 #include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
00034 
00035 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00036 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00037 #include "DataFormats/Provenance/interface/Timestamp.h"
00038 
00039 //class EcalElectronicsMapping;
00040 
00041 namespace edm {
00042   class ParameterSet;
00043   class Event;
00044   class EventSetup;
00045 }
00046 
00047 namespace popcon
00048 {
00049 
00050 
00051         class EcalTPGSlidingWindowHandler : public popcon::PopConSourceHandler<EcalTPGSlidingWindow>
00052         {
00053         
00054 
00055                 public:
00056                         EcalTPGSlidingWindowHandler(edm::ParameterSet const & );
00057                         ~EcalTPGSlidingWindowHandler();
00058                         
00059                         std::map<std::string, int> makeStripIdEB();
00060                         std::map<std::string, int> makeStripIdEE();
00061                         void getNewObjects();
00062                         
00063                         std::string id() const { return m_name;}
00064                         
00065                         void readFromFile(const char* inputFile) ;
00066                         void writeFile(const char* inputFile);
00067                         
00068                         EcalCondDBInterface* econn;
00069 
00070                 private:
00071                         std::string to_string( char value[]) {
00072                         std::ostringstream streamOut;
00073                         streamOut << value;
00074                         return streamOut.str();
00075                         }
00076                   
00077                         unsigned int m_firstRun ;
00078                         unsigned int m_lastRun ;
00079                         std::map<std::string, int> correspEBId;
00080                         std::map<std::string, int> correspEEId;
00081                         
00082                         std::string m_location;
00083                         std::string m_gentag;
00084                         std::string m_sid;
00085                         std::string m_user;
00086                         std::string m_pass;
00087                         std::string m_locationsource;
00088                         std::string m_name;
00089                         unsigned int m_runnr;
00090                         std::string m_runtype;
00091                         std::string m_i_tag;
00092                         int m_i_version;
00093                         unsigned int m_i_run_number;
00094                         int m_i_sliding;
00095 
00096         };
00097 }
00098 #endif
00099