test
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...
 
- Public Member Functions inherited from TTUConfiguration
virtual ~TTUConfiguration ()
 

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 15 of file TTUBasicConfig.h.

Constructor & Destructor Documentation

TTUBasicConfig::TTUBasicConfig ( )
inline

Standard constructor.

Definition at line 18 of file TTUBasicConfig.h.

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

Definition at line 27 of file TTUBasicConfig.cc.

References m_debug, and TTUConfiguration::m_ttulogic.

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

Definition at line 17 of file TTUBasicConfig.cc.

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

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

Destructor.

Definition at line 38 of file TTUBasicConfig.cc.

References TTUConfiguration::m_ttulogic, m_vecforce, and m_vecmask.

38  {
39 
40  if (m_ttulogic) delete m_ttulogic;
41 
42  m_vecmask.clear();
43  m_vecforce.clear();
44 
45 }
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 48 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, TTULogicUnit::setBoardSpecs(), TTULogicUnit::setlogic(), and mps_update::status.

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

Implements TTUConfiguration.

Definition at line 97 of file TTUBasicConfig.cc.

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

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

Member Data Documentation

bool TTUBasicConfig::m_debug
private

Definition at line 37 of file TTUBasicConfig.h.

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

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

Definition at line 35 of file TTUBasicConfig.h.

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

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

Definition at line 34 of file TTUBasicConfig.h.

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