00001 #ifndef ECALTESTDEVDB_H 00002 #define ECALTESTDEVDB_H 00003 00004 #include "FWCore/Framework/interface/EDAnalyzer.h" 00005 #include "CondCore/DBCommon/interface/DBSession.h" 00006 #include "CondCore/DBCommon/interface/Exception.h" 00007 //#include "CondCore/DBCommon/interface/ConnectMode.h" 00008 #include "CondCore/DBCommon/interface/MessageLevel.h" 00009 00010 #include "FWCore/Framework/interface/IOVSyncValue.h" 00011 00012 #include "CondFormats/EcalObjects/interface/EcalPedestals.h" 00013 #include "CondFormats/DataRecord/interface/EcalPedestalsRcd.h" 00014 #include "CondFormats/EcalObjects/interface/EcalADCToGeVConstant.h" 00015 #include "CondFormats/DataRecord/interface/EcalADCToGeVConstantRcd.h" 00016 #include "CondFormats/EcalObjects/interface/EcalIntercalibConstants.h" 00017 #include "CondFormats/DataRecord/interface/EcalIntercalibConstantsRcd.h" 00018 #include "CondFormats/EcalObjects/interface/EcalGainRatios.h" 00019 #include "CondFormats/DataRecord/interface/EcalGainRatiosRcd.h" 00020 #include "CondFormats/EcalObjects/interface/EcalWeightXtalGroups.h" 00021 #include "CondFormats/DataRecord/interface/EcalWeightXtalGroupsRcd.h" 00022 #include "CondFormats/EcalObjects/interface/EcalTBWeights.h" 00023 #include "CondFormats/DataRecord/interface/EcalTBWeightsRcd.h" 00024 #include "CondFormats/EcalObjects/interface/EcalLaserAPDPNRatios.h" 00025 #include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRcd.h" 00026 #include "CondFormats/EcalObjects/interface/EcalLaserAlphas.h" 00027 #include "CondFormats/DataRecord/interface/EcalLaserAlphasRcd.h" 00028 #include "CondFormats/EcalObjects/interface/EcalLaserAPDPNRatiosRef.h" 00029 #include "CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRefRcd.h" 00030 #include "DataFormats/EcalDetId/interface/EBDetId.h" 00031 00032 #include <string> 00033 #include <map> 00034 00035 namespace edm { 00036 class ParameterSet; 00037 class Event; 00038 class EventSetup; 00039 } 00040 00041 using namespace std; 00042 00043 class EcalTestDevDB : public edm::EDAnalyzer { 00044 public: 00045 explicit EcalTestDevDB(const edm::ParameterSet& iConfig ); 00046 ~EcalTestDevDB(); 00047 00048 00049 virtual void analyze( const edm::Event& evt, const edm::EventSetup& evtSetup); 00050 00051 EcalPedestals* generateEcalPedestals(); 00052 EcalADCToGeVConstant* generateEcalADCToGeVConstant(); 00053 EcalIntercalibConstants* generateEcalIntercalibConstants(); 00054 EcalGainRatios* generateEcalGainRatios(); 00055 EcalWeightXtalGroups* generateEcalWeightXtalGroups(); 00056 EcalTBWeights* generateEcalTBWeights(); 00057 EcalLaserAPDPNRatios* generateEcalLaserAPDPNRatios(uint32_t i_run); 00058 EcalLaserAlphas* generateEcalLaserAlphas(); 00059 EcalLaserAPDPNRatiosRef* generateEcalLaserAPDPNRatiosRef(); 00060 00061 00062 private: 00063 00064 std::string m_timetype; 00065 std::map<std::string, unsigned long long> m_cacheIDs; 00066 std::map<std::string, std::string> m_records; 00067 unsigned long m_firstRun ; 00068 unsigned long m_lastRun ; 00069 unsigned int m_interval ; 00070 }; 00071 00072 #endif