Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:59

0001 #ifndef GlobalTrigger_L1GtExternalCondition_h
0002 #define GlobalTrigger_L1GtExternalCondition_h
0003 
0004 /**
0005  * \class L1GtExternalCondition
0006  *
0007  *
0008  * Description: evaluation of a CondExternal condition.
0009  *
0010  * Implementation:
0011  *    Simply put the result read in the L1GtConditionEvaluation
0012  *    base class, to be similar with other conditions.
0013  *
0014  * \author: Vasile Mihai Ghete   - HEPHY Vienna
0015  *
0016  *
0017  */
0018 
0019 // system include files
0020 #include <iosfwd>
0021 #include <string>
0022 
0023 // user include files
0024 //   base classes
0025 #include "L1Trigger/GlobalTrigger/interface/L1GtConditionEvaluation.h"
0026 
0027 // forward declarations
0028 class L1GtCondition;
0029 class L1GtExternalTemplate;
0030 
0031 // class declaration
0032 class L1GtExternalCondition : public L1GtConditionEvaluation {
0033 public:
0034   /// constructors
0035   ///     default
0036   L1GtExternalCondition();
0037 
0038   ///     from base template condition (from event setup usually)
0039   L1GtExternalCondition(const L1GtCondition *, const bool result);
0040 
0041   // copy constructor
0042   L1GtExternalCondition(const L1GtExternalCondition &);
0043 
0044   // destructor
0045   ~L1GtExternalCondition() override;
0046 
0047   // assign operator
0048   L1GtExternalCondition &operator=(const L1GtExternalCondition &);
0049 
0050 public:
0051   /// the core function to check if the condition matches
0052   const bool evaluateCondition() const override;
0053 
0054   /// print condition
0055   void print(std::ostream &myCout) const override;
0056 
0057 public:
0058   ///   get / set the pointer to a L1GtCondition
0059   inline const L1GtExternalTemplate *gtExternalTemplate() const { return m_gtExternalTemplate; }
0060 
0061   void setGtExternalTemplate(const L1GtExternalTemplate *);
0062 
0063   ///   get / set the result
0064   inline const bool conditionResult() const { return m_conditionResult; }
0065 
0066   inline void setConditionResult(const bool result) { m_conditionResult = result; }
0067 
0068 private:
0069   /// copy function for copy constructor and operator=
0070   void copy(const L1GtExternalCondition &cp);
0071 
0072 private:
0073   /// pointer to a L1GtExternalTemplate
0074   const L1GtExternalTemplate *m_gtExternalTemplate;
0075 
0076   /// condition result
0077   bool m_conditionResult;
0078 };
0079 
0080 #endif