File indexing completed on 2024-04-06 12:20:29
0001 #ifndef L1Trigger_L1TGlobal_GtAlgorithm_h
0002 #define L1Trigger_L1TGlobal_GtAlgorithm_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include "CondFormats/Serialization/interface/Serializable.h"
0022
0023 #include <vector>
0024 #include <iosfwd>
0025
0026
0027 #include "DataFormats/L1TGlobal/interface/GlobalLogicParser.h"
0028
0029
0030
0031
0032 class GlobalAlgorithm {
0033 public:
0034
0035
0036 GlobalAlgorithm();
0037
0038
0039 GlobalAlgorithm(const std::string& algoNameValue);
0040
0041
0042 GlobalAlgorithm(const std::string&, const std::string&);
0043
0044
0045 GlobalAlgorithm(const std::string&, const std::string&, const int);
0046
0047
0048 virtual ~GlobalAlgorithm();
0049
0050 public:
0051
0052 inline const std::string algoName() const { return m_algoName; }
0053
0054 inline void setAlgoName(const std::string& algoNameValue) { m_algoName = algoNameValue; }
0055
0056
0057 inline std::string const& algoAlias() const { return m_algoAlias; }
0058
0059 inline void setAlgoAlias(const std::string& algoAliasValue) { m_algoAlias = algoAliasValue; }
0060
0061
0062 inline std::string const& algoLogicalExpression() const { return m_algoLogicalExpression; }
0063
0064 inline void setAlgoLogicalExpresssion(const std::string& logicalExpression) {
0065 m_algoLogicalExpression = logicalExpression;
0066 }
0067
0068
0069 inline const std::vector<GlobalLogicParser::TokenRPN>& algoRpnVector() const { return m_algoRpnVector; }
0070
0071
0072 inline int algoBitNumber() const { return m_algoBitNumber; }
0073
0074 inline void setAlgoBitNumber(const int algoBitNumberValue) { m_algoBitNumber = algoBitNumberValue; }
0075
0076
0077 inline const int algoChipNumber() const { return m_algoChipNumber; }
0078
0079 inline void setAlgoChipNumber(const int algoChipNumberValue) { m_algoChipNumber = algoChipNumberValue; }
0080
0081 public:
0082
0083 const int algoChipNumber(const int numberConditionChips,
0084 const int pinsOnConditionChip,
0085 const std::vector<int>& orderConditionChip) const;
0086
0087
0088 const int algoOutputPin(const int numberConditionChips,
0089 const int pinsOnConditionChip,
0090 const std::vector<int>& orderConditionChip) const;
0091
0092
0093 virtual void print(std::ostream& myCout) const;
0094
0095
0096 friend std::ostream& operator<<(std::ostream&, const GlobalAlgorithm&);
0097
0098 private:
0099
0100 std::string m_algoName;
0101
0102
0103 std::string m_algoAlias;
0104
0105
0106 std::string m_algoLogicalExpression;
0107
0108
0109 std::vector<GlobalLogicParser::TokenRPN> m_algoRpnVector;
0110
0111
0112
0113
0114 int m_algoBitNumber;
0115
0116
0117 int m_algoChipNumber;
0118
0119 COND_SERIALIZABLE;
0120 };
0121
0122 #endif