CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TTUBasicConfig Class Reference

#include <interface/RPCBasicConfig.h>

Inheritance diagram for TTUBasicConfig:
TTUConfiguration

Public Member Functions

bool initialise (int, int)
 
void preprocess (TTUInput &)
 
 TTUBasicConfig ()
 Standard constructor. More...
 
 TTUBasicConfig (const char *)
 
 TTUBasicConfig (const TTUBoardSpecs *)
 
virtual ~TTUBasicConfig ()
 Destructor. More...
 

Private Attributes

bool m_debug
 
std::vector< int > m_vecforce
 
std::vector< int > m_vecmask
 

Additional Inherited Members

- Public Attributes inherited from TTUConfiguration
const TTUBoardSpecsm_ttuboardspecs
 
TTUBoardSpecs::TTUBoardConfigm_ttuconf
 
TTULogicUnitm_ttulogic
 

Detailed Description

Author
Andres Osorio
Date
2008-10-29

Definition at line 16 of file TTUBasicConfig.h.

Constructor & Destructor Documentation

TTUBasicConfig::TTUBasicConfig ( )
inline

Standard constructor.

Definition at line 19 of file TTUBasicConfig.h.

19 { };
TTUBasicConfig::TTUBasicConfig ( const char *  logic)

Definition at line 28 of file TTUBasicConfig.cc.

References m_debug, and TTUConfiguration::m_ttulogic.

28  {
29 
30  m_ttulogic = new TTULogicUnit( logic );
31 
32  m_debug = false;
33 
34 }
TTULogicUnit * m_ttulogic
TTUBasicConfig::TTUBasicConfig ( const TTUBoardSpecs ttuspecs)

Definition at line 18 of file TTUBasicConfig.cc.

References m_debug, TTUConfiguration::m_ttuboardspecs, and TTUConfiguration::m_ttulogic.

18  {
19 
20  m_ttuboardspecs = ttuspecs;
21 
22  m_ttulogic = new TTULogicUnit();
23 
24  m_debug = false;
25 
26 }
const TTUBoardSpecs * m_ttuboardspecs
TTULogicUnit * m_ttulogic
TTUBasicConfig::~TTUBasicConfig ( )
virtual

Destructor.

Definition at line 39 of file TTUBasicConfig.cc.

References TTUConfiguration::m_ttulogic, m_vecforce, and m_vecmask.

39  {
40 
41  if (m_ttulogic) delete m_ttulogic;
42 
43  m_vecmask.clear();
44  m_vecforce.clear();
45 
46 }
std::vector< int > m_vecforce
std::vector< int > m_vecmask
TTULogicUnit * m_ttulogic

Member Function Documentation

bool TTUBasicConfig::initialise ( int  line,
int  ttuid 
)
virtual

Implements TTUConfiguration.

Definition at line 49 of file TTUBasicConfig.cc.

References gather_cfg::cout, TTULogicUnit::initialise(), TTUBoardSpecs::m_boardspecs, m_debug, TTUConfiguration::m_ttuboardspecs, TTUConfiguration::m_ttulogic, m_vecforce, m_vecmask, pos, TTULogicUnit::setBoardSpecs(), TTULogicUnit::setlogic(), and ntuplemaker::status.

50 {
51 
52  bool status(false);
53 
54  //. read specifications and set it to the corresponding TTU board
55 
56  std::vector<TTUBoardSpecs::TTUBoardConfig>::const_iterator itr;
57  itr = m_ttuboardspecs->m_boardspecs.begin();
58 
59  int pos(0);
60  int maxboards = m_ttuboardspecs->m_boardspecs.size();
61 
62  for( pos=0; pos < maxboards; ++pos) {
63  if ( m_debug ) std::cout << "TTUBasicConfig::initialise> "
64  << m_ttuboardspecs->m_boardspecs[pos].m_Wheel1Id
65  << std::endl;
66  if ( m_ttuboardspecs->m_boardspecs[pos].m_runId == ttuid ) break;
67 
68  }
69 
70  // initialise logic unit
71 
72  if ( line == 2 ) {
73  m_ttulogic->setlogic( "WedgeORLogic" );
74  } else {
75  m_ttulogic->setlogic( (*itr).m_LogicType.c_str() );
76  }
77 
79 
80  //itr = m_ttuboardspecs->m_boardspecs.begin();
81 
83 
84  // get mask and force vectors
85 
86  m_vecmask.assign( (*itr).m_MaskedSectors.begin(), (*itr).m_MaskedSectors.end() );
87 
88  m_vecforce.assign( (*itr).m_ForcedSectors.begin(), (*itr).m_ForcedSectors.end() );
89 
90  if ( !status ) {
91  if( m_debug ) std::cout << "TTUConfiguration> Problem initialising the logic unit\n";
92  return 0; };
93 
94  return status;
95 
96 }
std::vector< int > m_vecforce
const TTUBoardSpecs * m_ttuboardspecs
std::vector< int > m_vecmask
bool initialise()
Definition: TTULogicUnit.cc:45
void setlogic(const char *)
Definition: TTULogicUnit.cc:65
std::vector< TTUBoardConfig > m_boardspecs
Definition: TTUBoardSpecs.h:43
void setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig &)
Definition: TTULogicUnit.cc:72
TTULogicUnit * m_ttulogic
tuple cout
Definition: gather_cfg.py:41
tuple status
Definition: ntuplemaker.py:245
void TTUBasicConfig::preprocess ( TTUInput input)
virtual

Implements TTUConfiguration.

Definition at line 98 of file TTUBasicConfig.cc.

References gather_cfg::cout, m_debug, m_vecmask, and TTUInput::mask().

99 {
100 
101  if( m_debug ) std::cout << "TTUBasicConfig::preprocess> starts here" << std::endl;
102 
103  input.mask( m_vecmask );
104  //input.force( m_vecforce );
105 
106  if( m_debug ) std::cout << "TTUBasicConfig::preprocess> done" << std::endl;
107 
108 }
void mask(const std::vector< int > &)
Definition: TTUInput.cc:58
std::vector< int > m_vecmask
tuple cout
Definition: gather_cfg.py:41

Member Data Documentation

bool TTUBasicConfig::m_debug
private

Definition at line 38 of file TTUBasicConfig.h.

Referenced by initialise(), preprocess(), and TTUBasicConfig().

std::vector<int> TTUBasicConfig::m_vecforce
private

Definition at line 36 of file TTUBasicConfig.h.

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

std::vector<int> TTUBasicConfig::m_vecmask
private

Definition at line 35 of file TTUBasicConfig.h.

Referenced by initialise(), preprocess(), and ~TTUBasicConfig().