Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:35

0001 /**
0002  * \class ExternalTemplate
0003  *
0004  *
0005  * Description: L1 Global Trigger energy-sum template.
0006  *
0007  * Implementation:
0008  *    <TODO: enter implementation details>
0009  *
0010  * \author: Vasile Mihai Ghete - HEPHY Vienna
0011  *
0012  * $Date$
0013  * $Revision$
0014  *
0015  */
0016 
0017 // this class header
0018 #include "L1Trigger/L1TGlobal/interface/ExternalTemplate.h"
0019 
0020 // system include files
0021 
0022 #include <iostream>
0023 #include <iomanip>
0024 
0025 // user include files
0026 
0027 //   base class
0028 
0029 // forward declarations
0030 
0031 // constructors
0032 ExternalTemplate::ExternalTemplate() : GlobalCondition() { m_condCategory = l1t::CondExternal; }
0033 
0034 ExternalTemplate::ExternalTemplate(const std::string& cName) : GlobalCondition(cName) {
0035   m_condCategory = l1t::CondExternal;
0036 }
0037 
0038 ExternalTemplate::ExternalTemplate(const std::string& cName, const l1t::GtConditionType& cType)
0039     : GlobalCondition(cName, l1t::CondExternal, cType) {
0040   m_condCategory = l1t::CondExternal;
0041 }
0042 
0043 // copy constructor
0044 ExternalTemplate::ExternalTemplate(const ExternalTemplate& cp) : GlobalCondition(cp.m_condName) { copy(cp); }
0045 
0046 // destructor
0047 ExternalTemplate::~ExternalTemplate() {
0048   // empty now
0049 }
0050 
0051 // assign operator
0052 ExternalTemplate& ExternalTemplate::operator=(const ExternalTemplate& cp) {
0053   copy(cp);
0054   return *this;
0055 }
0056 
0057 void ExternalTemplate::print(std::ostream& myCout) const {
0058   myCout << "\n  ExternalTemplate print..." << std::endl;
0059 
0060   GlobalCondition::print(myCout);
0061 
0062   myCout << "  External Channel " << m_extChannel << std::endl;
0063 
0064   // reset to decimal output
0065   myCout << std::dec << std::endl;
0066 }
0067 
0068 void ExternalTemplate::copy(const ExternalTemplate& cp) {
0069   m_condName = cp.condName();
0070   m_condCategory = cp.condCategory();
0071   m_condType = cp.condType();
0072   m_objectType = cp.objectType();
0073   m_condGEq = cp.condGEq();
0074   m_condChipNr = cp.condChipNr();
0075   m_condRelativeBx = cp.condRelativeBx();
0076   m_extChannel = cp.extChannel();
0077 }
0078 
0079 // output stream operator
0080 std::ostream& operator<<(std::ostream& os, const ExternalTemplate& result) {
0081   result.print(os);
0082   return os;
0083 }