CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/L1Trigger/GlobalTrigger/src/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     m_verbosity = cp.m_verbosity;
00062 
00063 }
00064 
00065 L1GtCastorCondition::L1GtCastorCondition(const L1GtCastorCondition& cp) :
00066     L1GtConditionEvaluation() {
00067 
00068     copy(cp);
00069 
00070 }
00071 
00072 // destructor
00073 L1GtCastorCondition::~L1GtCastorCondition() {
00074 
00075     // empty
00076 
00077 }
00078 
00079 // equal operator
00080 L1GtCastorCondition& L1GtCastorCondition::operator= (const L1GtCastorCondition& cp)
00081 {
00082     copy(cp);
00083     return *this;
00084 }
00085 
00086 // methods
00087 void L1GtCastorCondition::setGtCastorTemplate(
00088         const L1GtCastorTemplate* castorTemplate) {
00089 
00090     m_gtCastorTemplate = castorTemplate;
00091 
00092 }
00093 
00094 const bool L1GtCastorCondition::evaluateCondition() const {
00095 
00096     // clear the m_combinationsInCond vector
00097     (combinationsInCond()).clear();
00098 
00099     //
00100     return m_conditionResult;
00101 
00102 }
00103 
00104 void L1GtCastorCondition::print(std::ostream& myCout) const {
00105 
00106     m_gtCastorTemplate->print(myCout);
00107     L1GtConditionEvaluation::print(myCout);
00108 
00109 }
00110