CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
L1GtVhdlWriterCore Class Reference

#include <L1GtVhdlWriterCore.h>

Inheritance diagram for L1GtVhdlWriterCore:
L1GtVhdlDefinitions

Public Member Functions

void addJetCountsToCond2IntMap (const int chip, const std::vector< ConditionMap > &conditionMap, std::map< std::string, int > &conditionToIntegerMap)
 
void buildCommonHeader (std::map< std::string, std::string > &headerParameters, const std::vector< std::string > &connectedChannels)
 builds the common header for all files More...
 
std::string buildDefValString (const int &conditionIndex, const std::vector< int > &values)
 
bool buildDefValuesBuffer (L1GtVhdlTemplateFile &buffer, const std::map< L1GtConditionType, std::string > &typeList, const std::vector< std::string > &defValuesList, const L1GtObject &object)
 
std::string chip2OutputSubDir (const int &chip)
 
void countCondsAndAdd2NumberVec (const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap, const int &condChip)
 
bool findObjectType (const L1GtObject &object, ConditionMap &map)
 
bool getCaloSetupContentFromTriggerMenu (const unsigned short int &condChip, std::map< std::string, std::string > &caloParameters, const L1GtObject &caloObject)
 
L1GtConditionCategory getCategoryFromObject (const L1GtObject &object)
 gets condition category from object More...
 
std::map< std::string, int > getCond2IntMap ()
 
bool getCondChipVhdContentFromTriggerMenu (const unsigned short int &condChip, std::map< std::string, L1GtVhdlTemplateFile > &templates, std::map< std::string, std::string > &commonParams)
 
std::string getDefValsFromTriggerMenu (const L1GtConditionType &type, const L1GtObject &object, const VmeRegister &reg)
 
bool getEsumsSetupContentFromTriggerMenu (const unsigned short int &condChip, const L1GtObject &object, std::string &energySumParameter)
 contains only one subsitution parameter which is stored in reference energySumParameter More...
 
bool getIntVal (const std::map< std::string, int > &map, const std::string &searchValue, int &intVal)
 checks weather value searchValue exists in a <string,int> map, saves it in &intVal if it exists and returns false if not More...
 
std::vector< std::string > getMsgBuf ()
 returns intern message buffer More...
 
void getMuonSetupContentFromTriggerMenu (const unsigned short int &condChip, std::map< std::string, std::string > &muonParameters)
 
bool getSubstParamCommonFromTriggerMenu (const unsigned short int &condChip, L1GtVhdlTemplateFile &particle, const L1GtObject &object, const L1GtConditionCategory &category, std::string &parameterStr)
 builds the parameters particle_common for the cond_chip.vhd's More...
 
std::string gtTemplatesPath ()
 returns the templates path More...
 
std::string index4CondChipVhd (int intval)
 
void initializeDeltaConditions ()
 
 L1GtVhdlWriterCore (const std::string &templatesDirectory, const std::string &outputDirectory, const bool &debug)
 constructor More...
 
bool makeFirmware (const std::vector< ConditionMap > &conditionMap, const AlgorithmMap &algorithmMap)
 produces the firmware code More...
 
void msg (const std::string &message)
 adds a string to intern message buffer More...
 
L1GtVhdlTemplateFile openVhdlFileWithCommonHeader (const std::string &filename, const std::string &outputFilename)
 opens a new template file and inserts the common header More...
 
void printCommonHeader ()
 prints the common header More...
 
void printConditionsOfCategory (const L1GtConditionCategory &category, const ConditionMap &map)
 for debuggin More...
 
bool processAlgorithmMap (std::vector< std::map< int, std::string > > &algoStrings)
 
std::string retNumberOfConditionsString (const std::string &typeStr, const int &number)
 
L1GtVhdlTemplateFile retrunCommonHeader ()
 returns the common header More...
 
bool returnConditionsOfOneClass (const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap)
 
std::string sp (const std::string &name)
 converts string name to substiution parameter synthax; name –> More...
 
void writeAlgoSetup (std::vector< std::map< int, std::string > > &algoStrings)
 builds the prealgo_and_or setup More...
 
void writeCond2intMap2File ()
 produces a control output file for condition to integer conversion More...
 
void writeCondChipPkg (const int &chip)
 
void writeConditionChipSetup (std::map< std::string, L1GtVhdlTemplateFile > templates, const std::map< std::string, std::string > &common, const unsigned short int &chip)
 builds cond_chip.vhds More...
 
void writeDefValPkg (const std::vector< ConditionMap > &conditionMap, const int &chip)
 writes def_val_pkg.vhd More...
 
void writeEtmSetup (std::string &etmString, const int &condChip)
 builds etm setup files More...
 
void writeMuonSetupVhdl (std::map< std::string, std::string > &muonParameters, const std::string &particle, unsigned short int &condChip)
 builds muon setup files More...
 
void writeQsfSetupFiles (const std::string &version)
 builds the two quartus setup files. This routine is called in buildCommonHeader! More...
 
 ~L1GtVhdlWriterCore ()
 destructor More...
 
- Public Member Functions inherited from L1GtVhdlDefinitions
const std::map< L1GtObject,
std::string > 
getCalo2IntMap ()
 
const std::map
< L1GtConditionType,
std::string > 
getCond2StrMap ()
 
const std::map< L1GtObject,
std::string > 
getObj2StrMap ()
 
 L1GtVhdlDefinitions ()
 constructor More...
 
std::string obj2str (const L1GtObject &type)
 converts object type to firmware string More...
 
std::string type2str (const L1GtConditionType &type)
 converts a condition type to firmware string More...
 
virtual ~L1GtVhdlDefinitions ()
 destructor More...
 

Static Public Member Functions

static std::string int2str (const int &integerValue)
 converts a integer into a string More...
 

Private Attributes

const AlgorithmMapalgorithmMap_
 algorithm map More...
 
L1GtVhdlWriterBitManager bm_
 bit manager for bit operations More...
 
std::vector< L1GtObjectcaloObjects_
 list of all possible calo objects More...
 
std::map< L1GtObject, std::string > caloType2Int_
 converts L1GtObject to calo_nr More...
 
L1GtVhdlTemplateFile commonHeader_
 common header for all files More...
 
const std::vector< ConditionMap > * conditionMap_
 condition map More...
 
std::map< std::string, int > conditionToIntegerMap_
 stores to condition name to integer conversion table More...
 
std::map< L1GtConditionType,
std::string > 
condType2Str_
 converts L1GtConditionType to firmware string More...
 
bool debugMode_
 class will produce some additional debugging output if set More...
 
std::vector< L1GtObjectesumObjects_
 list of all possible esums objects More...
 
std::vector< std::string > internMessageBuf_
 
std::vector< std::vector
< std::string > > 
numberOfConditions_
 vector containing the initialization of all conditions More...
 
std::map< L1GtObject, std::string > objType2Str_
 converts L1GtObject to string More...
 
std::string outputDir_
 output directory More...
 
std::string version_
 
std::string vhdlDir_
 templates directory More...
 

Additional Inherited Members

- Public Types inherited from L1GtVhdlDefinitions
enum  VmeRegister {
  RegPtHighThreshold, RegPtLowThreshold, RegQualityRange, RegChargeCorrelation,
  RegEtThreshold
}
 
- Static Protected Attributes inherited from L1GtVhdlDefinitions
static const std::string outputSubDir1_
 
static const std::string outputSubDir2_
 
static const std::string quartusSetupFileChip1_
 
static const std::string quartusSetupFileChip2_
 
static const std::string stringConstantAlgo_
 
static const std::string stringConstantCalo_
 
static const std::string stringConstantCharge1s_
 
static const std::string stringConstantCharge2s_
 
static const std::string stringConstantCharge2wsc_
 
static const std::string stringConstantCharge3s_
 
static const std::string stringConstantCharge4s_
 
static const std::string stringConstantCommon_
 
static const std::string stringConstantConstantNr_
 
static const std::string stringConstantDefValId_
 
static const std::string stringConstantEsumsHigh_
 
static const std::string stringConstantEsumsLHighDefVal_
 
static const std::string stringConstantEsumsLow_
 
static const std::string stringConstantEsumsLowDefVal_
 
static const std::string stringConstantJetCountsDefVal_
 
static const std::string stringConstantPth_
 
static const std::string stringConstantPtHighDefVal_
 
static const std::string stringConstantPtl_
 
static const std::string stringConstantPtLowDefVal_
 
static const std::string stringConstantQuality_
 
static const std::string stringConstantQualityDefVal_
 
static const std::string stringConstantQuargeDefVal_
 
static const std::string substParamAlgos_
 
static const std::string substParamCaloDefVals_
 
static const std::string substParamCaloOrMuon_
 
static const std::string substParamCharge_
 
static const std::string substParamContent_
 
static const std::string substParamDefValId_
 
static const std::string substParamDefValType_
 
static const std::string substParamEsumsDefVals_
 
static const std::string substParamJetCntsCommon_
 
static const std::string substParamJetsDefVals_
 
static const std::string substParamMaxNr_
 
static const std::string substParamMuonDefVals_
 
static const std::string substParamOthers_
 
static const std::string substParamParticle_
 
static const std::string substParamType_
 
static const std::string vhdlTemplateAlgoAndOr_
 
static const std::string vhdlTemplateCaloSetup_
 
static const std::string vhdlTemplateCondChip_
 
static const std::string vhdlTemplateCondChipPkg1_
 
static const std::string vhdlTemplateCondChipPkg2_
 
static const std::string vhdlTemplateDefValPkg_
 
static const std::string vhdlTemplateEtmSetup_
 
static const std::string vhdlTemplateMuonSetup_
 

Detailed Description

writes the actual VHDL code and stores global information like the common header. This class is using parameter maps containing the substitution parameters and their content.

Implementation: <TODO: enter implementation details>

Author
Philipp Wagner

$Date$ $Revision$

Description: a class to deal with VHDL template files

Implementation: <TODO: enter implementation details>

Author
: Philipp Wagner

$Date$ $Revision$

Definition at line 44 of file L1GtVhdlWriterCore.h.

Constructor & Destructor Documentation

L1GtVhdlWriterCore::L1GtVhdlWriterCore ( const std::string &  templatesDirectory,
const std::string &  outputDirectory,
const bool &  debug 
)

constructor

Definition at line 51 of file L1GtVhdlWriterCore.cc.

References caloObjects_, caloType2Int_, CenJet, condType2Str_, debug, debugMode_, esumObjects_, ETM, ETT, ForJet, L1GtVhdlDefinitions::getCalo2IntMap(), L1GtVhdlDefinitions::getCond2StrMap(), L1GtVhdlDefinitions::getObj2StrMap(), HTT, IsoEG, NoIsoEG, numberOfConditions_, objType2Str_, outputDir_, TauJet, groupFilesInBlocks::temp, and vhdlDir_.

53 {
54 
55  // set templates directory
56  vhdlDir_=templatesDirectory;
57 
58  // set output directory
59  outputDir_=outputDirectory;
60 
61  // Get maps
63 
67 
68  // fill calo object vector
69  caloObjects_.push_back(IsoEG);
70  caloObjects_.push_back(NoIsoEG);
71  caloObjects_.push_back(CenJet);
72  caloObjects_.push_back(ForJet);
73  caloObjects_.push_back(TauJet);
74 
75  esumObjects_.push_back(HTT);
76  esumObjects_.push_back(ETT);
77  esumObjects_.push_back(ETM);
78 
79  // prepare number of condition vector with two empty string vectors for the two condition chips
80  std::vector<std::string> temp;
81  numberOfConditions_.push_back(temp);
82  numberOfConditions_.push_back(temp);
83 
84  // set debug mode
86 
87 }
std::string vhdlDir_
templates directory
const std::map< L1GtConditionType, std::string > getCond2StrMap()
std::vector< L1GtObject > esumObjects_
list of all possible esums objects
std::map< L1GtObject, std::string > caloType2Int_
converts L1GtObject to calo_nr
Definition: L1GtObject.h:38
std::map< L1GtConditionType, std::string > condType2Str_
converts L1GtConditionType to firmware string
std::vector< L1GtObject > caloObjects_
list of all possible calo objects
std::vector< std::vector< std::string > > numberOfConditions_
vector containing the initialization of all conditions
Definition: L1GtObject.h:40
std::string outputDir_
output directory
Definition: L1GtObject.h:39
const std::map< L1GtObject, std::string > getObj2StrMap()
#define debug
Definition: MEtoEDMFormat.h:34
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
bool debugMode_
class will produce some additional debugging output if set
const std::map< L1GtObject, std::string > getCalo2IntMap()
L1GtVhdlWriterCore::~L1GtVhdlWriterCore ( )

destructor

Definition at line 90 of file L1GtVhdlWriterCore.cc.

91 {
92  // empty
93 }

Member Function Documentation

void L1GtVhdlWriterCore::addJetCountsToCond2IntMap ( const int  chip,
const std::vector< ConditionMap > &  conditionMap,
std::map< std::string, int > &  conditionToIntegerMap 
)

calculates the integer value for jet counts conditions and furthermore counts how many jet counts of one type are in trigger menu

Definition at line 1383 of file L1GtVhdlWriterCore.cc.

References CondJetCounts, i, int2str(), JetCounts, numberOfConditions_, L1GtJetCountsTemplate::objectParameter(), retNumberOfConditionsString(), returnConditionsOfOneClass(), and TypeJetCounts.

Referenced by makeFirmware().

1386 {
1387  ConditionMap jetConditions;
1388 
1390  conditionMap.at(chip-1), jetConditions);
1391  /*
1392  int counter = 0;
1393 
1394  for (ConditionMap::const_iterator iterCond = jetConditions.begin(); iterCond != jetConditions.end(); iterCond++)
1395  {
1396  conditionToIntegerMap_[iterCond->first]=counter;
1397  counter++;
1398  msg(iterCond->first);
1399  }
1400 
1401  */
1402 
1403  unsigned int maxJetsCountsIndex = 11;
1404 
1405  for (unsigned int i= 0; i<=maxJetsCountsIndex; i++)
1406  {
1407  int counter = 0;
1408 
1409  for (ConditionMap::const_iterator iterCond = jetConditions.begin(); iterCond
1410  != jetConditions.end(); iterCond++)
1411  {
1412 
1413  L1GtJetCountsTemplate* jetsTemplate =
1414  static_cast<L1GtJetCountsTemplate*>(iterCond->second);
1415  const std::vector<L1GtJetCountsTemplate::ObjectParameter>* op =
1416  jetsTemplate->objectParameter();
1417 
1418  conditionToIntegerMap_[iterCond->first]=counter;
1419  if ((*op)[0].countIndex==i)
1420  counter++;
1421 
1422  //msg(int2str((*op)[0].countIndex));
1423 
1424  }
1425 
1426  numberOfConditions_.at(chip-1).push_back(retNumberOfConditionsString("jet_cnts_"
1427  +int2str(i)+"_cond", counter));
1428 
1429  }
1430 
1431 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
std::vector< std::vector< std::string > > numberOfConditions_
vector containing the initialization of all conditions
static std::string int2str(const int &integerValue)
converts a integer into a string
bool returnConditionsOfOneClass(const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap)
const std::vector< ObjectParameter > * objectParameter() const
std::string retNumberOfConditionsString(const std::string &typeStr, const int &number)
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
void L1GtVhdlWriterCore::buildCommonHeader ( std::map< std::string, std::string > &  headerParameters,
const std::vector< std::string > &  connectedChannels 
)

