Public Member Functions | Private Attributes | List of all members
WireCell::Gen::DumpFrames Class Reference

#include <DumpFrames.h>

Inheritance diagram for WireCell::Gen::DumpFrames:
WireCell::IFrameSink WireCell::ISinkNode< IFrame > WireCell::ISinkNodeBase WireCell::INode WireCell::IComponent< INode > WireCell::Interface

Public Member Functions

 DumpFrames ()
 
virtual ~DumpFrames ()
 
virtual bool operator() (const IFrame::pointer &frame)
 Do something thrilling with a frame. More...
 
- Public Member Functions inherited from WireCell::IFrameSink
virtual ~IFrameSink ()
 
virtual std::string signature ()
 
- Public Member Functions inherited from WireCell::ISinkNode< IFrame >
virtual ~ISinkNode ()
 
virtual bool operator() (const boost::any &anyin)
 
virtual std::vector< std::stringinput_types ()
 
- Public Member Functions inherited from WireCell::ISinkNodeBase
virtual ~ISinkNodeBase ()
 
virtual NodeCategory category ()
 Return the behavior category type. More...
 
- Public Member Functions inherited from WireCell::INode
virtual ~INode ()
 
virtual int concurrency ()
 
virtual std::vector< std::stringoutput_types ()
 
virtual void reset ()
 
- Public Member Functions inherited from WireCell::IComponent< INode >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 

Private Attributes

Log::logptr_t log
 

Additional Inherited Members

- Public Types inherited from WireCell::IFrameSink
typedef std::shared_ptr< IFrameSinkpointer
 
- Public Types inherited from WireCell::ISinkNode< IFrame >
typedef IFrame input_type
 
typedef std::shared_ptr< const IFrameinput_pointer
 
- Public Types inherited from WireCell::ISinkNodeBase
typedef std::shared_ptr< ISinkNodeBasepointer
 
- Public Types inherited from WireCell::INode
enum  NodeCategory {
  unknown, sourceNode, sinkNode, functionNode,
  queuedoutNode, joinNode, splitNode, faninNode,
  fanoutNode, multioutNode, hydraNode
}
 
- Public Types inherited from WireCell::IComponent< INode >
typedef std::shared_ptr< INodepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 
- Public Types inherited from WireCell::Interface
typedef std::shared_ptr< Interfacepointer
 

Detailed Description

Definition at line 10 of file DumpFrames.h.

Constructor & Destructor Documentation

Gen::DumpFrames::DumpFrames ( )

Definition at line 9 of file DumpFrames.cxx.

10  : log(Log::logger("glue"))
11 {
12 }
logptr_t logger(std::string name)
Definition: Logging.cxx:71
Gen::DumpFrames::~DumpFrames ( )
virtual

Definition at line 15 of file DumpFrames.cxx.

16 {
17 }

Member Function Documentation

bool Gen::DumpFrames::operator() ( const IFrame::pointer frame)
virtual

Do something thrilling with a frame.

Implements WireCell::ISinkNode< IFrame >.

Definition at line 20 of file DumpFrames.cxx.

21 {
22  if (!frame) {
23  log->debug("frame sink sees EOS");
24  return true;
25  }
26  auto traces = frame->traces();
27  const int ntraces = traces->size();
28 
29  std::stringstream ss;
30  ss << "sink frame: #" << frame->ident()
31  << " @" << frame->time()/units::ms
32  << " with " << ntraces << " traces";
33  {
34  std::string comma = "";
35  ss << ", frame tags:[";
36  for (auto ftag : frame->frame_tags()) {
37  ss << comma << ftag;
38  comma = ", ";
39  }
40  ss << "]";
41  }
42  {
43  std::string comma = "";
44  ss << ", trace tags:[";
45  for (auto ftag : frame->trace_tags()) {
46  ss << comma << ftag;
47  comma = ", ";
48  }
49  ss << "]";
50  }
51  log->debug(ss.str());
52  return true;
53 }
std::string string
Definition: nybbler.cc:12
static const double ms
Definition: Units.h:104

Member Data Documentation

Log::logptr_t WireCell::Gen::DumpFrames::log
private

Definition at line 18 of file DumpFrames.h.


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