Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:18

0001 //
0002 // NOTE:  This file was automatically generated from UTM library via import_utm.pl
0003 // DIRECT EDITS MIGHT BE LOST.
0004 //
0005 /**
0006  * @author Bernhard Arnold
0007  *         Takashi Matsushita
0008  * @date:  2015-03-12
0009  */
0010 
0011 #ifndef tmEventSetup_L1TUtmTriggerMenu_hh
0012 #define tmEventSetup_L1TUtmTriggerMenu_hh
0013 
0014 #include "CondFormats/L1TObjects/interface/L1TUtmScale.h"
0015 #include "CondFormats/L1TObjects/interface/L1TUtmCondition.h"
0016 #include "CondFormats/L1TObjects/interface/L1TUtmAlgorithm.h"
0017 #include "CondFormats/Serialization/interface/Serializable.h"
0018 
0019 #include <map>
0020 #include <string>
0021 
0022 /**
0023  *  This class implements data structure for TriggerMenu
0024  */
0025 class L1TUtmTriggerMenu {
0026 public:
0027   L1TUtmTriggerMenu()
0028       : algorithm_map_(),
0029         condition_map_(),
0030         scale_map_(),
0031         external_map_(),
0032         token_to_condition_(),
0033         name_(),
0034         version_(),
0035         comment_(),
0036         datetime_(),
0037         uuid_firmware_(),
0038         scale_set_name_(),
0039         n_modules_(),
0040         version(0){};
0041 
0042   virtual ~L1TUtmTriggerMenu() = default;
0043 
0044   /** get algorithm_map_
0045      *
0046      * @return reference of algorithm_map_
0047      */
0048   const std::map<std::string, L1TUtmAlgorithm>& getAlgorithmMap() const { return algorithm_map_; };
0049 
0050   /** get condition_map_
0051      *
0052      * @return reference of condition_map_
0053      */
0054   const std::map<std::string, L1TUtmCondition>& getConditionMap() const { return condition_map_; };
0055 
0056   /** get scale_map_
0057      *
0058      * @return reference of scale_map_
0059      */
0060   const std::map<std::string, L1TUtmScale>& getScaleMap() const { return scale_map_; };
0061 
0062   /** get menu name
0063      *
0064      * @return name of the menu
0065      */
0066   const std::string& getName() const { return name_; };
0067 
0068   /** get grammar version
0069      *
0070      * @return grammar version
0071      */
0072   const std::string& getVersion() const { return version_; };
0073 
0074   /** get comment on the menu
0075      *
0076      * @return comment
0077      */
0078   const std::string& getComment() const { return comment_; };
0079 
0080   /** get datetime of the menu
0081      *
0082      * @return datetime
0083      */
0084   const std::string& getDatetime() const { return datetime_; };
0085 
0086   /** get UUID of firmware generated by VHDL producer
0087      *
0088      * @return UUID
0089      */
0090   const std::string& getFirmwareUuid() const { return uuid_firmware_; };
0091 
0092   /** gets the hash of the L1 firmware 
0093      *
0094      * @return the hash identifying the L1 firmware 
0095      */
0096   const unsigned long getFirmwareUuidHashed() const;
0097 
0098   /** get scale set name
0099      *
0100      * @return scale set name
0101      */
0102   const std::string& getScaleSetName() const { return scale_set_name_; };
0103 
0104   /** get number of uGT boards for the menu
0105      *
0106      * @return number of uGT boards
0107      */
0108   const unsigned int getNmodules() const { return n_modules_; };
0109 
0110   /** set menu name
0111      *
0112      * @param value [in] name of the menu
0113      */
0114   void setName(const std::string& value) { name_ = value; };
0115 
0116   /** set grammar version
0117      *
0118      * @param value [in] grammar version
0119      */
0120   void setVersion(const std::string& value) { version_ = value; };
0121 
0122   /** set comment on the menu
0123      *
0124      * @param value [in] comment
0125      */
0126   void setComment(const std::string& value) { comment_ = value; };
0127 
0128   /** set datetime of the menu
0129      *
0130      * @param value [in] datetime
0131      */
0132   void setDatetime(const std::string& value) { datetime_ = value; };
0133 
0134   /** set UUID of firmware generated by VHDL producer
0135      *
0136      * @param value [in] UUID
0137      */
0138   void setFirmwareUuid(const std::string& value) { uuid_firmware_ = value; };
0139 
0140   /** set scale set name
0141      *
0142      * @param value [in] scale set name
0143      */
0144   void setScaleSetName(const std::string& value) { scale_set_name_ = value; };
0145 
0146   /** set number of uGT boards for the menu
0147      *
0148      * @param value [in] number of uGT boards
0149      */
0150   void setNmodules(const unsigned int value) { n_modules_ = value; };
0151 
0152   /** hash computation function
0153      *
0154      * @return computed hash
0155      */
0156   static unsigned long murmurHashNeutral2(const void* key, int len, unsigned int seed);
0157 
0158 protected:
0159   std::map<std::string, L1TUtmAlgorithm> algorithm_map_; /**< map of algorithm <algorithm name, L1TUtmAlgorithm> */
0160   std::map<std::string, L1TUtmCondition> condition_map_; /**< map of condition <condition name, L1TUtmCondition> */
0161   std::map<std::string, L1TUtmScale> scale_map_;         /**< map of scale <scale name, L1TUtmScale*> */
0162   std::map<std::string, unsigned int> external_map_;     /**< map of external <external name, channel id> */
0163   std::map<std::string, std::string>
0164       token_to_condition_;     /**< look-up table for translating expression in grammar to expression in condition */
0165   std::string name_;           /**< name of the menu */
0166   std::string version_;        /**< menu grammar version */
0167   std::string comment_;        /**< comment on the menu */
0168   std::string datetime_;       /**< datetime of the menu */
0169   std::string uuid_firmware_;  /**< uuid of firmware */
0170   std::string scale_set_name_; /**< scale set name */
0171   unsigned int n_modules_;     /**< number of uGT boards for the menu */
0172   unsigned int version;
0173   COND_SERIALIZABLE;
0174 };
0175 
0176 #endif  // tmEventSetup_L1TUtmTriggerMenu_hh