builds the common header for all files

Definition at line 1045 of file L1GtVhdlWriterCore.cc.

References commonHeader_, L1GtVhdlTemplateFile::insert(), msg(), L1GtVhdlTemplateFile::open(), L1GtVhdlTemplateFile::substitute(), version_, and vhdlDir_.

Referenced by L1GtVhdlWriter::analyze().

1048 {
1049  commonHeader_.open(vhdlDir_+"InternalTemplates/header");
1050 
1051  std::map<std::string,std::string>::iterator iter = headerParameters.begin();
1052 
1053  // loop over the header parameter map and replace all subsitution
1054  // parameters with their values
1055  while (iter != headerParameters.end() )
1056  {
1057  commonHeader_.substitute((*iter).first, (*iter).second);
1058  iter++;
1059  }
1060 
1061  commonHeader_.insert("$(connected_channels_1)", connectedChannels);
1062  commonHeader_.insert("$(connected_channels_2)", connectedChannels);
1063 
1064  //---------------------build the Quartus configuration files----------------------------------------
1065 
1066  //writeQsfSetupFiles(headerParameters["version"]);
1067 
1068  version_=headerParameters["version"];
1069 
1070  msg("Build Common header and Quartus setup files sucessuflly!");
1071 
1072 }
std::string vhdlDir_
templates directory
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
bool insert(const std::string &atLine, std::vector< std::string > content)
replaces the whole line containing atLine and inserts content instead of it
L1GtVhdlTemplateFile commonHeader_
common header for all files
void msg(const std::string &message)
adds a string to intern message buffer
bool open(const std::string &fileName, bool internal=false)
opens a template file. If the header information shall be parsed intern has to be set to true ...
std::string L1GtVhdlWriterCore::buildDefValString ( const int &  conditionIndex,
const std::vector< int > &  values 
)

builds the string representing a condition in def_val_pkg.vhd. Parameters are condition index and a vector containig default values.

Definition at line 1480 of file L1GtVhdlWriterCore.cc.

1482 {
1483  // has to produce something like 1 => ("00000000", "00000000")
1484 
1485  return "1 => (\"00000000\", \"00000000\")";
1486 }
bool L1GtVhdlWriterCore::buildDefValuesBuffer ( L1GtVhdlTemplateFile buffer,
const std::map< L1GtConditionType, std::string > &  typeList,
const std::vector< std::string > &  defValuesList,
const L1GtObject object 
)

helper, used by writeDefValPkg. Builds default values buffer for each object type. this buffer finally is inserte in the def_val_pkg.vhd template file

Definition at line 1667 of file L1GtVhdlWriterCore.cc.

References L1GtVhdlTemplateFile::append(), condType2Str_, ws_sso_content_reader::content, ETM, ETT, L1GtVhdlTemplateFile::findAndReplaceString(), getDefValsFromTriggerMenu(), L1GtVhdlTemplateFile::getInternalParameter(), HTT, i, JetCounts, Mu, objType2Str_, L1GtVhdlTemplateFile::open(), L1GtVhdlDefinitions::RegEtThreshold, sp(), L1GtVhdlDefinitions::stringConstantCalo_, L1GtVhdlDefinitions::stringConstantDefValId_, L1GtVhdlTemplateFile::substitute(), L1GtVhdlDefinitions::substParamCaloOrMuon_, L1GtVhdlDefinitions::substParamContent_, L1GtVhdlDefinitions::substParamDefValId_, L1GtVhdlDefinitions::substParamDefValType_, L1GtVhdlDefinitions::substParamMaxNr_, L1GtVhdlDefinitions::substParamOthers_, L1GtVhdlDefinitions::substParamParticle_, L1GtVhdlDefinitions::substParamType_, and vhdlDir_.

Referenced by writeDefValPkg().

1670 {
1671  // type iterator
1672  std::map<L1GtConditionType,std::string>::const_iterator typeIter;
1673 
1674  for (typeIter=typeList.begin(); typeIter!=typeList.end(); typeIter++)
1675  {
1676 
1677  for (unsigned int i = 0; i<defValuesList.size(); i++)
1678  {
1679 
1680  // open a new internale template
1681  L1GtVhdlTemplateFile internalTemplate;
1682  internalTemplate.open(vhdlDir_+"InternalTemplates/defvalpkg", true);
1683 
1684  std::string
1685  idString =
1687 
1688  // The following three steps convert "$(particle)_$(type)_$(defvaltype)_def_val"
1689  // to e.g. "muon_1s_et_def_val"
1690 
1691  // replace the substiution parameter particle with muon - thereby parameterString is a
1692  // reference and therefore changed.
1694  sp(substParamParticle_), objType2Str_[object]);
1695 
1696  // replace the substiution parameter particle with muon
1698  sp(substParamType_), typeIter->second);
1699 
1700  // replace the substiution parameter defvaltype with muon
1702  sp(substParamDefValType_), defValuesList.at(i));
1703 
1704  // usage of the subsitute routine:
1705  // first the substitution parameter, then the content
1706  internalTemplate.substitute(substParamDefValId_, idString);
1707 
1708  // !here the body of the internale template is build - almost done!
1709 
1710  // The body looks as follows $(def_val), $(max_nr), $(content) and
1711  // $(others) have to be subsituted
1712 
1713  /*
1714  * CONSTANT $(def_val) : $(calo_or_muon)_maxnr$(max_nr)vector8_arr :=
1715  * (
1716  * $(content)
1717  * $(others)
1718  * );
1719  */
1720 
1721  // substitute the particle
1722  internalTemplate.substitute(substParamParticle_,
1723  objType2Str_[object]);
1724 
1725  // go on with max number - get the correct expression for max number from the internal template
1726  internalTemplate.substitute(substParamMaxNr_,
1727  internalTemplate.getInternalParameter(substParamMaxNr_+"_"
1728  +condType2Str_[typeIter->first]));
1729 
1730  // now we have to choose the correct OTHERS string for the
1731  // internal template. The identifier for the OTHERS string
1732  // is the condition type (as firmware string) therefore:
1733 
1734  // we get it as follows
1735  std::string othersString;
1736 
1737  // jet_cnts are a special case
1738  if (object==JetCounts || object==HTT || object==ETM || object==ETT )
1739  othersString
1740  = internalTemplate.getInternalParameter(objType2Str_[JetCounts]);
1741  else
1742  othersString
1743  = internalTemplate.getInternalParameter(typeIter->second);
1744 
1745  internalTemplate.substitute(substParamOthers_, othersString);
1746 
1747  // the actual content, taken from the trigger menu
1748 
1749  std::string content = getDefValsFromTriggerMenu(typeIter->first,
1750  object, RegEtThreshold);
1751 
1752  internalTemplate.substitute(substParamContent_, content);
1753 
1754  // Finally the parameter $(calo_or_muon) is left open
1755  std::string caloOrMuonStr = stringConstantCalo_;
1756 
1757  if (object == Mu)
1758  caloOrMuonStr = objType2Str_[Mu];
1759 
1760  internalTemplate.substitute(substParamCaloOrMuon_, caloOrMuonStr);
1761 
1762  // The internal template has been processed and now can be added to the buffer..
1763  buffer.append(internalTemplate);
1764 
1765  }
1766 
1767  }
1768 
1769  return true;
1770 }
int i
Definition: DBlmapReader.cc:9
std::string vhdlDir_
templates directory
std::string sp(const std::string &name)
converts string name to substiution parameter synthax; name –&gt;
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
static const std::string stringConstantDefValId_
Definition: L1GtObject.h:38
std::map< L1GtConditionType, std::string > condType2Str_
converts L1GtConditionType to firmware string
std::string getDefValsFromTriggerMenu(const L1GtConditionType &type, const L1GtObject &object, const VmeRegister &reg)
static const std::string substParamDefValType_
Definition: L1GtObject.h:40
static const std::string substParamType_
void append(const std::string &str)
adds a line at the end of the the file with the content of str
static const std::string substParamDefValId_
std::string getInternalParameter(const std::string &indentifier)
returns a parameter of a internal template file
Definition: L1GtObject.h:32
static const std::string stringConstantCalo_
static const std::string substParamContent_
static const std::string substParamParticle_
Definition: L1GtObject.h:39
static const std::string substParamOthers_
static const std::string substParamCaloOrMuon_
static const std::string substParamMaxNr_
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
bool open(const std::string &fileName, bool internal=false)
opens a template file. If the header information shall be parsed intern has to be set to true ...
std::string L1GtVhdlWriterCore::chip2OutputSubDir ( const int &  chip)

Definition at line 906 of file L1GtVhdlWriterCore.cc.

References outputDir_, L1GtVhdlDefinitions::outputSubDir1_, and L1GtVhdlDefinitions::outputSubDir2_.

Referenced by writeAlgoSetup(), writeCond2intMap2File(), writeCondChipPkg(), writeConditionChipSetup(), writeDefValPkg(), writeEtmSetup(), writeMuonSetupVhdl(), and writeQsfSetupFiles().

907 {
908  if (chip==1)
909  return outputDir_+"/"+outputSubDir1_+"/";
910  if (chip==2)
911  return outputDir_+"/"+outputSubDir2_+"/";
912 
913  return "";
914 }
static const std::string outputSubDir1_
static const std::string outputSubDir2_
std::string outputDir_
output directory
void L1GtVhdlWriterCore::countCondsAndAdd2NumberVec ( const L1GtConditionType type,
const L1GtConditionCategory category,
const L1GtObject object,
const ConditionMap map,
ConditionMap outputMap,
const int &  condChip 
)

returns conditions of a class in output map and counts the occurance of all conditions of a certain type at the same time with the result being stored in numberOfConditions_ in the following format: CONSTANT nr_muon_3 : integer := 0; Tis is the format for the cond_chip_pkg files.

Definition at line 1772 of file L1GtVhdlWriterCore.cc.

References condType2Str_, numberOfConditions_, objType2Str_, retNumberOfConditionsString(), and returnConditionsOfOneClass().

Referenced by getCaloSetupContentFromTriggerMenu(), getEsumsSetupContentFromTriggerMenu(), and getMuonSetupContentFromTriggerMenu().

1776 {
1777 
1778  // Get the absoloute amount of conditions
1779 
1780  int number;
1781 
1782  if (returnConditionsOfOneClass(type, category, object, map, outputMap))
1783  number=outputMap.size();
1784  else
1785  number=0;
1786 
1787  std::string initstr = retNumberOfConditionsString(objType2Str_[object]+"_"
1788  +condType2Str_[type], number);
1789 
1790  numberOfConditions_.at(condChip-1).push_back(initstr);
1791 
1792 }
type
Definition: HCALResponse.h:22
std::map< L1GtConditionType, std::string > condType2Str_
converts L1GtConditionType to firmware string
std::vector< std::vector< std::string > > numberOfConditions_
vector containing the initialization of all conditions
bool returnConditionsOfOneClass(const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap)
std::string retNumberOfConditionsString(const std::string &typeStr, const int &number)
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
bool L1GtVhdlWriterCore::findObjectType ( const L1GtObject object,
ConditionMap map 
)

Definition at line 118 of file L1GtVhdlWriterCore.cc.

References i, dbtoconf::object, findQualityFiles::size, and ntuplemaker::status.

120 {
121  bool status = false;
122 
123  ConditionMap::iterator condIter = map.begin();
124  while (condIter!=map.end())
125  {
126  for (unsigned int i=0; i<(condIter->second->objectType()).size(); i++)
127  {
128  if (condIter->second->objectType()[i]==object)
129  {
130  status = true;
131  break;
132  }
133  }
134 
135  if (status)
136  break;
137  condIter++;
138  }
139 
140  return status;
141 }
int i
Definition: DBlmapReader.cc:9
list object
Definition: dbtoconf.py:77
tuple status
Definition: ntuplemaker.py:245
tuple size
Write out results.
bool L1GtVhdlWriterCore::getCaloSetupContentFromTriggerMenu ( const unsigned short int &  condChip,
std::map< std::string, std::string > &  caloParameters,
const L1GtObject caloObject 
)

Definition at line 318 of file L1GtVhdlWriterCore.cc.

References bm_, L1GtVhdlWriterBitManager::buildDeltaEtaCalo(), L1GtVhdlWriterBitManager::buildDeltaPhiCalo(), L1GtVhdlWriterBitManager::buildEtaCalo(), L1GtVhdlWriterBitManager::buildPhiCalo(), CondCalo, conditionToIntegerMap_, L1GtCaloTemplate::correlationParameter(), countCondsAndAdd2NumberVec(), CommonMethods::cp(), debugMode_, i, L1GtCaloTemplate::objectParameter(), Type1s, Type2s, Type2wsc, and Type4s.

Referenced by makeFirmware().

