Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:10

0001 /**
0002  * \class L1GtVhdlDefinitions
0003  * 
0004  * 
0005  * Description: Contains conversion maps for conversion of trigger objects to strings etc.  
0006  *
0007  * Implementation:
0008  *    <TODO: enter implementation details>
0009  *   
0010  * \author: Philipp Wagner
0011  * 
0012  *
0013  */
0014 
0015 // this class header
0016 #include "L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlDefinitions.h"
0017 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0018 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenuFwd.h"
0019 
0020 // system include files
0021 #include <string>
0022 
0023 // user include files
0024 
0025 // static class members
0026 
0027 const std::string L1GtVhdlDefinitions::vhdlTemplateAlgoAndOr_("pre_algo_and_or.vhd");
0028 const std::string L1GtVhdlDefinitions::vhdlTemplateCondChip_("cond_chip.vhd");
0029 const std::string L1GtVhdlDefinitions::vhdlTemplateEtmSetup_("etm_setup.vhd");
0030 const std::string L1GtVhdlDefinitions::vhdlTemplateMuonSetup_("muon_setup.vhd");
0031 const std::string L1GtVhdlDefinitions::vhdlTemplateCaloSetup_("calo_setup.vhd");
0032 const std::string L1GtVhdlDefinitions::vhdlTemplateCondChipPkg1_("cond1_chip_pkg.vhd");
0033 const std::string L1GtVhdlDefinitions::vhdlTemplateCondChipPkg2_("cond2_chip_pkg.vhd");
0034 const std::string L1GtVhdlDefinitions::vhdlTemplateDefValPkg_("def_val_pkg.vhd");
0035 const std::string L1GtVhdlDefinitions::quartusSetupFileChip1_("cond1_chip.qsf");
0036 const std::string L1GtVhdlDefinitions::quartusSetupFileChip2_("cond2_chip.qsf");
0037 
0038 const std::string L1GtVhdlDefinitions::outputSubDir1_("cond1");
0039 const std::string L1GtVhdlDefinitions::outputSubDir2_("cond2");
0040 
0041 const std::string L1GtVhdlDefinitions::substParamAlgos_("prealgos");
0042 const std::string L1GtVhdlDefinitions::substParamParticle_("particle");
0043 const std::string L1GtVhdlDefinitions::substParamType_("type");
0044 const std::string L1GtVhdlDefinitions::substParamMaxNr_("max_nr");
0045 const std::string L1GtVhdlDefinitions::substParamDefValId_("def_val_id");
0046 const std::string L1GtVhdlDefinitions::substParamContent_("content");
0047 const std::string L1GtVhdlDefinitions::substParamOthers_("others");
0048 const std::string L1GtVhdlDefinitions::substParamDefValType_("defvaltype");
0049 const std::string L1GtVhdlDefinitions::substParamCaloOrMuon_("calo_or_muon");
0050 const std::string L1GtVhdlDefinitions::substParamMuonDefVals_("muon_def_vals");
0051 const std::string L1GtVhdlDefinitions::substParamCaloDefVals_("calo_def_vals");
0052 const std::string L1GtVhdlDefinitions::substParamEsumsDefVals_("esums_def_vals");
0053 const std::string L1GtVhdlDefinitions::substParamJetsDefVals_("jets_def_vals");
0054 const std::string L1GtVhdlDefinitions::substParamJetCntsCommon_("jet_cnts_common");
0055 const std::string L1GtVhdlDefinitions::substParamCharge_("charge");
0056 
0057 const std::string L1GtVhdlDefinitions::stringConstantAlgo_("pre_algo_a");
0058 const std::string L1GtVhdlDefinitions::stringConstantDefValId_("def_val_id");
0059 const std::string L1GtVhdlDefinitions::stringConstantJetCountsDefVal_("jet_cnts_def_val");
0060 const std::string L1GtVhdlDefinitions::stringConstantEsumsLowDefVal_("esums_low_def_val");
0061 const std::string L1GtVhdlDefinitions::stringConstantEsumsLHighDefVal_("esums_high_def_val");
0062 const std::string L1GtVhdlDefinitions::stringConstantPtLowDefVal_("ptl_def_val");
0063 const std::string L1GtVhdlDefinitions::stringConstantPtHighDefVal_("pth_def_val");
0064 const std::string L1GtVhdlDefinitions::stringConstantQualityDefVal_("quality_def_val");
0065 const std::string L1GtVhdlDefinitions::stringConstantQuargeDefVal_("charge_def_val");
0066 const std::string L1GtVhdlDefinitions::stringConstantCalo_("calo");
0067 const std::string L1GtVhdlDefinitions::stringConstantCharge1s_("charge_1_s");
0068 const std::string L1GtVhdlDefinitions::stringConstantCharge2s_("charge_2_s");
0069 const std::string L1GtVhdlDefinitions::stringConstantCharge2wsc_("charge_2_wsc");
0070 const std::string L1GtVhdlDefinitions::stringConstantCharge3s_("charge_3");
0071 const std::string L1GtVhdlDefinitions::stringConstantCharge4s_("charge_4");
0072 const std::string L1GtVhdlDefinitions::stringConstantCommon_("COMMON");
0073 const std::string L1GtVhdlDefinitions::stringConstantPtl_("ptl");
0074 const std::string L1GtVhdlDefinitions::stringConstantPth_("pth");
0075 const std::string L1GtVhdlDefinitions::stringConstantConstantNr_("CONSTANT nr_");
0076 const std::string L1GtVhdlDefinitions::stringConstantQuality_("quality");
0077 const std::string L1GtVhdlDefinitions::stringConstantEsumsLow_("esums_low");
0078 const std::string L1GtVhdlDefinitions::stringConstantEsumsHigh_("esums_high");
0079 
0080 // constructor
0081 L1GtVhdlDefinitions::L1GtVhdlDefinitions() {
0082   objType2Str_[Mu] = "muon";
0083   objType2Str_[NoIsoEG] = "eg";
0084   objType2Str_[IsoEG] = "ieg";
0085   objType2Str_[ForJet] = "fwdjet";
0086   objType2Str_[TauJet] = "tau";
0087   objType2Str_[CenJet] = "jet";
0088   objType2Str_[JetCounts] = "jet_cnts";
0089   objType2Str_[HTT] = "htt";
0090   objType2Str_[ETT] = "ett";
0091   objType2Str_[ETM] = "etm";
0092 
0093   condType2Str_[Type1s] = "1_s";
0094   condType2Str_[Type2s] = "2_s";
0095   condType2Str_[Type2wsc] = "2_wsc";
0096   condType2Str_[Type3s] = "3";
0097   condType2Str_[Type4s] = "4";
0098   condType2Str_[Type2cor] = "Type2cor";
0099   condType2Str_[TypeETM] = "cond";
0100   condType2Str_[TypeETT] = "cond";
0101   condType2Str_[TypeHTT] = "cond";
0102   condType2Str_[TypeJetCounts] = "jet_cnts";
0103 
0104   caloType2Int_[IsoEG] = "0";
0105   caloType2Int_[NoIsoEG] = "1";
0106   caloType2Int_[CenJet] = "2";
0107   caloType2Int_[TauJet] = "3";
0108   caloType2Int_[ForJet] = "4";
0109   caloType2Int_[Mu] = "5";
0110   caloType2Int_[ETM] = "6";
0111 }
0112 
0113 // destructor
0114 L1GtVhdlDefinitions::~L1GtVhdlDefinitions() {
0115   // empty
0116 }
0117 
0118 const std::map<L1GtObject, std::string> L1GtVhdlDefinitions::getObj2StrMap() { return objType2Str_; }
0119 
0120 const std::map<L1GtConditionType, std::string> L1GtVhdlDefinitions::getCond2StrMap() { return condType2Str_; }
0121 
0122 const std::map<L1GtObject, std::string> L1GtVhdlDefinitions::getCalo2IntMap() { return caloType2Int_; }
0123 
0124 std::string L1GtVhdlDefinitions::obj2str(const L1GtObject &type) { return objType2Str_[type]; }
0125 
0126 std::string L1GtVhdlDefinitions::type2str(const L1GtConditionType &type) { return condType2Str_[type]; }