A collection storage class of multiple tracks. More...
#include <track.hh>
Public Member Functions | |
event_track (DATA::DATA_TYPE type=DATA::Track) | |
Default constructor. | |
event_track (const event_track &original) | |
Default copy constructor. | |
~event_track () | |
Default destructor. | |
virtual void | clear_data () |
Method to clear currently held data contents in the buffer. | |
void | get_axis_range (Double_t &max, Double_t &min, const Int_t axis) const |
A utility function to obtain maximum & minimum of spacepoints' vertex along the specified axis. | |
void | get_axis_range (Double_t &xmax, Double_t &xmin, Double_t &ymax, Double_t &ymin, Double_t &zmax, Double_t &zmin) const |
A utility function to obtain maximum & minimum of spacepoints' vertex along all axis. | |
void | set_run (UInt_t run) |
run number setter | |
void | set_subrun (UInt_t run) |
sub-run number setter | |
void | set_event_id (UInt_t id) |
event-id setter | |
UInt_t | run () const |
run number getter | |
UInt_t | subrun () const |
sub-run number getter | |
UInt_t | event_id () const |
event-id getter | |
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 | |
UInt_t | fRunNumber |
Run number. | |
UInt_t | fSubRunNumber |
Sub-Run number. | |
UInt_t | fEventID |
Event 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. |
A collection storage class of multiple tracks.
Definition at line 119 of file track.hh.
larlight::event_track::event_track | ( | DATA::DATA_TYPE | type = DATA::Track |
) |
Default constructor.
Definition at line 101 of file track.cc.
References larlight::data_base::_type, larlight::DATA::Bezier, clear_data(), larlight::DATA::DATA_TREE_NAME, larlight::MSG::ERROR, larlight::DATA::Kalman3DHit, larlight::DATA::Kalman3DSPS, larlight::Message::send(), and larlight::DATA::Track.
00101 : std::vector<larlight::track>(), 00102 event_base(type) 00103 { 00104 if( _type != DATA::Track && 00105 _type != DATA::Bezier && 00106 _type != DATA::Kalman3DSPS && 00107 _type != DATA::Kalman3DHit ) { 00108 00109 Message::send(MSG::ERROR,__FUNCTION__, 00110 Form("Provided data type (%s) not supported! Reset to default.",DATA::DATA_TREE_NAME[_type].c_str())); 00111 00112 _type = DATA::Track; 00113 00114 } 00115 00116 clear_data(); 00117 }
larlight::event_track::event_track | ( | const event_track & | original | ) | [inline] |
Default copy constructor.
Definition at line 127 of file track.hh.
00127 : std::vector<larlight::track>(original), 00128 event_base(original) 00129 {}
larlight::event_track::~event_track | ( | ) | [inline] |
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 }
virtual void larlight::event_track::clear_data | ( | ) | [inline, virtual] |
Method to clear currently held data contents in the buffer.
Reimplemented from larlight::event_base.
Definition at line 135 of file track.hh.
Referenced by event_track().
00135 {event_base::clear_data(); clear();}
DATA::DATA_TYPE larlight::event_base::data_type | ( | ) | const [inline, inherited] |
data type getter
Reimplemented from larlight::data_base.
Definition at line 112 of file data_base.hh.
References larlight::data_base::_type.
00112 {return _type; }
UInt_t larlight::event_base::event_id | ( | ) | const [inline, inherited] |
event-id getter
Definition at line 110 of file data_base.hh.
References larlight::event_base::fEventID.
Referenced by main(), and larlight::storage_manager::read_event().
00110 { return fEventID; }
void larlight::event_track::get_axis_range | ( | Double_t & | xmax, | |
Double_t & | xmin, | |||
Double_t & | ymax, | |||
Double_t & | ymin, | |||
Double_t & | zmax, | |||
Double_t & | zmin | |||
) | const |
A utility function to obtain maximum & minimum of spacepoints' vertex along all axis.
NOTE: the initial max/min values matter. It only modifies max/min if it finds values that is above/below those initial values.
void larlight::event_track::get_axis_range | ( | Double_t & | max, | |
Double_t & | min, | |||
const Int_t | axis | |||
) | const |
A utility function to obtain maximum & minimum of spacepoints' vertex along the specified axis.
NOTE: the initial max/min values matter. It only modifies max/min if it finds values that is above/below those initial values.
Definition at line 120 of file track.cc.
References larlight::MSG::ERROR, larlight::Message::get(), and larlight::Message::send().
00122 { 00123 00124 if(axis < 0 || axis>2) { 00125 00126 Message::get()->send(MSG::ERROR,__FUNCTION__,Form("Invalid axis index: %d",axis)); 00127 00128 return; 00129 00130 } 00131 00132 for(size_t i=0; i<this->size(); ++i) 00133 00134 this->at(i).get_axis_range(max,min,axis); 00135 00136 return; 00137 }
UInt_t larlight::event_base::run | ( | ) | const [inline, inherited] |
run number getter
Definition at line 106 of file data_base.hh.
References larlight::event_base::fRunNumber.
00106 { return fRunNumber; }
void larlight::event_base::set_event_id | ( | UInt_t | id | ) | [inline, inherited] |
event-id setter
Definition at line 103 of file data_base.hh.
References larlight::event_base::fEventID.
Referenced by main().
00103 { fEventID = id; }
void larlight::event_base::set_run | ( | UInt_t | run | ) | [inline, inherited] |
run number setter
Definition at line 99 of file data_base.hh.
References larlight::event_base::fRunNumber.
Referenced by main().
00099 { fRunNumber = run; }
void larlight::event_base::set_subrun | ( | UInt_t | run | ) | [inline, inherited] |
sub-run number setter
Definition at line 101 of file data_base.hh.
References larlight::event_base::fSubRunNumber.
Referenced by main().
00101 { fSubRunNumber = run; }
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().
UInt_t larlight::event_base::subrun | ( | ) | const [inline, inherited] |
sub-run number getter
Definition at line 108 of file data_base.hh.
References larlight::event_base::fSubRunNumber.
00108 { return fSubRunNumber; }
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(), 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 larlight::wire::wire().
UInt_t larlight::event_base::fEventID [protected, inherited] |
Event ID.
Definition at line 123 of file data_base.hh.
Referenced by larlight::event_base::clear_data(), larlight::event_base::event_id(), and larlight::event_base::set_event_id().
UInt_t larlight::event_base::fRunNumber [protected, inherited] |
Run number.
Definition at line 117 of file data_base.hh.
Referenced by larlight::event_base::clear_data(), larlight::event_base::run(), and larlight::event_base::set_run().
UInt_t larlight::event_base::fSubRunNumber [protected, inherited] |
Sub-Run number.
Definition at line 120 of file data_base.hh.
Referenced by larlight::event_base::clear_data(), larlight::event_base::set_subrun(), and larlight::event_base::subrun().