322 {
323  // vector containing all relevant types for calo conditions
324  std::vector<L1GtConditionType> caloConditionTypes;
325 
326  caloConditionTypes.push_back(Type1s);
327  caloConditionTypes.push_back(Type2s);
328  caloConditionTypes.push_back(Type2wsc);
329  caloConditionTypes.push_back(Type4s);
330 
331  for (unsigned int i = 0; i<caloConditionTypes.size(); i++)
332  {
333  unsigned int counter=0;
334 
335  ConditionMap caloConditions;
336 
337  // stores all conditions of type given in the first three parameters
338  countCondsAndAdd2NumberVec(caloConditionTypes.at(i), CondCalo,
339  caloObject, (*conditionMap_).at(condChip-1), caloConditions,
340  condChip);
341 
342  for (ConditionMap::const_iterator iterCond = caloConditions.begin(); iterCond
343  != caloConditions.end(); iterCond++)
344  {
345 
346  // add this condition to name -> integer conversion map
347  conditionToIntegerMap_[iterCond->first]=counter;
348 
349  L1GtCaloTemplate* m_gtCaloTemplate =
350  static_cast<L1GtCaloTemplate*>(iterCond->second);
351  const std::vector<L1GtCaloTemplate::ObjectParameter>* op =
352  m_gtCaloTemplate->objectParameter();
353 
354  if (caloConditionTypes.at(i)==Type1s)
355  {
356 
357  //= static_cast<std::vector<L1GtCaloTemplate::ObjectPaenergySumParameter+=rameter*> >(op);
358 
359  // build eta
360  caloParameters["eta_1_s"] += (bm_.buildEtaCalo(op, 1, counter));
361 
362  caloParameters["phi_1_s"]+= bm_.buildPhiCalo(op, 1, counter);
363 
364  if (debugMode_)
365  {
366  caloParameters["eta_1_s"]+=("--"+iterCond->first+"\n");
367  caloParameters["phi_1_s"]+=("--"+iterCond->first+"\n");
368  }
369 
370  } else if (caloConditionTypes.at(i)==Type2s)
371  {
372 
373  // build eta
374  caloParameters["eta_2_s"] += (bm_.buildEtaCalo(op, 2, counter));
375 
376  // add the parameters to parameter map
377  caloParameters["phi_2_s"]+= bm_.buildPhiCalo(op, 2, counter);
378 
379  if (debugMode_)
380  {
381  caloParameters["eta_2_s"]+=("--"+iterCond->first+"\n");
382  caloParameters["phi_2_s"]+=("--"+iterCond->first+"\n");
383  }
384 
385  } else if (caloConditionTypes.at(i)==Type4s)
386  {
387  // build eta
388  caloParameters["eta_4"] += (bm_.buildEtaCalo(op, 4, counter));
389 
390  // add the parameters to parameter map
391  caloParameters["phi_4"]+= bm_.buildPhiCalo(op, 4, counter);
392 
393  if (debugMode_)
394  {
395  caloParameters["eta_4"]+=("--"+iterCond->first+"\n");
396  caloParameters["phi_4"]+=("--"+iterCond->first+"\n");
397  }
398 
399  } else if (caloConditionTypes.at(i)==Type2wsc)
400  {
402  m_gtCaloTemplate->correlationParameter();
403 
404  // build eta
405  caloParameters["eta_2_wsc"]
406  += (bm_.buildEtaCalo(op, 2, counter));
407 
408  // build phi
409  caloParameters["phi_2_wsc"]+= bm_.buildPhiCalo(op, 2, counter);
410 
411  // build delta_eta
412  caloParameters["delta_eta"] += bm_.buildDeltaEtaCalo(cp,
413  counter);
414 
415  // build delta_phi
416  caloParameters["delta_phi"] += bm_.buildDeltaPhiCalo(cp,
417  counter);
418 
419  if (debugMode_)
420  {
421  caloParameters["eta_2_wsc"]+=("--"+iterCond->first+"\n");
422  caloParameters["phi_2_wsc"]+=("--"+iterCond->first+"\n");
423  caloParameters["delta_eta"]+=("--"+iterCond->first+"\n");
424  caloParameters["delta_phi"]+=("--"+iterCond->first+"\n");
425  }
426 
427  }
428 
429  counter++;
430 
431  }
432 
433  }
434 
435  return true;
436 }
int i
Definition: DBlmapReader.cc:9
std::string buildEtaCalo(const std::vector< L1GtCaloTemplate::ObjectParameter > *op, const unsigned int &num, const unsigned int &counter)
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
L1GtVhdlWriterBitManager bm_
bit manager for bit operations
std::string buildDeltaEtaCalo(const L1GtCaloTemplate::CorrelationParameter *&cp, const unsigned int &counter)
std::string buildDeltaPhiCalo(const L1GtCaloTemplate::CorrelationParameter *&cp, const unsigned int &counter)
std::string buildPhiCalo(const std::vector< L1GtCaloTemplate::ObjectParameter > *op, const unsigned int &num, const unsigned int &counter)
typedef for correlation parameters
void countCondsAndAdd2NumberVec(const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap, const int &condChip)
const CorrelationParameter * correlationParameter() const
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
const std::vector< ObjectParameter > * objectParameter() const
bool debugMode_
class will produce some additional debugging output if set
L1GtConditionCategory L1GtVhdlWriterCore::getCategoryFromObject ( const L1GtObject object)

gets condition category from object

Definition at line 1839 of file L1GtVhdlWriterCore.cc.

References python.rootplot.argparse::category, CenJet, CondCalo, CondEnergySum, CondJetCounts, CondMuon, CondNull, ETM, ETT, ForJet, HTT, IsoEG, JetCounts, Mu, NoIsoEG, and TauJet.

Referenced by getDefValsFromTriggerMenu().

1841 {
1842 
1844 
1845  if (object==Mu)
1846  category = CondMuon;
1847  else if (object==ETM || object==HTT || object==ETT)
1848  category = CondEnergySum;
1849  else if (object==IsoEG|| object==NoIsoEG || object==CenJet || object
1850  ==ForJet || object==TauJet)
1851  category = CondCalo;
1852  else if (object==IsoEG|| object==NoIsoEG || object==CenJet || object
1853  ==ForJet || object==TauJet)
1854  category = CondCalo;
1855  else if (object==JetCounts)
1856  category = CondJetCounts;
1857  else
1858  category=CondNull;
1859 
1860  return category;
1861 
1862 }
Definition: L1GtObject.h:38
Definition: L1GtObject.h:40
L1GtConditionCategory
condition categories
Definition: L1GtObject.h:32
Definition: L1GtObject.h:39
std::map< std::string, int > L1GtVhdlWriterCore::getCond2IntMap ( )

Definition at line 1915 of file L1GtVhdlWriterCore.cc.

References conditionToIntegerMap_.

Referenced by L1GtVhdlWriter::analyze().

1916 {
1917  return conditionToIntegerMap_;
1918 }
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
bool L1GtVhdlWriterCore::getCondChipVhdContentFromTriggerMenu ( const unsigned short int &  condChip,
std::map< std::string, L1GtVhdlTemplateFile > &  templates,
std::map< std::string, std::string > &  commonParams 
)

builds the substitution parameters for the cond_chip.vhd the condition chip that will be processed

Parameters
conditionToIntegerMapthis has to be a already FILLED conversion map. therefore this routine has to be called after all those which are adding information to the conditionToIntegerMap map (getMuonSetupContentFromTriggerMenu, buildCaloParameterMap...)
templatesin this map the final content for the subsitution parameters is stored in VHDL template file format

Definition at line 530 of file L1GtVhdlWriterCore.cc.

References L1GtVhdlTemplateFile::append(), asciidump::at, caloObjects_, caloType2Int_, CondCalo, CondCorrelation, CondEnergySum, conditionToIntegerMap_, CondJetCounts, CondMuon, CondNull, condType2Str_, esumObjects_, ETM, spr::find(), L1GtVhdlTemplateFile::findAndReplaceString(), L1GtVhdlTemplateFile::getInternalParameter(), getIntVal(), getSubstParamCommonFromTriggerMenu(), i, index4CondChipVhd(), int2str(), metsig::jet, JetCounts, msg(), Mu, metsig::muon, L1GtCondition::nrObjects(), L1GtJetCountsTemplate::objectParameter(), objType2Str_, L1GtVhdlTemplateFile::open(), AlCaHLTBitMon_ParallelJobs::p, L1GtVhdlTemplateFile::removeEmptyLines(), L1GtVhdlTemplateFile::returnParameterMap(), sp(), L1GtVhdlDefinitions::stringConstantCharge1s_, L1GtVhdlDefinitions::stringConstantCharge2s_, L1GtVhdlDefinitions::stringConstantCharge2wsc_, L1GtVhdlDefinitions::stringConstantCharge3s_, L1GtVhdlDefinitions::stringConstantCharge4s_, L1GtVhdlDefinitions::stringConstantCommon_, L1GtVhdlTemplateFile::substitute(), L1GtVhdlDefinitions::substParamCharge_, L1GtVhdlDefinitions::substParamJetCntsCommon_, L1GtVhdlDefinitions::substParamParticle_, L1GtVhdlDefinitions::substParamType_, Type1s, Type2s, Type2wsc, Type3s, Type4s, and vhdlDir_.

Referenced by makeFirmware().

