Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-11 04:40:25

0001 #ifndef GlobalTriggerAnalyzer_L1GtUtils_h
0002 #define GlobalTriggerAnalyzer_L1GtUtils_h
0003 
0004 /**
0005  * \class L1GtUtils
0006  *
0007  *
0008  * Description: various methods for L1 GT, to be called in an EDM analyzer, producer or filter.
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  *
0015  *
0016  */
0017 
0018 // system include files
0019 #include <memory>
0020 #include <string>
0021 #include <utility>
0022 
0023 // user include files
0024 #include "CondFormats/L1TObjects/interface/L1GtStableParameters.h"
0025 #include "CondFormats/DataRecord/interface/L1GtStableParametersRcd.h"
0026 
0027 #include "CondFormats/L1TObjects/interface/L1GtPrescaleFactors.h"
0028 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsAlgoTrigRcd.h"
0029 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsTechTrigRcd.h"
0030 
0031 #include "CondFormats/L1TObjects/interface/L1GtTriggerMask.h"
0032 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskAlgoTrigRcd.h"
0033 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskTechTrigRcd.h"
0034 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskVetoAlgoTrigRcd.h"
0035 #include "CondFormats/DataRecord/interface/L1GtTriggerMaskVetoTechTrigRcd.h"
0036 
0037 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h"
0038 #include "CondFormats/DataRecord/interface/L1GtTriggerMenuRcd.h"
0039 
0040 #include "DataFormats/L1GlobalTrigger/interface/L1GtTriggerMenuLite.h"
0041 
0042 #include "FWCore/Framework/interface/ConsumesCollector.h"
0043 #include "FWCore/Framework/interface/Event.h"
0044 #include "FWCore/Framework/interface/EventSetup.h"
0045 #include "FWCore/Framework/interface/Run.h"
0046 
0047 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0048 #include "FWCore/Utilities/interface/ESGetToken.h"
0049 #include "FWCore/Utilities/interface/InputTag.h"
0050 
0051 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenuFwd.h"
0052 
0053 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtilsHelper.h"
0054 
0055 // forward declarations
0056 class L1GtStableParameters;
0057 class L1GtPrescaleFactors;
0058 class L1GtTriggerMask;
0059 class L1GtTriggerMenu;
0060 
0061 class L1GlobalTriggerReadoutRecord;
0062 class L1GlobalTriggerRecord;
0063 
0064 // class declaration
0065 
0066 class L1GtUtils {
0067 public:
0068   // Use this enum to tell the EventSetup whether it should prefetch
0069   // data when processing beginRun or an Event or both. (This
0070   // depends on when retrieveL1EventSetup is called which can
0071   // be a direct call or also indirectly through a call to one
0072   // or both versions of getL1GtRunCache. Also note that getL1GtRunCache
0073   // has an argument that disables EventSetup calls and if the Run
0074   // version of the function is called then the Event version of the
0075   // function does not get EventSetup data)
0076   enum class UseEventSetupIn { Run, Event, RunAndEvent, Nothing };
0077 
0078   // Using this constructor will require InputTags to be specified in the configuration
0079   L1GtUtils(edm::ParameterSet const& pset,
0080             edm::ConsumesCollector&& iC,
0081             bool useL1GtTriggerMenuLite,
0082             UseEventSetupIn use = UseEventSetupIn::Run);
0083 
0084   L1GtUtils(edm::ParameterSet const& pset,
0085             edm::ConsumesCollector& iC,
0086             bool useL1GtTriggerMenuLite,
0087             UseEventSetupIn use = UseEventSetupIn::Run);
0088 
0089   // Using this constructor will cause it to look for valid InputTags in
0090   // the following ways in the specified order until they are found.
0091   //   1. The configuration
0092   //   2. Search all products from the preferred input tags for the required type
0093   //   3. Search all products from any other process for the required type
0094   template <typename T>
0095   L1GtUtils(edm::ParameterSet const& pset,
0096             edm::ConsumesCollector&& iC,
0097             bool useL1GtTriggerMenuLite,
0098             T& module,
0099             UseEventSetupIn use = UseEventSetupIn::Run);
0100 
0101   template <typename T>
0102   L1GtUtils(edm::ParameterSet const& pset,
0103             edm::ConsumesCollector& iC,
0104             bool useL1GtTriggerMenuLite,
0105             T& module,
0106             UseEventSetupIn use = UseEventSetupIn::Run);
0107 
0108   // Using this constructor will cause it to look for valid InputTags in
0109   // the following ways in the specified order until they are found.
0110   //   1. The constructor arguments
0111   //   2. The configuration
0112   //   3. Search all products from the preferred input tags for the required type
0113   //   4. Search all products from any other process for the required type
0114   template <typename T>
0115   L1GtUtils(edm::ParameterSet const& pset,
0116             edm::ConsumesCollector&& iC,
0117             bool useL1GtTriggerMenuLite,
0118             T& module,
0119             edm::InputTag const& l1GtRecordInputTag,
0120             edm::InputTag const& l1GtReadoutRecordInputTag,
0121             edm::InputTag const& l1GtTriggerMenuLiteInputTag,
0122             UseEventSetupIn use = UseEventSetupIn::Run);
0123 
0124   template <typename T>
0125   L1GtUtils(edm::ParameterSet const& pset,
0126             edm::ConsumesCollector& iC,
0127             bool useL1GtTriggerMenuLite,
0128             T& module,
0129             edm::InputTag const& l1GtRecordInputTag,
0130             edm::InputTag const& l1GtReadoutRecordInputTag,
0131             edm::InputTag const& l1GtTriggerMenuLiteInputTag,
0132             UseEventSetupIn use = UseEventSetupIn::Run);
0133 
0134   /// destructor
0135   virtual ~L1GtUtils();
0136 
0137   static void fillDescription(edm::ParameterSetDescription& desc) { L1GtUtilsHelper::fillDescription(desc); }
0138 
0139 public:
0140   enum TriggerCategory { AlgorithmTrigger = 0, TechnicalTrigger = 1 };
0141 
0142   /**
0143      * \class L1GtUtils
0144      *
0145      *
0146      * Description: return L1 trigger results for a logical expression.
0147      *
0148      * Implementation:
0149      *    Return L1 trigger results for a logical expression of algorithm or technical triggers.
0150      *    Mixture of algorithm and technical triggers in the logical expression is allowed only if
0151      *    trigger names or aliases are used. Mixing bit numbers and names or aliases is not supported.
0152      *    If the expression has bit numbers, they are assumed to be technical triggers.
0153      *
0154      * \author: Vasile Mihai Ghete - HEPHY Vienna
0155      *      *
0156      */
0157   class LogicalExpressionL1Results {
0158   public:
0159     /// constructor(s)
0160 
0161     /// trigger decisions, prescale factors and masks from GT record(s)
0162     explicit LogicalExpressionL1Results(const std::string&, L1GtUtils&);
0163 
0164     /// destructor
0165     ~LogicalExpressionL1Results();
0166 
0167   public:
0168     /// return true if the logical expression is syntactically correct
0169     inline bool isValid() { return m_validLogicalExpression; }
0170 
0171     /// update quantities related to the logical expression at the beginning of the run
0172     ///     new logical expression, replacing the logical expression given the in previous run
0173     const int logicalExpressionRunUpdate(const edm::Run&, const edm::EventSetup&, const std::string&);
0174     //
0175     ///     keep the logical expression given in the previous run
0176     const int logicalExpressionRunUpdate(const edm::Run&, const edm::EventSetup&);
0177 
0178     /// list of triggers in the logical expression, trigger decisions, prescale factors and masks, error codes
0179 
0180     inline const std::vector<L1GtLogicParser::OperandToken>& expL1Triggers() { return m_expL1Triggers; }
0181     const std::vector<std::pair<std::string, bool> >& decisionsBeforeMask();
0182     const std::vector<std::pair<std::string, bool> >& decisionsAfterMask();
0183     const std::vector<std::pair<std::string, int> >& prescaleFactors();
0184     const std::vector<std::pair<std::string, int> >& triggerMasks();
0185 
0186     const std::vector<std::pair<std::string, int> >& errorCodes(const edm::Event&);
0187 
0188   private:
0189     /// parse the logical expression, initialize the private members to required size
0190     /// such that one can just reset them
0191     bool initialize();
0192 
0193     /// reset for each L1 trigger the value from pair.second
0194     void reset(const std::vector<std::pair<std::string, bool> >&) const;
0195     void reset(const std::vector<std::pair<std::string, int> >&) const;
0196 
0197     void l1Results(const edm::Event& iEvent);
0198 
0199   private:
0200     /// private members as input parameters
0201 
0202     /// logical expression
0203     std::string m_logicalExpression;
0204 
0205     L1GtUtils& m_l1GtUtils;
0206 
0207   private:
0208     // private members
0209 
0210     /// code for L1 trigger configuration
0211     int m_l1ConfCode;
0212 
0213     /// true if valid L1 configuration - if not, reset all quantities and return
0214     bool m_validL1Configuration;
0215 
0216     /// true if the logical expression uses accepted L1GtLogicParser operators
0217     bool m_validLogicalExpression;
0218 
0219     /// set to true if the method l1Results was called once
0220     bool m_l1ResultsAlreadyCalled;
0221 
0222     std::vector<L1GtLogicParser::OperandToken> m_expL1Triggers;
0223     size_t m_expL1TriggersSize;
0224 
0225     /// trigger category for each L1 trigger in the logical expression
0226     std::vector<L1GtUtils::TriggerCategory> m_expTriggerCategory;
0227 
0228     /// flag true, if the logical expression is built from technical trigger bits
0229     bool m_expBitsTechTrigger;
0230 
0231     /// for each L1 trigger in the logical expression, true if the trigger is found
0232     /// in the current L1 menu
0233     std::vector<bool> m_expTriggerInMenu;
0234 
0235     ///
0236     std::vector<std::pair<std::string, bool> > m_decisionsBeforeMask;
0237     std::vector<std::pair<std::string, bool> > m_decisionsAfterMask;
0238     std::vector<std::pair<std::string, int> > m_prescaleFactors;
0239     std::vector<std::pair<std::string, int> > m_triggerMasks;
0240     std::vector<std::pair<std::string, int> > m_errorCodes;
0241   };
0242 
0243 public:
0244   /// public methods
0245 
0246   // enum to string for TriggerCategory
0247   const std::string triggerCategory(const TriggerCategory&) const;
0248 
0249   /// retrieve all the relevant L1 trigger event setup records and cache them to improve the speed
0250   void retrieveL1EventSetup(const edm::EventSetup&, bool isRun = true);
0251 
0252   /// retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed
0253 
0254   ///    for use in beginRun(const edm::Run&, const edm::EventSetup&);
0255   void retrieveL1GtTriggerMenuLite(const edm::Run&);
0256 
0257   /// get all the run-constant quantities for L1 trigger and cache them
0258 
0259   ///    for use in beginRun(const edm::Run&, const edm::EventSetup&);
0260   void getL1GtRunCache(const edm::Run&, const edm::EventSetup&, const bool, const bool);
0261 
0262   ///    for use in analyze(const edm::Event&, const edm::EventSetup&)
0263   void getL1GtRunCache(const edm::Event&, const edm::EventSetup&, const bool, const bool);
0264 
0265   /// return the trigger "category" trigCategory
0266   ///    algorithm trigger alias or algorithm trigger name AlgorithmTrigger = 0,
0267   ///    technical trigger TechnicalTrigger = 1
0268   /// and its bit number
0269   ///
0270   /// in case the algorithm trigger / technical trigger is not in the menu,
0271   /// the returned function is false, the trigger category is irrelevant
0272   /// (default value is AlgorithmTrigger), and the value of the bit number is -1
0273 
0274   const bool l1AlgoTechTrigBitNumber(const std::string& nameAlgoTechTrig,
0275                                      TriggerCategory& trigCategory,
0276                                      int& bitNumber) const;
0277 
0278   /// return the trigger name and alias for a given trigger category and a given
0279   /// bit number
0280   ///
0281   /// in case no algorithm trigger / technical trigger is defined for that bit in the menu,
0282   /// the returned function is false, and the name and the alias is empty
0283 
0284   const bool l1TriggerNameFromBit(const int& bitNumber,
0285                                   const TriggerCategory& trigCategory,
0286                                   std::string& aliasL1Trigger,
0287                                   std::string& nameL1Trigger) const;
0288 
0289   /// return results for a given algorithm or technical trigger,
0290   /// input:
0291   ///   event
0292   ///   algorithm trigger name or alias, or technical trigger name
0293   /// output (by reference):
0294   ///    decision before mask,
0295   ///    decision after mask,
0296   ///    prescale factor
0297   ///    trigger mask
0298   /// return: integer error code
0299 
0300   const int l1Results(const edm::Event& iEvent,
0301                       const std::string& nameAlgoTechTrig,
0302                       bool& decisionBeforeMask,
0303                       bool& decisionAfterMask,
0304                       int& prescaleFactor,
0305                       int& triggerMask) const;
0306 
0307   /// for the functions decisionBeforeMask, decisionAfterMask, decision
0308   /// prescaleFactor, trigger mask:
0309   ///
0310   /// input:
0311   ///   event, event setup
0312   ///   algorithm trigger name or alias, or technical trigger name
0313   /// output (by reference):
0314   ///    error code
0315   /// return: the corresponding quantity
0316 
0317   ///   return decision before trigger mask for a given algorithm or technical trigger
0318   const bool decisionBeforeMask(const edm::Event& iEvent, const std::string& nameAlgoTechTrig, int& errorCode) const;
0319 
0320   ///   return decision after trigger mask for a given algorithm or technical trigger
0321   const bool decisionAfterMask(const edm::Event& iEvent, const std::string& nameAlgoTechTrig, int& errorCode) const;
0322 
0323   ///   return decision after trigger mask for a given algorithm or technical trigger
0324   ///          function identical with decisionAfterMask
0325   const bool decision(const edm::Event& iEvent, const std::string& nameAlgoTechTrig, int& errorCode) const;
0326 
0327   ///   return prescale factor for a given algorithm or technical trigger
0328   const int prescaleFactor(const edm::Event& iEvent, const std::string& nameAlgoTechTrig, int& errorCode) const;
0329 
0330   ///   return trigger mask for a given algorithm or technical trigger
0331   const int triggerMask(const edm::Event& iEvent, const std::string& nameAlgoTechTrig, int& errorCode) const;
0332 
0333   ///     faster than previous two methods - one needs in fact for the
0334   ///     masks the event setup only
0335   const int triggerMask(const std::string& nameAlgoTechTrig, int& errorCode) const;
0336 
0337   /// return the index of the actual set of prescale factors used for the
0338   /// event (must be the same for all events in the luminosity block,
0339   /// if no errors)
0340   ///
0341 
0342   const int prescaleFactorSetIndex(const edm::Event& iEvent, const TriggerCategory& trigCategory, int& errorCode) const;
0343 
0344   /// return the actual set of prescale factors used for the
0345   /// event (must be the same for all events in the luminosity block,
0346   /// if no errors)
0347 
0348   const std::vector<int>& prescaleFactorSet(const edm::Event& iEvent,
0349                                             const TriggerCategory& trigCategory,
0350                                             int& errorCode);
0351 
0352   /// return the set of trigger masks for the physics partition (partition zero)
0353   /// used for the event (remain the same in the whole run, if no errors)
0354   const std::vector<unsigned int>& triggerMaskSet(const TriggerCategory& trigCategory, int& errorCode);
0355 
0356   /// return the L1 trigger menu name
0357   const std::string& l1TriggerMenu() const;
0358 
0359   /// return the L1 trigger menu implementation
0360   const std::string& l1TriggerMenuImplementation() const;
0361 
0362   /// return a pointer to the L1 trigger menu from event setup
0363   const L1GtTriggerMenu* ptrL1TriggerMenuEventSetup(int& errorCode);
0364 
0365   /// return a pointer to the L1GtTriggerMenuLite product
0366   const L1GtTriggerMenuLite* ptrL1GtTriggerMenuLite(int& errorCode);
0367 
0368   /// check if L1 trigger configuration is available
0369   /// return false and an error code if configuration is not available
0370   const bool availableL1Configuration(int& errorCode, int& l1ConfCode) const;
0371 
0372 private:
0373   static const std::string EmptyString;
0374   static const int L1GtNotValidError;
0375 
0376   /// return the trigger result given bit number and decision word
0377   /// errorCode != 0 if bit number greater than size of decision word
0378   /// print in debug mode a message in case of error
0379   const bool trigResult(const DecisionWord& decWord,
0380                         const int bitNumber,
0381                         const std::string& nameAlgoTechTrig,
0382                         const TriggerCategory& trigCategory,
0383                         int& errorCode) const;
0384 
0385 private:
0386   L1GtUtils(edm::ConsumesCollector&, UseEventSetupIn);
0387 
0388   /// event setup cached stuff
0389 
0390   /// stable parameters
0391   const L1GtStableParameters* m_l1GtStablePar;
0392   unsigned long long m_l1GtStableParCacheID;
0393 
0394   /// number of algorithm triggers
0395   unsigned int m_numberAlgorithmTriggers;
0396 
0397   /// number of technical triggers
0398   unsigned int m_numberTechnicalTriggers;
0399 
0400   /// prescale factors
0401   const L1GtPrescaleFactors* m_l1GtPfAlgo;
0402   unsigned long long m_l1GtPfAlgoCacheID;
0403 
0404   const L1GtPrescaleFactors* m_l1GtPfTech;
0405   unsigned long long m_l1GtPfTechCacheID;
0406 
0407   const std::vector<std::vector<int> >* m_prescaleFactorsAlgoTrig;
0408   const std::vector<std::vector<int> >* m_prescaleFactorsTechTrig;
0409 
0410   /// trigger masks & veto masks
0411   const L1GtTriggerMask* m_l1GtTmAlgo;
0412   unsigned long long m_l1GtTmAlgoCacheID;
0413 
0414   const L1GtTriggerMask* m_l1GtTmTech;
0415   unsigned long long m_l1GtTmTechCacheID;
0416 
0417   const L1GtTriggerMask* m_l1GtTmVetoAlgo;
0418   unsigned long long m_l1GtTmVetoAlgoCacheID;
0419 
0420   const L1GtTriggerMask* m_l1GtTmVetoTech;
0421   unsigned long long m_l1GtTmVetoTechCacheID;
0422 
0423   const std::vector<unsigned int>* m_triggerMaskAlgoTrig;
0424   const std::vector<unsigned int>* m_triggerMaskTechTrig;
0425 
0426   const std::vector<unsigned int>* m_triggerMaskVetoAlgoTrig;
0427   const std::vector<unsigned int>* m_triggerMaskVetoTechTrig;
0428 
0429   // trigger menu
0430   const L1GtTriggerMenu* m_l1GtMenu;
0431   unsigned long long m_l1GtMenuCacheID;
0432 
0433   const AlgorithmMap* m_algorithmMap;
0434   const AlgorithmMap* m_algorithmAliasMap;
0435   const AlgorithmMap* m_technicalTriggerMap;
0436 
0437   bool m_l1EventSetupValid;
0438 
0439   /// L1GtTriggerMenuLite cached stuff
0440 
0441   /// L1GtTriggerMenuLite
0442   const L1GtTriggerMenuLite* m_l1GtMenuLite;
0443 
0444   const L1GtTriggerMenuLite::L1TriggerMap* m_algorithmMapLite;
0445   const L1GtTriggerMenuLite::L1TriggerMap* m_algorithmAliasMapLite;
0446   const L1GtTriggerMenuLite::L1TriggerMap* m_technicalTriggerMapLite;
0447 
0448   const std::vector<unsigned int>* m_triggerMaskAlgoTrigLite;
0449   const std::vector<unsigned int>* m_triggerMaskTechTrigLite;
0450 
0451   const std::vector<std::vector<int> >* m_prescaleFactorsAlgoTrigLite;
0452   const std::vector<std::vector<int> >* m_prescaleFactorsTechTrigLite;
0453 
0454   bool m_l1GtMenuLiteValid;
0455 
0456   /// flag for call of getL1GtRunCache in beginRun
0457   bool m_beginRunCache;
0458 
0459   /// run cache ID
0460   edm::RunID m_runIDCache;
0461 
0462 private:
0463   /// index of physics DAQ partition
0464   unsigned int m_physicsDaqPartition;
0465 
0466   std::vector<unsigned int> m_triggerMaskSet;
0467   std::vector<int> m_prescaleFactorSet;
0468 
0469   /// flags to check which method was used to retrieve L1 trigger configuration
0470   bool m_retrieveL1EventSetup;
0471   bool m_retrieveL1GtTriggerMenuLite;
0472 
0473   std::unique_ptr<L1GtUtilsHelper> m_l1GtUtilsHelper;
0474 
0475   // beginRun EventSetup tokens
0476   edm::ESGetToken<L1GtStableParameters, L1GtStableParametersRcd> m_L1GtStableParametersRunToken;
0477   edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> m_L1GtPrescaleFactorsAlgoTrigRunToken;
0478   edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> m_L1GtPrescaleFactorsTechTrigRunToken;
0479   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> m_L1GtTriggerMaskAlgoTrigRunToken;
0480   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> m_L1GtTriggerMaskTechTrigRunToken;
0481   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd> m_L1GtTriggerMaskVetoAlgoTrigRunToken;
0482   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd> m_L1GtTriggerMaskVetoTechTrigRunToken;
0483   edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> m_L1GtTriggerMenuRunToken;
0484 
0485   // event transition EventSetup tokens (same as run tokens except a different name)
0486   edm::ESGetToken<L1GtStableParameters, L1GtStableParametersRcd> m_L1GtStableParametersEventToken;
0487   edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> m_L1GtPrescaleFactorsAlgoTrigEventToken;
0488   edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> m_L1GtPrescaleFactorsTechTrigEventToken;
0489   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> m_L1GtTriggerMaskAlgoTrigEventToken;
0490   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> m_L1GtTriggerMaskTechTrigEventToken;
0491   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd> m_L1GtTriggerMaskVetoAlgoTrigEventToken;
0492   edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd> m_L1GtTriggerMaskVetoTechTrigEventToken;
0493   edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> m_L1GtTriggerMenuEventToken;
0494 };
0495 
0496 template <typename T>
0497 L1GtUtils::L1GtUtils(edm::ParameterSet const& pset,
0498                      edm::ConsumesCollector&& iC,
0499                      bool useL1GtTriggerMenuLite,
0500                      T& module,
0501                      UseEventSetupIn useEventSetupIn)
0502     : L1GtUtils(pset, iC, useL1GtTriggerMenuLite, module, useEventSetupIn) {}
0503 
0504 template <typename T>
0505 L1GtUtils::L1GtUtils(edm::ParameterSet const& pset,
0506                      edm::ConsumesCollector& iC,
0507                      bool useL1GtTriggerMenuLite,
0508                      T& module,
0509                      UseEventSetupIn useEventSetupIn)
0510     : L1GtUtils(iC, useEventSetupIn) {
0511   m_l1GtUtilsHelper = std::make_unique<L1GtUtilsHelper>(pset, iC, useL1GtTriggerMenuLite, module);
0512 }
0513 
0514 template <typename T>
0515 L1GtUtils::L1GtUtils(edm::ParameterSet const& pset,
0516                      edm::ConsumesCollector&& iC,
0517                      bool useL1GtTriggerMenuLite,
0518                      T& module,
0519                      edm::InputTag const& l1GtRecordInputTag,
0520                      edm::InputTag const& l1GtReadoutRecordInputTag,
0521                      edm::InputTag const& l1GtTriggerMenuLiteInputTag,
0522                      UseEventSetupIn useEventSetupIn)
0523     : L1GtUtils(pset,
0524                 iC,
0525                 useL1GtTriggerMenuLite,
0526                 module,
0527                 l1GtRecordInputTag,
0528                 l1GtReadoutRecordInputTag,
0529                 l1GtTriggerMenuLiteInputTag,
0530                 useEventSetupIn) {}
0531 
0532 template <typename T>
0533 L1GtUtils::L1GtUtils(edm::ParameterSet const& pset,
0534                      edm::ConsumesCollector& iC,
0535                      bool useL1GtTriggerMenuLite,
0536                      T& module,
0537                      edm::InputTag const& l1GtRecordInputTag,
0538                      edm::InputTag const& l1GtReadoutRecordInputTag,
0539                      edm::InputTag const& l1GtTriggerMenuLiteInputTag,
0540                      UseEventSetupIn useEventSetupIn)
0541     : L1GtUtils(iC, useEventSetupIn) {
0542   m_l1GtUtilsHelper = std::make_unique<L1GtUtilsHelper>(pset,
0543                                                         iC,
0544                                                         useL1GtTriggerMenuLite,
0545                                                         module,
0546                                                         l1GtRecordInputTag,
0547                                                         l1GtReadoutRecordInputTag,
0548                                                         l1GtTriggerMenuLiteInputTag);
0549 }
0550 
0551 #endif /*GlobalTriggerAnalyzer_L1GtUtils_h*/