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

#include <RBCProcessTestSignal.h>

Inheritance diagram for RBCProcessTestSignal:
ProcessInputSignal

Public Member Functions

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

Private Attributes

std::ifstream * m_in
 
RBCInputm_input
 
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 ( )
inline

Standard constructor.

Definition at line 28 of file RBCProcessTestSignal.h.

28 {};
RBCProcessTestSignal::RBCProcessTestSignal ( const char *  f_name)

Definition at line 16 of file RBCProcessTestSignal.cc.

References gather_cfg::cout, m_in, m_input, m_lbin, and showfirst().

17 {
18 
19  m_in = new std::ifstream();
20  m_in->open(f_name);
21 
22  if(!m_in->is_open()) {
23  std::cout << "RBCProcessTestSignal> cannot open file" << std::endl;
24  } else {
25  std::cout << "RBCProcessTestSignal> file is now open" << std::endl;
26  }
27 
28  m_input = new RBCInput();
29  m_lbin = dynamic_cast<RPCInputSignal*>( new RBCLinkBoardSignal( m_input ) );
30 
31  showfirst();
32 
33 }
tuple cout
Definition: gather_cfg.py:145
RBCProcessTestSignal::~RBCProcessTestSignal ( )
virtual

Destructor.

Definition at line 37 of file RBCProcessTestSignal.cc.

References m_in, m_input, and m_lbin.

38 {
39  m_in->close();
40  delete m_in;
41 
42  if ( m_lbin ) delete m_lbin;
43 
44  if ( m_input ) delete m_input;
45 
46 }

Member Function Documentation

int RBCProcessTestSignal::next ( void  )
virtual

Implements ProcessInputSignal.

Definition at line 50 of file RBCProcessTestSignal.cc.

References m_in.

Referenced by BeautifulSoup.PageElement::_invert().

51 {
52 
53  if ( m_in->fail()) return 0;
54  (*m_in) >> (*m_input);
55  if ( m_in->eof() ) return 0;
56  return 1;
57 
58 }
RPCInputSignal* RBCProcessTestSignal::retrievedata ( )
inlinevirtual

Implements ProcessInputSignal.

Definition at line 40 of file RBCProcessTestSignal.h.

References m_lbin.

40  {
41  return m_lbin;
42  };
void RBCProcessTestSignal::rewind ( )

Definition at line 69 of file RBCProcessTestSignal.cc.

References m_in.

Referenced by showfirst().

70 {
71  m_in->clear();
72  m_in->seekg(0,std::ios::beg);
73 }
void RBCProcessTestSignal::showfirst ( )

Definition at line 60 of file RBCProcessTestSignal.cc.

References gather_cfg::cout, and rewind().

Referenced by RBCProcessTestSignal().

61 {
62  rewind();
63  (*m_in) >> (*m_input);
64  std::cout << (*m_input);
65  rewind();
66 
67 }
tuple cout
Definition: gather_cfg.py:145

Member Data Documentation

std::ifstream* RBCProcessTestSignal::m_in
private

Definition at line 42 of file RBCProcessTestSignal.h.

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

RBCInput* RBCProcessTestSignal::m_input
private

Definition at line 50 of file RBCProcessTestSignal.h.

Referenced by RBCProcessTestSignal(), and ~RBCProcessTestSignal().

RPCInputSignal* RBCProcessTestSignal::m_lbin
private