File indexing completed on 2024-04-06 12:02:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "CondFormats/L1TObjects/interface/L1GtJetCountsTemplate.h"
0019
0020
0021
0022 #include <iostream>
0023 #include <iomanip>
0024
0025
0026
0027
0028
0029 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0030 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0031
0032
0033
0034
0035 L1GtJetCountsTemplate::L1GtJetCountsTemplate() : L1GtCondition() { m_condCategory = CondJetCounts; }
0036
0037 L1GtJetCountsTemplate::L1GtJetCountsTemplate(const std::string& cName) : L1GtCondition(cName) {
0038 m_condCategory = CondJetCounts;
0039 }
0040
0041 L1GtJetCountsTemplate::L1GtJetCountsTemplate(const std::string& cName, const L1GtConditionType& cType)
0042 : L1GtCondition(cName, CondJetCounts, cType) {
0043 m_condCategory = CondJetCounts;
0044
0045
0046 int nObjects = nrObjects();
0047
0048 if (nObjects > 0) {
0049 m_objectParameter.reserve(nObjects);
0050
0051 m_objectType.reserve(nObjects);
0052 m_objectType.assign(nObjects, JetCounts);
0053 }
0054 }
0055
0056
0057 L1GtJetCountsTemplate::L1GtJetCountsTemplate(const L1GtJetCountsTemplate& cp) : L1GtCondition(cp.m_condName) {
0058 copy(cp);
0059 }
0060
0061
0062 L1GtJetCountsTemplate::~L1GtJetCountsTemplate() {
0063
0064 }
0065
0066
0067 L1GtJetCountsTemplate& L1GtJetCountsTemplate::operator=(const L1GtJetCountsTemplate& cp) {
0068 copy(cp);
0069 return *this;
0070 }
0071
0072
0073 void L1GtJetCountsTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter) {
0074 m_objectParameter = objParameter;
0075 }
0076
0077 void L1GtJetCountsTemplate::print(std::ostream& myCout) const {
0078 myCout << "\n L1GtJetCountsTemplate print..." << std::endl;
0079
0080 L1GtCondition::print(myCout);
0081
0082 int nObjects = nrObjects();
0083
0084 for (int i = 0; i < nObjects; i++) {
0085 myCout << std::endl;
0086 myCout << " Template for object " << i << std::endl;
0087 myCout << " countIndex = " << std::hex << m_objectParameter[i].countIndex << " [ dec ]" << std::endl;
0088 myCout << " countThreshold = " << std::hex << m_objectParameter[i].countThreshold << " [ hex ]" << std::endl;
0089 myCout << " countOverflow = " << std::hex << m_objectParameter[0].countOverflow << std::endl;
0090 }
0091
0092
0093 myCout << std::dec << std::endl;
0094 }
0095
0096 void L1GtJetCountsTemplate::copy(const L1GtJetCountsTemplate& cp) {
0097 m_condName = cp.condName();
0098 m_condCategory = cp.condCategory();
0099 m_condType = cp.condType();
0100 m_objectType = cp.objectType();
0101 m_condGEq = cp.condGEq();
0102 m_condChipNr = cp.condChipNr();
0103
0104 m_objectParameter = *(cp.objectParameter());
0105 }
0106
0107
0108 std::ostream& operator<<(std::ostream& os, const L1GtJetCountsTemplate& result) {
0109 result.print(os);
0110 return os;
0111 }