Go to the documentation of this file.00001 #ifndef L1COMPARATOR_H
00002 #define L1COMPARATOR_H
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <memory>
00012 #include <string>
00013 #include <iostream>
00014 #include <fstream>
00015 #include <iomanip>
00016 #include <vector>
00017 #include <algorithm>
00018 #include "FWCore/ServiceRegistry/interface/Service.h"
00019 #include "FWCore/Framework/interface/Frameworkfwd.h"
00020 #include "FWCore/Framework/interface/EDProducer.h"
00021 #include "FWCore/Framework/interface/Event.h"
00022 #include "FWCore/Framework/interface/MakerMacros.h"
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00025
00026
00027 #include "L1Trigger/HardwareValidation/interface/DEtrait.h"
00028
00029
00030 #include "L1Trigger/HardwareValidation/interface/DEcompare.h"
00031
00032
00033 #include "CondFormats/L1TObjects/interface/L1TriggerKey.h"
00034
00035 #include "CondFormats/DataRecord/interface/L1TriggerKeyRcd.h"
00036
00037
00038 template <class T> class DEcompare;
00039
00040 class L1Comparator : public edm::EDProducer {
00041
00042 public:
00043
00044 explicit L1Comparator(const edm::ParameterSet&);
00045 ~L1Comparator();
00046
00047 private:
00048
00049 virtual void beginJob(void);
00050 virtual void beginRun(edm::Run const&, const edm::EventSetup&) override final;
00051 virtual void produce (edm::Event&, const edm::EventSetup&);
00052 virtual void endJob();
00053
00054 template <class T>
00055 void process( T const*, T const*, const int, const int);
00056 template <class T>
00057 void process(const edm::Handle<T> data, const edm::Handle<T> emul,
00058 const int sys, const int cid) {
00059 if(data.isValid()&&emul.isValid())
00060 process(data.product(),emul.product(),sys, cid);
00061 }
00062
00063 template <class T> bool CompareCollections(edm::Handle<T> data, edm::Handle<T> emul);
00064 template <class T> bool dumpCandidate(const T& dt, const T& em, std::ostream& s);
00065
00066 int verbose() {return verbose_;}
00067
00068 private:
00069
00070 int nevt_;
00071 int evtNum_;
00072 int runNum_;
00073 int verbose_;
00074 bool dumpEvent_;
00075
00076 edm::InputTag m_DEsource[dedefs::DEnsys][4];
00077 bool m_doSys[dedefs::DEnsys];
00078 std::string m_dumpFileName;
00079 std::ofstream m_dumpFile;
00080 int m_dumpMode;
00081 bool m_match;
00082 bool DEmatchEvt[dedefs::DEnsys];
00083 int DEncand[dedefs::DEnsys][2];
00084 L1DEDigiCollection m_dedigis;
00085
00086 };
00087
00088 #endif