CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/CondFormats/L1TObjects/src/L1GtBptxTemplate.cc

Go to the documentation of this file.
00001 
00022 // this class header
00023 #include "CondFormats/L1TObjects/interface/L1GtBptxTemplate.h"
00024 
00025 // system include files
00026 
00027 #include <iostream>
00028 #include <iomanip>
00029 
00030 // user include files
00031 
00032 //   base class
00033 
00034 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
00035 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
00036 
00037 // forward declarations
00038 
00039 // constructors
00040 L1GtBptxTemplate::L1GtBptxTemplate()
00041         : L1GtCondition()
00042 {
00043 
00044     m_condCategory = CondBptx;
00045     m_condType = TypeBptx;
00046 
00047 }
00048 
00049 L1GtBptxTemplate::L1GtBptxTemplate(const std::string& cName)
00050         : L1GtCondition(cName)
00051 {
00052 
00053     m_condCategory = CondBptx;
00054     m_condType = TypeBptx;
00055 
00056 }
00057 
00058 L1GtBptxTemplate::L1GtBptxTemplate(const std::string& cName, const L1GtConditionType& cType)
00059         : L1GtCondition(cName, CondEnergySum, cType)
00060 {
00061 
00062     m_condCategory = CondBptx;
00063     m_condType = TypeBptx;
00064 
00065     // actually no objects are sent by BPTX, only the result of the condition
00066     int nObjects = nrObjects();
00067 
00068     if (nObjects > 0) {
00069         m_objectType.reserve(nObjects);
00070     }
00071 
00072 }
00073 
00074 // copy constructor
00075 L1GtBptxTemplate::L1GtBptxTemplate(const L1GtBptxTemplate& cp)
00076         : L1GtCondition(cp.m_condName)
00077 {
00078     copy(cp);
00079 }
00080 
00081 // destructor
00082 L1GtBptxTemplate::~L1GtBptxTemplate()
00083 {
00084     // empty now
00085 }
00086 
00087 // assign operator
00088 L1GtBptxTemplate& L1GtBptxTemplate::operator= (const L1GtBptxTemplate& cp)
00089 {
00090 
00091     copy(cp);
00092     return *this;
00093 }
00094 
00095 
00096 void L1GtBptxTemplate::print(std::ostream& myCout) const
00097 {
00098 
00099     myCout << "\n  L1GtBptxTemplate print..." << std::endl;
00100 
00101     L1GtCondition::print(myCout);
00102 
00103 
00104     // reset to decimal output
00105     myCout << std::dec << std::endl;
00106 }
00107 
00108 void L1GtBptxTemplate::copy(const L1GtBptxTemplate& cp)
00109 {
00110 
00111     m_condName     = cp.condName();
00112     m_condCategory = cp.condCategory();
00113     m_condType     = cp.condType();
00114     m_objectType   = cp.objectType();
00115     m_condGEq      = cp.condGEq();
00116     m_condChipNr   = cp.condChipNr();
00117 
00118 }
00119 
00120 // output stream operator
00121 std::ostream& operator<<(std::ostream& os, const L1GtBptxTemplate& result)
00122 {
00123     result.print(os);
00124     return os;
00125 
00126 }
00127 
00128