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 {
29
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_ */
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
Members.
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 required VHDL buffers.
Definition JSignalData.h:94
std::map< std::string, std::vector< int > > m_signals
Holds all the required 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.
std::string getVhdlInProcess() const
Gets the VHDL code that are in a process statement.
void printToFile()
Utilities Function to print VHDL code.
std::string getVhdlOutProcess() const
Gets the VHDL code that are outside a process statement.
bool getPrintVhdl() const
Gets the status of m_printVhdl.
void setVhdlInProcess(const std::string &)
Set the VHDL code that are in a process statement.
void setVhdlOutProcess(const std::string &)
Set the VHDL code that is outside a process statement.
bool getPrintedToFile() const
Gets the status of m_printedToFile.
std::map< std::string, std::vector< int > > const & getSignals() const
Gets the signals that were saved for one line of VHDL.
std::string getVhdlOutputFile() const
Get the VHDL output code.
std::string getVhdlDefine() const
Gets the VHDL code for define statement.
void entryVhdlCode()
Function to print entry VHDL code.
void signalsVhdlCode()
Function to print definition of signal VHDL code.
void setVhdlOutputFile(const std::string &)
Sets the filename for VHDL output.
void buffersVhdlCode()
Function to print buffer VHDL code.
void setPrintVhdl(bool)
Sets if to print VHDL output.
TRGCDCJSignalData()
Constructor for class.
Abstract base class for different kinds of events.