test
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 (const 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

Description: a class to deal with VHDL template files

Implementation: <TODO: enter implementation details>

Author
: Philipp Wagner

Definition at line 42 of file L1GtVhdlWriterCore.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 49 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_.

51 {
52 
53  // set templates directory
54  vhdlDir_=templatesDirectory;
55 
56  // set output directory
57  outputDir_=outputDirectory;
58 
59  // Get maps
61 
65 
66  // fill calo object vector
67  caloObjects_.push_back(IsoEG);
68  caloObjects_.push_back(NoIsoEG);
69  caloObjects_.push_back(CenJet);
70  caloObjects_.push_back(ForJet);
71  caloObjects_.push_back(TauJet);
72 
73  esumObjects_.push_back(HTT);
74  esumObjects_.push_back(ETT);
75  esumObjects_.push_back(ETM);
76 
77  // prepare number of condition vector with two empty string vectors for the two condition chips
78  std::vector<std::string> temp;
79  numberOfConditions_.push_back(temp);
80  numberOfConditions_.push_back(temp);
81 
82  // set debug mode
84 
85 }
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:36
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:38
#define debug
Definition: HDRShower.cc:19
std::string outputDir_
output directory
Definition: L1GtObject.h:37
const std::map< L1GtObject, std::string > getObj2StrMap()
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 88 of file L1GtVhdlWriterCore.cc.

89 {
90  // empty
91 }

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 1381 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

1384 {
1385  ConditionMap jetConditions;
1386 
1388  conditionMap.at(chip-1), jetConditions);
1389  /*
1390  int counter = 0;
1391 
1392  for (ConditionMap::const_iterator iterCond = jetConditions.begin(); iterCond != jetConditions.end(); iterCond++)
1393  {
1394  conditionToIntegerMap_[iterCond->first]=counter;
1395  counter++;
1396  msg(iterCond->first);
1397  }
1398 
1399  */
1400 
1401  unsigned int maxJetsCountsIndex = 11;
1402 
1403  for (unsigned int i= 0; i<=maxJetsCountsIndex; i++)
1404  {
1405  int counter = 0;
1406 
1407  for (ConditionMap::const_iterator iterCond = jetConditions.begin(); iterCond
1408  != jetConditions.end(); iterCond++)
1409  {
1410 
1411  L1GtJetCountsTemplate* jetsTemplate =
1412  static_cast<L1GtJetCountsTemplate*>(iterCond->second);
1413  const std::vector<L1GtJetCountsTemplate::ObjectParameter>* op =
1414  jetsTemplate->objectParameter();
1415 
1416  conditionToIntegerMap_[iterCond->first]=counter;
1417  if ((*op)[0].countIndex==i)
1418  counter++;
1419 
1420  //msg(int2str((*op)[0].countIndex));
1421 
1422  }
1423 
1424  numberOfConditions_.at(chip-1).push_back(retNumberOfConditionsString("jet_cnts_"
1425  +int2str(i)+"_cond", counter));
1426 
1427  }
1428 
1429 }
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)
static std::atomic< unsigned int > counter
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 1043 of file L1GtVhdlWriterCore.cc.

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

Referenced by L1GtVhdlWriter::analyze().

1046 {
1047  commonHeader_.open(vhdlDir_+"InternalTemplates/header");
1048 
1049  std::map<std::string,std::string>::iterator iter = headerParameters.begin();
1050 
1051  // loop over the header parameter map and replace all subsitution
1052  // parameters with their values
1053  while (iter != headerParameters.end() )
1054  {
1055  commonHeader_.substitute((*iter).first, (*iter).second);
1056  iter++;
1057  }
1058 
1059  commonHeader_.insert("$(connected_channels_1)", connectedChannels);
1060  commonHeader_.insert("$(connected_channels_2)", connectedChannels);
1061 
1062  //---------------------build the Quartus configuration files----------------------------------------
1063 
1064  //writeQsfSetupFiles(headerParameters["version"]);
1065 
1066  version_=headerParameters["version"];
1067 
1068  msg("Build Common header and Quartus setup files sucessuflly!");
1069 
1070 }
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
bool insert(const std::string &atLine, const std::vector< std::string > &content)
replaces the whole line containing atLine and inserts content instead of it
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 1478 of file L1GtVhdlWriterCore.cc.

