larlight::pulse Class Reference

Channel-wise data member class to hold reconstructed pulse information. More...

#include <pulse.hh>

Inheritance diagram for larlight::pulse:
larlight::data_base

List of all members.

Public Member Functions

 pulse (DATA::DATA_TYPE type=DATA::Pulse)
 Default constructor.
 pulse (const pulse &original)
 Default copy constructor.
void set_channel_number (UShort_t ch)
 Setter for the channel number.
void set_ped_mean (double v)
 Setter for pedestal mean.
void set_ped_rms (double v)
 Setter for pedestal rms.
void set_pulse_peak (double v)
 Setter for pulse peak height.
void set_charge (double v)
 Setter for pulse charge (integral).
void set_start_time (double v)
 Setter for pulse start time.
void set_end_time (double v)
 Setter for pulse end time.
void set_max_time (double v)
 Setter for pulse max time (peak point).
void set_disc_id (FEM::DISCRIMINATOR id)
 Setter for discriminator id.
void set_readout_frame_number (UInt_t id)
 Setter for original waveform's frame number.
void set_readout_sample_number (UInt_t t)
 Setter for original waveform's sample time-slice.
FEM::DISCRIMINATOR disc_id () const
 Getter for discriminator id.
UInt_t readout_frame_number () const
 Getter for original waveform's frame number.
UInt_t readout_sample_number () const
 Getter for original waveform's sample time-slice.
UShort_t channel_number () const
 Getter for the channel number.
double ped_mean () const
 Getter for pedestal mean.
double ped_rms () const
 Getter for pedestal rms.
double pulse_peak () const
 Getter for pulse peak height.
double charge () const
 Getter for pulse charge (integral).
double start_time () const
 Getter for pulse start time.
double end_time () const
 Getter for pulse end time.
double max_time () const
 Getter for pulse max time (peak point).
virtual void clear_data ()
 Method to clear currently held data contents in the buffer.
 ~pulse ()
 Default destructor.
DATA::DATA_TYPE data_type () const
 data type getter
void add_association (DATA::DATA_TYPE type, const std::vector< unsigned short > ass)
 Adder for a set of association.
size_t size_association (DATA::DATA_TYPE type) const
 Getter for # of associations.
const std::vector< unsigned short > association (DATA::DATA_TYPE type, size_t index=0) const
 Getter of an association.

Protected Member Functions

void init_vars ()
 Internal function to reset variables.

Protected Attributes

UShort_t _channel_number
 Channel number.
double _ped_mean
 pedestal mean
double _ped_rms
 pedestal std. deviation
double _pulse_peak
 peak height
double _charge
 charge sum (integral)
double _start_time
 pulse start time
double _end_time
 pulse end time
double _max_time
 pulse max time (where highestpeak is)
UInt_t _readout_frame_number
 original waveofrm's readout frame id
UInt_t _readout_sample_number
 original waveform's sample number in 64 MHz
FEM::DISCRIMINATOR _disc_id
 original waveform's discriminator id
DATA::DATA_TYPE _type
 DATA_TYPE.
std::map
< larlight::DATA::DATA_TYPE,
std::vector< std::vector
< unsigned short > > > 
_ass
 Association storage ... allow multiple set of associations.

Detailed Description

Channel-wise data member class to hold reconstructed pulse information.

Definition at line 24 of file pulse.hh.


Constructor & Destructor Documentation

larlight::pulse::pulse ( DATA::DATA_TYPE  type = DATA::Pulse  ) 

Default constructor.

Definition at line 8 of file pulse.cc.

References larlight::data_base::_type, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::DATA::PMTPulse_FixedWin, larlight::DATA::PMTPulse_ThresWin, larlight::DATA::Pulse, larlight::Message::send(), larlight::DATA::TPCPulse_FixedWin, and larlight::DATA::TPCPulse_ThresWin.

00008                                  : data_base(type) 
00009   {
00010     if(_type!=DATA::PMTPulse_FixedWin && 
00011        _type!=DATA::TPCPulse_FixedWin &&
00012        _type!=DATA::PMTPulse_ThresWin &&
00013        _type!=DATA::TPCPulse_ThresWin &&
00014        _type!=DATA::Pulse ) {
00015       
00016       Message::send(MSG::ERROR,__FUNCTION__,
00017             Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str()));     
00018 
00019       _type=DATA::Pulse;
00020 
00021     }
00022     clear_data();
00023   }

