File indexing completed on 2025-06-03 00:12:14
0001 #ifndef L1Trigger_TrackerTFP_Demonstrator_h
0002 #define L1Trigger_TrackerTFP_Demonstrator_h
0003
0004 #include "FWCore/Framework/interface/data_default_record_trait.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0007
0008 #include <vector>
0009 #include <string>
0010
0011 namespace trackerTFP {
0012
0013
0014
0015
0016
0017
0018 class Demonstrator {
0019 public:
0020
0021 struct Config {
0022 std::string dirIPBB_;
0023 double runTime_;
0024 std::vector<int> linkMappingIn_;
0025 std::vector<int> linkMappingOut_;
0026 };
0027 Demonstrator() {}
0028 Demonstrator(const Config& iConfig, const tt::Setup* setup);
0029 ~Demonstrator() = default;
0030
0031 bool analyze(const std::vector<std::vector<tt::Frame>>& input,
0032 const std::vector<std::vector<tt::Frame>>& output) const;
0033
0034 private:
0035
0036 void convert(const std::vector<std::vector<tt::Frame>>& bits,
0037 std::stringstream& ss,
0038 const std::vector<int>& mapping) const;
0039
0040 void sim(const std::stringstream& ss) const;
0041
0042 bool compare(std::stringstream& ss) const;
0043
0044 std::string header(const std::vector<int>& links) const;
0045
0046 std::string infraGap(int& nFrame, int numLinks) const;
0047
0048 std::string frame(int& nFrame) const;
0049
0050 std::string hex(const tt::Frame& bv, bool first = false) const;
0051
0052
0053 std::string dirIPBB_;
0054
0055 double runTime_;
0056
0057 std::vector<int> linkMappingIn_;
0058
0059 std::vector<int> linkMappingOut_;
0060
0061 std::string dirIn_;
0062
0063 std::string dirOut_;
0064
0065 std::string dirPre_;
0066
0067 std::string dirDiff_;
0068
0069 int numFrames_;
0070
0071 int numFramesInfra_;
0072
0073 int numRegions_;
0074 };
0075
0076 }
0077
0078 EVENTSETUP_DATA_DEFAULT_RECORD(trackerTFP::Demonstrator, tt::SetupRcd);
0079
0080 #endif