Pottu
Public Member Functions | Public Attributes | List of all members
pottu::RawHistogrammer< EventOp > Class Template Reference
Inheritance diagram for pottu::RawHistogrammer< EventOp >:
Inheritance graph
[legend]
Collaboration diagram for pottu::RawHistogrammer< EventOp >:
Collaboration graph
[legend]

Public Member Functions

 RawHistogrammer (EventOp eventOp)
 
void setHistogram (uint16_t ch, _histogram_1d_type *h)
 Sets individual histogram to a channel. More...
 
_histogram_1d_typegetHistogram (uint16_t ch) noexcept
 
void createAndSetHistogramsChannelInterval (_result_tree_type tree, const std::string &prefix, uint16_t chFirst, uint16_t chLast, double low, double high, unsigned int binc)
 
template<class DAQCH >
void setGroup (DetectorEvent::group_type group, double low, double high, unsigned int binc, const DAQCH &daqchannels, _result_tree_type tree)
 
virtual void process (std::vector< DetectorEvent > &data) noexcept
 Uses or modifies detector events in a container. More...
 
- Public Member Functions inherited from pottu::StageDetectorEvent
virtual ~StageDetectorEvent ()
 Virtual desctructor.
 

Public Attributes

ContextHandle_ctxh
 
EventOp _eventOp
 
std::vector< _histogram_1d_type * > _histos
 

Member Function Documentation

◆ process()

template<class EventOp = EventOpEnergy>
virtual void pottu::RawHistogrammer< EventOp >::process ( std::vector< DetectorEvent > &  data)
inlinevirtualnoexcept

Uses or modifies detector events in a container.

Parameters
dataVector containing detector events to be modified or used.

Typically only the fields of each detector event is modified and the event is otherwise kept the same.

Implements pottu::StageDetectorEvent.

◆ setGroup()

template<class EventOp = EventOpEnergy>
template<class DAQCH >
void pottu::RawHistogrammer< EventOp >::setGroup ( DetectorEvent::group_type  group,
double  low,
double  high,
unsigned int  binc,
const DAQCH &  daqchannels,
_result_tree_type  tree 
)
inline

Creates histogram for the group and attaches all channels to it

Parameters
groupGroup index
lowlow value of the histogram
highhigh value of the histogram
bincnumber of bins for the histogram
daqchannelsDAQChannels object to find the channels for the group group.
treePointer to the result tree where new histogram is to be created.

◆ setHistogram()

template<class EventOp = EventOpEnergy>
void pottu::RawHistogrammer< EventOp >::setHistogram ( uint16_t  ch,
_histogram_1d_type h 
)
inline

Sets individual histogram to a channel.

Histogram is owned by the caller also after this call.

NOTE: There is only one histogram for a channel so only the last set for a channel is effective. Therefore, use different RawHistogrammer instances for group and individual channel histogramming.


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