CMS 3D CMS Logo

Demonstrator.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackerTFP_Demonstrator_h
2 #define L1Trigger_TrackerTFP_Demonstrator_h
3 
8 
9 #include <vector>
10 #include <string>
11 
12 namespace trackerTFP {
13 
19  class Demonstrator {
20  public:
22  Demonstrator(const edm::ParameterSet& iConfig, const tt::Setup* setup);
24  // plays input through modelsim and compares result with output
25  bool analyze(const std::vector<std::vector<tt::Frame>>& input,
26  const std::vector<std::vector<tt::Frame>>& output) const;
27 
28  private:
29  // converts streams of bv into stringstream
30  void convert(const std::vector<std::vector<tt::Frame>>& bits, std::stringstream& ss) const;
31  // plays stringstream through modelsim
32  void sim(const std::stringstream& ss) const;
33  // compares stringstream with modelsim output
34  bool compare(std::stringstream& ss) const;
35  // creates emp file header
36  std::string header(int numChannel) const;
37  // creates 6 frame gap between packets
38  std::string infraGap(int& nFrame, int numChannel) const;
39  // creates frame number
40  std::string frame(int& nFrame) const;
41  // converts bv into hex
42  std::string hex(const tt::Frame& bv) const;
43 
44  // path to ipbb proj area
46  // runtime in ms
47  double runTime_;
48  // path to input text file
50  // path to output text file
52  // path to expected output text file
54  // path to diff text file
56  // number of frames per event (161)
58  // number of emp reset frames per event (6)
60  // number of TFPs per time node (9)
62  };
63 
64 } // namespace trackerTFP
65 
67 
68 #endif
std::bitset< TTBV::S_ > Frame
Definition: TTTypes.h:58
void convert(const std::vector< std::vector< tt::Frame >> &bits, std::stringstream &ss) const
Definition: Demonstrator.cc:39
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
constexpr uint32_t bits
Definition: gpuClustering.h:25
bool analyze(const std::vector< std::vector< tt::Frame >> &input, const std::vector< std::vector< tt::Frame >> &output) const
Definition: Demonstrator.cc:26
static std::string const input
Definition: EdmProvDump.cc:50
void sim(const std::stringstream &ss) const
Definition: Demonstrator.cc:70
#define EVENTSETUP_DATA_DEFAULT_RECORD(_data_, _record_)
Compares emulator with f/w.
Definition: Demonstrator.h:19
std::string header(int numChannel) const
std::string infraGap(int &nFrame, int numChannel) const
bool compare(std::stringstream &ss) const
Definition: Demonstrator.cc:84
std::string hex(const tt::Frame &bv) const
std::string frame(int &nFrame) const