534 {
535 
536  // open the necessary internal templates
537  L1GtVhdlTemplateFile muon, calo, esums, jet;
538 
539  muon.open(vhdlDir_+"InternalTemplates/muon", true);
540  muon.substitute("particle", "muon");
541 
542  calo.open(vhdlDir_+"InternalTemplates/calo", true);
543  esums.open(vhdlDir_+"InternalTemplates/esums", true);
544  jet.open(vhdlDir_+"InternalTemplates/jet_cnts", true);
545 
546  /*
547  charge1s.open(vhdlDir_+"InternalTemplates/charge_1s",false);
548  charge2s.open(vhdlDir_+"InternalTemplates/charge_2s",false);
549  charge2wsc.open(vhdlDir_+"InternalTemplates/charge_2_wsc",false);
550  charge3s.open(vhdlDir_+"InternalTemplates/charge_3",false);
551  charge4s.open(vhdlDir_+"InternalTemplates/charge_4",false);
552  */
553 
554  // only for jet_cnts common parameter relevant since common parameter is build in this routine
555  std::vector<unsigned int> processedTypes;
556 
557  //-------------------------------------build the common parameters-------------------------------------------
558 
559  // build $(muon_common)
560  getSubstParamCommonFromTriggerMenu(condChip,muon, Mu, CondMuon, commonParams["muon_common"]);
561 
562  // build $(calo_common) - loop over all calo objects
563  std::vector<L1GtObject>::iterator caloObjIter = caloObjects_.begin();
564 
565  while (caloObjIter != caloObjects_.end())
566  {
567 
568  getSubstParamCommonFromTriggerMenu(condChip, muon, (*caloObjIter), CondCalo,
569  commonParams["calo_common"]);
570  caloObjIter++;
571 
572  }
573 
574  // build $(esums_common) - loop over all esums objects
575  std::vector<L1GtObject>::iterator esumObjIter = esumObjects_.begin();
576 
577  while (esumObjIter != esumObjects_.end())
578  {
579 
580  getSubstParamCommonFromTriggerMenu(condChip, esums, (*esumObjIter), CondEnergySum,
581  commonParams["esums_common"]);
582  esumObjIter++;
583 
584  }
585 
586  //--------------------------------------build the parameter maps----------------------------------------------
587 
588  // loop over condition map
589  for (ConditionMap::const_iterator iterCond = (*conditionMap_).at(condChip-1).begin(); iterCond != (*conditionMap_).at(condChip-1).end(); iterCond++)
590  {
591 
592  switch ((iterCond->second)->condCategory())
593  {
594 
595  case CondMuon:
596  {
597 
598  int cond2int;
599  if (!getIntVal(conditionToIntegerMap_, (iterCond->first), cond2int))
600  {
601  msg("Panik! Condition "+(iterCond->first)
602  +" does not have a integer equivalent!");
603  break;
604  }
605 
606  std::string intVal = index4CondChipVhd(cond2int);
607 
608  L1GtVhdlTemplateFile muoncopy = muon;
609 
610  muoncopy.substitute("type", condType2Str_[(iterCond->second)->condType()]);
611 
612  muoncopy.substitute("ser_no", intVal);
613 
614  muoncopy.substitute("name", iterCond->first);
615 
616  if ((iterCond->second)->condType() == Type1s)
617  {
618  muoncopy.substitute(substParamCharge_,
620  } else if ((iterCond->second)->condType() == Type2s)
621  {
622  muoncopy.substitute(substParamCharge_,
624  } else if ((iterCond->second)->condType() == Type2wsc)
625  {
626  muoncopy.substitute(substParamCharge_,
628  } else if ((iterCond->second)->condType() == Type3s)
629  {
630  muoncopy.substitute(substParamCharge_,
632  } else if ((iterCond->second)->condType() == Type4s)
633  {
634  muoncopy.substitute(substParamCharge_,
636  }
637 
638  std::string tempStr = muoncopy.returnParameterMap()["PREALGO"];
639 
640  muoncopy.findAndReplaceString(tempStr, "$(particle)", "muon");
641  muoncopy.findAndReplaceString(tempStr, "$(ser_no)", intVal);
642  muoncopy.findAndReplaceString(tempStr, "$(type)", condType2Str_[(iterCond->second)->condType()]);
643 
644  muoncopy.append(tempStr);
645 
646  muoncopy.removeEmptyLines();
647 
648  // add the processed internal template to parameter map
649  templates["muon"].append(muoncopy);
650 
651  }
652  break;
653 
654  case CondCalo:
655  {
656  int cond2int;
657 
658  if (!getIntVal(conditionToIntegerMap_, (iterCond->first), cond2int))
659  {
660  msg("Panik! Condition "+(iterCond->first)
661  +" does not have a integer equivalent!");
662  break;
663  }
664 
665  std::string intVal = index4CondChipVhd(cond2int);
666 
667  L1GtVhdlTemplateFile calocopy = calo;
668 
669  calocopy.substitute("type", condType2Str_[(iterCond->second)->condType()]);
670  calocopy.substitute("particle", objType2Str_[((iterCond->second)->objectType()).at(0)]);
671  calocopy.substitute("name", iterCond->first);
672  calocopy.substitute("ser_no", intVal);
673  calocopy.substitute("calo_nr", caloType2Int_[((iterCond->second)->objectType()).at(0)]);
674 
675  // builds something like tau_1_s(20));
676  calocopy.append(objType2Str_[((iterCond->second)->objectType()).at(0)] +"_"+condType2Str_[(iterCond->second)->condType()]+"("+intVal+"));");
677 
678  templates["calo"].append(calocopy);
679 
680  }
681  break;
682 
683  case CondEnergySum:
684  {
685 
686  int cond2int;
687 
688  if (!getIntVal(conditionToIntegerMap_, (iterCond->first), cond2int))
689  {
690  msg("Panik! Condition "+(iterCond->first)
691  +" does not have a integer equivalent!");
692  break;
693  }
694 
695  std::string intVal = index4CondChipVhd(cond2int);
696 
697  L1GtVhdlTemplateFile esumscopy = esums;
698 
699  esumscopy.substitute("type", condType2Str_[(iterCond->second)->condType()]);
700  esumscopy.substitute("particle", objType2Str_[((iterCond->second)->objectType()).at(0)]);
701  esumscopy.substitute("name", iterCond->first);
702  esumscopy.substitute("ser_no", intVal);
703 
704  if (((iterCond->second)->objectType()).at(0)==ETM)
705  esumscopy.substitute("if_etm_then_1_else_0", "1");
706  else
707  esumscopy.substitute("if_etm_then_1_else_0", "0");
708 
709  // builds something like htt_cond(4));
710  esumscopy.append(objType2Str_[((iterCond->second)->objectType()).at(0)] +"_"+condType2Str_[(iterCond->second)->condType()]+"("+ intVal+"));");
711 
712  templates["esums"].append(esumscopy);
713  }
714 
715  break;
716 
717  case CondJetCounts:
718  {
719 
720  // build the common parameter for the jet counts
721 
722  L1GtJetCountsTemplate* jetsTemplate =
723  static_cast<L1GtJetCountsTemplate*>(iterCond->second);
724 
725  int nObjects = iterCond->second->nrObjects();
726 
727  const std::vector<L1GtJetCountsTemplate::ObjectParameter>* op =
728  jetsTemplate->objectParameter();
729 
730  for (int i = 0; i < nObjects; i++)
731  {
732 
733  std::vector<unsigned int>::iterator p = find(
734  processedTypes.begin(), processedTypes.end(), (*op)[i].countIndex);
735 
736  // check, weather this count index was already processed
737  // and process it if not
738  if (p==processedTypes.end())
739  {
740  std::ostringstream indStr;
741  indStr<<(*op)[i].countIndex;
742 
743  std::string tempStr2 = jet.returnParameterMap()[stringConstantCommon_];
744  while (jet.findAndReplaceString(tempStr2,
746  ;
747  while (jet.findAndReplaceString(tempStr2,
748  sp(substParamType_), indStr.str()))
749  ;
750  commonParams[substParamJetCntsCommon_]+=tempStr2+"\n"; // +"<= '0';\n");
751  processedTypes.push_back((*op)[i].countIndex);
752  }
753 
754  }
755 
756  int cond2int;
757 
758  if (!getIntVal(conditionToIntegerMap_, (iterCond->first), cond2int))
759  {
760  msg("Panik! Condition "+(iterCond->first)
761  +" does not have a integer equivalent!");
762  break;
763  }
764 
765  std::string intVal = index4CondChipVhd(cond2int);
766 
767  L1GtVhdlTemplateFile jetcopy = jet;
768 
769  jetcopy.substitute("particle", condType2Str_[(iterCond->second)->condType()]);
770  jetcopy.substitute("type", int2str((*op)[0].countIndex));
771  jetcopy.substitute("name", iterCond->first);
772 
773  jetcopy.substitute("ser_no", intVal);
774 
775  // builds the final string
776  std::string tempStr = jetcopy.returnParameterMap()["PREALGO"];
777 
778  jetcopy.findAndReplaceString(tempStr, "$(particle)", "jet_cnt");
779  jetcopy.findAndReplaceString(tempStr, "$(ser_no)", intVal);
780  jetcopy.findAndReplaceString(tempStr, "$(type)", int2str((*op)[0].countIndex));
781 
782  jetcopy.append(tempStr);
783  jetcopy.removeEmptyLines();
784 
785  templates["jet_cnts"].append(jetcopy);
786  }
787 
788  break;
789 
790  case CondCorrelation:
791  {
792  //empty
793  }
794  break;
795 
796  case CondNull:
797  {
798  //empty
799  }
800  break;
801 
802  default:
803  {
804  //empty
805  }
806  break;
807  }
808  }
809 
810  // delete superfluous newlines at the end of common parameters
811  std::map<std::string,std::string>::iterator pIt = commonParams.begin();
812 
813  while (pIt!=commonParams.end())
814  {
815  if ((pIt->second)[((pIt->second).length()-1)] == '\n')
816  (pIt->second) = (pIt->second).substr(0, (pIt->second).length()-1);
817  pIt++;
818  }
819 
820  return true;
821 
822 }
std::map< std::string, std::string > returnParameterMap()
returns parameter map
int i
Definition: DBlmapReader.cc:9
std::string vhdlDir_
templates directory
std::string sp(const std::string &name)
converts string name to substiution parameter synthax; name –&gt;
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
const int nrObjects() const
get number of trigger objects
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
static const std::string stringConstantCharge2wsc_
std::vector< L1GtObject > esumObjects_
list of all possible esums objects
std::map< L1GtObject, std::string > caloType2Int_
converts L1GtObject to calo_nr
Definition: L1GtObject.h:38
std::map< L1GtConditionType, std::string > condType2Str_
converts L1GtConditionType to firmware string
std::vector< L1GtObject > caloObjects_
list of all possible calo objects
static const std::string substParamJetCntsCommon_
std::string index4CondChipVhd(int intval)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
static const std::string stringConstantCommon_
bool getIntVal(const std::map< std::string, int > &map, const std::string &searchValue, int &intVal)
checks weather value searchValue exists in a &lt;string,int&gt; map, saves it in &amp;intVal if it exists and r...
static std::string int2str(const int &integerValue)
converts a integer into a string
static const std::string stringConstantCharge4s_
const std::vector< ObjectParameter > * objectParameter() const
static const std::string substParamType_
bool getSubstParamCommonFromTriggerMenu(const unsigned short int &condChip, L1GtVhdlTemplateFile &particle, const L1GtObject &object, const L1GtConditionCategory &category, std::string &parameterStr)
builds the parameters particle_common for the cond_chip.vhd&#39;s
void append(const std::string &str)
adds a line at the end of the the file with the content of str
std::string getInternalParameter(const std::string &indentifier)
returns a parameter of a internal template file
static const std::string stringConstantCharge3s_
void msg(const std::string &message)
adds a string to intern message buffer
Definition: L1GtObject.h:32
static const std::string substParamParticle_
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
static const std::string stringConstantCharge1s_
static const std::string substParamCharge_
bool removeEmptyLines()
deletes all empty lines in a template file
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
bool open(const std::string &fileName, bool internal=false)
opens a template file. If the header information shall be parsed intern has to be set to true ...
static const std::string stringConstantCharge2s_
list at
Definition: asciidump.py:428
std::string L1GtVhdlWriterCore::getDefValsFromTriggerMenu ( const L1GtConditionType type,
const L1GtObject object,
const VmeRegister reg 
)

this routine extracts default values for def_val_pkg.vhd from trigger menu. it is used from buildDefValuesBuffer.

Definition at line 1488 of file L1GtVhdlWriterCore.cc.

References python.rootplot.argparse::category, CondCalo, getCategoryFromObject(), i, int2str(), L1GtCaloTemplate::objectParameter(), query::result, and returnConditionsOfOneClass().

Referenced by buildDefValuesBuffer().

1491 {
1493 
1494  // get condition category from object
1495 
1496  category = getCategoryFromObject(object);
1497 
1498  ConditionMap conditions;
1499  returnConditionsOfOneClass(type, category, object, (*conditionMap_).at(0),
1500  conditions);
1501 
1502  std::string result;
1503 
1504  if (category==CondCalo)
1505  {
1506  for (ConditionMap::const_iterator iterCond =conditions.begin(); iterCond
1507  != conditions.end(); iterCond++)
1508  {
1509  L1GtCaloTemplate* caloTemplate =
1510  static_cast<L1GtCaloTemplate*>(iterCond->second);
1511  const std::vector<L1GtCaloTemplate::ObjectParameter>* op =
1512  caloTemplate->objectParameter();
1513 
1514  unsigned int nObjects = iterCond->second->nrObjects();
1515 
1516  for (unsigned int i =0; i<nObjects; i++)
1517  {
1518  if (i==0)
1519  result+="(";
1520  result +="\"";
1521  result += int2str((*op).at(i).etThreshold);
1522  result +="\"";
1523  if (i!=nObjects-1)
1524  result +=",";
1525  else
1526  result+=")\n";
1527 
1528  }
1529  }
1530  }
1531 
1532  return "-- 0 => (\"00000000\", \"00000000\" ... )";
1533  return result;
1534 }
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
static std::string int2str(const int &integerValue)
converts a integer into a string
bool returnConditionsOfOneClass(const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap)
L1GtConditionCategory getCategoryFromObject(const L1GtObject &object)
gets condition category from object
tuple result
Definition: query.py:137
L1GtConditionCategory
condition categories
const std::vector< ObjectParameter > * objectParameter() const
bool L1GtVhdlWriterCore::getEsumsSetupContentFromTriggerMenu ( const unsigned short int &  condChip,
const L1GtObject object,
std::string &  energySumParameter 
)

contains only one subsitution parameter which is stored in reference energySumParameter

Definition at line 438 of file L1GtVhdlWriterCore.cc.

References bm_, L1GtVhdlWriterBitManager::buildPhiEnergySum(), CondEnergySum, conditionToIntegerMap_, countCondsAndAdd2NumberVec(), debugMode_, ETM, ETT, HTT, L1GtEnergySumTemplate::objectParameter(), TypeETM, TypeETT, and TypeHTT.

Referenced by makeFirmware().

441 {
442 
444 
445  unsigned int counter=0;
446 
447  if (object==HTT)
448  type= TypeHTT;
449  else if (object==ETM)
450  type= TypeETM;
451  else if (object==ETT)
452  type= TypeETT;
453 
454  ConditionMap esumsConditions;
455  // stores all conditions of type given in the first three parameters
457  (*conditionMap_).at(condChip-1), esumsConditions, condChip);
458 
459  for (ConditionMap::const_iterator iterCond = esumsConditions.begin(); iterCond
460  != esumsConditions.end(); iterCond++)
461  {
462  L1GtEnergySumTemplate* energySumTempl =
463  static_cast<L1GtEnergySumTemplate*>(iterCond->second);
464  const std::vector<L1GtEnergySumTemplate::ObjectParameter>* op =
465  energySumTempl->objectParameter();
466 
467  if (bm_.buildPhiEnergySum(op, 1, counter)!="")
468  energySumParameter+=bm_.buildPhiEnergySum(op, 1, counter);
469 
470  if (debugMode_)
471  {
472  energySumParameter+=("--"+iterCond->first+"\n");
473  }
474 
475  conditionToIntegerMap_[(iterCond->first)]=counter;
476 
477  counter++;
478  }
479 
480  return true;
481 
482 }
type
Definition: HCALResponse.h:22
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
Definition: L1GtObject.h:38
L1GtVhdlWriterBitManager bm_
bit manager for bit operations
L1GtConditionType
Definition: L1GtObject.h:40
const std::vector< ObjectParameter > * objectParameter() const
void countCondsAndAdd2NumberVec(const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap, const int &condChip)
Definition: L1GtObject.h:39
std::string buildPhiEnergySum(const std::vector< L1GtEnergySumTemplate::ObjectParameter > *op, const unsigned int &num, const unsigned int &counter)
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
bool debugMode_
class will produce some additional debugging output if set
bool L1GtVhdlWriterCore::getIntVal ( const std::map< std::string, int > &  map,
const std::string &  searchValue,
int &  intVal 
)

checks weather value searchValue exists in a <string,int> map, saves it in &intVal if it exists and returns false if not

Definition at line 1367 of file L1GtVhdlWriterCore.cc.

Referenced by getCondChipVhdContentFromTriggerMenu().

1369 {
1370  std::map<std::string,int>::const_iterator iter = map.find(searchValue);
1371  if (iter == map.end() )
1372  return false;
1373  intVal = (*iter).second;
1374  return true;
1375 }
std::vector< std::string > L1GtVhdlWriterCore::getMsgBuf ( )

returns intern message buffer

Definition at line 1362 of file L1GtVhdlWriterCore.cc.

References internMessageBuf_.

1363 {
1364  return internMessageBuf_;
1365 }
std::vector< std::string > internMessageBuf_
void L1GtVhdlWriterCore::getMuonSetupContentFromTriggerMenu ( const unsigned short int &  condChip,
std::map< std::string, std::string > &  muonParameters 
)

builds a parameter map that can be used by the L1GtVhdlWriterCore class the output is written into the parameter

Parameters
conditionToIntegerMapis the condition is added to this conversion map
muonParametershere the routine stores the content of the subsitution parameters
conditionMapcontaining the input

Definition at line 143 of file L1GtVhdlWriterCore.cc.

References bm_, L1GtVhdlWriterBitManager::buildDeltaEtaMuon(), L1GtVhdlWriterBitManager::buildDeltaPhiMuon(), L1GtVhdlWriterBitManager::buildEtaMuon(), L1GtVhdlWriterBitManager::buildPhiMuon(), conditionToIntegerMap_, CondMuon, L1GtMuonTemplate::correlationParameter(), countCondsAndAdd2NumberVec(), CommonMethods::cp(), debugMode_, i, Mu, L1GtMuonTemplate::objectParameter(), Type1s, Type2s, Type2wsc, Type3s, and Type4s.

Referenced by makeFirmware().

146 {
147  // vector containing all relevant types for muon conditions
148  std::vector<L1GtConditionType> muonConditionTypes;
149 
150  muonConditionTypes.push_back(Type1s);
151  muonConditionTypes.push_back(Type2s);
152  muonConditionTypes.push_back(Type2wsc);
153  muonConditionTypes.push_back(Type3s);
154  muonConditionTypes.push_back(Type4s);
155 
156  for (unsigned int i = 0; i<muonConditionTypes.size(); i++)
157  {
158  //std::cout<<i<<std::endl;
159 
160  ConditionMap MuonConditions1s;
161 
162  countCondsAndAdd2NumberVec(muonConditionTypes.at(i), CondMuon, Mu,
163  (*conditionMap_).at(condChip-1), MuonConditions1s, condChip);
164 
165  /*
166  // Get the absoloute amount of conditions
167  std::string initstr="CONSTANT nr_"+objType2Str_[Mu]+"_"+condType2Str_[muonConditionTypes.at(i)]+" : integer := ";
168 
169  if (returnConditionsOfOneClass(muonConditionTypes.at(i),CondMuon,Mu,conditionMap_.at(condChip-1), MuonConditions1s))
170  initstr+=(int2str(MuonConditions1s.size())+";");
171  else
172  initstr+=("0;");
173 
174  numberOfConditions_.at(condChip-1).push_back(initstr);
175 
176  */
177 
178  //std::cout<< std::hex << (*myObjectParameter).at(0).etThreshold << std::endl;
179  unsigned int counter=0;
180 
181  for (ConditionMap::const_iterator iterCond = MuonConditions1s.begin(); iterCond
182  != MuonConditions1s.end(); iterCond++)
183  {
184 
185  // add this condition to name -> integer conversion map
186  conditionToIntegerMap_[iterCond->first]=counter;
187 
188  L1GtMuonTemplate* m_gtMuonTemplate =
189  static_cast<L1GtMuonTemplate*>(iterCond->second);
190  const std::vector<L1GtMuonTemplate::ObjectParameter>* op =
191  m_gtMuonTemplate->objectParameter();
192 
193  if (muonConditionTypes.at(i)==Type1s)
194  {
195 
196  // build eta
197  muonParameters["eta_1_s"] += (bm_.buildEtaMuon(op, 1, counter));
198 
199  // add the parameters to parameter map
200  muonParameters["phi_h_1_s"]+= bm_.buildPhiMuon(op, 1, counter,
201  true);
202  muonParameters["phi_l_1_s"]+=bm_.buildPhiMuon(op, 1, counter,
203  false);
204 
205  if (debugMode_)
206  {
207  muonParameters["phi_l_1_s"]+=("--"+iterCond->first+"\n");
208  muonParameters["phi_h_1_s"]+=("--"+iterCond->first+"\n");
209  muonParameters["eta_1_s"] +=("--"+iterCond->first+"\n");
210  }
211 
212  } else
213 
214  if (muonConditionTypes.at(i)==Type2s)
215  {
216 
217  // build eta
218  muonParameters["eta_2_s"] += (bm_.buildEtaMuon(op, 2, counter));
219 
220  // add the parameters to parameter map
221  muonParameters["phi_h_2_s"]+= bm_.buildPhiMuon(op, 2, counter,
222  true);
223  muonParameters["phi_l_2_s"]+=bm_.buildPhiMuon(op, 2, counter,
224  false);
225 
226  if (debugMode_)
227  {
228  muonParameters["phi_l_2_s"]+=("--"+iterCond->first+"\n");
229  muonParameters["phi_h_2_s"]+=("--"+iterCond->first+"\n");
230  muonParameters["eta_2_s"] +=("--"+iterCond->first+"\n");
231  }
232 
233  } else
234  //m_gtMuonTemplate->print(std::cout);
235 
236  if (muonConditionTypes.at(i)==Type3s)
237  {
238 
239  // build eta
240  muonParameters["eta_3"] += (bm_.buildEtaMuon(op, 3, counter));
241 
242  // add the parameters to parameter map
243  muonParameters["phi_h_3"]+= bm_.buildPhiMuon(op, 3, counter,
244  true);
245  muonParameters["phi_l_3"]+=bm_.buildPhiMuon(op, 3, counter,
246  false);
247 
248  if (debugMode_)
249  {
250  muonParameters["phi_l_3"]+=("--"+iterCond->first+"\n");
251  muonParameters["phi_h_3"]+=("--"+iterCond->first+"\n");
252  muonParameters["eta_3"] +=("--"+iterCond->first+"\n");
253  }
254 
255  }
256 
257  if (muonConditionTypes.at(i)==Type4s)
258  {
259 
260  // build eta
261  muonParameters["eta_4"] += (bm_.buildEtaMuon(op, 4, counter));
262 
263  // add the parameters to parameter map
264  muonParameters["phi_h_4"]+= bm_.buildPhiMuon(op, 4, counter,
265  true);
266  muonParameters["phi_l_4"]+=bm_.buildPhiMuon(op, 4, counter,
267  false);
268 
269  if (debugMode_)
270  {
271  muonParameters["phi_l_4"]+=("--"+iterCond->first+"\n");
272  muonParameters["phi_h_4"]+=("--"+iterCond->first+"\n");
273  muonParameters["eta_4"] +=("--"+iterCond->first+"\n");
274  }
275 
276  }
277 
278  if (muonConditionTypes.at(i)==Type2wsc)
279  {
281  m_gtMuonTemplate->correlationParameter();
282 
283  // build eta
284  muonParameters["eta_2_wsc"]
285  += (bm_.buildEtaMuon(op, 2, counter));
286 
287  // build phi
288  muonParameters["phi_h_2_wsc"]+= bm_.buildPhiMuon(op, 2,
289  counter, true);
290  muonParameters["phi_l_2_wsc"]+=bm_.buildPhiMuon(op, 2, counter,
291  false);
292 
293  // build delta_eta
294  std::ostringstream dEta;
295  muonParameters["delta_eta"] += bm_.buildDeltaEtaMuon(cp,
296  counter);
297 
298  // build delta_phi
299  muonParameters["delta_phi"] += bm_.buildDeltaPhiMuon(cp,
300  counter);
301 
302  if (debugMode_)
303  {
304  muonParameters["eta_2_wsc"]+=("--"+iterCond->first+"\n");
305  muonParameters["phi_h_2_wsc"]+=("--"+iterCond->first+"\n");
306  muonParameters["phi_l_2_wsc"] +=("--"+iterCond->first+"\n");
307  muonParameters["delta_eta"]+=("--"+iterCond->first+"\n");
308  muonParameters["delta_phi"] +=("--"+iterCond->first+"\n");
309  }
310 
311  }
312  counter++;
313  }
314  }
315 
316 }
int i
Definition: DBlmapReader.cc:9
const CorrelationParameter * correlationParameter() const
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
L1GtVhdlWriterBitManager bm_
bit manager for bit operations
const std::vector< ObjectParameter > * objectParameter() const
std::string buildDeltaPhiMuon(const L1GtMuonTemplate::CorrelationParameter *&cp, const unsigned int &counter)
void countCondsAndAdd2NumberVec(const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap, const int &condChip)
std::string buildDeltaEtaMuon(const L1GtMuonTemplate::CorrelationParameter *&cp, const unsigned int &counter)
Definition: L1GtObject.h:32
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
std::string buildEtaMuon(const std::vector< L1GtMuonTemplate::ObjectParameter > *op, const unsigned int &num, const unsigned int &counter)
std::string buildPhiMuon(const std::vector< L1GtMuonTemplate::ObjectParameter > *op, const unsigned int &num, const unsigned int &counter, bool high)
bool debugMode_
class will produce some additional debugging output if set
bool L1GtVhdlWriterCore::getSubstParamCommonFromTriggerMenu ( const unsigned short int &  condChip,
L1GtVhdlTemplateFile particle,
const L1GtObject object,
const L1GtConditionCategory category,
std::string &  parameterStr 
)

builds the parameters particle_common for the cond_chip.vhd's

Definition at line 484 of file L1GtVhdlWriterCore.cc.

References condType2Str_, L1GtVhdlTemplateFile::findAndReplaceString(), JetCounts, objType2Str_, returnConditionsOfOneClass(), L1GtVhdlTemplateFile::returnParameterMap(), sp(), L1GtVhdlDefinitions::stringConstantCommon_, L1GtVhdlDefinitions::substParamParticle_, and L1GtVhdlDefinitions::substParamType_.

Referenced by getCondChipVhdContentFromTriggerMenu().

487 {
488 
489  std::map<L1GtConditionType,std::string> condType2Strcopy = condType2Str_;
490 
491  // make a copy since types will deleted later after they are processed
492  std::map<L1GtConditionType,std::string>::iterator typeIterator =
493  condType2Strcopy.begin();
494 
495  while (typeIterator != condType2Strcopy.end())
496  {
497 
498  ConditionMap outputMap;
499 
500  if (returnConditionsOfOneClass((*typeIterator).first, category, object, (*conditionMap_).at(condChip-1), outputMap))
501  {
502 
503  // special treatment for jet counts in buildCodChipParameters
504  if (object !=JetCounts)
505  {
506  std::string tempStr2 = particle.returnParameterMap()[stringConstantCommon_];
507  while (particle.findAndReplaceString(tempStr2,
509  ;
510  while (particle.findAndReplaceString(tempStr2,
511  sp(substParamType_), condType2Str_[(*typeIterator).first]))
512  ;
513  parameterStr+=(tempStr2+"\n\n");
514 
515  //parameterStr+=(tempStr2+"<= '0';\n");
516 
517  // remove this type since it was already processed
518  condType2Strcopy.erase(typeIterator);
519  }
520 
521  }
522 
523  typeIterator++;
524 
525  }
526 
527  return true;
528 }
std::map< std::string, std::string > returnParameterMap()
returns parameter map
std::string sp(const std::string &name)
converts string name to substiution parameter synthax; name –&gt;
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
std::map< L1GtConditionType, std::string > condType2Str_
converts L1GtConditionType to firmware string
static const std::string stringConstantCommon_
bool returnConditionsOfOneClass(const L1GtConditionType &type, const L1GtConditionCategory &category, const L1GtObject &object, const ConditionMap &map, ConditionMap &outputMap)
static const std::string substParamType_
static const std::string substParamParticle_
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
std::string L1GtVhdlWriterCore::gtTemplatesPath ( )

returns the templates path

Definition at line 1032 of file L1GtVhdlWriterCore.cc.

References vhdlDir_.

1033 {
1034  return vhdlDir_;
1035 }
std::string vhdlDir_
templates directory
std::string L1GtVhdlWriterCore::index4CondChipVhd ( int  intval)

builds the index for the cond_chip vhds. (They have to start at 1 so one has to be added to the value in conversion map)

Definition at line 1377 of file L1GtVhdlWriterCore.cc.

References int2str().

Referenced by getCondChipVhdContentFromTriggerMenu().

1378 {
1379  intval++;
1380  return int2str(intval);
1381 }
static std::string int2str(const int &integerValue)
converts a integer into a string
void L1GtVhdlWriterCore::initializeDeltaConditions ( )

Definition at line 1794 of file L1GtVhdlWriterCore.cc.

References caloObjects_, ETM, i, gen::k, Mu, numberOfConditions_, objType2Str_, and retNumberOfConditionsString().

Referenced by makeFirmware().

1795 {
1796 
1797  for (unsigned int k=0; k<=1; k++)
1798  {
1799 
1800  // combine muon with calo particles
1801  for (unsigned int i=0; i<caloObjects_.size(); i++)
1802  {
1804  +"_"+objType2Str_[caloObjects_.at(i)], 0));
1805  }
1806 
1807  // combine etm with muon
1809  +objType2Str_[Mu], 0));
1810 
1811  // combine etm with calo particles
1812  for (unsigned int i=0; i<caloObjects_.size(); i++)
1813  {
1815  +"_"+objType2Str_[caloObjects_.at(i)], 0));
1816  }
1817 
1818  std::vector<L1GtObject> caloObjectsCp = caloObjects_;
1819 
1820  while (caloObjectsCp.size()>0)
1821  {
1822  std::vector<L1GtObject>::iterator iter=caloObjectsCp.begin();
1823  L1GtObject firstPartner = (*iter);
1824  caloObjectsCp.erase(iter);
1825 
1826  iter=caloObjectsCp.begin();
1827  while (iter!=caloObjectsCp.end())
1828  {
1830  objType2Str_[firstPartner]+"_"+objType2Str_[(*iter)], 0));
1831  iter++;
1832  }
1833 
1834  }
1835 
1836  }
1837 }
int i
Definition: DBlmapReader.cc:9
Definition: L1GtObject.h:38
std::vector< L1GtObject > caloObjects_
list of all possible calo objects
std::vector< std::vector< std::string > > numberOfConditions_
vector containing the initialization of all conditions
std::string retNumberOfConditionsString(const std::string &typeStr, const int &number)
int k[5][pyjets_maxn]
Definition: L1GtObject.h:32
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
std::string L1GtVhdlWriterCore::int2str ( const int &  integerValue)
static

