00001 #ifndef L1RCTLutWriter_h 00002 #define L1RCTLutWriter_h 00003 00004 // -*- C++ -*- 00005 // 00006 // Package: L1RCTLutWriter 00007 // Class: L1RCTLutWriter 00008 // 00016 // 00017 // Original Author: jleonard 00018 // Created: Fri Apr 11 16:27:07 CEST 2008 00019 // $Id: L1RCTLutWriter.h,v 1.3 2008/07/10 16:57:07 jleonard Exp $ 00020 // 00021 // 00022 00023 00024 // system include files 00025 #include <memory> 00026 00027 #include <iostream> 00028 using std::endl; 00029 using std::hex; 00030 using std::dec; 00031 using std::ios; 00032 #include <fstream> 00033 00034 // user include files 00035 #include "FWCore/Framework/interface/Frameworkfwd.h" 00036 #include "FWCore/Framework/interface/EDAnalyzer.h" 00037 00038 #include "FWCore/Framework/interface/Event.h" 00039 #include "FWCore/Framework/interface/MakerMacros.h" 00040 00041 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00042 #include "FWCore/Framework/interface/ESHandle.h" // why doesn't mkedanlzr 00043 #include "FWCore/Framework/interface/EventSetup.h" // add these?? 00044 00045 class L1RCTLookupTables; 00046 class L1RCTParameters; 00047 //class L1RCTChannelMask; 00048 00049 // 00050 // class declaration 00051 // 00052 00053 class L1RCTLutWriter : public edm::EDAnalyzer { 00054 public: 00055 explicit L1RCTLutWriter(const edm::ParameterSet&); 00056 ~L1RCTLutWriter(); 00057 00058 00059 private: 00060 virtual void beginJob(const edm::EventSetup&) ; 00061 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00062 virtual void endJob() ; 00063 void writeRcLutFile(unsigned short card); 00064 void writeEicLutFile(unsigned short card); 00065 void writeJscLutFile(); 00066 void writeThresholdsFile(unsigned int eicThreshold, 00067 unsigned int jscThresholdBarrel, 00068 unsigned int jscThresholdEndcap); 00069 00070 // ----------member data --------------------------- 00071 00072 L1RCTLookupTables* lookupTable_; 00073 const L1RCTParameters* rctParameters_; 00074 //const L1RCTChannelMask* channelMask_; 00075 std::ofstream lutFile_; 00076 std::string keyName_; 00077 bool useDebugTpgScales_; 00078 00079 }; 00080 #endif