Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:17

0001 #ifndef GlobalTrigger_L1GtCastorCondition_h
0002 #define GlobalTrigger_L1GtCastorCondition_h
0003 
0004 /**
0005  * \class L1GtCastorCondition
0006  *
0007  *
0008  * Description: evaluation of a CondCastor condition.
0009  *
0010  * Implementation:
0011  *    Simply put the result read from CASTOR L1 record in the
0012  * L1GtConditionEvaluation 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 L1GtCastorTemplate;
0030 
0031 // class declaration
0032 class L1GtCastorCondition : public L1GtConditionEvaluation {
0033 public:
0034   /// constructors
0035   ///     default
0036   L1GtCastorCondition();
0037 
0038   ///     from base template condition (from event setup usually)
0039   L1GtCastorCondition(const L1GtCondition *, const bool result);
0040 
0041   // copy constructor
0042   L1GtCastorCondition(const L1GtCastorCondition &);
0043 
0044   // destructor
0045   ~L1GtCastorCondition() override;
0046 
0047   // assign operator
0048   L1GtCastorCondition &operator=(const L1GtCastorCondition &);
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 L1GtCastorTemplate *gtCastorTemplate() const { return m_gtCastorTemplate; }
0060 
0061   void setGtCastorTemplate(const L1GtCastorTemplate *);
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 L1GtCastorCondition &cp);
0071 
0072 private:
0073   /// pointer to a L1GtCastorTemplate
0074   const L1GtCastorTemplate *m_gtCastorTemplate;
0075 
0076   /// condition result
0077   bool m_conditionResult;
0078 };
0079 
0080 #endif