CMS 3D CMS Logo

L1GtCastorCondition.cc

Go to the documentation of this file.
00001 
00018 // this class header
00019 #include "L1Trigger/GlobalTrigger/interface/L1GtCastorCondition.h"
00020 
00021 // system include files
00022 #include <iostream>
00023 
00024 // user include files
00025 //   base classes
00026 #include "CondFormats/L1TObjects/interface/L1GtCastorTemplate.h"
00027 #include "L1Trigger/GlobalTrigger/interface/L1GtConditionEvaluation.h"
00028 
00029 // constructors
00030 //     default
00031 L1GtCastorCondition::L1GtCastorCondition() :
00032     L1GtConditionEvaluation() {
00033 
00034     m_conditionResult = false;
00035 
00036 }
00037 
00038 //     from base template condition (from event setup usually)
00039 L1GtCastorCondition::L1GtCastorCondition(const L1GtCondition* castorTemplate,
00040         const bool result) :
00041             L1GtConditionEvaluation(),
00042             m_gtCastorTemplate(static_cast<const L1GtCastorTemplate*>(castorTemplate)),
00043             m_conditionResult(result) {
00044 
00045     // maximum number of objects received for the evaluation of the condition
00046     // no object 
00047     m_condMaxNumberObjects = 0;
00048 
00049 }
00050 
00051 // copy constructor
00052 void L1GtCastorCondition::copy(const L1GtCastorCondition &cp) {
00053 
00054     m_gtCastorTemplate = cp.gtCastorTemplate();
00055     m_conditionResult = cp.conditionResult();
00056 
00057     m_condMaxNumberObjects = cp.condMaxNumberObjects();
00058     m_condLastResult = cp.condLastResult();
00059     m_combinationsInCond = cp.getCombinationsInCond();
00060 
00061 }
00062 
00063 L1GtCastorCondition::L1GtCastorCondition(const L1GtCastorCondition& cp) :
00064     L1GtConditionEvaluation() {
00065 
00066     copy(cp);
00067 
00068 }
00069 
00070 // destructor
00071 L1GtCastorCondition::~L1GtCastorCondition() {
00072 
00073     // empty
00074 
00075 }
00076 
00077 // equal operator
00078 L1GtCastorCondition& L1GtCastorCondition::operator= (const L1GtCastorCondition& cp)
00079 {
00080     copy(cp);
00081     return *this;
00082 }
00083 
00084 // methods
00085 void L1GtCastorCondition::setGtCastorTemplate(
00086         const L1GtCastorTemplate* castorTemplate) {
00087 
00088     m_gtCastorTemplate = castorTemplate;
00089 
00090 }
00091 
00092 const bool L1GtCastorCondition::evaluateCondition() const {
00093 
00094     // clear the m_combinationsInCond vector
00095     (*m_combinationsInCond).clear();
00096 
00097     // 
00098     return m_conditionResult;
00099 
00100 }
00101 
00102 void L1GtCastorCondition::print(std::ostream& myCout) const {
00103 
00104     m_gtCastorTemplate->print(myCout);
00105     L1GtConditionEvaluation::print(myCout);
00106 
00107 }
00108 

Generated on Tue Jun 9 17:40:14 2009 for CMSSW by  doxygen 1.5.4