1480 {
1481  // has to produce something like 1 => ("00000000", "00000000")
1482 
1483  return "1 => (\"00000000\", \"00000000\")";
1484 }
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 1665 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(), AlCaHLTBitMon_QueryRunRegistry::string, 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().

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

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

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

905 {
906  if (chip==1)
907  return outputDir_+"/"+outputSubDir1_+"/";
908  if (chip==2)
909  return outputDir_+"/"+outputSubDir2_+"/";
910 
911  return "";
912 }
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 1770 of file L1GtVhdlWriterCore.cc.

References condType2Str_, contentValuesFiles::number, numberOfConditions_, objType2Str_, retNumberOfConditionsString(), returnConditionsOfOneClass(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

1774 {
1775 
1776  // Get the absoloute amount of conditions
1777 
1778  int number;
1779 
1780  if (returnConditionsOfOneClass(type, category, object, map, outputMap))
1781  number=outputMap.size();
1782  else
1783  number=0;
1784 
1786  +condType2Str_[type], number);
1787 
1788  numberOfConditions_.at(condChip-1).push_back(initstr);
1789 
1790 }
type
Definition: HCALResponse.h:21
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 116 of file L1GtVhdlWriterCore.cc.

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

118 {
119  bool status = false;
120 
121  ConditionMap::iterator condIter = map.begin();
122  while (condIter!=map.end())
123  {
124  for (unsigned int i=0; i<(condIter->second->objectType()).size(); i++)
125  {
126  if (condIter->second->objectType()[i]==object)
127  {
128  status = true;
129  break;
130  }
131  }
132 
133  if (status)
134  break;
135  condIter++;
136  }
137 
138  return status;
139 }
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 316 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

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

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

Definition at line 1913 of file L1GtVhdlWriterCore.cc.

References conditionToIntegerMap_.

Referenced by L1GtVhdlWriter::analyze().

1914 {
1915  return conditionToIntegerMap_;
1916 }
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 528 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(), AlCaHLTBitMon_QueryRunRegistry::string, 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().

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

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

Referenced by buildDefValuesBuffer().

1489 {
1491 
1492  // get condition category from object
1493 
1494  category = getCategoryFromObject(object);
1495 
1496  ConditionMap conditions;
1497  returnConditionsOfOneClass(type, category, object, (*conditionMap_).at(0),
1498  conditions);
1499 
1501 
1502  if (category==CondCalo)
1503  {
1504  for (ConditionMap::const_iterator iterCond =conditions.begin(); iterCond
1505  != conditions.end(); iterCond++)
1506  {
1507  L1GtCaloTemplate* caloTemplate =
1508  static_cast<L1GtCaloTemplate*>(iterCond->second);
1509  const std::vector<L1GtCaloTemplate::ObjectParameter>* op =
1510  caloTemplate->objectParameter();
1511 
1512  unsigned int nObjects = iterCond->second->nrObjects();
1513 
1514  for (unsigned int i =0; i<nObjects; i++)
1515  {
1516  if (i==0)
1517  result+="(";
1518  result +="\"";
1519  result += int2str((*op).at(i).etThreshold);
1520  result +="\"";
1521  if (i!=nObjects-1)
1522  result +=",";
1523  else
1524  result+=")\n";
1525 
1526  }
1527  }
1528  }
1529 
1530  return "-- 0 => (\"00000000\", \"00000000\" ... )";
1531  return result;
1532 }
type
Definition: HCALResponse.h:21
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 436 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

