Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-31 23:51:03

0001 #ifndef HcalPedestalWidthsCheck_h
0002 #define HcalPedestalWidthsCheck_h
0003 
0004 //
0005 // R.Ofierzynski 9.12.2007
0006 //
0007 // Code to check pedestals for completeness and to compare to previous pedestals
0008 
0009 #include <string>
0010 #include <iostream>
0011 #include <fstream>
0012 #include <sstream>
0013 #include <map>
0014 #include <vector>
0015 #include <algorithm>
0016 
0017 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/MakerMacros.h"
0020 
0021 #include "FWCore/Framework/interface/EventSetup.h"
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023 
0024 #include "CondFormats/HcalObjects/interface/HcalPedestals.h"
0025 #include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
0026 #include "CondFormats/HcalObjects/interface/HcalGains.h"
0027 #include "CondFormats/HcalObjects/interface/HcalGainWidths.h"
0028 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
0029 
0030 #include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
0031 #include "DataFormats/DetId/interface/DetId.h"
0032 
0033 #include "CondFormats/DataRecord/interface/HcalPedestalsRcd.h"
0034 #include "CondFormats/DataRecord/interface/HcalPedestalWidthsRcd.h"
0035 #include "CondFormats/DataRecord/interface/HcalGainsRcd.h"
0036 #include "CondFormats/DataRecord/interface/HcalGainWidthsRcd.h"
0037 #include "CondFormats/DataRecord/interface/HcalElectronicsMapRcd.h"
0038 
0039 #include "CalibCalorimetry/HcalAlgos/interface/HcalDbASCIIIO.h"
0040 #include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
0041 
0042 class HcalPedestalWidthsCheck : public edm::one::EDAnalyzer<> {
0043 public:
0044   HcalPedestalWidthsCheck(edm::ParameterSet const& ps);
0045 
0046   ~HcalPedestalWidthsCheck() override;
0047 
0048   void analyze(const edm::Event& ev, const edm::EventSetup& es) override;
0049 
0050 private:
0051   std::string outfile;
0052   std::string dumprefs;
0053   std::string dumpupdate;
0054   bool checkemapflag;
0055   bool validateflag;
0056   double epsilon;
0057   edm::ESGetToken<HcalPedestalWidths, HcalPedestalWidthsRcd> m_tok1;
0058   edm::ESGetToken<HcalPedestalWidths, HcalPedestalWidthsRcd> m_tok2;
0059   edm::ESGetToken<HcalElectronicsMap, HcalElectronicsMapRcd> m_tokmap;
0060   //  vecDetId getMissingDetIds(std::vector<HcalPedestalWidths> &);
0061 };
0062 #endif