Go to the documentation of this file.00001 #ifndef ECAL_TPG_SPIKETHRESHOLD_HANDLER_H
00002 #define ECAL_TPG_SPIKETHRESHOLD_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 #include "CondFormats/EcalObjects/interface/EcalTPGSpike.h"
00027 #include "CondFormats/DataRecord/interface/EcalTPGSpikeRcd.h"
00028
00029 #include "OnlineDB/EcalCondDB/interface/all_monitoring_types.h"
00030 #include "OnlineDB/Oracle/interface/Oracle.h"
00031 #include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
00032
00033 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00034 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00035 #include "DataFormats/Provenance/interface/Timestamp.h"
00036
00037
00038 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
00039
00040 namespace edm {
00041 class ParameterSet;
00042 class Event;
00043 class EventSetup;
00044 }
00045
00046
00047
00048 namespace popcon
00049 {
00050
00051
00052 class EcalTPGSpikeThresholdHandler : public popcon::PopConSourceHandler<EcalTPGSpike>
00053 {
00054
00055 public:
00056 EcalTPGSpikeThresholdHandler(edm::ParameterSet const & );
00057 ~EcalTPGSpikeThresholdHandler();
00058
00059 std::map<std::string, int> makeTTEBDetId();
00060 std::map<std::string, int> makeTTEEDetId();
00061
00062 void getNewObjects();
00063
00064 std::string id() const { return m_name;}
00065
00066 void readFromFile(const char* inputFile) ;
00067 void writeFile(const char* inputFile);
00068
00069 EcalCondDBInterface* econn;
00070
00071 private:
00072 std::string to_string( char value[]) {
00073 std::ostringstream streamOut;
00074 streamOut << value;
00075 return streamOut.str();
00076 }
00077
00078 const EcalTPGSpike * mySpikeTh;
00079 unsigned int m_firstRun ;
00080 unsigned int m_lastRun ;
00081 std::map <std::string, int> mapDetEBId;
00082 std::map <std::string, int> mapDetEEId;
00083
00084 const EcalElectronicsMapping* ecalMapping_;
00085
00086 std::string m_location;
00087 std::string m_gentag;
00088 std::string m_sid;
00089 std::string m_user;
00090 std::string m_pass;
00091 std::string m_locationsource;
00092 std::string m_name;
00093 unsigned int m_runnr;
00094 std::string m_runtype;
00095 std::string m_i_tag;
00096 int m_i_version;
00097 unsigned int m_i_run_number;
00098 int m_i_spikeTh;
00099
00100 };
00101 }
00102 #endif
00103