59 edm::LogInfo(
"L1GtConfigProducers") <<
"\n\nL1 GT VHDL directory: " <<
vhdlDir_ <<
"\n\n" << std::endl;
66 std::vector<ConditionMap>
const& conditionMap = l1GtMenu->
gtConditionMap();
70 int printVerbosity = 0;
76 std::map<std::string, std::string> headerParameters;
77 std::vector<std::string> channelVector;
79 headerParameters[
"vhdl_path"] =
"/vhdllibrarypath";
80 headerParameters[
"designer_date"] =
"20.05.1986";
81 headerParameters[
"designer_name"] =
"Philipp Wagner";
82 headerParameters[
"version"] =
"2.0";
83 headerParameters[
"designer_comments"] =
"produced in CMSSW";
84 headerParameters[
"gtl_setup_name"] =
"L1Menu2007NovGR";
86 channelVector.reserve(10);
87 channelVector.push_back(
"-- ca1: ieg");
88 channelVector.push_back(
"-- ca2: eg");
89 channelVector.push_back(
"-- ca3: jet");
90 channelVector.push_back(
"-- ca4: fwdjet");
91 channelVector.push_back(
"-- ca5: tau");
92 channelVector.push_back(
"-- ca6: esums");
93 channelVector.push_back(
"-- ca7: jet_cnts");
94 channelVector.push_back(
"-- ca8: free");
95 channelVector.push_back(
"-- ca9: free");
96 channelVector.push_back(
"-- ca10: free");
99 if (std::filesystem::is_directory(
outputDir_)) {
100 std::cout << std::endl <<
"Ok - Output directory exists!" << std::endl;
103 std::cout << std::endl <<
"Directory: " <<
outputDir_ <<
" has been created!" << std::endl;
105 std::cout << std::endl <<
"Error while creating directory: " <<
outputDir_ <<
" !" << std::endl;
112 if (vhdlWriter.
makeFirmware(conditionMap, algorithmMap)) {
115 <<
"*********************** I'm ready ;-) **************************" << std::endl
117 <<
"You can find the firmware in dircetory: " <<
outputDir_ << std::endl
119 <<
"******************************************************************" << std::endl;
T getParameter(std::string const &) const
L1GtVhdlWriter(const edm::ParameterSet &)
constructor
std::string outputDir_
output directory
std::string vhdlDir_
templates directory
void writeVME(const std::vector< ConditionMap > &conditionMap, const std::map< std::string, int > &cond2intMap, const L1GtVhdlTemplateFile &header, const int spacesPerLevel=2)
bool makeFirmware(const std::vector< ConditionMap > &conditionMap, const AlgorithmMap &algorithmMap)
produces the firmware code
void analyze(const edm::Event &, const edm::EventSetup &) override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
L1GtVhdlTemplateFile retrunCommonHeader()
returns the common header
Log< level::Info, false > LogInfo
std::map< std::string, int > getCond2IntMap()
void buildCommonHeader(std::map< std::string, std::string > &headerParameters, const std::vector< std::string > &connectedChannels)
builds the common header for all files
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > menuToken_