439 {
440 
442 
443  unsigned int counter=0;
444 
445  if (object==HTT)
446  type= TypeHTT;
447  else if (object==ETM)
448  type= TypeETM;
449  else if (object==ETT)
450  type= TypeETT;
451 
452  ConditionMap esumsConditions;
453  // stores all conditions of type given in the first three parameters
455  (*conditionMap_).at(condChip-1), esumsConditions, condChip);
456 
457  for (ConditionMap::const_iterator iterCond = esumsConditions.begin(); iterCond
458  != esumsConditions.end(); iterCond++)
459  {
460  L1GtEnergySumTemplate* energySumTempl =
461  static_cast<L1GtEnergySumTemplate*>(iterCond->second);
462  const std::vector<L1GtEnergySumTemplate::ObjectParameter>* op =
463  energySumTempl->objectParameter();
464 
465  if (bm_.buildPhiEnergySum(op, 1, counter)!="")
466  energySumParameter+=bm_.buildPhiEnergySum(op, 1, counter);
467 
468  if (debugMode_)
469  {
470  energySumParameter+=("--"+iterCond->first+"\n");
471  }
472 
473  conditionToIntegerMap_[(iterCond->first)]=counter;
474 
475  counter++;
476  }
477 
478  return true;
479 
480 }
type
Definition: HCALResponse.h:21
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
Definition: L1GtObject.h:36
L1GtVhdlWriterBitManager bm_
bit manager for bit operations
L1GtConditionType
Definition: L1GtObject.h:38
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:37
static std::atomic< unsigned int > counter
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 1365 of file L1GtVhdlWriterCore.cc.

References getDQMSummary::iter.

Referenced by getCondChipVhdContentFromTriggerMenu().

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

returns intern message buffer

Definition at line 1360 of file L1GtVhdlWriterCore.cc.

References internMessageBuf_.

1361 {
1362  return internMessageBuf_;
1363 }
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 141 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

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

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

Referenced by getCondChipVhdContentFromTriggerMenu().

485 {
486 
487  std::map<L1GtConditionType,std::string> condType2Strcopy = condType2Str_;
488 
489  // make a copy since types will deleted later after they are processed
490  std::map<L1GtConditionType,std::string>::iterator typeIterator =
491  condType2Strcopy.begin();
492 
493  while (typeIterator != condType2Strcopy.end())
494  {
495 
496  ConditionMap outputMap;
497 
498  if (returnConditionsOfOneClass((*typeIterator).first, category, object, (*conditionMap_).at(condChip-1), outputMap))
499  {
500 
501  // special treatment for jet counts in buildCodChipParameters
502  if (object !=JetCounts)
503  {
505  while (particle.findAndReplaceString(tempStr2,
507  ;
508  while (particle.findAndReplaceString(tempStr2,
509  sp(substParamType_), condType2Str_[(*typeIterator).first]))
510  ;
511  parameterStr+=(tempStr2+"\n\n");
512 
513  //parameterStr+=(tempStr2+"<= '0';\n");
514 
515  // remove this type since it was already processed
516  condType2Strcopy.erase(typeIterator);
517  }
518 
519  }
520 
521  typeIterator++;
522 
523  }
524 
525  return true;
526 }
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::map< std::string, std::string > returnParameterMap() const
returns parameter map
std::string L1GtVhdlWriterCore::gtTemplatesPath ( )

returns the templates path

Definition at line 1030 of file L1GtVhdlWriterCore.cc.

References vhdlDir_.

1031 {
1032  return vhdlDir_;
1033 }
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 1375 of file L1GtVhdlWriterCore.cc.

References int2str().

Referenced by getCondChipVhdContentFromTriggerMenu().

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

Definition at line 1792 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

1793 {
1794 
1795  for (unsigned int k=0; k<=1; k++)
1796  {
1797 
1798  // combine muon with calo particles
1799  for (unsigned int i=0; i<caloObjects_.size(); i++)
1800  {
1802  +"_"+objType2Str_[caloObjects_.at(i)], 0));
1803  }
1804 
1805  // combine etm with muon
1807  +objType2Str_[Mu], 0));
1808 
1809  // combine etm with calo particles
1810  for (unsigned int i=0; i<caloObjects_.size(); i++)
1811  {
1813  +"_"+objType2Str_[caloObjects_.at(i)], 0));
1814  }
1815 
1816  std::vector<L1GtObject> caloObjectsCp = caloObjects_;
1817 
1818  while (caloObjectsCp.size()>0)
1819  {
1820  std::vector<L1GtObject>::iterator iter=caloObjectsCp.begin();
1821  L1GtObject firstPartner = (*iter);
1822  caloObjectsCp.erase(iter);
1823 
1824  iter=caloObjectsCp.begin();
1825  while (iter!=caloObjectsCp.end())
1826  {
1828  objType2Str_[firstPartner]+"_"+objType2Str_[(*iter)], 0));
1829  iter++;
1830  }
1831 
1832  }
1833 
1834  }
1835 }
int i
Definition: DBlmapReader.cc:9
Definition: L1GtObject.h:36
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:30
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 1035 of file L1GtVhdlWriterCore.cc.

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

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

