Public Member Functions | List of all members
WireCell::Img::SumSlices Class Reference

#include <SumSlice.h>

Inheritance diagram for WireCell::Img::SumSlices:
WireCell::Img::SumSliceBase WireCell::IFrameSlices WireCell::IConfigurable WireCell::IQueuedoutNode< IFrame, ISlice > WireCell::IComponent< IConfigurable > WireCell::IQueuedoutNodeBase WireCell::Interface WireCell::INode WireCell::IComponent< INode > WireCell::Interface

Public Member Functions

virtual ~SumSlices ()
 
virtual bool operator() (const input_pointer &depo, output_queue &slices)
 The calling signature: More...
 
- Public Member Functions inherited from WireCell::Img::SumSliceBase
 SumSliceBase ()
 
virtual ~SumSliceBase ()
 
virtual void configure (const WireCell::Configuration &cfg)
 Accept a configuration. More...
 
virtual WireCell::Configuration default_configuration () const
 Optional, override to return a hard-coded default configuration. More...
 
- Public Member Functions inherited from WireCell::IConfigurable
virtual ~IConfigurable ()
 
- Public Member Functions inherited from WireCell::IComponent< IConfigurable >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 
- Public Member Functions inherited from WireCell::IFrameSlices
virtual ~IFrameSlices ()
 
virtual std::string signature ()
 
- Public Member Functions inherited from WireCell::IQueuedoutNode< IFrame, ISlice >
virtual ~IQueuedoutNode ()
 
virtual bool operator() (const boost::any &anyin, queuedany &outanyq)
 The calling signature: More...
 
virtual std::vector< std::stringinput_types ()
 
virtual std::vector< std::stringoutput_types ()
 
- Public Member Functions inherited from WireCell::IQueuedoutNodeBase
virtual ~IQueuedoutNodeBase ()
 
virtual NodeCategory category ()
 Return the behavior category type. More...
 
virtual int concurrency ()
 By default assume all subclasses maintain state. More...
 
- Public Member Functions inherited from WireCell::INode
virtual ~INode ()
 
virtual void reset ()
 
- Public Member Functions inherited from WireCell::IComponent< INode >
virtual ~IComponent ()
 

Additional Inherited Members

- Public Types inherited from WireCell::IComponent< IConfigurable >
typedef std::shared_ptr< IConfigurablepointer
 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
 
- Public Types inherited from WireCell::IFrameSlices
typedef std::shared_ptr< IFrameSlicespointer
 
- Public Types inherited from WireCell::IQueuedoutNode< IFrame, ISlice >
typedef std::shared_ptr< IQueuedoutNodeBasepointer
 
typedef IFrame input_type
 
typedef ISlice output_type
 
typedef std::shared_ptr< const IFrameinput_pointer
 
typedef std::shared_ptr< const ISliceoutput_pointer
 
typedef std::deque< output_pointeroutput_queue
 
- Public Types inherited from WireCell::IQueuedoutNodeBase
typedef std::shared_ptr< IQueuedoutNodeBasepointer
 
typedef std::deque< boost::any > queuedany
 
- 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...
 
- Protected Types inherited from WireCell::Img::SumSliceBase
typedef std::map< size_t, Data::Slice * > slice_map_t
 
- Protected Member Functions inherited from WireCell::Img::SumSliceBase
void slice (const IFrame::pointer &in, slice_map_t &sm)
 

Detailed Description

Definition at line 73 of file SumSlice.h.

Constructor & Destructor Documentation

Img::SumSlices::~SumSlices ( )
virtual

Definition at line 21 of file SumSlice.cxx.

21 { }

Member Function Documentation

bool Img::SumSlices::operator() ( const input_pointer in,
output_queue outq 
)
virtual

The calling signature:

debug

Implements WireCell::IQueuedoutNode< IFrame, ISlice >.

Definition at line 100 of file SumSlice.cxx.

101 {
102  if (!in) {
103  slices.push_back(nullptr);
104  return true; // eos
105  }
106 
107  // Slices will be sparse in general. Index by a "slice bin" number
108  slice_map_t svcmap;
109  slice(in, svcmap);
110 
111  // intern
112  for (auto sit : svcmap) {
113  auto s = sit.second;
114 
115  /// debug
116  double qtot = 0;
117  for (const auto& a : s->activity()) {
118  qtot += a.second;
119  }
120 
121  slices.push_back(ISlice::pointer(s));
122  }
123 
124  return true;
125 }
std::shared_ptr< const ISlice > pointer
Definition: IData.h:19
std::map< size_t, Data::Slice * > slice_map_t
Definition: SumSlice.h:55
std::vector< TCSlice > slices
Definition: DataStructs.cxx:12
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
void slice(const IFrame::pointer &in, slice_map_t &sm)
Definition: SumSlice.cxx:48
static QCString * s
Definition: config.cpp:1042

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