larlight::pulse::pulse ( const pulse original  )  [inline]

Default copy constructor.

Definition at line 32 of file pulse.hh.

00032                                  : data_base(original),
00033                          _channel_number(original._channel_number),
00034                          _ped_mean(original._ped_mean),
00035                          _ped_rms(original._ped_rms),
00036                          _pulse_peak(original._pulse_peak),
00037                          _charge(original._charge),
00038                          _start_time(original._start_time),
00039                          _end_time(original._end_time),
00040                          _max_time(original._max_time),
00041                          _readout_frame_number(original._readout_frame_number),
00042                          _readout_sample_number(original._readout_sample_number),
00043                                              _disc_id(original._disc_id)
00044     {};

larlight::pulse::~pulse (  )  [inline]

Default destructor.

Definition at line 116 of file pulse.hh.

00116 {};


Member Function Documentation

void larlight::data_base::add_association ( DATA::DATA_TYPE  type,
const std::vector< unsigned short >  ass 
) [inherited]

Adder for a set of association.

Definition at line 9 of file data_base.cc.

References larlight::data_base::_ass.

00011   {
00012 
00013     if( _ass.find(type) == _ass.end() )
00014       
00015       _ass[type]=std::vector<std::vector<unsigned short> >();
00016     
00017     _ass[type].push_back(ass);
00018     
00019     
00020   }

const std::vector< unsigned short > larlight::data_base::association ( DATA::DATA_TYPE  type,
size_t  index = 0 
) const [inherited]

Getter of an association.

Definition at line 35 of file data_base.cc.

References larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, and larlight::Message::send().

00037   {
00038     
00039     size_t ass_length = size_association(type);
00040     
00041     if( !(ass_length) ) {
00042       
00043       Message::send(MSG::ERROR,__FUNCTION__,
00044             Form("There is no association to %s",DATA::DATA_TREE_NAME[type].c_str()));
00045       
00046       return std::vector<unsigned short>();
00047       
00048     }
00049     
00050     if( ass_length <= index ) {
00051       
00052       Message::send(MSG::ERROR,__FUNCTION__,
00053             Form("There are only %zu associations. No association @ index=%zu",ass_length,index));
00054       
00055       return std::vector<unsigned short>();
00056       
00057     }
00058     
00059     return ((_ass.find(type))->second).at(index);
00060   }

UShort_t larlight::pulse::channel_number (  )  const [inline]

Getter for the channel number.

Definition at line 89 of file pulse.hh.

References _channel_number.

00089 {return _channel_number;};

double larlight::pulse::charge (  )  const [inline]

Getter for pulse charge (integral).

Definition at line 101 of file pulse.hh.

References _charge.

00101 { return _charge;};

void larlight::pulse::clear_data (  )  [virtual]

Method to clear currently held data contents in the buffer.

Reimplemented from larlight::data_base.

Definition at line 25 of file pulse.cc.

References _channel_number, _charge, _disc_id, _end_time, _max_time, _ped_mean, _ped_rms, _readout_frame_number, _readout_sample_number, _start_time, larlight::FEM::DISC_MAX, larlight::FEM::INVALID_CH, and larlight::FEM::INVALID_WORD.

Referenced by pulse().

00025                          {
00026 
00027     data_base::clear_data();
00028     _disc_id=FEM::DISC_MAX;
00029     _readout_frame_number=FEM::INVALID_WORD;
00030     _readout_sample_number=FEM::INVALID_WORD;
00031     _channel_number=FEM::INVALID_CH;
00032     _ped_mean=-1;
00033     _ped_rms=-1;
00034     _charge=-1;
00035     _start_time=-1;
00036     _end_time=-1;
00037     _max_time=-1;
00038 
00039   }

DATA::DATA_TYPE larlight::data_base::data_type (  )  const [inline, inherited]

data type getter

Reimplemented in larlight::event_base.

Definition at line 48 of file data_base.hh.

References larlight::data_base::_type.

00048 {return _type; }

FEM::DISCRIMINATOR larlight::pulse::disc_id (  )  const [inline]

Getter for discriminator id.

Definition at line 80 of file pulse.hh.

