larlight::tpcfifo Class Reference

#include <tpcfifo.hh>

Inheritance diagram for larlight::tpcfifo:
larlight::fifo larlight::data_base

List of all members.

Public Member Functions

 tpcfifo ()
 Default constructor.
 tpcfifo (const tpcfifo &original)
 Default copy constructor.
 tpcfifo (UShort_t ch, UInt_t frame, UInt_t sample, UChar_t module_address, UChar_t module_id, larlight::GEO::View_t plane, larlight::GEO::SigType_t signaltype, DATA::DATA_TYPE type, std::vector< UShort_t > wf)
 Fast vector copy constructor.
void set_plane (larlight::GEO::View_t plane)
 plane info setter
void set_signal (larlight::GEO::SigType_t signal)
 signal type setter
larlight::GEO::View_t plane () const
 plane info getter
larlight::GEO::SigType_t signal () const
 signal type getter
virtual void clear_data ()
 Method to clear currently held data contents in the buffer.
 ~tpcfifo ()
 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

larlight::GEO::View_t _plane
 Plane Projection.
larlight::GEO::SigType_t _signal
 Signal Type.
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

Definition at line 27 of file tpcfifo.hh.


Constructor & Destructor Documentation

larlight::tpcfifo::tpcfifo (  ) 

Default constructor.

Definition at line 9 of file tpcfifo.cc.

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

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

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

Default copy constructor.

Definition at line 35 of file tpcfifo.hh.

References _plane, and _signal.

00036       : fifo::fifo(original)
00037     { _plane = original._plane ; _signal = original._signal; }

larlight::tpcfifo::tpcfifo ( UShort_t  ch,
UInt_t  frame,
UInt_t  sample,
UChar_t  module_address,
UChar_t  module_id,
larlight::GEO::View_t  plane,
larlight::GEO::SigType_t  signaltype,
DATA::DATA_TYPE  type,
std::vector< UShort_t >  wf 
) [inline]

Fast vector copy constructor.

Definition at line 40 of file tpcfifo.hh.

References _plane, and _signal.

00048                                 : fifo::fifo(ch,
00049                            frame,
00050                            sample,
00051                            module_address,
00052                            module_id,
00053                            type,
00054                            wf)
00055     { _plane = plane;  _signal = signaltype; }

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

Default destructor.

Definition at line 74 of file tpcfifo.hh.

00074 {}


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::tpcfifo::clear_data (  )  [virtual]

Method to clear currently held data contents in the buffer.

Reimplemented from larlight::fifo.

Definition at line 24 of file tpcfifo.cc.

References init_vars().

Referenced by tpcfifo().

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

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; }

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

Internal function to reset variables.

Reimplemented from larlight::fifo.

Definition at line 34 of file tpcfifo.cc.

References _plane, _signal, larlight::GEO::kMysteryType, and larlight::GEO::kUnknown.

Referenced by clear_data().

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;}

larlight::GEO::View_t larlight::tpcfifo::plane (  )  const [inline]

plane info getter

Definition at line 65 of file tpcfifo.hh.

References _plane.

00065 { return _plane; }

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::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::tpcfifo::set_plane ( larlight::GEO::View_t  plane  )  [inline]

plane info setter

Definition at line 59 of file tpcfifo.hh.

References _plane.

00059 { _plane=plane;}

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.

void larlight::tpcfifo::set_signal ( larlight::GEO::SigType_t  signal  )  [inline]

signal type setter

Definition at line 62 of file tpcfifo.hh.

References _signal.

00062 { _signal=signal;}

larlight::GEO::SigType_t larlight::tpcfifo::signal (  )  const [inline]

signal type getter

Definition at line 68 of file tpcfifo.hh.

References _signal.

00068 {return _signal; }

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().

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().

Plane Projection.

Definition at line 82 of file tpcfifo.hh.

Referenced by init_vars(), plane(), set_plane(), and tpcfifo().

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

Signal Type.

Definition at line 83 of file tpcfifo.hh.

Referenced by init_vars(), set_signal(), signal(), and tpcfifo().

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(), 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(), 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