produces the firmware code

Definition at line 915 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(), AlCaHLTBitMon_QueryRunRegistry::string, PixelCPETemplateReco_cfi::templates, version_, writeAlgoSetup(), writeCond2intMap2File(), writeCondChipPkg(), writeConditionChipSetup(), writeDefValPkg(), writeEtmSetup(), writeMuonSetupVhdl(), and writeQsfSetupFiles().

Referenced by L1GtVhdlWriter::analyze().

917 {
918  conditionMap_ = &conditionMap;
919 
920  algorithmMap_ = &algorithmMap;
921 
924 
925  if (!mkdir(subDir1.c_str(), 666));
926  if (!mkdir(subDir2.c_str(), 666));
927 
928  chmod(subDir1.c_str(), 0777);
929  chmod(subDir2.c_str(), 0777);
930 
931  /*
932  subDirs_.push_back(subDir1);
933  subDirs_.push_back(subDir2);
934  */
935 
937 
938 
939  //--------------------------------------build setups-------------------------------------------------------
940 
941  // loop over the two condition chips
942  for (unsigned short int i =1; i<=2; i++)
943  {
944  // ----------------------- muon setup -------------------------------------------------------
945 
946  std::map<std::string,std::string> muonParameters;
947  getMuonSetupContentFromTriggerMenu(i, muonParameters);
948  writeMuonSetupVhdl(muonParameters, "muon", i);
949 
950  // ----------------------- calo setup -------------------------------------------------------
951 
952  // map containing all calo object types correlated with the strings
953  // under which they appear in the firmware
954  std::vector<L1GtObject>::iterator caloObjIter = caloObjects_.begin();
955 
956  // loop over all calo objectsbuildMuonSetupVhdl
957  while (caloObjIter != caloObjects_.end())
958  {
959  std::map<std::string,std::string> caloParameters;
960  getCaloSetupContentFromTriggerMenu(i, caloParameters,
961  (*caloObjIter));
962  writeMuonSetupVhdl(caloParameters, objType2Str_[(*caloObjIter)], i);
963 
964  caloObjIter++;
965  }
966 
967  // ----------------------- etm setup ---------------------------------------------------------
968 
969  // map containing all calo object types correlated with the strings
970  // under which they appear in the firmware
971  std::vector<L1GtObject>::iterator esumObjIter = esumObjects_.begin();
972 
973  while (esumObjIter != esumObjects_.end())
974  {
975  std::string etmParameter;
976 
977  getEsumsSetupContentFromTriggerMenu(i, (*esumObjIter),
978  etmParameter);
979  writeEtmSetup(etmParameter, i);
980 
981  esumObjIter++;
982 
983  }
984 
985  // add jet counts to condition 2 integer map
987 
988  // --------------------cond chip setup---------------------------------------------------------
989  // Important: all other setups have to be build BEFORE this one because it needs a
990  // complete condition2integer map !!!
991 
992  std::map<std::string, L1GtVhdlTemplateFile> templates;
993  std::map<std::string, std::string> common;
994  getCondChipVhdContentFromTriggerMenu(i, templates, common);
995  writeConditionChipSetup(templates, common, i);
996 
997  // despite yet not existing they have to appear in cond_chip_pkg vhds
999 
1000  // --------------------cond chip pkg------------------------------------------------------------
1001 
1003 
1004  // -----------------------def val pkg -------------------------------------------------
1005 
1007 
1008  // debug
1009  if (debugMode_)
1010  {
1011  //printConditionsOfCategory(CondEnergySum, (*conditionMap_).at(i-1));
1012  }
1013 
1014  }
1015 
1016  if (debugMode_)
1018 
1019  //-------------------------------process algorithms----------------------------------------------------------
1020 
1021  std::vector< std::map<int, std::string> > algoStrings;
1022 
1023  processAlgorithmMap(algoStrings);
1024 
1025  writeAlgoSetup(algoStrings);
1026 
1027  return true;
1028 }
int i
Definition: DBlmapReader.cc:9
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 writeConditionChipSetup(const std::map< std::string, L1GtVhdlTemplateFile > &templates, const std::map< std::string, std::string > &common, const unsigned short int &chip)
builds cond_chip.vhds
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 1355 of file L1GtVhdlWriterCore.cc.