References _disc_id.

00080 { return _disc_id;}

double larlight::pulse::end_time (  )  const [inline]

Getter for pulse end time.

Definition at line 107 of file pulse.hh.

References _end_time.

00107 { return _end_time;};

void larlight::pulse::init_vars (  )  [protected]

Internal function to reset variables.

double larlight::pulse::max_time (  )  const [inline]

Getter for pulse max time (peak point).

Definition at line 110 of file pulse.hh.

References _max_time.

00110 { return _max_time;};

double larlight::pulse::ped_mean (  )  const [inline]

Getter for pedestal mean.

Definition at line 92 of file pulse.hh.

References _ped_mean.

00092 { return _ped_mean;};

double larlight::pulse::ped_rms (  )  const [inline]

Getter for pedestal rms.

Definition at line 95 of file pulse.hh.

References _ped_rms.

00095 { return _ped_rms;};

double larlight::pulse::pulse_peak (  )  const [inline]

Getter for pulse peak height.

Definition at line 98 of file pulse.hh.

References _pulse_peak.

00098 { return _pulse_peak;};

UInt_t larlight::pulse::readout_frame_number (  )  const [inline]

Getter for original waveform's frame number.

Definition at line 83 of file pulse.hh.

References _readout_frame_number.

00083 { return _readout_frame_number;}

UInt_t larlight::pulse::readout_sample_number (  )  const [inline]

Getter for original waveform's sample time-slice.

Definition at line 86 of file pulse.hh.

References _readout_sample_number.

00086 { return _readout_sample_number;}

void larlight::pulse::set_channel_number ( UShort_t  ch  )  [inline]

Setter for the channel number.

Definition at line 47 of file pulse.hh.

References _channel_number.

00047 {_channel_number=ch;};

void larlight::pulse::set_charge ( double  v  )  [inline]

Setter for pulse charge (integral).

Definition at line 59 of file pulse.hh.

References _charge.

00059 {_charge=v;};

void larlight::pulse::set_disc_id ( FEM::DISCRIMINATOR  id  )  [inline]

Setter for discriminator id.

Definition at line 71 of file pulse.hh.

References _disc_id.

00071 { _disc_id=id; }

void larlight::pulse::set_end_time ( double  v  )  [inline]

Setter for pulse end time.

Definition at line 65 of file pulse.hh.

References _end_time.

00065 {_end_time=v;};

void larlight::pulse::set_max_time ( double  v  )  [inline]

Setter for pulse max time (peak point).

Definition at line 68 of file pulse.hh.

References _max_time.

00068 {_max_time=v;};

void larlight::pulse::set_ped_mean ( double  v  )  [inline]

Setter for pedestal mean.

Definition at line 50 of file pulse.hh.

References _ped_mean.

00050 {_ped_mean=v;};

void larlight::pulse::set_ped_rms ( double  v  )  [inline]

Setter for pedestal rms.

Definition at line 53 of file pulse.hh.

References _ped_rms.

00053 {_ped_rms=v;};

void larlight::pulse::set_pulse_peak ( double  v  )  [inline]

Setter for pulse peak height.

Definition at line 56 of file pulse.hh.

References _pulse_peak.

00056 {_pulse_peak=v;};

void larlight::pulse::set_readout_frame_number ( UInt_t  id  )  [inline]

Setter for original waveform's frame number.

Definition at line 74 of file pulse.hh.

References _readout_frame_number.

00074 { _readout_frame_number=id; }

void larlight::pulse::set_readout_sample_number ( UInt_t  t  )  [inline]

Setter for original waveform's sample time-slice.

Definition at line 77 of file pulse.hh.

References _readout_sample_number.

void larlight::pulse::set_start_time ( double  v  )  [inline]

Setter for pulse start time.

Definition at line 62 of file pulse.hh.

References _start_time.

00062 {_start_time=v;};

size_t larlight::data_base::size_association ( DATA::DATA_TYPE  type  )  const [inherited]

Getter for # of associations.

Definition at line 23 of file data_base.cc.

Referenced by larlight::cluster::get_hit_type().

00025   {
00026     
00027     if( _ass.find(type) == _ass.end() ) return 0;
00028     
00029     return ((_ass.find(type))->second).size();
00030     //return _ass[type].size();
00031     
00032   }

