File indexing completed on 2024-06-28 02:36:28
0001 #include "L1Trigger/L1TGlobal/interface/CICADATemplate.h"
0002
0003 #include <iostream>
0004 #include <iomanip>
0005
0006
0007 CICADATemplate::CICADATemplate() : GlobalCondition() { m_condCategory = l1t::CondCICADA; }
0008
0009 CICADATemplate::CICADATemplate(const std::string& cName) : GlobalCondition(cName) { m_condCategory = l1t::CondCICADA; }
0010
0011 CICADATemplate::CICADATemplate(const std::string& cName, const l1t::GtConditionType& cType)
0012 : GlobalCondition(cName, l1t::CondCICADA, cType) {
0013 m_condCategory = l1t::CondCICADA;
0014
0015 int nObjects = nrObjects();
0016
0017 if (nObjects > 0) {
0018 m_objectType.reserve(nObjects);
0019 }
0020 }
0021
0022 CICADATemplate::CICADATemplate(const CICADATemplate& cp) : GlobalCondition(cp.m_condName) { copy(cp); }
0023
0024 CICADATemplate& CICADATemplate::operator=(const CICADATemplate& cp) {
0025 copy(cp);
0026 return *this;
0027 }
0028
0029 void CICADATemplate::print(std::ostream& myCout) const {
0030 myCout << "\n CICADATemplate print..." << std::endl;
0031
0032 GlobalCondition::print(myCout);
0033
0034 int nObjects = nrObjects();
0035
0036 for (int i = 0; i < nObjects; ++i) {
0037 myCout << std::endl;
0038 myCout << " Template for object " << i << " [ hex ]" << std::endl;
0039 myCout << " CICADAThreshold = " << std::hex << m_objectParameter[i].minCICADAThreshold << std::endl;
0040 }
0041
0042 myCout << std::dec << std::endl;
0043 }
0044
0045 void CICADATemplate::copy(const CICADATemplate& cp) {
0046 m_condName = cp.condName();
0047 m_condCategory = cp.condCategory();
0048 m_condType = cp.condType();
0049 m_objectType = cp.objectType();
0050 m_condGEq = cp.condGEq();
0051 m_condChipNr = cp.condChipNr();
0052 m_condRelativeBx = cp.condRelativeBx();
0053
0054 m_objectParameter = *(cp.objectParameter());
0055 }
0056
0057 std::ostream& operator<<(std::ostream& os, const CICADATemplate& result) {
0058 result.print(os);
0059 return os;
0060 }