00001 00018 // this class header 00019 #include "L1Trigger/GlobalTrigger/interface/L1GtBptxCondition.h" 00020 00021 // system include files 00022 #include <iostream> 00023 00024 // user include files 00025 // base classes 00026 #include "CondFormats/L1TObjects/interface/L1GtBptxTemplate.h" 00027 #include "L1Trigger/GlobalTrigger/interface/L1GtConditionEvaluation.h" 00028 00029 // constructors 00030 // default 00031 L1GtBptxCondition::L1GtBptxCondition() : 00032 L1GtConditionEvaluation() { 00033 00034 m_conditionResult = false; 00035 00036 } 00037 00038 // from base template condition (from event setup usually) 00039 L1GtBptxCondition::L1GtBptxCondition(const L1GtCondition* bptxTemplate, 00040 const bool result) : 00041 L1GtConditionEvaluation(), 00042 m_gtBptxTemplate(static_cast<const L1GtBptxTemplate*>(bptxTemplate)), 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 L1GtBptxCondition::copy(const L1GtBptxCondition &cp) { 00053 00054 m_gtBptxTemplate = cp.gtBptxTemplate(); 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 L1GtBptxCondition::L1GtBptxCondition(const L1GtBptxCondition& cp) : 00066 L1GtConditionEvaluation() { 00067 00068 copy(cp); 00069 00070 } 00071 00072 // destructor 00073 L1GtBptxCondition::~L1GtBptxCondition() { 00074 00075 // empty 00076 00077 } 00078 00079 // equal operator 00080 L1GtBptxCondition& L1GtBptxCondition::operator= (const L1GtBptxCondition& cp) 00081 { 00082 copy(cp); 00083 return *this; 00084 } 00085 00086 // methods 00087 void L1GtBptxCondition::setGtBptxTemplate( 00088 const L1GtBptxTemplate* bptxTemplate) { 00089 00090 m_gtBptxTemplate = bptxTemplate; 00091 00092 } 00093 00094 const bool L1GtBptxCondition::evaluateCondition() const { 00095 00096 // clear the m_combinationsInCond vector 00097 (combinationsInCond()).clear(); 00098 00099 // 00100 return m_conditionResult; 00101 00102 } 00103 00104 void L1GtBptxCondition::print(std::ostream& myCout) const { 00105 00106 m_gtBptxTemplate->print(myCout); 00107 L1GtConditionEvaluation::print(myCout); 00108 00109 } 00110