converts a integer into a string

Definition at line 1037 of file L1GtVhdlWriterCore.cc.

Referenced by addJetCountsToCond2IntMap(), getCondChipVhdContentFromTriggerMenu(), getDefValsFromTriggerMenu(), index4CondChipVhd(), printConditionsOfCategory(), retNumberOfConditionsString(), writeAlgoSetup(), writeConditionChipSetup(), writeDefValPkg(), writeEtmSetup(), and L1GtVmeWriterCore::writeVME().

1038 {
1039  std::ostringstream oss;
1040  oss<<integerValue;
1041  return oss.str();
1042 
1043 }
bool L1GtVhdlWriterCore::makeFirmware ( const std::vector< ConditionMap > &  conditionMap,
const AlgorithmMap algorithmMap 
)

produces the firmware code

Definition at line 917 of file L1GtVhdlWriterCore.cc.

References addJetCountsToCond2IntMap(), algorithmMap_, caloObjects_, conditionMap_, conditionToIntegerMap_, debugMode_, esumObjects_, getCaloSetupContentFromTriggerMenu(), getCondChipVhdContentFromTriggerMenu(), getEsumsSetupContentFromTriggerMenu(), getMuonSetupContentFromTriggerMenu(), i, initializeDeltaConditions(), objType2Str_, outputDir_, L1GtVhdlDefinitions::outputSubDir1_, L1GtVhdlDefinitions::outputSubDir2_, processAlgorithmMap(), PixelCPETemplateReco_cfi::templates, version_, writeAlgoSetup(), writeCond2intMap2File(), writeCondChipPkg(), writeConditionChipSetup(), writeDefValPkg(), writeEtmSetup(), writeMuonSetupVhdl(), and writeQsfSetupFiles().

Referenced by L1GtVhdlWriter::analyze().

919 {
920  conditionMap_ = &conditionMap;
921 
922  algorithmMap_ = &algorithmMap;
923 
924  std::string subDir1 = outputDir_+outputSubDir1_;
925  std::string subDir2 = outputDir_+outputSubDir2_;
926 
927  if (!mkdir(subDir1.c_str(), 666));
928  if (!mkdir(subDir2.c_str(), 666));
929 
930  chmod(subDir1.c_str(), 0777);
931  chmod(subDir2.c_str(), 0777);
932 
933  /*
934  subDirs_.push_back(subDir1);
935  subDirs_.push_back(subDir2);
936  */
937 
939 
940 
941  //--------------------------------------build setups-------------------------------------------------------
942 
943  // loop over the two condition chips
944  for (unsigned short int i =1; i<=2; i++)
945  {
946  // ----------------------- muon setup -------------------------------------------------------
947 
948  std::map<std::string,std::string> muonParameters;
949  getMuonSetupContentFromTriggerMenu(i, muonParameters);
950  writeMuonSetupVhdl(muonParameters, "muon", i);
951 
952  // ----------------------- calo setup -------------------------------------------------------
953 
954  // map containing all calo object types correlated with the strings
955  // under which they appear in the firmware
956  std::vector<L1GtObject>::iterator caloObjIter = caloObjects_.begin();
957 
958  // loop over all calo objectsbuildMuonSetupVhdl
959  while (caloObjIter != caloObjects_.end())
960  {
961  std::map<std::string,std::string> caloParameters;
962  getCaloSetupContentFromTriggerMenu(i, caloParameters,
963  (*caloObjIter));
964  writeMuonSetupVhdl(caloParameters, objType2Str_[(*caloObjIter)], i);
965 
966  caloObjIter++;
967  }
968 
969  // ----------------------- etm setup ---------------------------------------------------------
970 
971  // map containing all calo object types correlated with the strings
972  // under which they appear in the firmware
973  std::vector<L1GtObject>::iterator esumObjIter = esumObjects_.begin();
974 
975  while (esumObjIter != esumObjects_.end())
976  {
977  std::string etmParameter;
978 
979  getEsumsSetupContentFromTriggerMenu(i, (*esumObjIter),
980  etmParameter);
981  writeEtmSetup(etmParameter, i);
982 
983  esumObjIter++;
984 
985  }
986 
987  // add jet counts to condition 2 integer map
989 
990  // --------------------cond chip setup---------------------------------------------------------
991  // Important: all other setups have to be build BEFORE this one because it needs a
992  // complete condition2integer map !!!
993 
994  std::map<std::string, L1GtVhdlTemplateFile> templates;
995  std::map<std::string, std::string> common;
996  getCondChipVhdContentFromTriggerMenu(i, templates, common);
997  writeConditionChipSetup(templates, common, i);
998 
999  // despite yet not existing they have to appear in cond_chip_pkg vhds
1001 
1002  // --------------------cond chip pkg------------------------------------------------------------
1003 
1005 
1006  // -----------------------def val pkg -------------------------------------------------
1007 
1009 
1010  // debug
1011  if (debugMode_)
1012  {
1013  //printConditionsOfCategory(CondEnergySum, (*conditionMap_).at(i-1));
1014  }
1015 
1016  }
1017 
1018  if (debugMode_)
1020 
1021  //-------------------------------process algorithms----------------------------------------------------------
1022 
1023  std::vector< std::map<int, std::string> > algoStrings;
1024 
1025  processAlgorithmMap(algoStrings);
1026 
1027  writeAlgoSetup(algoStrings);
1028 
1029  return true;
1030 }
int i
Definition: DBlmapReader.cc:9
void writeConditionChipSetup(std::map< std::string, L1GtVhdlTemplateFile > templates, const std::map< std::string, std::string > &common, const unsigned short int &chip)
builds cond_chip.vhds
void writeQsfSetupFiles(const std::string &version)
builds the two quartus setup files. This routine is called in buildCommonHeader!
std::vector< L1GtObject > esumObjects_
list of all possible esums objects
void writeDefValPkg(const std::vector< ConditionMap > &conditionMap, const int &chip)
writes def_val_pkg.vhd
bool getCaloSetupContentFromTriggerMenu(const unsigned short int &condChip, std::map< std::string, std::string > &caloParameters, const L1GtObject &caloObject)
std::vector< L1GtObject > caloObjects_
list of all possible calo objects
bool getEsumsSetupContentFromTriggerMenu(const unsigned short int &condChip, const L1GtObject &object, std::string &energySumParameter)
contains only one subsitution parameter which is stored in reference energySumParameter ...
const AlgorithmMap * algorithmMap_
algorithm map
void writeEtmSetup(std::string &etmString, const int &condChip)
builds etm setup files
void writeCond2intMap2File()
produces a control output file for condition to integer conversion
void writeCondChipPkg(const int &chip)
const std::vector< ConditionMap > * conditionMap_
condition map
static const std::string outputSubDir1_
void getMuonSetupContentFromTriggerMenu(const unsigned short int &condChip, std::map< std::string, std::string > &muonParameters)
static const std::string outputSubDir2_
std::string outputDir_
output directory
bool getCondChipVhdContentFromTriggerMenu(const unsigned short int &condChip, std::map< std::string, L1GtVhdlTemplateFile > &templates, std::map< std::string, std::string > &commonParams)
void addJetCountsToCond2IntMap(const int chip, const std::vector< ConditionMap > &conditionMap, std::map< std::string, int > &conditionToIntegerMap)
void writeMuonSetupVhdl(std::map< std::string, std::string > &muonParameters, const std::string &particle, unsigned short int &condChip)
builds muon setup files
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
void writeAlgoSetup(std::vector< std::map< int, std::string > > &algoStrings)
builds the prealgo_and_or setup
bool processAlgorithmMap(std::vector< std::map< int, std::string > > &algoStrings)
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
bool debugMode_
class will produce some additional debugging output if set
void L1GtVhdlWriterCore::msg ( const std::string &  message)

