Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1GtConfigProducers_L1GtVhdlDefinitions_h
0002 #define L1GtConfigProducers_L1GtVhdlDefinitions_h
0003 
0004 /**
0005  * \class L1GtVhdlDefinitions
0006  * 
0007  * 
0008  * Description: Contains conversion maps for conversion of trigger objects to strings etc.  
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *   
0013  * \author: Philipp Wagner
0014  * 
0015  *
0016  */
0017 
0018 // system include files
0019 #include <string>
0020 
0021 // user include files
0022 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0023 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenuFwd.h"
0024 
0025 // forward declarations
0026 
0027 // class declaration
0028 class L1GtVhdlDefinitions {
0029 public:
0030   enum VmeRegister { RegPtHighThreshold, RegPtLowThreshold, RegQualityRange, RegChargeCorrelation, RegEtThreshold };
0031 
0032   /// constructor
0033   L1GtVhdlDefinitions();
0034 
0035   /// destructor
0036   virtual ~L1GtVhdlDefinitions();
0037 
0038   /// converts object type to firmware string
0039   std::string obj2str(const L1GtObject &type);
0040 
0041   /// converts a condition type to firmware string
0042   std::string type2str(const L1GtConditionType &type);
0043 
0044   const std::map<L1GtObject, std::string> getObj2StrMap();
0045 
0046   const std::map<L1GtConditionType, std::string> getCond2StrMap();
0047 
0048   const std::map<L1GtObject, std::string> getCalo2IntMap();
0049 
0050 protected:
0051   // templates
0052 
0053   static const std::string vhdlTemplateAlgoAndOr_;
0054   static const std::string vhdlTemplateCondChip_;
0055   static const std::string vhdlTemplateDefValPkg_;
0056   static const std::string vhdlTemplateEtmSetup_;
0057   static const std::string vhdlTemplateMuonSetup_;
0058   static const std::string vhdlTemplateCaloSetup_;
0059   static const std::string vhdlTemplateCondChipPkg1_;
0060   static const std::string vhdlTemplateCondChipPkg2_;
0061   static const std::string quartusSetupFileChip1_;
0062   static const std::string quartusSetupFileChip2_;
0063 
0064   // output subdirectories
0065 
0066   static const std::string outputSubDir1_;
0067   static const std::string outputSubDir2_;
0068 
0069   // internal templates
0070 
0071   // ...
0072 
0073   // substitution parameters
0074 
0075   static const std::string substParamAlgos_;
0076   static const std::string substParamParticle_;
0077   static const std::string substParamType_;
0078   static const std::string substParamMaxNr_;
0079   static const std::string substParamDefValId_;
0080   static const std::string substParamCaloOrMuon_;
0081   static const std::string substParamContent_;
0082   static const std::string substParamOthers_;
0083   static const std::string substParamDefValType_;
0084   static const std::string substParamMuonDefVals_;
0085   static const std::string substParamCaloDefVals_;
0086   static const std::string substParamEsumsDefVals_;
0087   static const std::string substParamJetsDefVals_;
0088   static const std::string substParamCharge_;
0089   static const std::string substParamJetCntsCommon_;
0090 
0091   //string constants
0092 
0093   static const std::string stringConstantAlgo_;
0094   static const std::string stringConstantDefValId_;
0095   static const std::string stringConstantJetCountsDefVal_;
0096   static const std::string stringConstantConstantNr_;
0097   static const std::string stringConstantEsumsLowDefVal_;
0098   static const std::string stringConstantEsumsLHighDefVal_;
0099   static const std::string stringConstantPtLowDefVal_;
0100   static const std::string stringConstantPtHighDefVal_;
0101   static const std::string stringConstantQualityDefVal_;
0102   static const std::string stringConstantQuargeDefVal_;
0103   static const std::string stringConstantCalo_;
0104   static const std::string stringConstantCharge1s_;
0105   static const std::string stringConstantCharge2s_;
0106   static const std::string stringConstantCharge2wsc_;
0107   static const std::string stringConstantCharge3s_;
0108   static const std::string stringConstantCharge4s_;
0109   static const std::string stringConstantCommon_;
0110   static const std::string stringConstantPtl_;
0111   static const std::string stringConstantPth_;
0112   static const std::string stringConstantEsumsLow_;
0113   static const std::string stringConstantEsumsHigh_;
0114   static const std::string stringConstantQuality_;
0115 
0116   // ... and so on
0117 
0118 private:
0119   /// converts L1GtConditionType to firmware string
0120   std::map<L1GtObject, std::string> objType2Str_;
0121 
0122   /// converts L1GtObject to calo_nr
0123   std::map<L1GtConditionType, std::string> condType2Str_;
0124 
0125   /// converts L1GtObject to string
0126   std::map<L1GtObject, std::string> caloType2Int_;
0127 };
0128 
0129 #endif /*L1GtConfigProducers_L1GtVhdlDefinitions_h*/