Belle II Software development
JSignalData.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9//-----------------------------------------------------------------------------
10// Description : A class for SignalData in CDC Trigger for 3D tracker.
11//-----------------------------------------------------------------------------
12
13#ifndef TRGCDCJSignalData_FLAG_
14#define TRGCDCJSignalData_FLAG_
15
16#include <string>
17#include <vector>
18#include <map>
19
20#ifdef TRGCDC_SHORT_NAMES
21#define JSignalData TRGCDCJSignalData
22#endif
23
24namespace Belle2 {
30 class TRGCDCJSignal;
31
34 friend class TRGCDCJSignal;
35 friend class TRGCDCJLUT;
36
37 public:
38
42 void setVhdlOutputFile(const std::string&);
44 void setPrintVhdl(bool);
46 void setPrintedToFile(bool);
48 void setVhdlInProcess(const std::string&);
50 void setVhdlOutProcess(const std::string&);
52 std::string getVhdlOutputFile() const;
54 bool getPrintVhdl() const;
56 bool getPrintedToFile() const;
58 std::map<std::string, std::vector<int> > const& getSignals() const;
60 std::string getVhdlInProcess() const;
62 std::string getVhdlOutProcess() const;
64 std::string getVhdlDefine() const;
67 void printToFile();
69 void buffersVhdlCode();
71 void signalsVhdlCode();
73 void entryVhdlCode();
74
75 private:
76
79 std::string m_vhdlOutputFile;
81 std::string m_vhdlEntry;
83 std::string m_vhdlDefine;
85 std::string m_vhdlInProcess;
87 std::string m_vhdlOutProcess;
94 std::map<std::string, std::vector<int> > m_buffers;
96 std::map<std::string, std::vector<int> > m_signals;
98 std::map<std::string, bool > m_arrayType;
99
100 };
101
103}
104
105#endif /* TRGCDCJSignalData_FLAG_ */
A class to use LUTs for TRGCDC.
Definition: JLUT.h:35
A class to hold common data for JSignals.
Definition: JSignalData.h:33
bool m_printVhdl
Status if code should be printed.
Definition: JSignalData.h:89
std::string m_vhdlInProcess
Holds VHDL process code.
Definition: JSignalData.h:85
std::string m_vhdlOutputFile
Memebers.
Definition: JSignalData.h:79
std::string m_vhdlEntry
Holds VHDL entry code.
Definition: JSignalData.h:81
std::map< std::string, bool > m_arrayType
Holds all the required VHDL types.
Definition: JSignalData.h:98
std::map< std::string, std::vector< int > > m_buffers
vector<int> is {type, bitwidth, buffer} Holds all the requried VHDL buffers.
Definition: JSignalData.h:94
std::map< std::string, std::vector< int > > m_signals
Holds all the requried VHDL signals.
Definition: JSignalData.h:96
bool m_printedToFile
Statis if VHDL is printed to file.
Definition: JSignalData.h:91
std::string m_vhdlDefine
Holds VHDL define code.
Definition: JSignalData.h:83
std::string m_vhdlOutProcess
Holds VHDL out of process code.
Definition: JSignalData.h:87
A class to use Signals for TRGCDC 3D tracker.
Definition: JSignal.h:35
void setPrintedToFile(bool)
Set to remember that file was printed.
Definition: JSignalData.cc:55
std::string getVhdlInProcess() const
Gets the VHDL code that are in a process statement.
Definition: JSignalData.cc:85
void printToFile()
Utilities Function to print VHDL code.
Definition: JSignalData.cc:106
std::string getVhdlOutProcess() const
Gets the VHDL code that are outside a process statement.
Definition: JSignalData.cc:90
bool getPrintVhdl() const
Gets the status of m_printVhdl.
Definition: JSignalData.cc:75
void setVhdlInProcess(const std::string &)
Set the VHDL code that are in a process statement.
Definition: JSignalData.cc:60
void setVhdlOutProcess(const std::string &)
Set the VHDL code that is outside a process statement.
Definition: JSignalData.cc:65
bool getPrintedToFile() const
Gets the status of m_printedToFile.
Definition: JSignalData.cc:80
std::map< std::string, std::vector< int > > const & getSignals() const
Gets the signals that were saved for one line of VHDL.
Definition: JSignalData.cc:100
std::string getVhdlOutputFile() const
Get the VHDL output code.
Definition: JSignalData.cc:70
std::string getVhdlDefine() const
Gets the VHDL code for define statement.
Definition: JSignalData.cc:95
void entryVhdlCode()
Function to print entry VHDL code.
Definition: JSignalData.cc:195
void signalsVhdlCode()
Function to print definition of signal VHDL code.
Definition: JSignalData.cc:178
void setVhdlOutputFile(const std::string &)
Sets the filename for VHDL output.
Definition: JSignalData.cc:45
void buffersVhdlCode()
Function to print buffer VHDL code.
Definition: JSignalData.cc:150
void setPrintVhdl(bool)
Sets if to print VHDL output.
Definition: JSignalData.cc:50
TRGCDCJSignalData()
Constructor for class.
Definition: JSignalData.cc:34
Abstract base class for different kinds of events.