adds a string to intern message buffer

Definition at line 1357 of file L1GtVhdlWriterCore.cc.

References internMessageBuf_.

Referenced by buildCommonHeader(), getCondChipVhdContentFromTriggerMenu(), printConditionsOfCategory(), and processAlgorithmMap().

1358 {
1359  internMessageBuf_.push_back(message);
1360 }
std::vector< std::string > internMessageBuf_
L1GtVhdlTemplateFile L1GtVhdlWriterCore::openVhdlFileWithCommonHeader ( const std::string &  filename,
const std::string &  outputFilename 
)

opens a new template file and inserts the common header

Definition at line 1074 of file L1GtVhdlWriterCore.cc.

References commonHeader_, L1GtVhdlTemplateFile::insert(), L1GtVhdlTemplateFile::substitute(), and vhdlDir_.

Referenced by writeAlgoSetup(), writeCondChipPkg(), writeConditionChipSetup(), writeDefValPkg(), writeEtmSetup(), and writeMuonSetupVhdl().

1076 {
1077  L1GtVhdlTemplateFile commonHeaderCp;
1078  commonHeaderCp = commonHeader_;
1079 
1080  commonHeaderCp.substitute("vhdl_file_name", outputFilename);
1081 
1082  L1GtVhdlTemplateFile myTemplate(vhdlDir_+"Templates/"+filename);
1083  myTemplate.insert("$(header)", commonHeaderCp);
1084 
1085  return myTemplate;
1086 }
std::string vhdlDir_
templates directory
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
L1GtVhdlTemplateFile commonHeader_
common header for all files
tuple filename
Definition: lut2db_cfg.py:20
void L1GtVhdlWriterCore::printCommonHeader ( )

prints the common header

Definition at line 1320 of file L1GtVhdlWriterCore.cc.

References commonHeader_, and L1GtVhdlTemplateFile::print().

1321 {
1322  commonHeader_.print();
1323 }
L1GtVhdlTemplateFile commonHeader_
common header for all files
void print()
prints the content of the VHDL File (only lines_)
void L1GtVhdlWriterCore::printConditionsOfCategory ( const L1GtConditionCategory category,
const ConditionMap map 
)

for debuggin

Definition at line 1864 of file L1GtVhdlWriterCore.cc.

References int2str(), and msg().

1866 {
1867  int counter =0;
1868  for (ConditionMap::const_iterator iterCond = map.begin(); iterCond
1869  != map.end(); iterCond++)
1870  {
1871  msg(iterCond->first);
1872  counter++;
1873  }
1874 
1875  msg("Total Occurances: "+int2str(counter));
1876 
1877 }
static std::string int2str(const int &integerValue)
converts a integer into a string
void msg(const std::string &message)
adds a string to intern message buffer
bool L1GtVhdlWriterCore::processAlgorithmMap ( std::vector< std::map< int, std::string > > &  algoStrings)

processes algorithm map delivered by parser, replaces condition names by types and serial numbers, splits the map in a vector two seperate ones for the two condition chips

Definition at line 824 of file L1GtVhdlWriterCore.cc.

References asciidump::at, conditionMap_, conditionToIntegerMap_, condType2Str_, debugMode_, L1GtVhdlTemplateFile::findAndReplaceString(), L1GtVhdlTemplateFile::getConditionsFromAlgo(), i, msg(), NULL, and objType2Str_.

Referenced by makeFirmware().

825 {
826  std::map<int, std::string> algorithmsChip1;
827  std::map<int, std::string> algorithmsChip2;
828 
829  AlgorithmMap::const_iterator algoIter=(*algorithmMap_).begin();
830 
831  // loop over algorithm map
832  while (algoIter!=(*algorithmMap_).end())
833  {
834  // msg(algoIter->first);
835 
836  L1GtVhdlTemplateFile dummy;
837 
838  // get the logical expression
839  std::string logicalExpr = (algoIter->second).algoLogicalExpression();
840  std::vector<std::string> conditions;
841 
842  dummy.getConditionsFromAlgo(logicalExpr, conditions);
843 
844  std::string logicalExprCopy= logicalExpr;
845 
846  // loop over all condition names appearing in algorithm and replace them by type and integer value
847  for (unsigned int i=0; i<conditions.size(); i++)
848  {
849  std::ostringstream newExpr;
850 
851  // look for the condition on correct chip
852 
853  std::vector<ConditionMap> * conditionMapCp = const_cast< std::vector<ConditionMap>* >(conditionMap_);
854 
855  L1GtCondition* cond = (*conditionMapCp).at((algoIter->second).algoChipNumber())[conditions.at(i)];
856 
857  // check weather condition exists
858  if (cond!=NULL)
859  {
860  newExpr<<objType2Str_[(cond->objectType()).at(0)];
861 
862  newExpr <<"_" << condType2Str_[cond->condType()] << "(";
863 
864  newExpr << conditionToIntegerMap_[conditions.at(i)] << ")";
865  dummy.findAndReplaceString(logicalExpr, conditions.at(i),
866  newExpr.str());
867  } else
868  msg("Panik! Didn't find Condition "+conditions.at(i));
869  }
870 
871  // has to be checked!
872  std::vector<int> orderConditionChip;
873  orderConditionChip.push_back(2);
874  orderConditionChip.push_back(1);
875 
876  int pin = (algoIter->second).algoOutputPin(2, 96, orderConditionChip);
877 
878  //msg(int2str(pin));
879 
880  if (pin<0)
881  pin*=-1;
882 
883  if ((algoIter->second).algoChipNumber()==0)
884  {
885  algorithmsChip1[pin]=logicalExpr;
886  if (debugMode_)
887  algorithmsChip1[pin]+=("-- "+logicalExprCopy);
888  } else if ((algoIter->second).algoChipNumber()==1)
889  {
890  algorithmsChip2[pin]=logicalExpr;
891  if (debugMode_)
892  algorithmsChip2[pin]+=("-- "+logicalExprCopy);
893  } else
894  ;
895 
896  algoIter++;
897  }
898 
899  algoStrings.push_back(algorithmsChip1);
900  algoStrings.push_back(algorithmsChip2);
901 
902  return true;
903 
904 }
int i
Definition: DBlmapReader.cc:9
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
std::map< L1GtConditionType, std::string > condType2Str_
converts L1GtConditionType to firmware string
#define NULL
Definition: scimark2.h:8
const std::vector< ConditionMap > * conditionMap_
condition map
void msg(const std::string &message)
adds a string to intern message buffer
void getConditionsFromAlgo(std::string condString, std::vector< std::string > &result)
extracts all conditions from a algorithm
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
std::map< L1GtObject, std::string > objType2Str_
converts L1GtObject to string
bool debugMode_
class will produce some additional debugging output if set
list at
Definition: asciidump.py:428
std::string L1GtVhdlWriterCore::retNumberOfConditionsString ( const std::string &  typeStr,
const int &  number 
)

Definition at line 1906 of file L1GtVhdlWriterCore.cc.

References int2str(), and L1GtVhdlDefinitions::stringConstantConstantNr_.

Referenced by addJetCountsToCond2IntMap(), countCondsAndAdd2NumberVec(), and initializeDeltaConditions().

1908 {
1909  std::string initstr=stringConstantConstantNr_+typeStr+" : integer := "+int2str(number)
1910  +";";
1911 
1912  return initstr;
1913 }
static std::string int2str(const int &integerValue)
converts a integer into a string
static const std::string stringConstantConstantNr_
L1GtVhdlTemplateFile L1GtVhdlWriterCore::retrunCommonHeader ( )

returns the common header

Definition at line 1325 of file L1GtVhdlWriterCore.cc.

References commonHeader_.

Referenced by L1GtVhdlWriter::analyze().

1326 {
1327  return commonHeader_;
1328 }
L1GtVhdlTemplateFile commonHeader_
common header for all files
bool L1GtVhdlWriterCore::returnConditionsOfOneClass ( const L1GtConditionType type,
const L1GtConditionCategory category,
const L1GtObject object,
const ConditionMap map,
ConditionMap outputMap 
)

returns all condition of the same class. Conditions belong to one class if they are matching in type (Type1s, Type2s..) category (CondMuon, CondCalo,)and are defined for the same object (Mu, fwdJet..)

Parameters
mapis the ConditionMap that shall be filtered
conditionToIntegerMapis the condition is added to this conversion map
outputMaphere the conditions matching the requirements are stored

Definition at line 95 of file L1GtVhdlWriterCore.cc.

References ntuplemaker::status.

Referenced by addJetCountsToCond2IntMap(), countCondsAndAdd2NumberVec(), getDefValsFromTriggerMenu(), and getSubstParamCommonFromTriggerMenu().

100 {
101  bool status = false;
102 
103  ConditionMap::const_iterator condIter = map.begin();
104  while (condIter!=map.end())
105  {
106  if (condIter->second->condCategory()==category
107  && condIter->second->condType()==type && (condIter->second->objectType())[0]==object)
108  {
109  outputMap[condIter->first]=condIter->second;
110  status = true;
111  }
112  condIter++;
113  }
114 
115  return status;
116 }
type
Definition: HCALResponse.h:22
tuple status
Definition: ntuplemaker.py:245
std::string L1GtVhdlWriterCore::sp ( const std::string &  name)

converts string name to substiution parameter synthax; name –>

Definition at line 1920 of file L1GtVhdlWriterCore.cc.

Referenced by buildDefValuesBuffer(), getCondChipVhdContentFromTriggerMenu(), getSubstParamCommonFromTriggerMenu(), and writeDefValPkg().

1921 {
1922  return "$("+name+")";
1923 }
void L1GtVhdlWriterCore::writeAlgoSetup ( std::vector< std::map< int, std::string > > &  algoStrings)

builds the prealgo_and_or setup

Definition at line 1253 of file L1GtVhdlWriterCore.cc.

References chip2OutputSubDir(), lut2db_cfg::filename, L1GtVhdlTemplateFile::findAndReplaceString(), i, int2str(), gen::k, openVhdlFileWithCommonHeader(), dumpDBToFile_GT_ttrig_cfg::outputFileName, L1GtVhdlTemplateFile::save(), L1GtVhdlDefinitions::stringConstantAlgo_, L1GtVhdlTemplateFile::substitute(), L1GtVhdlDefinitions::substParamAlgos_, indexGen::templateFile, and L1GtVhdlDefinitions::vhdlTemplateAlgoAndOr_.

Referenced by makeFirmware().

