File indexing completed on 2024-04-06 12:20:01
0001 #ifndef GlobalTriggerAnalyzer_L1GtPatternGenerator_h
0002 #define GlobalTriggerAnalyzer_L1GtPatternGenerator_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <memory>
0020 #include <string>
0021 #include <fstream>
0022
0023
0024 #include "FWCore/Framework/interface/Frameworkfwd.h"
0025 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0026
0027 #include "FWCore/Framework/interface/Event.h"
0028 #include "FWCore/Framework/interface/EventSetup.h"
0029
0030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0031 #include "FWCore/Utilities/interface/InputTag.h"
0032
0033
0034 class L1GtPatternWriter;
0035 class L1GtPatternMap;
0036
0037 class L1GtPatternGenerator : public edm::one::EDAnalyzer<> {
0038 public:
0039 explicit L1GtPatternGenerator(const edm::ParameterSet&);
0040 ~L1GtPatternGenerator() override;
0041
0042 protected:
0043 void extractGlobalTriggerData(const edm::Event& iEvent, L1GtPatternMap& patterns);
0044
0045 private:
0046
0047 void beginJob() override;
0048
0049
0050 void analyze(const edm::Event&, const edm::EventSetup&) override;
0051
0052
0053 void endJob() override;
0054
0055
0056 void packHfRecords(const std::string& resultName, L1GtPatternMap& allPatterns);
0057
0058
0059 static uint32_t packRegionalMuons(uint32_t rawValue);
0060
0061
0062 static uint32_t packEtMiss(uint32_t rawValue);
0063
0064 private:
0065
0066 edm::InputTag m_gctTag;
0067
0068
0069 edm::InputTag m_gmtTag;
0070
0071
0072 edm::InputTag m_gtTag;
0073
0074
0075 edm::InputTag m_dtTag;
0076 edm::InputTag m_cscTag;
0077 edm::InputTag m_rpcbTag;
0078 edm::InputTag m_rpcfTag;
0079
0080
0081 std::string m_destPath;
0082
0083
0084 std::string m_fileName;
0085 std::ofstream m_fileStream;
0086
0087
0088
0089 std::string m_header;
0090 std::string m_footer;
0091 std::vector<std::string> m_columnNames;
0092 std::vector<uint32_t> m_columnLengths;
0093 std::vector<int> m_bx;
0094 std::vector<uint32_t> m_columnDefaults;
0095 bool m_debug;
0096
0097 std::unique_ptr<L1GtPatternWriter> m_writer;
0098 };
0099
0100 #endif