CMS 3D CMS Logo

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() [1/3]

RBCInput::RBCInput ( )
inline

Standard constructor.

Definition at line 25 of file RBCInput.h.

25  {
26  needmapping = false;
27  m_debug = false;
28  hasData = false;
29  };

References hasData, m_debug, and needmapping.

◆ RBCInput() [2/3]

RBCInput::RBCInput ( const RBCInput )
default

◆ RBCInput() [3/3]

RBCInput::RBCInput ( RBCInput &&  )
default

Member Function Documentation

◆ force()

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

Definition at line 51 of file RBCInput.cc.

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 }

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

◆ mask()

void RBCInput::mask ( const std::vector< int > &  maskvec)

Definition at line 37 of file RBCInput.cc.

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 }

References mps_fire::i, and input_sec.

◆ operator=() [1/2]

RBCInput& RBCInput::operator= ( const RBCInput )
default

◆ operator=() [2/2]

RBCInput& RBCInput::operator= ( RBCInput &&  )
default

◆ printinfo()

void RBCInput::printinfo ( ) const
inline

Definition at line 43 of file RBCInput.h.

43 { std::cout << "RBCInput: " << (*this); };

References gather_cfg::cout.

◆ setWheelId()

void RBCInput::setWheelId ( int  wid)
inline

Definition at line 52 of file RBCInput.h.

52 { m_wheelId = wid; };

References m_wheelId.

◆ wheelId()

int RBCInput::wheelId ( ) const
inline

Definition at line 54 of file RBCInput.h.

54 { return m_wheelId; };

References m_wheelId.

Referenced by RBCChamberORLogic::process().

Friends And Related Function Documentation

◆ operator<<

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 }

◆ operator>>

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 }

Member Data Documentation

◆ hasData

bool RBCInput::hasData

Definition at line 49 of file RBCInput.h.

Referenced by RBCInput().

◆ input

bool RBCInput::input[30]

Definition at line 40 of file RBCInput.h.

Referenced by operator>>().

◆ input_sec

std::array<std::bitset<15>, 2> RBCInput::input_sec

◆ m_debug

bool RBCInput::m_debug
private

Definition at line 54 of file RBCInput.h.

Referenced by force(), and RBCInput().

◆ m_wheelId

int RBCInput::m_wheelId
private

Definition at line 59 of file RBCInput.h.

Referenced by setWheelId(), and wheelId().

◆ needmapping

bool RBCInput::needmapping

Definition at line 50 of file RBCInput.h.

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

mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
RBCInput::input_sec
std::array< std::bitset< 15 >, 2 > input_sec
Definition: RBCInput.h:41
RBCInput::needmapping
bool needmapping
Definition: RBCInput.h:50
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:15
RBCInput::m_wheelId
int m_wheelId
Definition: RBCInput.h:59
RBCInput::m_debug
bool m_debug
Definition: RBCInput.h:54
RBCInput::input
bool input[30]
Definition: RBCInput.h:40
RBCInput::hasData
bool hasData
Definition: RBCInput.h:49