1254 {
1255  // loop over the two condition chips
1256  for (unsigned int i=1; i<=2; i++)
1257  {
1258  std::string filename=vhdlTemplateAlgoAndOr_;
1259 
1260  // output file name
1261  std::string outputFileName = filename;
1262  L1GtVhdlTemplateFile::findAndReplaceString(outputFileName, ".",
1263  int2str(i)+".");
1264 
1266  filename, outputFileName);
1267 
1268  std::ostringstream buffer;
1269 
1270  unsigned int algoPinsPerChip = 96;
1271 
1272  for (unsigned int k=1; k<=algoPinsPerChip; k++)
1273  {
1274 
1275  buffer<< stringConstantAlgo_<<"("<<k<<")";
1276  if (algoStrings.at(i-1)[k]!="")
1277  buffer<<" <= "<<algoStrings.at(i-1)[k]<<";"<<std::endl;
1278  else
1279  buffer<<" <= '0';"<<std::endl;
1280  }
1281 
1282  templateFile.substitute(substParamAlgos_, buffer.str());
1283  templateFile.save(chip2OutputSubDir(i)+filename);
1284  chmod((chip2OutputSubDir(i)+filename).c_str(), 0666);
1285  }
1286 
1287 }
static const std::string vhdlTemplateAlgoAndOr_
int i
Definition: DBlmapReader.cc:9
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
bool save(const std::string &fileName)
saves the content of the template file to a local file (the content of parameterMap_ will not be save...
string templateFile
Definition: indexGen.py:50
static std::string int2str(const int &integerValue)
converts a integer into a string
static const std::string substParamAlgos_
static const std::string stringConstantAlgo_
int k[5][pyjets_maxn]
std::string chip2OutputSubDir(const int &chip)
L1GtVhdlTemplateFile openVhdlFileWithCommonHeader(const std::string &filename, const std::string &outputFilename)
opens a new template file and inserts the common header
tuple filename
Definition: lut2db_cfg.py:20
void L1GtVhdlWriterCore::writeCond2intMap2File ( )

produces a control output file for condition to integer conversion

Definition at line 1433 of file L1GtVhdlWriterCore.cc.

References chip2OutputSubDir(), conditionMap_, conditionToIntegerMap_, lut2db_cfg::filename, i, and download_sqlite_cfg::outputFile.

Referenced by makeFirmware().

1434 {
1435 
1436 
1437  for (unsigned int i=0; i<=1;i++)
1438  {
1439  ConditionMap::const_iterator iterCond =
1440  conditionMap_->at(i).begin();
1441 
1442  std::string filename=chip2OutputSubDir(i+1)+"cond_names_integer.txt";
1443 
1444  std::ofstream outputFile(filename.c_str());
1445 
1446  while (iterCond!=conditionMap_->at(i).end())
1447  {
1448  conditionToIntegerMap_[(*iterCond).first];
1449 
1450  outputFile<<(iterCond->first)<<": "<<conditionToIntegerMap_[(*iterCond).first]<<std::endl;
1451  iterCond++;
1452  }
1453 
1454  outputFile.close();
1455 
1456  chmod(filename.c_str(), 0666);
1457 
1458 
1459  }
1460 
1461  /*
1462 
1463 
1464  const std::vector<ConditionMap> * conditionMap_;
1465 
1466  std::string filename=outputDir_+"cond_names_integer.txt";
1467  std::ofstream outputFile(filename.c_str());
1468 
1469  for (std::map<std::string,int>::const_iterator iterCond =
1470  conditionToIntegerMap_.begin(); iterCond
1471  != conditionToIntegerMap_.end(); iterCond++)
1472  {
1473  outputFile<<(iterCond->first)<<": "<<(iterCond->second)<<std::endl;
1474  }
1475 
1476  */
1477 
1478 }
int i
Definition: DBlmapReader.cc:9
const std::vector< ConditionMap > * conditionMap_
condition map
std::string chip2OutputSubDir(const int &chip)
tuple filename
Definition: lut2db_cfg.py:20
std::map< std::string, int > conditionToIntegerMap_
stores to condition name to integer conversion table
void L1GtVhdlWriterCore::writeCondChipPkg ( const int &  chip)

Definition at line 1879 of file L1GtVhdlWriterCore.cc.

References chip2OutputSubDir(), lut2db_cfg::filename, L1GtVhdlTemplateFile::findAndReplaceString(), L1GtVhdlTemplateFile::insert(), numberOfConditions_, openVhdlFileWithCommonHeader(), L1GtVhdlTemplateFile::save(), L1GtVhdlTemplateFile::substitute(), version_, L1GtVhdlDefinitions::vhdlTemplateCondChipPkg1_, and L1GtVhdlDefinitions::vhdlTemplateCondChipPkg2_.

Referenced by makeFirmware().

1880 {
1881 
1882  // build filename
1883 
1884  std::string filename;
1885 
1886  if (chip==1)
1887  filename = vhdlTemplateCondChipPkg1_;
1888  else if (chip==2)
1889  filename = vhdlTemplateCondChipPkg2_;
1890 
1891  // write the output
1892  L1GtVhdlTemplateFile myTemplate = openVhdlFileWithCommonHeader(filename,
1893  filename);
1894 
1895  myTemplate.substitute("version",version_);
1896 
1897  myTemplate.insert("$(conditions_nr)", numberOfConditions_.at(chip-1));
1898 
1901 
1902  myTemplate.save(chip2OutputSubDir(chip)+filename);
1903  chmod((chip2OutputSubDir(chip)+filename).c_str(), 0666);
1904 }
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
bool save(const std::string &fileName)
saves the content of the template file to a local file (the content of parameterMap_ will not be save...
std::vector< std::vector< std::string > > numberOfConditions_
vector containing the initialization of all conditions
static const std::string vhdlTemplateCondChipPkg2_
bool insert(const std::string &atLine, std::vector< std::string > content)
replaces the whole line containing atLine and inserts content instead of it
static const std::string vhdlTemplateCondChipPkg1_
std::string chip2OutputSubDir(const int &chip)
L1GtVhdlTemplateFile openVhdlFileWithCommonHeader(const std::string &filename, const std::string &outputFilename)
opens a new template file and inserts the common header
tuple filename
Definition: lut2db_cfg.py:20
void L1GtVhdlWriterCore::writeConditionChipSetup ( std::map< std::string, L1GtVhdlTemplateFile templates,
const std::map< std::string, std::string > &  common,
const unsigned short int &  chip 
)

builds cond_chip.vhds

Definition at line 1208 of file L1GtVhdlWriterCore.cc.

References chip2OutputSubDir(), lut2db_cfg::filename, L1GtVhdlTemplateFile::findAndReplaceString(), L1GtVhdlTemplateFile::insert(), int2str(), openVhdlFileWithCommonHeader(), dumpDBToFile_GT_ttrig_cfg::outputFileName, L1GtVhdlTemplateFile::save(), L1GtVhdlTemplateFile::substitute(), and L1GtVhdlDefinitions::vhdlTemplateCondChip_.

Referenced by makeFirmware().

1212 {
1213 
1214  // get filename
1215  std::string filename = vhdlTemplateCondChip_;
1216 
1217  // build output filename
1218  std::string outputFileName = filename;
1219  L1GtVhdlTemplateFile::findAndReplaceString(outputFileName, ".",
1220  int2str(chip)+".");
1221 
1222  L1GtVhdlTemplateFile myTemplate = openVhdlFileWithCommonHeader(filename,
1223  outputFileName);
1224 
1225  // map containing the subsitution parameters with their content (as L1GtVhdlTemplateFile file object)
1226  std::map<std::string, L1GtVhdlTemplateFile>::iterator iter=
1227  templates.begin();
1228 
1229  while (iter != templates.end())
1230  {
1231 
1232  myTemplate.insert("$("+(iter->first)+")", iter->second);
1233 
1234  iter++;
1235  }
1236 
1237  // subsitutes common parameters
1238  std::map<std::string, std::string>::const_iterator iter2= common.begin();
1239 
1240  while (iter2 != common.end())
1241  {
1242 
1243  myTemplate.substitute((iter2->first), iter2->second);
1244 
1245  iter2++;
1246  }
1247 
1248  myTemplate.save(chip2OutputSubDir(chip)+filename);
1249  chmod((chip2OutputSubDir(chip)+filename).c_str(), 0666);
1250 
1251 }
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
bool save(const std::string &fileName)
saves the content of the template file to a local file (the content of parameterMap_ will not be save...
static std::string int2str(const int &integerValue)
converts a integer into a string
bool insert(const std::string &atLine, std::vector< std::string > content)
replaces the whole line containing atLine and inserts content instead of it
std::string chip2OutputSubDir(const int &chip)
L1GtVhdlTemplateFile openVhdlFileWithCommonHeader(const std::string &filename, const std::string &outputFilename)
opens a new template file and inserts the common header
tuple filename
Definition: lut2db_cfg.py:20
static const std::string vhdlTemplateCondChip_
void L1GtVhdlWriterCore::writeDefValPkg ( const std::vector< ConditionMap > &  conditionMap,
const int &  chip 
)

writes def_val_pkg.vhd

Definition at line 1536 of file L1GtVhdlWriterCore.cc.

References buildDefValuesBuffer(), caloObjects_, chip2OutputSubDir(), condType2Str_, esumObjects_, lut2db_cfg::filename, L1GtVhdlTemplateFile::findAndReplaceString(), L1GtVhdlTemplateFile::getInternalParameter(), i, L1GtVhdlTemplateFile::insert(), int2str(), JetCounts, Mu, L1GtVhdlTemplateFile::open(), openVhdlFileWithCommonHeader(), download_sqlite_cfg::outputFile, L1GtVhdlTemplateFile::save(), sp(), L1GtVhdlDefinitions::stringConstantEsumsHigh_, L1GtVhdlDefinitions::stringConstantEsumsLow_, L1GtVhdlDefinitions::stringConstantPth_, L1GtVhdlDefinitions::stringConstantPtl_, L1GtVhdlDefinitions::stringConstantQuality_, L1GtVhdlDefinitions::substParamCaloDefVals_, L1GtVhdlDefinitions::substParamCharge_, L1GtVhdlDefinitions::substParamEsumsDefVals_, L1GtVhdlDefinitions::substParamJetsDefVals_, L1GtVhdlDefinitions::substParamMuonDefVals_, Type2cor, Type3s, TypeETM, TypeETT, TypeHTT, TypeJetCounts, vhdlDir_, and L1GtVhdlDefinitions::vhdlTemplateDefValPkg_.

Referenced by makeFirmware().

1538 {
1539  // open internal template file
1540  L1GtVhdlTemplateFile internalTemplate;
1541  internalTemplate.open(vhdlDir_+"InternalTemplates/defvalpkg", true);
1542 
1543  // to write the def_value_pkg file it has to be looped over all POSSIBLE types of conditions
1544  // POSSIBLE: calo_3 eg. does not exist and therefore makes no sense..
1545 
1546  // Process muon conditions first
1547 
1548  // temporary buffers for the default value blocks (see internal templates) of the different types.
1549  // in the end those buffers are simply appended to the actual template!
1550  L1GtVhdlTemplateFile muonDefValuesBuffer, caloDefValuesBuffer,
1551  jetCountsDefValuesBuffer, esumsDefValBuffer;
1552 
1553  // Get the default value type strings from internal template
1554  std::vector<std::string> muonDefValTypes;
1555  muonDefValTypes.push_back(internalTemplate.getInternalParameter(stringConstantPtl_));
1556  muonDefValTypes.push_back(internalTemplate.getInternalParameter(stringConstantPth_));
1557  muonDefValTypes.push_back(internalTemplate.getInternalParameter(stringConstantQuality_));
1558  muonDefValTypes.push_back(internalTemplate.getInternalParameter(substParamCharge_));
1559 
1560  int jetCountsMaxIndex = 11;
1561 
1562  // fill jet counts vector (from 1 to 11)
1563  std::vector<std::string> jetCountsDefValTypes;
1564  for (int i = 0; i<=jetCountsMaxIndex; i++)
1565  {
1566  jetCountsDefValTypes.push_back(int2str(i));
1567  }
1568 
1569  // only one default value for calo objects therefore only a empty string
1570  std::vector<std::string> caloDefValTypes;
1571  caloDefValTypes.push_back("");
1572 
1573  // get types of esums defvalues (as firmware strings) from the internal templates
1574  std::vector<std::string> esumsDefValTypes;
1575  esumsDefValTypes.push_back(internalTemplate.getInternalParameter(stringConstantEsumsLow_));
1576  esumsDefValTypes.push_back(internalTemplate.getInternalParameter(stringConstantEsumsHigh_));
1577 
1578  std::map<L1GtConditionType,std::string>::iterator typeIter;
1579 
1580  // prepare a map with all muon relevant types by removing
1581  // obsolete types from a copy of condType2Str_ map
1582  // should be improved
1583  std::map<L1GtConditionType,std::string> muonTypes = condType2Str_;
1584 
1585  typeIter=muonTypes.find(Type2cor);
1586  muonTypes.erase(typeIter);
1587  typeIter=muonTypes.find(TypeETM);
1588  muonTypes.erase(typeIter);
1589  typeIter=muonTypes.find(TypeETT);
1590  muonTypes.erase(typeIter);
1591  typeIter=muonTypes.find(TypeHTT);
1592  muonTypes.erase(typeIter);
1593  typeIter=muonTypes.find(TypeJetCounts);
1594  muonTypes.erase(typeIter);
1595 
1596  std::map<L1GtConditionType,std::string> caloTypes = muonTypes;
1597  typeIter=caloTypes.find(Type3s);
1598  caloTypes.erase(typeIter);
1599 
1600  // dummy type in order to be able to use the same code as for calo and muon
1601  // this map is also used for esums since there is no difference in treatment
1602  std::map<L1GtConditionType,std::string> jetCountsTypes;
1603  jetCountsTypes[TypeJetCounts] = "";
1604 
1605  // here the DefValuesBuffer are build (=objects of the class L1GtVhdlTemplateFile
1606  // that are containing all default values and finally can be inserted into the
1607  // def_val_pkg.vhd template
1608 
1609  buildDefValuesBuffer(muonDefValuesBuffer, muonTypes, muonDefValTypes, Mu);
1610 
1611  // loop over all possible calo objects here
1612  for (unsigned int i=0; i<caloObjects_.size(); i++)
1613  {
1614  buildDefValuesBuffer(caloDefValuesBuffer, caloTypes, caloDefValTypes,
1615  caloObjects_.at(i));
1616  }
1617 
1618  // loop over all possible esums objects here
1619  for (unsigned int i=0; i<esumObjects_.size(); i++)
1620  {
1621  buildDefValuesBuffer(esumsDefValBuffer, jetCountsTypes,
1622  esumsDefValTypes, esumObjects_.at(i));
1623  }
1624 
1625  // same procedure for jet counts
1626  buildDefValuesBuffer(esumsDefValBuffer, jetCountsTypes,
1627  jetCountsDefValTypes, JetCounts);
1628 
1629  //----------------------In this section the actual output file is written----------------
1630 
1631  // now open the actual template file:
1632 
1633  std::string filename = vhdlTemplateDefValPkg_;
1634 
1635  std::string outputFile = filename;
1636 
1637  // modify output filename
1639  +".");
1641  filename, outputFile);
1642 
1643  // insert the temporary buffers to the template
1644 
1645  // muon default values
1646  defValTemplate.insert(sp(substParamMuonDefVals_), muonDefValuesBuffer);
1647 
1648  // calo default values
1649  defValTemplate.insert(sp(substParamCaloDefVals_), caloDefValuesBuffer);
1650 
1651  // esums default values
1652  defValTemplate.insert(sp(substParamEsumsDefVals_), esumsDefValBuffer);
1653 
1654  // jet counts default values
1655  defValTemplate.insert(sp(substParamJetsDefVals_), jetCountsDefValuesBuffer);
1656 
1657  // close and save the file
1658 
1659  L1GtVhdlTemplateFile::findAndReplaceString(outputFile, "1","");
1660  L1GtVhdlTemplateFile::findAndReplaceString(outputFile, "2","");
1661 
1662  defValTemplate.save(chip2OutputSubDir(chip)+outputFile);
1663  chmod((chip2OutputSubDir(chip)+outputFile).c_str(), 0666);
1664 
1665 }
static const std::string substParamMuonDefVals_
int i
Definition: DBlmapReader.cc:9
std::string vhdlDir_
templates directory
std::string sp(const std::string &name)
converts string name to substiution parameter synthax; name –&gt;
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
static const std::string substParamCaloDefVals_
std::vector< L1GtObject > esumObjects_
list of all possible esums objects
bool save(const std::string &fileName)
saves the content of the template file to a local file (the content of parameterMap_ will not be save...
static const std::string stringConstantEsumsLow_
std::map< L1GtConditionType, std::string > condType2Str_
converts L1GtConditionType to firmware string
static const std::string substParamJetsDefVals_
std::vector< L1GtObject > caloObjects_
list of all possible calo objects
static std::string int2str(const int &integerValue)
converts a integer into a string
static const std::string stringConstantEsumsHigh_
bool insert(const std::string &atLine, std::vector< std::string > content)
replaces the whole line containing atLine and inserts content instead of it
std::string getInternalParameter(const std::string &indentifier)
returns a parameter of a internal template file
Definition: L1GtObject.h:32
static const std::string stringConstantPth_
std::string chip2OutputSubDir(const int &chip)
static const std::string stringConstantPtl_
static const std::string vhdlTemplateDefValPkg_
L1GtVhdlTemplateFile openVhdlFileWithCommonHeader(const std::string &filename, const std::string &outputFilename)
opens a new template file and inserts the common header
tuple filename
Definition: lut2db_cfg.py:20
static const std::string stringConstantQuality_
static const std::string substParamCharge_
bool buildDefValuesBuffer(L1GtVhdlTemplateFile &buffer, const std::map< L1GtConditionType, std::string > &typeList, const std::vector< std::string > &defValuesList, const L1GtObject &object)
bool open(const std::string &fileName, bool internal=false)
opens a template file. If the header information shall be parsed intern has to be set to true ...
static const std::string substParamEsumsDefVals_
void L1GtVhdlWriterCore::writeEtmSetup ( std::string &  etmString,
const int &  condChip 
)

builds etm setup files

Definition at line 1289 of file L1GtVhdlWriterCore.cc.

References chip2OutputSubDir(), lut2db_cfg::filename, L1GtVhdlTemplateFile::findAndReplaceString(), int2str(), openVhdlFileWithCommonHeader(), download_sqlite_cfg::outputFile, L1GtVhdlTemplateFile::save(), L1GtVhdlTemplateFile::substitute(), and L1GtVhdlDefinitions::vhdlTemplateEtmSetup_.

Referenced by makeFirmware().

1291 {
1292 
1293  // get filename
1294  std::string filename= vhdlTemplateEtmSetup_;
1295  std::string outputFile = filename;
1296 
1297  L1GtVhdlTemplateFile myTemplate;
1298 
1299  // modify output filename
1300  myTemplate.findAndReplaceString(outputFile, ".", int2str(condChip)+".");
1301 
1302  myTemplate = openVhdlFileWithCommonHeader(filename, filename);
1303 
1304  // replace all occurances of $(particle)
1305  while (myTemplate.substitute("particle", "etm"))
1306  while (myTemplate.substitute("particle", "etm"))
1307  ;
1308 
1309  // delete last char if it is \n
1310  if (etmString[etmString.length()-1] == '\n')
1311  etmString = etmString.substr(0, etmString.length()-1);
1312 
1313  myTemplate.substitute("phi", etmString);
1314 
1315  myTemplate.save(chip2OutputSubDir(condChip)+filename);
1316  chmod((chip2OutputSubDir(condChip)+filename).c_str(), 0666);
1317 
1318 }
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
bool save(const std::string &fileName)
saves the content of the template file to a local file (the content of parameterMap_ will not be save...
static std::string int2str(const int &integerValue)
converts a integer into a string
static const std::string vhdlTemplateEtmSetup_
std::string chip2OutputSubDir(const int &chip)
L1GtVhdlTemplateFile openVhdlFileWithCommonHeader(const std::string &filename, const std::string &outputFilename)
opens a new template file and inserts the common header
tuple filename
Definition: lut2db_cfg.py:20
void L1GtVhdlWriterCore::writeMuonSetupVhdl ( std::map< std::string, std::string > &  muonParameters,
const std::string &  particle,
unsigned short int &  condChip 
)

builds muon setup files

Definition at line 1088 of file L1GtVhdlWriterCore.cc.

References L1GtVhdlTemplateFile::append(), chip2OutputSubDir(), lut2db_cfg::filename, L1GtVhdlTemplateFile::findAndReplaceString(), L1GtVhdlTemplateFile::getSubstitutionParametersFromTemplate(), i, L1GtVhdlTemplateFile::insert(), L1GtVhdlTemplateFile::open(), openVhdlFileWithCommonHeader(), download_sqlite_cfg::outputFile, L1GtVhdlTemplateFile::removeLineWithContent(), L1GtVhdlTemplateFile::returnParameterMap(), L1GtVhdlTemplateFile::save(), L1GtVhdlTemplateFile::substitute(), vhdlDir_, L1GtVhdlDefinitions::vhdlTemplateCaloSetup_, and L1GtVhdlDefinitions::vhdlTemplateMuonSetup_.

Referenced by makeFirmware().

1091 {
1092  std::string filename;
1093 
1094  L1GtVhdlTemplateFile muonTemplate, internalTemplate, internalTemplateCopy;
1095 
1096  // choose the correct template file name
1097  if (particle=="muon")
1098  {
1099  filename = vhdlTemplateMuonSetup_;
1100  internalTemplate.open(vhdlDir_+"InternalTemplates/muonsetup", true);
1101  } else
1102  {
1103  filename = vhdlTemplateCaloSetup_;
1104  internalTemplate.open(vhdlDir_+"InternalTemplates/calosetup", true);
1105  }
1106 
1107  std::string outputFile;
1108  outputFile = filename;
1109 
1110  // modify filename
1111  if (particle!="muon")
1112  muonTemplate.findAndReplaceString(outputFile, "calo", particle);
1113 
1114  // add condition chip index to output filename
1115  //muonTemplate.findAndReplaceString(outputFile, ".", int2str(condChip)+".");
1116 
1117  // open the template file and insert header
1118  muonTemplate = openVhdlFileWithCommonHeader(filename, outputFile);
1119 
1120  std::map<std::string,std::string> parameterMap =
1121  internalTemplate.returnParameterMap();
1122 
1123  std::vector<std::string> substitutionParameters;
1124 
1125  // fills the map with all substitution parameters of the template file
1126  substitutionParameters=muonTemplate.getSubstitutionParametersFromTemplate();
1127 
1128  // insert a emty line at the end of each block
1129  internalTemplate.append("");
1130 
1131  std::map<std::string, std::string>::iterator iter;
1132 
1133  // loop over all substitution parameters that have been extracted from the template file
1134  for (unsigned int i=0; i<substitutionParameters.size(); i++)
1135  {
1136  // make a working copy of the template file
1137  internalTemplateCopy = internalTemplate;
1138 
1139  // choose which of the three constant template strings to take - only for calo!
1140  if (particle!="muon")
1141  {
1142 
1143  if (substitutionParameters.at(i).substr(0, 3) == "eta")
1144  internalTemplateCopy.substitute("constant", parameterMap["eta"]);
1145  else if (substitutionParameters.at(i).substr(0, 3) == "phi")
1146  internalTemplateCopy.substitute("constant", parameterMap["phi"]);
1147  else if (substitutionParameters.at(i).substr(0, 3) == "del"/*ta*/)
1148  {
1149  internalTemplateCopy.substitute("constant",
1150  parameterMap["delta"]);
1151  while (internalTemplateCopy.substitute("delta",
1152  substitutionParameters[i]))
1153  internalTemplateCopy.substitute("delta",
1154  substitutionParameters[i]);
1155 
1156  }
1157  }
1158 
1159  if (particle=="muon")
1160  {
1161  // final preparation of the internal template before it is inserted in the actual template file
1162  internalTemplateCopy.substitute("type", substitutionParameters[i]);
1163  } else
1164 
1165  {
1166  internalTemplateCopy.substitute("type", substitutionParameters[i].substr(4));
1167  }
1168 
1169  // subsitute the second occurance of type without "_l" and "_h"
1170 
1171  std::string paramCopy = substitutionParameters[i];
1172 
1173  internalTemplateCopy.findAndReplaceString(paramCopy, "_l", "");
1174  internalTemplateCopy.findAndReplaceString(paramCopy, "_h", "");
1175 
1176  internalTemplateCopy.substitute("type2", paramCopy);
1177 
1178  internalTemplateCopy.substitute("others",
1179  parameterMap[substitutionParameters[i]]);
1180 
1181  // replace all the occurances of "particle"
1182  while (muonTemplate.substitute("particle", particle))
1183  muonTemplate.substitute("particle", particle);
1184 
1185  // remove the the parameter $(content) if its empty
1186  iter=muonParameters.find(substitutionParameters[i]);
1187 
1188  // check weather this parameter exists
1189  if (iter!=muonParameters.end())
1190  {
1191  if ((*iter).second[(*iter).second.length()-1]=='\n')
1192  (*iter).second[(*iter).second.length()-1]=' ';
1193  internalTemplateCopy.substitute("content", (*iter).second);
1194  } else
1195  internalTemplateCopy.removeLineWithContent("$(content)");
1196 
1197  // insert the processed internal template in the muon template file
1198  muonTemplate.insert("$("+substitutionParameters[i]+")",
1199  internalTemplateCopy);
1200  }
1201 
1202  // save the muon template file
1203  muonTemplate.save(chip2OutputSubDir(condChip)+outputFile);
1204  chmod((chip2OutputSubDir(condChip)+outputFile).c_str(), 0666);
1205 
1206 }
std::map< std::string, std::string > returnParameterMap()
returns parameter map
int i
Definition: DBlmapReader.cc:9
std::string vhdlDir_
templates directory
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
bool save(const std::string &fileName)
saves the content of the template file to a local file (the content of parameterMap_ will not be save...
bool removeLineWithContent(const std::string &str)
removes all lines that contain the str
bool insert(const std::string &atLine, std::vector< std::string > content)
replaces the whole line containing atLine and inserts content instead of it
static const std::string vhdlTemplateCaloSetup_
void append(const std::string &str)
adds a line at the end of the the file with the content of str
static const std::string vhdlTemplateMuonSetup_
std::string chip2OutputSubDir(const int &chip)
L1GtVhdlTemplateFile openVhdlFileWithCommonHeader(const std::string &filename, const std::string &outputFilename)
opens a new template file and inserts the common header
tuple filename
Definition: lut2db_cfg.py:20
bool open(const std::string &fileName, bool internal=false)
opens a template file. If the header information shall be parsed intern has to be set to true ...
std::vector< std::string > getSubstitutionParametersFromTemplate()
returns a vector with all substitution parameters that are found in the template file ...
void L1GtVhdlWriterCore::writeQsfSetupFiles ( const std::string &  version)

builds the two quartus setup files. This routine is called in buildCommonHeader!

Definition at line 1330 of file L1GtVhdlWriterCore.cc.

References chip2OutputSubDir(), cmsPerfCommons::filenames, L1GtVhdlTemplateFile::findAndReplaceString(), i, L1GtVhdlTemplateFile::open(), L1GtVhdlDefinitions::quartusSetupFileChip1_, L1GtVhdlDefinitions::quartusSetupFileChip2_, L1GtVhdlTemplateFile::save(), L1GtVhdlTemplateFile::substitute(), and vhdlDir_.

Referenced by makeFirmware().

1331 {
1332 
1333  std::vector<std::string> filenames;
1334  filenames.push_back(quartusSetupFileChip1_);
1335  filenames.push_back(quartusSetupFileChip2_);
1336 
1337  for (unsigned int i=0; i<filenames.size(); i++)
1338  {
1339  L1GtVhdlTemplateFile myTemplate;
1340 
1341  myTemplate.open(vhdlDir_+"Templates/"+filenames.at(i));
1342  myTemplate.substitute("version", version);
1343 
1344  std::string tempStr = filenames.at(i);
1345 
1346  if (i==0)
1347  L1GtVhdlTemplateFile::findAndReplaceString(tempStr , "cond1","cond");
1348  if (i==1)
1349  L1GtVhdlTemplateFile::findAndReplaceString(tempStr , "cond2","cond");
1350 
1351  myTemplate.save(chip2OutputSubDir(i+1)+tempStr);
1352  chmod((chip2OutputSubDir(i+1)+tempStr).c_str(), 0666);
1353  }
1354 
1355 }
int i
Definition: DBlmapReader.cc:9
std::string vhdlDir_
templates directory
static const bool findAndReplaceString(std::string &paramString, const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString at it&#39;s first occurance in string
bool substitute(const std::string &searchString, const std::string &replaceString)
replaces searchString with replaceString
static const std::string quartusSetupFileChip2_
bool save(const std::string &fileName)
saves the content of the template file to a local file (the content of parameterMap_ will not be save...
static const std::string quartusSetupFileChip1_
std::string chip2OutputSubDir(const int &chip)
bool open(const std::string &fileName, bool internal=false)
opens a template file. If the header information shall be parsed intern has to be set to true ...

Member Data Documentation

const AlgorithmMap* L1GtVhdlWriterCore::algorithmMap_
private

algorithm map

Definition at line 199 of file L1GtVhdlWriterCore.h.

Referenced by makeFirmware().

L1GtVhdlWriterBitManager L1GtVhdlWriterCore::bm_
private
std::vector<L1GtObject> L1GtVhdlWriterCore::caloObjects_
private

list of all possible calo objects

Definition at line 214 of file L1GtVhdlWriterCore.h.

Referenced by getCondChipVhdContentFromTriggerMenu(), initializeDeltaConditions(), L1GtVhdlWriterCore(), makeFirmware(), and writeDefValPkg().

std::map<L1GtObject,std::string> L1GtVhdlWriterCore::caloType2Int_
private

converts L1GtObject to calo_nr

Definition at line 208 of file L1GtVhdlWriterCore.h.

Referenced by getCondChipVhdContentFromTriggerMenu(), and L1GtVhdlWriterCore().

L1GtVhdlTemplateFile L1GtVhdlWriterCore::commonHeader_
private

common header for all files

Definition at line 231 of file L1GtVhdlWriterCore.h.

Referenced by buildCommonHeader(), openVhdlFileWithCommonHeader(), printCommonHeader(), and retrunCommonHeader().

const std::vector<ConditionMap>* L1GtVhdlWriterCore::conditionMap_
private

condition map

Definition at line 196 of file L1GtVhdlWriterCore.h.

Referenced by makeFirmware(), processAlgorithmMap(), and writeCond2intMap2File().

std::map<std::string,int> L1GtVhdlWriterCore::conditionToIntegerMap_
private
std::map<L1GtConditionType,std::string> L1GtVhdlWriterCore::condType2Str_
private
bool L1GtVhdlWriterCore::debugMode_
private
std::vector<L1GtObject> L1GtVhdlWriterCore::esumObjects_
private

list of all possible esums objects

Definition at line 217 of file L1GtVhdlWriterCore.h.

Referenced by getCondChipVhdContentFromTriggerMenu(), L1GtVhdlWriterCore(), makeFirmware(), and writeDefValPkg().

std::vector<std::string> L1GtVhdlWriterCore::internMessageBuf_
private

Definition at line 233 of file L1GtVhdlWriterCore.h.

Referenced by getMsgBuf(), and msg().

std::vector<std::vector<std::string> > L1GtVhdlWriterCore::numberOfConditions_
private

vector containing the initialization of all conditions

Definition at line 236 of file L1GtVhdlWriterCore.h.

Referenced by addJetCountsToCond2IntMap(), countCondsAndAdd2NumberVec(), initializeDeltaConditions(), L1GtVhdlWriterCore(), and writeCondChipPkg().

std::map<L1GtObject,std::string> L1GtVhdlWriterCore::objType2Str_
private
std::string L1GtVhdlWriterCore::outputDir_
private

output directory

Definition at line 223 of file L1GtVhdlWriterCore.h.

Referenced by chip2OutputSubDir(), L1GtVhdlWriterCore(), makeFirmware(), and valtools.webpage::readCaptions().

std::string L1GtVhdlWriterCore::version_
private

Definition at line 228 of file L1GtVhdlWriterCore.h.

Referenced by buildCommonHeader(), makeFirmware(), and writeCondChipPkg().

std::string L1GtVhdlWriterCore::vhdlDir_
private