00001 #ifndef DTTPGConfigProducers_DTConfigDBProducer_h 00002 #define DTTPGConfigProducers_DTConfigDBProducer_h 00003 00004 // -*- C++ -*- 00005 // 00006 // Package: DTTPGConfigProducers 00007 // Class: DTConfigDBProducer 00008 // 00016 // 00017 // Original Author: Sara Vanini 00018 // Created: September 2008 00019 // 00020 // 00021 00022 00023 // system include files 00024 #include <memory> 00025 #include <boost/shared_ptr.hpp> 00026 #include <vector> 00027 00028 // user include files 00029 #include "FWCore/Framework/interface/ModuleFactory.h" 00030 #include "FWCore/Framework/interface/ESProducer.h" 00031 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00032 00033 #include "FWCore/Framework/interface/ESHandle.h" 00034 00035 #include "CondFormats/DTObjects/interface/DTCCBConfig.h" 00036 #include "CondFormats/DataRecord/interface/DTCCBConfigRcd.h" 00037 00038 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h" 00039 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManagerRcd.h" 00040 00041 // 00042 // class declaration 00043 // 00044 00045 class DTConfigDBProducer : public edm::ESProducer{ 00046 00047 public : 00048 00050 DTConfigDBProducer(const edm::ParameterSet&); 00051 00053 ~DTConfigDBProducer(); 00054 00056 std::auto_ptr<DTConfigManager> produce(const DTConfigManagerRcd&); 00057 00058 private : 00059 00061 void readDBPedestalsConfig(const DTConfigManagerRcd& iRecord); 00062 00064 int readDTCCBConfig(const DTConfigManagerRcd& iRecord); 00065 00067 void configFromCfg(); 00068 00070 DTConfigPedestals buildTrivialPedestals(); 00071 00072 std::string mapEntryName(const DTChamberId & chambid) const; 00073 00074 // ----------member data --------------------------- 00075 edm::ParameterSet m_ps; 00076 DTConfigManager* m_manager; 00077 00078 // debug flags 00079 bool m_debugDB; 00080 int m_debugBti; 00081 int m_debugTraco; 00082 bool m_debugTSP; 00083 bool m_debugTST; 00084 bool m_debugTU; 00085 bool m_debugSC; 00086 bool m_debugLUTs; 00087 bool m_debugPed; 00088 00089 // general DB requests 00090 bool m_UseT0; 00091 00092 bool cfgConfig; 00093 00094 bool flagDBBti, flagDBTraco, flagDBTSS, flagDBTSM, flagDBLUTS; 00095 00096 }; 00097 00098 #endif