larlight::pmtfifo Class Reference

Channel-wise data member class to hold a collection of ADC samples. More...

#include <pmtfifo.hh>

Inheritance diagram for larlight::pmtfifo:
larlight::fifo larlight::data_base

List of all members.

Public Member Functions

 pmtfifo ()
 Default constructor.
 pmtfifo (const pmtfifo &original)
 Default copy constructor.
 pmtfifo (UShort_t ch, UInt_t frame, UInt_t sample, UChar_t module_address, UChar_t module_id, FEM::DISCRIMINATOR disc, DATA::DATA_TYPE type, std::vector< UShort_t > wf)
 Fast vector copy constructor.
void set_disc_id (FEM::DISCRIMINATOR id)
 Setter for the channel discriminator ID number.
FEM::DISCRIMINATOR disc_id () const
 Getter for the discriminator ID number.
virtual void clear_data ()
 Method to clear currently held data contents in the buffer.
 ~pmtfifo ()
 Default destructor.
void set_channel_number (UShort_t ch)
 Setter for the channel number.
void set_readout_frame_number (UInt_t id)
 Setter for the channel frame ID number.
void set_readout_sample_number (UInt_t t)
 Setter for the readout_sample_number number.
void set_module_address (UChar_t n)
 Setter for the module address.
void set_module_id (UChar_t n)
 Setter for the module id.
UInt_t readout_frame_number () const
 Getter for the channel frame ID number.
UInt_t readout_sample_number_RAW () const
 Getter for a RAW readout sample number.
UInt_t readout_sample_number_2MHz () const
 Getter for the readout_sample_number number.
UInt_t readout_sample_number_16MHz () const
 Getter for the readout_sample_number number.
UInt_t readout_sample_number_64MHz () const
 Getter for the readout_sample_number number.
UShort_t channel_number () const
 Getter for the channel number.
UChar_t module_address () const
 Getter for the module address.
UChar_t module_id () const
 Getter for the module id.
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

virtual void init_vars ()
 Internal function to reset variables.

Protected Attributes

FEM::DISCRIMINATOR _disc_id
 Discriminator ID.
UShort_t _channel_number
 Channel number.
UChar_t _module_address
 Module number.
UChar_t _module_id
 Module ID.
UInt_t _readout_frame_number
 Frame number.
UInt_t _readout_sample_number
 Sample number.
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 a collection of ADC samples.

Definition at line 27 of file pmtfifo.hh.


Constructor & Destructor Documentation

larlight::pmtfifo::pmtfifo (  ) 

Default constructor.

Definition at line 9 of file pmtfifo.cc.

References larlight::data_base::_type, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::DATA::PMTFIFO, and larlight::Message::send().

00009                    : fifo::fifo(DATA::PMTFIFO)
00010   //***************************************************************************
00011   {
00012     if(_type!=DATA::PMTFIFO) {
00013       
00014       Message::send(MSG::ERROR,__FUNCTION__,
00015             Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str()));
00016       _type=DATA::PMTFIFO;
00017     }
00018     
00019     clear_data();
00020   }

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

Default copy constructor.

Definition at line 35 of file pmtfifo.hh.

References _disc_id.

00036       : fifo::fifo(original)
00037 
00038     { _disc_id = original._disc_id; }

larlight::pmtfifo::pmtfifo ( UShort_t  ch,
UInt_t  frame,
UInt_t  sample,
UChar_t  module_address,
UChar_t  module_id,
FEM::DISCRIMINATOR  disc,
DATA::DATA_TYPE  type,
std::vector< UShort_t >  wf 
) [inline]

Fast vector copy constructor.

Definition at line 41 of file pmtfifo.hh.

References _disc_id.

00048                                 : fifo::fifo(ch,
00049                            frame,
00050                            sample,
00051                            module_address,
00052                            module_id,
00053                            type,
00054                            wf)
00055 
00056     { _disc_id = disc; }

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

Default destructor.

Definition at line 68 of file pmtfifo.hh.

00068 {}


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::fifo::channel_number (  )  const [inline, inherited]

Getter for the channel number.

Definition at line 96 of file fifo.hh.

References larlight::fifo::_channel_number.

00096 {return _channel_number;}

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

Method to clear currently held data contents in the buffer.

Reimplemented from larlight::fifo.

Definition at line 23 of file pmtfifo.cc.

References init_vars().

Referenced by pmtfifo().

00025   {
00026 
00027     data_base::clear_data();
00028     clear();
00029     init_vars();
00030   }

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::pmtfifo::disc_id (  )  const [inline]

Getter for the discriminator ID number.

Definition at line 62 of file pmtfifo.hh.

References _disc_id.

00062 {return _disc_id;}

