CMS 3D CMS Logo

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

#include <interface/RBCInput.h>

Public Member Functions

void force (const std::vector< int > &)
 
void mask (const std::vector< int > &)
 
RBCInputoperator= (const RBCInput &)=default
 
RBCInputoperator= (RBCInput &&)=default
 
void printinfo () const
 
 RBCInput ()
 Standard constructor. More...
 
 RBCInput (const RBCInput &)=default
 
 RBCInput (RBCInput &&)=default
 
void setWheelId (int wid)
 
int wheelId () const
 

Public Attributes

bool hasData
 
bool input [30]
 
std::array< std::bitset< 15 >, 2 > input_sec
 
bool needmapping
 

Private Attributes

bool m_debug
 
int m_wheelId
 

Friends

std::ostream & operator<< (std::ostream &ostr, RBCInput const &)
 
std::istream & operator>> (std::istream &istr, RBCInput &)
 

Detailed Description

Author
Andres Osorio

email: aosor.nosp@m.io@u.nosp@m.niand.nosp@m.es.e.nosp@m.du.co

Date
2008-10-16

Definition at line 22 of file RBCInput.h.

Constructor & Destructor Documentation

RBCInput::RBCInput ( )
inline

Standard constructor.

Definition at line 25 of file RBCInput.h.

References hasData, m_debug, and needmapping.

25  {
26  needmapping = false;
27  m_debug = false;
28  hasData = false;
29  };
bool needmapping
Definition: RBCInput.h:50
bool hasData
Definition: RBCInput.h:49
bool m_debug
Definition: RBCInput.h:54
RBCInput::RBCInput ( const RBCInput )
default
RBCInput::RBCInput ( RBCInput &&  )
default

Member Function Documentation

void RBCInput::force ( const std::vector< int > &  forcevec)

Definition at line 51 of file RBCInput.cc.

References gather_cfg::cout, mps_fire::i, input_sec, m_debug, and createJobs::tmp.

Referenced by RBCBasicConfig::preprocess().

51  {
52  if (m_debug)
53  std::cout << forcevec.size() << std::endl;
54 
55  std::bitset<15> tmp;
56 
57  for (int i = 0; i < 15; ++i)
58  tmp.set(i, forcevec[i]);
59 
60  //... operate on the first sector
61  input_sec[0] |= tmp;
62  tmp.reset();
63 
64  for (int i = 15; i < 30; ++i)
65  tmp.set((i - 15), forcevec[i]);
66 
67  input_sec[1] |= tmp;
68 
69  tmp.reset();
70 }
std::array< std::bitset< 15 >, 2 > input_sec
Definition: RBCInput.h:41
tuple cout
Definition: gather_cfg.py:144
tmp
align.sh
Definition: createJobs.py:716
bool m_debug
Definition: RBCInput.h:54
void RBCInput::mask ( const std::vector< int > &  maskvec)

Definition at line 37 of file RBCInput.cc.

References mps_fire::i, and input_sec.

Referenced by RBCBasicConfig::preprocess().

37  {
38  //... operate on the first sector
39 
40  for (int i = 0; i < 15; ++i)
41  if (maskvec[i])
42  input_sec[0].set(i, false);
43 
44  //... operate on the second sector
45 
46  for (int i = 15; i < 30; ++i)
47  if (maskvec[i])
48  input_sec[1].set((i - 15), false);
49 }
std::array< std::bitset< 15 >, 2 > input_sec
Definition: RBCInput.h:41
RBCInput& RBCInput::operator= ( const RBCInput )
default
RBCInput& RBCInput::operator= ( RBCInput &&  )
default
void RBCInput::printinfo ( ) const
inline

Definition at line 43 of file RBCInput.h.

References gather_cfg::cout.

43 { std::cout << "RBCInput: " << (*this); };
tuple cout
Definition: gather_cfg.py:144
void RBCInput::setWheelId ( int  wid)
inline

Definition at line 52 of file RBCInput.h.

References m_wheelId.

Referenced by RBCEmulator::emulate().

52 { m_wheelId = wid; };
int m_wheelId
Definition: RBCInput.h:59
int RBCInput::wheelId ( ) const
inline

Definition at line 54 of file RBCInput.h.

References m_wheelId.

Referenced by RBCChamberORLogic::process().

54 { return m_wheelId; };
int m_wheelId
Definition: RBCInput.h:59

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ostr,
RBCInput const &  rhs 
)
friend

Definition at line 26 of file RBCInput.cc.

26  {
27  for (int i = 0; i < 15; ++i)
28  ostr << rhs.input_sec[0][i];
29  ostr << '\t';
30  for (int i = 0; i < 15; ++i)
31  ostr << rhs.input_sec[1][i];
32  ostr << '\n';
33 
34  return ostr;
35 }
for(Iditer=Id.begin();Iditer!=Id.end();Iditer++)
std::istream& operator>> ( std::istream &  istr,
RBCInput rhs 
)
friend

Definition at line 12 of file RBCInput.cc.

12  {
13  int _ks = 0;
14 
15  for (int i = 0; i < 30; ++i) {
16  istr >> rhs.input[i];
17  if (i < 15)
18  _ks = 0;
19  else
20  _ks = 1;
21  rhs.input_sec[_ks].set(i - (15 * _ks), rhs.input[i]);
22  }
23  return istr;
24 }
std::array< std::bitset< 15 >, 2 > input_sec
Definition: RBCInput.h:41
bool input[30]
Definition: RBCInput.h:40

Member Data Documentation

bool RBCInput::hasData

Definition at line 49 of file RBCInput.h.

Referenced by RBCInput().

bool RBCInput::input[30]

Definition at line 40 of file RBCInput.h.

Referenced by operator>>().

std::array<std::bitset<15>, 2> RBCInput::input_sec
bool RBCInput::m_debug
private

Definition at line 54 of file RBCInput.h.

Referenced by force(), and RBCInput().

int RBCInput::m_wheelId
private

Definition at line 59 of file RBCInput.h.

Referenced by setWheelId(), and wheelId().

bool RBCInput::needmapping

Definition at line 50 of file RBCInput.h.

Referenced by ProcessTestSignal::builddata(), RBCChamberORLogic::process(), and RBCInput().