References internMessageBuf_.

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

1356 {
1357  internMessageBuf_.push_back(message);
1358 }
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 1072 of file L1GtVhdlWriterCore.cc.

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

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

1074 {
1075  L1GtVhdlTemplateFile commonHeaderCp;
1076  commonHeaderCp = commonHeader_;
1077 
1078  commonHeaderCp.substitute("vhdl_file_name", outputFilename);
1079 
1080  L1GtVhdlTemplateFile myTemplate(vhdlDir_+"Templates/"+filename);
1081  myTemplate.insert("$(header)", commonHeaderCp);
1082 
1083  return myTemplate;
1084 }
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 1318 of file L1GtVhdlWriterCore.cc.

References commonHeader_, and L1GtVhdlTemplateFile::print().

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

for debuggin

Definition at line 1862 of file L1GtVhdlWriterCore.cc.

References counter, int2str(), and msg().

1864 {
1865  int counter =0;
1866  for (ConditionMap::const_iterator iterCond = map.begin(); iterCond
1867  != map.end(); iterCond++)
1868  {
1869  msg(iterCond->first);
1870  counter++;
1871  }
1872 
1873  msg("Total Occurances: "+int2str(counter));
1874 
1875 }
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
static std::atomic< unsigned int > counter
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 822 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

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

Definition at line 1904 of file L1GtVhdlWriterCore.cc.

References int2str(), AlCaHLTBitMon_QueryRunRegistry::string, and L1GtVhdlDefinitions::stringConstantConstantNr_.

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

1906 {
1907  std::string initstr=stringConstantConstantNr_+typeStr+" : integer := "+int2str(number)
1908  +";";
1909 
1910  return initstr;
1911 }
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 1323 of file L1GtVhdlWriterCore.cc.

References commonHeader_.

Referenced by L1GtVhdlWriter::analyze().

1324 {
1325  return commonHeader_;
1326 }
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 93 of file L1GtVhdlWriterCore.cc.

References ntuplemaker::status.

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

98 {
99  bool status = false;
100 
101  ConditionMap::const_iterator condIter = map.begin();
102  while (condIter!=map.end())
103  {
104  if (condIter->second->condCategory()==category
105  && condIter->second->condType()==type && (condIter->second->objectType())[0]==object)
106  {
107  outputMap[condIter->first]=condIter->second;
108  status = true;
109  }
110  condIter++;
111  }
112 
113  return status;
114 }
type
Definition: HCALResponse.h:21
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 1918 of file L1GtVhdlWriterCore.cc.

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

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

