CMS 3D CMS Logo

Public Member Functions | Private Attributes

TTULogicUnit Class Reference

#include <TTULogicUnit.h>

Inheritance diagram for TTULogicUnit:
RPCLogicUnit

List of all members.

Public Member Functions

bool initialise ()
bool isTriggered ()
void run (const TTUInput &, int)
void run (const TTUInput &)
void setBoardSpecs (const TTUBoardSpecs::TTUBoardConfig &)
void setlogic (const char *)
 TTULogicUnit (const char *)
 TTULogicUnit ()
 Standard constructor.
virtual ~TTULogicUnit ()
 Destructor.

Private Attributes

bool m_debug
TTULogicm_logic
LogicTool< TTULogic > * m_logtool
std::string m_logtype

Detailed Description

Author:
Andres Osorio
Date:
2008-10-25

Definition at line 22 of file TTULogicUnit.h.


Constructor & Destructor Documentation

TTULogicUnit::TTULogicUnit ( )

Standard constructor.

Definition at line 18 of file TTULogicUnit.cc.

References m_debug, and m_logtool.

                            : RPCLogicUnit () {
  
  m_logtool = new LogicTool<TTULogic>();
  m_debug = false;
  
}
TTULogicUnit::TTULogicUnit ( const char *  logic_type)

Definition at line 25 of file TTULogicUnit.cc.

References m_debug, m_logtool, m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                    : RPCLogicUnit () {

  m_logtool = new LogicTool<TTULogic>();
  m_logtype = std::string( logic_type );
  m_debug = false;
  
}
TTULogicUnit::~TTULogicUnit ( ) [virtual]

Destructor.

Definition at line 35 of file TTULogicUnit.cc.

References LogicTool< GenLogic >::endjob(), and m_logtool.

                            {
  
  if (m_logtool) {
    if ( m_logtool->endjob() )
      delete m_logtool;
  }

} 

Member Function Documentation

bool TTULogicUnit::initialise ( )

Definition at line 45 of file TTULogicUnit.cc.

References gather_cfg::cout, LogicTool< GenLogic >::initialise(), m_debug, m_logic, m_logtool, m_logtype, LogicTool< GenLogic >::retrieve(), and ntuplemaker::status.

Referenced by TTUBasicConfig::initialise().

{
  
  bool status(true);
  
  status = m_logtool->initialise();
  if ( !status ) { 
    if( m_debug ) std::cout << "TTULogicUnit> Problem initialising LogicTool \n"; 
    return 0; };

  m_logic  = dynamic_cast<TTULogic*> ( m_logtool->retrieve(m_logtype) );
  
  if ( ! m_logic ) { 
    if( m_debug ) std::cout << "TTULogicUnit> No logic found \n"; 
    return 0; };
  
  return 1;
  
}
bool TTULogicUnit::isTriggered ( ) [inline]

Definition at line 41 of file TTULogicUnit.h.

References m_logic, and TTULogic::m_triggersignal.

Referenced by TTUEmulator::processTtu().

                     {
    return m_logic->m_triggersignal;
  };
void TTULogicUnit::run ( const TTUInput input,
int  option 
)

Definition at line 97 of file TTULogicUnit.cc.

References m_logic, TTULogic::process(), and TTULogic::setOption().

{

  m_logic->setOption( option );
  m_logic->process( input );

  //m_logic->m_triggersignal = false;
  
}
void TTULogicUnit::run ( const TTUInput input)

Definition at line 79 of file TTULogicUnit.cc.

References m_logic, and TTULogic::process().

Referenced by TTUEmulator::processTtu().

{

  //... check the thresholds

  //... by Sector
  
  //... by Tower

  //... by Wheel

  m_logic->process( input );

  //m_logic->m_triggersignal = false;
  
 
}
void TTULogicUnit::setBoardSpecs ( const TTUBoardSpecs::TTUBoardConfig boardSpcs)

Definition at line 72 of file TTULogicUnit.cc.

References m_logic, and TTULogic::setBoardSpecs().

Referenced by TTUBasicConfig::initialise().

{
  
  m_logic->setBoardSpecs ( boardSpcs );
  
}
void TTULogicUnit::setlogic ( const char *  logic)

Definition at line 65 of file TTULogicUnit.cc.

References m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TTUBasicConfig::initialise().

{

  m_logtype = std::string( logic );

}

Member Data Documentation

bool TTULogicUnit::m_debug [private]

Definition at line 55 of file TTULogicUnit.h.

Referenced by initialise(), and TTULogicUnit().

Definition at line 51 of file TTULogicUnit.h.

Referenced by initialise(), isTriggered(), run(), and setBoardSpecs().

Definition at line 53 of file TTULogicUnit.h.

Referenced by initialise(), TTULogicUnit(), and ~TTULogicUnit().

std::string TTULogicUnit::m_logtype [private]

Definition at line 43 of file TTULogicUnit.h.

Referenced by initialise(), setlogic(), and TTULogicUnit().