double larlight::pulse::start_time (  )  const [inline]

Getter for pulse start time.

Definition at line 104 of file pulse.hh.

References _start_time.

00104 { return _start_time;};


Member Data Documentation

std::map<larlight::DATA::DATA_TYPE,std::vector<std::vector<unsigned short> > > larlight::data_base::_ass [protected, inherited]

Association storage ... allow multiple set of associations.

Definition at line 65 of file data_base.hh.

Referenced by larlight::data_base::add_association(), and larlight::data_base::clear_data().

UShort_t larlight::pulse::_channel_number [protected]

Channel number.

Definition at line 124 of file pulse.hh.

Referenced by channel_number(), clear_data(), and set_channel_number().

double larlight::pulse::_charge [protected]

charge sum (integral)

Definition at line 128 of file pulse.hh.

Referenced by charge(), clear_data(), and set_charge().

original waveform's discriminator id

Definition at line 134 of file pulse.hh.

Referenced by clear_data(), disc_id(), and set_disc_id().

double larlight::pulse::_end_time [protected]

pulse end time

Definition at line 130 of file pulse.hh.

Referenced by clear_data(), end_time(), and set_end_time().

double larlight::pulse::_max_time [protected]

pulse max time (where highestpeak is)

Definition at line 131 of file pulse.hh.

Referenced by clear_data(), max_time(), and set_max_time().

double larlight::pulse::_ped_mean [protected]

pedestal mean

Definition at line 125 of file pulse.hh.

Referenced by clear_data(), ped_mean(), and set_ped_mean().

double larlight::pulse::_ped_rms [protected]

pedestal std. deviation

Definition at line 126 of file pulse.hh.

Referenced by clear_data(), ped_rms(), and set_ped_rms().

double larlight::pulse::_pulse_peak [protected]

peak height

Definition at line 127 of file pulse.hh.

Referenced by pulse_peak(), and set_pulse_peak().

original waveofrm's readout frame id

Definition at line 132 of file pulse.hh.

Referenced by clear_data(), readout_frame_number(), and set_readout_frame_number().

original waveform's sample number in 64 MHz

Definition at line 133 of file pulse.hh.

Referenced by clear_data(), readout_sample_number(), and set_readout_sample_number().

double larlight::pulse::_start_time [protected]

pulse start time

Definition at line 129 of file pulse.hh.

Referenced by clear_data(), set_start_time(), and start_time().

DATA_TYPE.

Definition at line 62 of file data_base.hh.

Referenced by larlight::calorimetry::calorimetry(), larlight::cluster::cluster(), larlight::data_base::data_base(), larlight::event_base::data_type(), larlight::data_base::data_type(), larlight::endpoint2d::endpoint2d(), larlight::event_calorimetry::event_calorimetry(), larlight::event_cluster::event_cluster(), larlight::event_endpoint2d::event_endpoint2d(), larlight::event_fifo::event_fifo(), larlight::event_hit::event_hit(), larlight::event_mcpart::event_mcpart(), larlight::event_mcshower::event_mcshower(), larlight::event_mctruth::event_mctruth(), larlight::event_pulse::event_pulse(), larlight::event_shower::event_shower(), larlight::event_simch::event_simch(), larlight::event_sps::event_sps(), larlight::event_track::event_track(), larlight::event_user::event_user(), larlight::event_vertex::event_vertex(), larlight::event_wire::event_wire(), larlight::fifo::fifo(), larlight::hit::hit(), larlight::mcnu::mcnu(), larlight::mcpart::mcpart(), larlight::mcshower::mcshower(), larlight::mctrajectory::mctrajectory(), larlight::mctruth::mctruth(), larlight::pmtfifo::pmtfifo(), pulse(), larlight::fifo::readout_sample_number_16MHz(), larlight::fifo::readout_sample_number_2MHz(), larlight::fifo::readout_sample_number_64MHz(), larlight::shower::shower(), larlight::simch::simch(), larlight::spacepoint::spacepoint(), larlight::tpcfifo::tpcfifo(), larlight::track::track(), larlight::trigger::trigger(), larlight::user_info::user_info(), larlight::vertex::vertex(), and larlight::wire::wire().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator

Generated on 3 Jun 2014 for MyProject by  doxygen 1.6.1