builds the prealgo_and_or setup

Definition at line 1251 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

1252 {
1253  // loop over the two condition chips
1254  for (unsigned int i=1; i<=2; i++)
1255  {
1257 
1258  // output file name
1260  L1GtVhdlTemplateFile::findAndReplaceString(outputFileName, ".",
1261  int2str(i)+".");
1262 
1264  filename, outputFileName);
1265 
1266  std::ostringstream buffer;
1267 
1268  unsigned int algoPinsPerChip = 96;
1269 
1270  for (unsigned int k=1; k<=algoPinsPerChip; k++)
1271  {
1272 
1273  buffer<< stringConstantAlgo_<<"("<<k<<")";
1274  if (algoStrings.at(i-1)[k]!="")
1275  buffer<<" <= "<<algoStrings.at(i-1)[k]<<";"<<std::endl;
1276  else
1277  buffer<<" <= '0';"<<std::endl;
1278  }
1279 
1280  templateFile.substitute(substParamAlgos_, buffer.str());
1281  templateFile.save(chip2OutputSubDir(i)+filename);
1282  chmod((chip2OutputSubDir(i)+filename).c_str(), 0666);
1283  }
1284 
1285 }
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 1431 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

1432 {
1433 
1434 
1435  for (unsigned int i=0; i<=1;i++)
1436  {
1437  ConditionMap::const_iterator iterCond =
1438  conditionMap_->at(i).begin();
1439 
1440  std::string filename=chip2OutputSubDir(i+1)+"cond_names_integer.txt";
1441 
1442  std::ofstream outputFile(filename.c_str());
1443 
1444  while (iterCond!=conditionMap_->at(i).end())
1445  {
1446  conditionToIntegerMap_[(*iterCond).first];
1447 
1448  outputFile<<(iterCond->first)<<": "<<conditionToIntegerMap_[(*iterCond).first]<<std::endl;
1449  iterCond++;
1450  }
1451 
1452  outputFile.close();
1453 
1454  chmod(filename.c_str(), 0666);
1455 
1456 
1457  }
1458 
1459  /*
1460 
1461 
1462  const std::vector<ConditionMap> * conditionMap_;
1463 
1464  std::string filename=outputDir_+"cond_names_integer.txt";
1465  std::ofstream outputFile(filename.c_str());
1466 
1467  for (std::map<std::string,int>::const_iterator iterCond =
1468  conditionToIntegerMap_.begin(); iterCond
1469  != conditionToIntegerMap_.end(); iterCond++)
1470  {
1471  outputFile<<(iterCond->first)<<": "<<(iterCond->second)<<std::endl;
1472  }
1473 
1474  */
1475 
1476 }
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 1877 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

