Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /**
0002  * \class L1GtBptxCondition
0003  *
0004  *
0005  * Description: evaluation of a CondBptx condition.
0006  *
0007  * Implementation:
0008  *    Simply put the result read in the L1GtConditionEvaluation
0009  *    base class, to be similar with other conditions.
0010  *
0011  * \author: Vasile Mihai Ghete   - HEPHY Vienna
0012  *
0013  *
0014  */
0015 
0016 // this class header
0017 #include "L1Trigger/GlobalTrigger/interface/L1GtBptxCondition.h"
0018 
0019 // system include files
0020 #include <iostream>
0021 
0022 // user include files
0023 //   base classes
0024 #include "CondFormats/L1TObjects/interface/L1GtBptxTemplate.h"
0025 #include "L1Trigger/GlobalTrigger/interface/L1GtConditionEvaluation.h"
0026 
0027 // constructors
0028 //     default
0029 L1GtBptxCondition::L1GtBptxCondition() : L1GtConditionEvaluation() { m_conditionResult = false; }
0030 
0031 //     from base template condition (from event setup usually)
0032 L1GtBptxCondition::L1GtBptxCondition(const L1GtCondition *bptxTemplate, const bool result)
0033     : L1GtConditionEvaluation(),
0034       m_gtBptxTemplate(static_cast<const L1GtBptxTemplate *>(bptxTemplate)),
0035       m_conditionResult(result) {
0036   // maximum number of objects received for the evaluation of the condition
0037   // no object
0038   m_condMaxNumberObjects = 0;
0039 }
0040 
0041 // copy constructor
0042 void L1GtBptxCondition::copy(const L1GtBptxCondition &cp) {
0043   m_gtBptxTemplate = cp.gtBptxTemplate();
0044   m_conditionResult = cp.conditionResult();
0045 
0046   m_condMaxNumberObjects = cp.condMaxNumberObjects();
0047   m_condLastResult = cp.condLastResult();
0048   m_combinationsInCond = cp.getCombinationsInCond();
0049 
0050   m_verbosity = cp.m_verbosity;
0051 }
0052 
0053 L1GtBptxCondition::L1GtBptxCondition(const L1GtBptxCondition &cp) : L1GtConditionEvaluation() { copy(cp); }
0054 
0055 // destructor
0056 L1GtBptxCondition::~L1GtBptxCondition() {
0057   // empty
0058 }
0059 
0060 // equal operator
0061 L1GtBptxCondition &L1GtBptxCondition::operator=(const L1GtBptxCondition &cp) {
0062   copy(cp);
0063   return *this;
0064 }
0065 
0066 // methods
0067 void L1GtBptxCondition::setGtBptxTemplate(const L1GtBptxTemplate *bptxTemplate) { m_gtBptxTemplate = bptxTemplate; }
0068 
0069 const bool L1GtBptxCondition::evaluateCondition() const {
0070   // clear the m_combinationsInCond vector
0071   (combinationsInCond()).clear();
0072 
0073   //
0074   return m_conditionResult;
0075 }
0076 
0077 void L1GtBptxCondition::print(std::ostream &myCout) const {
0078   m_gtBptxTemplate->print(myCout);
0079   L1GtConditionEvaluation::print(myCout);
0080 }