CMS 3D CMS Logo

L1GtMuonTemplate.cc

Go to the documentation of this file.
00001 
00017 // this class header
00018 #include "CondFormats/L1TObjects/interface/L1GtMuonTemplate.h"
00019 
00020 // system include files
00021 
00022 #include <iostream>
00023 #include <iomanip>
00024 
00025 // user include files
00026 
00027 //   base class
00028 
00029 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
00030 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
00031 
00032 // forward declarations
00033 
00034 // constructors
00035 L1GtMuonTemplate::L1GtMuonTemplate()
00036         : L1GtCondition()
00037 {
00038 
00039     m_condCategory = CondMuon;
00040 
00041 }
00042 
00043 L1GtMuonTemplate::L1GtMuonTemplate(const std::string& cName)
00044         : L1GtCondition(cName)
00045 {
00046 
00047     m_condCategory = CondMuon;
00048 
00049 }
00050 
00051 L1GtMuonTemplate::L1GtMuonTemplate(const std::string& cName, const L1GtConditionType& cType)
00052         : L1GtCondition(cName, CondMuon, cType)
00053 {
00054 
00055     int nObjects = nrObjects();
00056 
00057     if (nObjects > 0) {
00058         m_objectParameter.reserve(nObjects);
00059 
00060         m_objectType.reserve(nObjects);
00061         m_objectType.assign(nObjects, Mu);
00062     }
00063 
00064 }
00065 
00066 // copy constructor
00067 L1GtMuonTemplate::L1GtMuonTemplate(const L1GtMuonTemplate& cp)
00068         : L1GtCondition(cp.m_condName)
00069 {
00070     copy(cp);
00071 }
00072 
00073 // destructor
00074 L1GtMuonTemplate::~L1GtMuonTemplate()
00075 {
00076     // empty now
00077 }
00078 
00079 // assign operator
00080 L1GtMuonTemplate& L1GtMuonTemplate::operator= (const L1GtMuonTemplate& cp)
00081 {
00082 
00083     copy(cp);
00084     return *this;
00085 }
00086 
00087 
00088 // setConditionParameter - set the parameters of the condition
00089 void L1GtMuonTemplate::setConditionParameter(
00090     const std::vector<ObjectParameter>& objParameter,
00091     const CorrelationParameter& corrParameter)
00092 {
00093 
00094     m_objectParameter = objParameter;
00095     m_correlationParameter = corrParameter;
00096 
00097 }
00098 
00099 void L1GtMuonTemplate::print(std::ostream& myCout) const
00100 {
00101 
00102     myCout << "\n  L1GtMuonTemplate print..." << std::endl;
00103 
00104     L1GtCondition::print(myCout);
00105 
00106     int nObjects = nrObjects();
00107 
00108     for (int i = 0; i < nObjects; i++) {
00109         myCout << std::endl;
00110         myCout << "  Template for object " << i << " [ hex ]" << std::endl;
00111         myCout << "    ptHighThreshold   = "
00112         << std::hex << m_objectParameter[i].ptHighThreshold << std::endl;
00113         myCout << "    ptLowThreshold    = "
00114         << std::hex << m_objectParameter[i].ptLowThreshold << std::endl;
00115         myCout << "    enableMip         = "
00116         << std::hex << m_objectParameter[i].enableMip << std::endl;
00117         myCout << "    enableIso         = "
00118         << std::hex << m_objectParameter[i].enableIso << std::endl;
00119         myCout << "    requestIso        = "
00120         << std::hex << m_objectParameter[i].requestIso << std::endl;
00121         myCout << "    qualityRange      = "
00122         << std::hex << m_objectParameter[i].qualityRange << std::endl;
00123         myCout << "    etaRange          = "
00124         << std::hex << m_objectParameter[i].etaRange << std::endl;
00125         myCout << "    phiHigh           = "
00126         << std::hex << m_objectParameter[i].phiHigh << std::endl;
00127         myCout << "    phiLow            = "
00128         << std::hex << m_objectParameter[i].phiLow << std::endl;
00129     }
00130 
00131 
00132     if ( wsc() ) {
00133         myCout << "  Correlation parameters " << "[ hex ]" <<  std::endl;
00134 
00135         myCout <<     "    chargeCorrelation  = "
00136         << std::hex << m_correlationParameter.chargeCorrelation
00137         << std::endl;
00138 
00139         myCout << "    deltaEtaRange      = "
00140         << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
00141         myCout << "    deltaPhiRange1Word = "
00142         << std::hex << m_correlationParameter.deltaPhiRange1Word << std::endl;
00143         myCout << "    deltaPhiRange0Word = "
00144         << std::hex << m_correlationParameter.deltaPhiRange0Word << std::endl;
00145         myCout << "    deltaPhiMaxbits    = "
00146         << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
00147     } else {
00148 
00149         if (m_condType == Type1s) {
00150             myCout << "  Correlation parameters " << "[ hex ]" <<  std::endl;
00151 
00152             myCout <<     "    chargeCorrelation  = "
00153             << std::hex << m_correlationParameter.chargeCorrelation
00154             << " (charge sign) " << std::endl;
00155 
00156         } else {
00157 
00158             myCout << "\n  Correlation parameters " << "[ hex ]" <<  std::endl;
00159 
00160             myCout <<     "    chargeCorrelation  = "
00161             << std::hex << m_correlationParameter.chargeCorrelation
00162             << std::endl;
00163         }
00164     }
00165 
00166     // reset to decimal output
00167     myCout << std::dec << std::endl;
00168     myCout << "\n  ...end L1GtMuonTemplate print." << std::endl;
00169 }
00170 
00171 void L1GtMuonTemplate::copy(const L1GtMuonTemplate& cp)
00172 {
00173 
00174     m_condName     = cp.condName();
00175     m_condCategory = cp.condCategory();
00176     m_condType     = cp.condType();
00177     m_objectType   = cp.objectType();
00178     m_condGEq      = cp.condGEq();
00179     m_condChipNr   = cp.condChipNr();
00180 
00181     m_objectParameter = *(cp.objectParameter());
00182     m_correlationParameter = *(cp.correlationParameter());
00183 
00184 }
00185 
00186 
00187 

Generated on Tue Jun 9 17:26:38 2009 for CMSSW by  doxygen 1.5.4