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 | Private Attributes
RBCProcessTestSignal Class Reference

#include <RBCProcessTestSignal.h>

Inheritance diagram for RBCProcessTestSignal:
ProcessInputSignal

Public Member Functions

int next () override
 
 RBCProcessTestSignal (const char *)
 
RPCInputSignalretrievedata () override
 
void rewind ()
 
void showfirst ()
 
 ~RBCProcessTestSignal () override
 Destructor. More...
 
- Public Member Functions inherited from ProcessInputSignal
virtual ~ProcessInputSignal ()
 

Private Attributes

std::ifstream m_in
 
RBCInput m_input
 
std::unique_ptr< RPCInputSignalm_lbin
 

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-10

Definition at line 25 of file RBCProcessTestSignal.h.

Constructor & Destructor Documentation

RBCProcessTestSignal::RBCProcessTestSignal ( const char *  f_name)
explicit

Definition at line 15 of file RBCProcessTestSignal.cc.

16  : m_in{}, m_input{}, m_lbin{std::make_unique<RBCLinkBoardSignal>(&m_input)} {
17  m_in.open(f_name);
18 
19  if (!m_in.is_open()) {
20  std::cout << "RBCProcessTestSignal> cannot open file" << std::endl;
21  } else {
22  std::cout << "RBCProcessTestSignal> file is now open" << std::endl;
23  }
24 
25  showfirst();
26 }
std::unique_ptr< RPCInputSignal > m_lbin
tuple cout
Definition: gather_cfg.py:144
RBCProcessTestSignal::~RBCProcessTestSignal ( )
override

Destructor.

Definition at line 30 of file RBCProcessTestSignal.cc.

References m_in.

30 { m_in.close(); }

Member Function Documentation

int RBCProcessTestSignal::next ( void  )
overridevirtual

Implements ProcessInputSignal.

Definition at line 34 of file RBCProcessTestSignal.cc.

References m_in, and m_input.

Referenced by BeautifulSoup.PageElement::_invert().

34  {
35  if (m_in.fail())
36  return 0;
37  m_in >> m_input;
38  if (m_in.eof())
39  return 0;
40  return 1;
41 }
RPCInputSignal* RBCProcessTestSignal::retrievedata ( )
inlineoverridevirtual

Implements ProcessInputSignal.

Definition at line 37 of file RBCProcessTestSignal.h.

References m_lbin.

37 { return m_lbin.get(); };
std::unique_ptr< RPCInputSignal > m_lbin
void RBCProcessTestSignal::rewind ( )

Definition at line 50 of file RBCProcessTestSignal.cc.

References m_in.

Referenced by showfirst().

50  {
51  m_in.clear();
52  m_in.seekg(0, std::ios::beg);
53 }
void RBCProcessTestSignal::showfirst ( )

Definition at line 43 of file RBCProcessTestSignal.cc.

References gather_cfg::cout, m_in, m_input, and rewind().

43  {
44  rewind();
45  m_in >> m_input;
46  std::cout << m_input;
47  rewind();
48 }
tuple cout
Definition: gather_cfg.py:144

Member Data Documentation

std::ifstream RBCProcessTestSignal::m_in
private

Definition at line 37 of file RBCProcessTestSignal.h.

Referenced by next(), rewind(), showfirst(), and ~RBCProcessTestSignal().

RBCInput RBCProcessTestSignal::m_input
private

Definition at line 43 of file RBCProcessTestSignal.h.

Referenced by next(), and showfirst().

std::unique_ptr<RPCInputSignal> RBCProcessTestSignal::m_lbin
private

Definition at line 45 of file RBCProcessTestSignal.h.

Referenced by retrievedata().