Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:50

0001 #ifndef ECAL_TPG_BADXT_HANDLER_H
0002 #define ECAL_TPG_BADXT_HANDLER_H
0003 
0004 #include <vector>
0005 #include <typeinfo>
0006 #include <string>
0007 #include <map>
0008 #include <iostream>
0009 #include <ctime>
0010 
0011 #include "CondCore/PopCon/interface/PopConSourceHandler.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0013 
0014 #include "FWCore/ServiceRegistry/interface/Service.h"
0015 #include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
0016 #include "FWCore/Framework/interface/ESHandle.h"
0017 #include "FWCore/Framework/interface/Event.h"
0018 #include "FWCore/Framework/interface/MakerMacros.h"
0019 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "DataFormats/Common/interface/Handle.h"
0022 #include "FWCore/Framework/interface/EventSetup.h"
0023 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
0024 
0025 #include "CondFormats/EcalObjects/interface/EcalTPGCrystalStatus.h"
0026 #include "CondFormats/DataRecord/interface/EcalTPGCrystalStatusRcd.h"
0027 
0028 #include "OnlineDB/EcalCondDB/interface/all_monitoring_types.h"
0029 #include "OnlineDB/EcalCondDB/interface/all_od_types.h"
0030 #include "OnlineDB/Oracle/interface/Oracle.h"
0031 #include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
0032 
0033 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0034 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0035 #include "DataFormats/Provenance/interface/Timestamp.h"
0036 
0037 namespace edm {
0038   class ParameterSet;
0039   class Event;
0040   class EventSetup;
0041 }  // namespace edm
0042 
0043 namespace popcon {
0044 
0045   class EcalTPGBadXTHandler : public popcon::PopConSourceHandler<EcalTPGCrystalStatus> {
0046   public:
0047     EcalTPGBadXTHandler(edm::ParameterSet const&);
0048     ~EcalTPGBadXTHandler() override;
0049 
0050     void getNewObjects() override;
0051 
0052     std::string id() const override { return m_name; }
0053 
0054     void readFromFile(const char* inputFile);
0055     void writeFile(const char* inputFile);
0056     EcalTPGCrystalStatus* produceEcalTrgChannelStatus();
0057 
0058     EcalCondDBInterface* econn;
0059 
0060   private:
0061     std::string to_string(char value[]) {
0062       std::ostringstream streamOut;
0063       streamOut << value;
0064       return streamOut.str();
0065     }
0066 
0067     const EcalTPGCrystalStatus* mycrystalStat;
0068 
0069     unsigned int m_firstRun;
0070     unsigned int m_lastRun;
0071 
0072     std::string m_location;
0073     std::string m_gentag;
0074     std::string m_sid;
0075     std::string m_user;
0076     std::string m_pass;
0077     std::string m_locationsource;
0078     std::string m_name;
0079     unsigned int m_runnr;
0080     std::string m_runtype;
0081     std::string m_i_tag;
0082     int m_i_version;
0083     unsigned int m_i_run_number;
0084     int m_i_badXT;
0085   };
0086 }  // namespace popcon
0087 #endif