Public Member Functions | Private Attributes | List of all members
NoiseAdderProc Class Reference
Inheritance diagram for NoiseAdderProc:
WireCell::FilterProc WireCell::SourceProc WireCell::SinkProc WireCell::Proc WireCell::Proc

Public Member Functions

 NoiseAdderProc (IFrameSource::pointer nn)
 
virtual ~NoiseAdderProc ()
 
virtual Pipeinput_pipe ()
 
virtual Pipeoutput_pipe ()
 
virtual bool operator() ()
 
- Public Member Functions inherited from WireCell::FilterProc
virtual ~FilterProc ()
 
- Public Member Functions inherited from WireCell::SourceProc
virtual ~SourceProc ()
 
- Public Member Functions inherited from WireCell::Proc
virtual ~Proc ()
 
- Public Member Functions inherited from WireCell::SinkProc
virtual ~SinkProc ()
 

Private Attributes

Pipe iq
 
Pipe oq
 
IFrameSource::pointer noise_node
 

Detailed Description

Definition at line 213 of file Fourdee.cxx.

Constructor & Destructor Documentation

NoiseAdderProc::NoiseAdderProc ( IFrameSource::pointer  nn)
inline

Definition at line 215 of file Fourdee.cxx.

215 : noise_node(nn) {}
IFrameSource::pointer noise_node
Definition: Fourdee.cxx:249
virtual NoiseAdderProc::~NoiseAdderProc ( )
inlinevirtual

Definition at line 216 of file Fourdee.cxx.

216 {}

Member Function Documentation

virtual Pipe& NoiseAdderProc::input_pipe ( )
inlinevirtual

Implements WireCell::SinkProc.

Definition at line 218 of file Fourdee.cxx.

218  {
219  return iq;
220  }
virtual bool NoiseAdderProc::operator() ( void  )
inlinevirtual

Implements WireCell::Proc.

Definition at line 225 of file Fourdee.cxx.

225  {
226  if (iq.empty()) { return false; }
227 
228  const IFrame::pointer iframe = boost::any_cast<const IFrame::pointer>(iq.front());
229  iq.pop();
230 
231  if (!iframe) { // eos
232  std::cerr << "NoiseAdderProc eos\n";
233  boost::any out = iframe;
234  oq.push(out);
235  return true;
236  }
237 
238  IFrame::pointer nframe;
239  bool ok = (*noise_node)(nframe);
240  if (!ok) return false;
241  nframe = Gen::sum(IFrame::vector{iframe,nframe}, iframe->ident());
242  boost::any anyout = nframe;
243  oq.push(anyout);
244  return true;
245  }
struct vector vector
IFrame::pointer sum(std::vector< IFrame::pointer > frames, int ident)
Definition: FrameUtil.cxx:15
const GenericPointer< typename T::ValueType > & pointer
Definition: pointer.h:1124
virtual Pipe& NoiseAdderProc::output_pipe ( )
inlinevirtual

Implements WireCell::SourceProc.

Definition at line 221 of file Fourdee.cxx.

221  {
222  return oq;
223  }

Member Data Documentation

Pipe NoiseAdderProc::iq
private

Definition at line 248 of file Fourdee.cxx.

IFrameSource::pointer NoiseAdderProc::noise_node
private

Definition at line 249 of file Fourdee.cxx.

Pipe NoiseAdderProc::oq
private

Definition at line 248 of file Fourdee.cxx.


The documentation for this class was generated from the following file: