LArSoft Wire class equivalent data container. More...
#include <wire.hh>
Public Member Functions | |
wire (DATA::DATA_TYPE type=DATA::Wire) | |
Default constructor. | |
wire (const std::vector< Float_t > wf, const UInt_t ch, const GEO::View_t view, const GEO::SigType_t sig) | |
Alternative constructor. | |
wire (const wire &original) | |
Copy constructor. | |
virtual | ~wire () |
Default destructor. | |
void | clear_data () |
Clear method. | |
void | set_signal (const std::vector< Float_t > wf) |
Setter for an waveform. | |
void | set_channel (UInt_t ch) |
Setter for a channel number. | |
void | set_view (GEO::View_t v) |
Setter for view type. | |
void | set_sigtype (GEO::SigType_t s) |
Setter for signal type. | |
const std::vector< Float_t > & | Signal () const |
Getter for waveform. | |
GEO::View_t | View () const |
Getter for view type. | |
GEO::SigType_t | SignalType () const |
Getter for signal type. | |
UInt_t | Channel () const |
Getter for channel number. | |
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 Attributes | |
std::vector< Float_t > | fSignal |
the calibrated signal waveform | |
GEO::View_t | fView |
view corresponding to the plane of this wire | |
GEO::SigType_t | fSignalType |
signal type of the plane for this wire | |
UInt_t | fChannel |
channel 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. |
LArSoft Wire class equivalent data container.
Definition at line 25 of file wire.hh.
larlight::wire::wire | ( | DATA::DATA_TYPE | type = DATA::Wire |
) |
Default constructor.
Definition at line 9 of file wire.cc.
References larlight::data_base::_type, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::Message::send(), and larlight::DATA::Wire.
00009 : data_base(type), 00010 fSignal() 00011 //*************************************************** 00012 { 00013 if(_type!=DATA::Wire) { 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 00018 _type=DATA::Wire; 00019 } 00020 00021 clear_data(); 00022 }
larlight::wire::wire | ( | const std::vector< Float_t > | wf, | |
const UInt_t | ch, | |||
const GEO::View_t | view, | |||
const GEO::SigType_t | sig | |||
) | [inline] |
Alternative constructor.
Definition at line 33 of file wire.hh.
00037 : data_base(DATA::Wire), 00038 fSignal(wf), 00039 fView(view), 00040 fSignalType(sig), 00041 fChannel(ch) 00042 {};
larlight::wire::wire | ( | const wire & | original | ) | [inline] |
virtual larlight::wire::~wire | ( | ) | [inline, virtual] |
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.
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 }
UInt_t larlight::wire::Channel | ( | ) | const [inline] |
void larlight::wire::clear_data | ( | ) | [virtual] |
Clear method.
Reimplemented from larlight::data_base.
Definition at line 25 of file wire.cc.
References fChannel, fSignal, fSignalType, fView, larlight::GEO::kMysteryType, and larlight::GEO::kUnknown.
Referenced by wire().
00027 { 00028 fSignal.clear(); 00029 fView = GEO::kUnknown; 00030 fSignalType = GEO::kMysteryType; 00031 fChannel = 0xffffffff; 00032 }
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::wire::set_channel | ( | UInt_t | ch | ) | [inline] |
void larlight::wire::set_signal | ( | const std::vector< Float_t > | wf | ) | [inline] |
void larlight::wire::set_sigtype | ( | GEO::SigType_t | s | ) | [inline] |
Setter for signal type.
Definition at line 64 of file wire.hh.
References fSignalType.
00064 { fSignalType = s; }
void larlight::wire::set_view | ( | GEO::View_t | v | ) | [inline] |
const std::vector<Float_t>& larlight::wire::Signal | ( | ) | const [inline] |
GEO::SigType_t larlight::wire::SignalType | ( | ) | const [inline] |
Getter for signal type.
Definition at line 72 of file wire.hh.
References fSignalType.
00072 { return fSignalType; }
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().
GEO::View_t larlight::wire::View | ( | ) | const [inline] |
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().
DATA::DATA_TYPE larlight::data_base::_type [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(), 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(), larlight::tpcfifo::tpcfifo(), larlight::track::track(), larlight::trigger::trigger(), larlight::user_info::user_info(), larlight::vertex::vertex(), and wire().
UInt_t larlight::wire::fChannel [protected] |
channel number
Definition at line 81 of file wire.hh.
Referenced by Channel(), clear_data(), and set_channel().
std::vector<Float_t> larlight::wire::fSignal [protected] |
the calibrated signal waveform
Definition at line 78 of file wire.hh.
Referenced by clear_data(), set_signal(), and Signal().
GEO::SigType_t larlight::wire::fSignalType [protected] |
signal type of the plane for this wire
Definition at line 80 of file wire.hh.
Referenced by clear_data(), set_sigtype(), and SignalType().
GEO::View_t larlight::wire::fView [protected] |
view corresponding to the plane of this wire
Definition at line 79 of file wire.hh.
Referenced by clear_data(), set_view(), and View().