1878 {
1879 
1880  // build filename
1881 
1883 
1884  if (chip==1)
1885  filename = vhdlTemplateCondChipPkg1_;
1886  else if (chip==2)
1887  filename = vhdlTemplateCondChipPkg2_;
1888 
1889  // write the output
1890  L1GtVhdlTemplateFile myTemplate = openVhdlFileWithCommonHeader(filename,
1891  filename);
1892 
1893  myTemplate.substitute("version",version_);
1894 
1895  myTemplate.insert("$(conditions_nr)", numberOfConditions_.at(chip-1));
1896 
1899 
1900  myTemplate.save(chip2OutputSubDir(chip)+filename);
1901  chmod((chip2OutputSubDir(chip)+filename).c_str(), 0666);
1902 }
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, const 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 ( const 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 1206 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

1210 {
1211 
1212  // get filename
1214 
1215  // build output filename
1217  L1GtVhdlTemplateFile::findAndReplaceString(outputFileName, ".",
1218  int2str(chip)+".");
1219 
1220  L1GtVhdlTemplateFile myTemplate = openVhdlFileWithCommonHeader(filename,
1221  outputFileName);
1222 
1223  // map containing the subsitution parameters with their content (as L1GtVhdlTemplateFile file object)
1224  std::map<std::string, L1GtVhdlTemplateFile>::const_iterator iter=
1225  templates.begin();
1226 
1227  while (iter != templates.end())
1228  {
1229 
1230  myTemplate.insert("$("+(iter->first)+")", iter->second);
1231 
1232  iter++;
1233  }
1234 
1235  // subsitutes common parameters
1236  std::map<std::string, std::string>::const_iterator iter2= common.begin();
1237 
1238  while (iter2 != common.end())
1239  {
1240 
1241  myTemplate.substitute((iter2->first), iter2->second);
1242 
1243  iter2++;
1244  }
1245 
1246  myTemplate.save(chip2OutputSubDir(chip)+filename);
1247  chmod((chip2OutputSubDir(chip)+filename).c_str(), 0666);
1248 
1249 }
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, const 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 1534 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(), AlCaHLTBitMon_QueryRunRegistry::string, 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().

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

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

Referenced by makeFirmware().

1289 {
1290 
1291  // get filename
1294 
1295  L1GtVhdlTemplateFile myTemplate;
1296 
1297  // modify output filename
1298  myTemplate.findAndReplaceString(outputFile, ".", int2str(condChip)+".");
1299 
1300  myTemplate = openVhdlFileWithCommonHeader(filename, filename);
1301 
1302  // replace all occurances of $(particle)
1303  while (myTemplate.substitute("particle", "etm"))
1304  while (myTemplate.substitute("particle", "etm"))
1305  ;
1306 
1307  // delete last char if it is \n
1308  if (etmString[etmString.length()-1] == '\n')
1309  etmString = etmString.substr(0, etmString.length()-1);
1310 
1311  myTemplate.substitute("phi", etmString);
1312 
1313  myTemplate.save(chip2OutputSubDir(condChip)+filename);
1314  chmod((chip2OutputSubDir(condChip)+filename).c_str(), 0666);
1315 
1316 }
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 1086 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

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

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

Definition at line 1328 of file L1GtVhdlWriterCore.cc.

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

Referenced by makeFirmware().

1329 {
1330 
1331  std::vector<std::string> filenames;
1332  filenames.push_back(quartusSetupFileChip1_);
1333  filenames.push_back(quartusSetupFileChip2_);
1334 
1335  for (unsigned int i=0; i<filenames.size(); i++)
1336  {
1337  L1GtVhdlTemplateFile myTemplate;
1338 
1339  myTemplate.open(vhdlDir_+"Templates/"+filenames.at(i));
1340  myTemplate.substitute("version", version);
1341 
1342  std::string tempStr = filenames.at(i);
1343 
1344  if (i==0)
1345  L1GtVhdlTemplateFile::findAndReplaceString(tempStr , "cond1","cond");
1346  if (i==1)
1347  L1GtVhdlTemplateFile::findAndReplaceString(tempStr , "cond2","cond");
1348 
1349  myTemplate.save(chip2OutputSubDir(i+1)+tempStr);
1350  chmod((chip2OutputSubDir(i+1)+tempStr).c_str(), 0666);
1351  }
1352 
1353 }
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 197 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 212 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 206 of file L1GtVhdlWriterCore.h.

Referenced by getCondChipVhdContentFromTriggerMenu(), and L1GtVhdlWriterCore().

L1GtVhdlTemplateFile L1GtVhdlWriterCore::commonHeader_
private

common header for all files

Definition at line 229 of file L1GtVhdlWriterCore.h.

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

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

condition map

Definition at line 194 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 215 of file L1GtVhdlWriterCore.h.

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

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

Definition at line 231 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 234 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 221 of file L1GtVhdlWriterCore.h.

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

std::string L1GtVhdlWriterCore::version_
private

Definition at line 226 of file L1GtVhdlWriterCore.h.

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

std::string L1GtVhdlWriterCore::vhdlDir_
private