void larlight::pmtfifo::init_vars (  )  [protected, virtual]

Internal function to reset variables.

Reimplemented from larlight::fifo.

Definition at line 33 of file pmtfifo.cc.

References _disc_id, and larlight::FEM::DISC_MAX.

Referenced by clear_data().

00035   {
00036     fifo::init_vars();
00037     _disc_id=FEM::DISC_MAX;
00038   }

UChar_t larlight::fifo::module_address (  )  const [inline, inherited]

Getter for the module address.

Definition at line 99 of file fifo.hh.

References larlight::fifo::_module_address.

00099 { return _module_address; }

UChar_t larlight::fifo::module_id (  )  const [inline, inherited]

Getter for the module id.

Definition at line 102 of file fifo.hh.

References larlight::fifo::_module_id.

00102 {return _module_id;}

UInt_t larlight::fifo::readout_frame_number (  )  const [inline, inherited]

Getter for the channel frame ID number.

Definition at line 78 of file fifo.hh.

References larlight::fifo::_readout_frame_number.

00078 {return _readout_frame_number;}

UInt_t larlight::fifo::readout_sample_number_16MHz (  )  const [inline, inherited]

Getter for the readout_sample_number number.

Definition at line 88 of file fifo.hh.

References larlight::fifo::_readout_sample_number, larlight::data_base::_type, and larlight::DATA::PMTFIFO.

UInt_t larlight::fifo::readout_sample_number_2MHz (  )  const [inline, inherited]

Getter for the readout_sample_number number.

Definition at line 84 of file fifo.hh.

References larlight::fifo::_readout_sample_number, larlight::data_base::_type, and larlight::DATA::PMTFIFO.

UInt_t larlight::fifo::readout_sample_number_64MHz (  )  const [inline, inherited]

Getter for the readout_sample_number number.

Definition at line 92 of file fifo.hh.

References larlight::fifo::_readout_sample_number, larlight::data_base::_type, and larlight::DATA::PMTFIFO.

UInt_t larlight::fifo::readout_sample_number_RAW (  )  const [inline, inherited]

Getter for a RAW readout sample number.

Definition at line 81 of file fifo.hh.

References larlight::fifo::_readout_sample_number.

00081 { return _readout_sample_number; }

void larlight::fifo::set_channel_number ( UShort_t  ch  )  [inline, inherited]

Setter for the channel number.

Definition at line 63 of file fifo.hh.

References larlight::fifo::_channel_number.

Referenced by main().

00063 {_channel_number=ch;}

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

Setter for the channel discriminator ID number.

Definition at line 59 of file pmtfifo.hh.

References _disc_id.

00059 {_disc_id=id;}

void larlight::fifo::set_module_address ( UChar_t  n  )  [inline, inherited]

Setter for the module address.

Definition at line 72 of file fifo.hh.

References larlight::fifo::_module_address.

00072 { _module_address = n;}

void larlight::fifo::set_module_id ( UChar_t  n  )  [inline, inherited]

Setter for the module id.

Definition at line 75 of file fifo.hh.

References larlight::fifo::_module_id.

00075 { _module_id = n;}

void larlight::fifo::set_readout_frame_number ( UInt_t  id  )  [inline, inherited]

Setter for the channel frame ID number.

Definition at line 66 of file fifo.hh.

References larlight::fifo::_readout_frame_number.

void larlight::fifo::set_readout_sample_number ( UInt_t  t  )  [inline, inherited]

Setter for the readout_sample_number number.

Definition at line 69 of file fifo.hh.

References larlight::fifo::_readout_sample_number.

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   }


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::fifo::_channel_number [protected, inherited]

Channel number.

Definition at line 116 of file fifo.hh.

Referenced by larlight::fifo::channel_number(), larlight::fifo::init_vars(), and larlight::fifo::set_channel_number().

Discriminator ID.

Definition at line 76 of file pmtfifo.hh.

Referenced by disc_id(), init_vars(), pmtfifo(), and set_disc_id().

UChar_t larlight::fifo::_module_address [protected, inherited]

Module number.

Definition at line 117 of file fifo.hh.

Referenced by larlight::fifo::init_vars(), larlight::fifo::module_address(), and larlight::fifo::set_module_address().

UChar_t larlight::fifo::_module_id [protected, inherited]

Module ID.

Definition at line 118 of file fifo.hh.

Referenced by larlight::fifo::init_vars(), larlight::fifo::module_id(), and larlight::fifo::set_module_id().

UInt_t larlight::fifo::_readout_frame_number [protected, inherited]
UInt_t larlight::fifo::_readout_sample_number [protected, inherited]

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(), pmtfifo(), larlight::pulse::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