23 #include "boost/filesystem.hpp" 51 if (outputDir_[outputDir_.length()-1]!=
'/')
62 edm::LogInfo(
"L1GtConfigProducers") <<
"\n\nL1 GT VHDL directory: " 81 std::vector<ConditionMap> conditionMap = l1GtMenu->
gtConditionMap();
85 int printVerbosity = 0;
91 std::map<std::string,std::string> headerParameters;
92 std::vector<std::string> channelVector;
94 headerParameters[
"vhdl_path"]=
"/vhdllibrarypath";
95 headerParameters[
"designer_date"]=
"20.05.1986";
96 headerParameters[
"designer_name"]=
"Philipp Wagner";
97 headerParameters[
"version"]=
"2.0";
98 headerParameters[
"designer_comments"]=
"produced in CMSSW";
99 headerParameters[
"gtl_setup_name"]=
"L1Menu2007NovGR";
101 channelVector.push_back(
"-- ca1: ieg");
102 channelVector.push_back(
"-- ca2: eg");
103 channelVector.push_back(
"-- ca3: jet");
104 channelVector.push_back(
"-- ca4: fwdjet");
105 channelVector.push_back(
"-- ca5: tau");
106 channelVector.push_back(
"-- ca6: esums");
107 channelVector.push_back(
"-- ca7: jet_cnts");
108 channelVector.push_back(
"-- ca8: free");
109 channelVector.push_back(
"-- ca9: free");
110 channelVector.push_back(
"-- ca10: free");
113 if (boost::filesystem::is_directory(
outputDir_))
115 std::cout<<std::endl<<
"Ok - Output directory exists!"<<std::endl;
128 if (vhdlWriter.
makeFirmware(conditionMap, algorithmMap))
131 <<
"*********************** I'm ready ;-) **************************" 132 <<std::endl <<std::endl
133 <<
"You can find the firmware in dircetory: " <<
outputDir_ 134 <<std::endl <<std::endl
135 <<
"******************************************************************" 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
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual ~L1GtVhdlWriter()
destructor
L1GtVhdlTemplateFile retrunCommonHeader()
returns the common header
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