CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/L1Trigger/RPCTechnicalTrigger/src/TTUTwoORLogic.cc

Go to the documentation of this file.
00001 // $Id: TTUTwoORLogic.cc,v 1.1 2009/06/17 15:27:24 aosorio Exp $
00002 // Include files 
00003 
00004 
00005 
00006 // local
00007 #include "L1Trigger/RPCTechnicalTrigger/interface/TTUTwoORLogic.h"
00008 
00009 //-----------------------------------------------------------------------------
00010 // Implementation file for class : TTUTwoORLogic
00011 // 
00012 // This logic implements the OR of the two logics TTU or RBC
00013 //
00014 //
00015 // 2009-06-15 : Andres Felipe Osorio Oliveros
00016 //-----------------------------------------------------------------------------
00017 
00018 //=============================================================================
00019 // Standard constructor, initializes variables
00020 //=============================================================================
00021 TTUTwoORLogic::TTUTwoORLogic(  ) {
00022 
00023   m_triggersignal = false;
00024  
00025   m_debug = false;
00026 
00027   m_ttuLogic = new TTUTrackingAlg();
00028   
00029   m_rbcLogic = new TTUSectorORLogic();
00030   
00031 }
00032 //=============================================================================
00033 // Destructor
00034 //=============================================================================
00035 TTUTwoORLogic::~TTUTwoORLogic() {
00036 
00037   if ( m_ttuLogic ) delete m_ttuLogic;
00038 
00039   if ( m_rbcLogic ) delete m_rbcLogic;
00040   
00041 } 
00042 
00043 //=============================================================================
00044 
00045 void TTUTwoORLogic::setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & boardspecs ) 
00046 {
00047   
00048   m_ttuLogic->setBoardSpecs( boardspecs );
00049   
00050   m_rbcLogic->setBoardSpecs( boardspecs );
00051   
00052 }
00053 
00054 bool TTUTwoORLogic::process( const TTUInput & inmap )
00055 {
00056   
00057   if( m_debug) std::cout << "TTUTwoORLogic::process starts" << std::endl;
00058   
00059   m_triggersignal = false;
00060   
00061   
00062   m_ttuLogic->process( inmap );
00063   m_rbcLogic->process( inmap );
00064   
00065   bool triggerFromTTU = m_ttuLogic->m_triggersignal;
00066   
00067   bool triggerFromRBC = m_rbcLogic->m_triggersignal;
00068     
00069   m_triggersignal = triggerFromTTU || triggerFromRBC;
00070   
00071   if( m_debug ) std::cout << "TTUTwoORLogic>process ends" << std::endl;
00072   
00073   return true;
00074   
00075 }
00076