Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:47:09

0001 #ifndef CondFormats_L1TObjects_L1GtCondition_h
0002 #define CondFormats_L1TObjects_L1GtCondition_h
0003 
0004 /**
0005  * \class L1GtCondition
0006  *
0007  *
0008  * Description: base class for L1 Global Trigger object templates (condition).
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  *
0015  * $Date$
0016  * $Revision$
0017  *
0018  */
0019 
0020 // system include files
0021 #include "CondFormats/Serialization/interface/Serializable.h"
0022 
0023 #include <string>
0024 #include <vector>
0025 
0026 #include <iostream>
0027 
0028 // user include files
0029 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0030 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0031 
0032 // forward declarations
0033 
0034 // class declaration
0035 class L1GtCondition {
0036 public:
0037   /// constructor(s)
0038   ///
0039   L1GtCondition();
0040 
0041   ///   constructor from condition name
0042   L1GtCondition(const std::string&);
0043 
0044   ///   constructor from condition name, category and type
0045   L1GtCondition(const std::string&, const L1GtConditionCategory&, const L1GtConditionType&);
0046 
0047   /// destructor
0048   virtual ~L1GtCondition();
0049 
0050 public:
0051   /// get / set condition name
0052   inline const std::string& condName() const { return m_condName; }
0053 
0054   inline void setCondName(const std::string& cName) { m_condName = cName; }
0055 
0056   /// get / set the category of the condition
0057   inline const L1GtConditionCategory& condCategory() const { return m_condCategory; }
0058 
0059   inline void setCondCategory(const L1GtConditionCategory& cCategory) { m_condCategory = cCategory; }
0060 
0061   /// get / set the type of the condition (1s, etc)
0062   inline const L1GtConditionType& condType() const { return m_condType; }
0063 
0064   inline void setCondType(const L1GtConditionType& cType) { m_condType = cType; }
0065 
0066   /// get / set the trigger object type(s) in the condition
0067   inline const std::vector<L1GtObject>& objectType() const { return m_objectType; }
0068 
0069   inline void setObjectType(const std::vector<L1GtObject>& objType) { m_objectType = objType; }
0070 
0071   /// get / set condition GEq flag
0072   inline const bool condGEq() const { return m_condGEq; }
0073 
0074   inline void setCondGEq(const bool& cGEq) { m_condGEq = cGEq; }
0075 
0076   /// get / set the condition-chip number the condition is located on
0077   inline const int& condChipNr() const { return m_condChipNr; }
0078 
0079   inline void setCondChipNr(const int& cChipNr) { m_condChipNr = cChipNr; }
0080 
0081 public:
0082   /// get number of trigger objects
0083   const int nrObjects() const;
0084 
0085   /// get logic flag for conditions, same type of trigger objects,
0086   /// and with spatial correlations
0087   const bool wsc() const;
0088 
0089   /// get logic flag for conditions, different type of trigger objects,
0090   /// and with spatial correlations
0091   const bool corr() const;
0092 
0093   /// print condition
0094   virtual void print(std::ostream& myCout) const;
0095 
0096   /// output stream operator
0097   friend std::ostream& operator<<(std::ostream&, const L1GtCondition&);
0098 
0099 protected:
0100   /// the name of the condition
0101   std::string m_condName;
0102 
0103   /// the category of the condition
0104   L1GtConditionCategory m_condCategory;
0105 
0106   /// the type of the condition (1s, etc)
0107   L1GtConditionType m_condType;
0108 
0109   /// the trigger object type(s)
0110   std::vector<L1GtObject> m_objectType;
0111 
0112   /// the operator used for the condition (>=, =): true for >=
0113   bool m_condGEq;
0114 
0115   /// condition is located on condition chip m_condChipNr
0116   int m_condChipNr;
0117 
0118   COND_SERIALIZABLE;
0119 };
0120 
0121 #endif /*CondFormats_L1TObjects_L1GtCondition_h*/