#include <tpcfifo.hh>
Public Member Functions | |
event_tpcfifo (DATA::DATA_TYPE type=DATA::FIFO) | |
Default constructor ... provide an option to set the length of ch-wise data. | |
event_tpcfifo (const event_tpcfifo &original) | |
Default copy constructor needed to avoid memory leak in ROOT streamer. | |
~event_tpcfifo () | |
Default destructor. | |
void | set_event_number (UInt_t n) |
Setter for the evnet number. | |
void | set_event_frame_number (UInt_t n) |
Setter for the event frame number. | |
void | set_module_address (UChar_t n) |
Setter for the module address from which this event is read-out. | |
void | set_module_id (UChar_t id) |
Setter for the module ID. | |
void | set_checksum (UInt_t sum) |
Setter for the checksum. | |
void | set_nwords (UInt_t n) |
Setter for the # words read out. | |
void | set_fem_trig_frame_number (UInt_t n) |
Setter for the trigger frame id. | |
void | set_fem_trig_sample_number (UInt_t n) |
Setter for the trigger timeslice. | |
UInt_t | event_number () const |
Getter for the event number. | |
UInt_t | event_frame_number () const |
Getter for the frame ID. | |
UChar_t | module_address () const |
Getter for the module address. | |
UChar_t | module_id () const |
Getter for the module ID. | |
UInt_t | checksum () const |
Getter for the checksum. | |
UInt_t | nwords () const |
Getter for the number of read words. | |
UInt_t | fem_trig_frame_number () const |
Getter for the trigger frame number. | |
UInt_t | fem_trig_sample_number_RAW () const |
Getter for the fem trigger sample number RAW. | |
UInt_t | fem_trig_sample_number_2MHz () const |
Getter for the fem trigger sample number in 2 MHz. | |
UInt_t | fem_trig_sample_number_16MHz () const |
Getter for the fem trigger sample number in 16 MHz. | |
UInt_t | fem_trig_sample_number_64MHz () const |
Getter for the fem trigger sample number in 64 MHz. | |
virtual void | clear_data () |
A function to reset data member variables. | |
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 Member Functions | |
virtual void | init_vars () |
Protected Attributes | |
UInt_t | _event_number |
Actual implementation function of resetting variables. | |
UInt_t | _event_frame_number |
event frame ID number | |
UChar_t | _module_address |
module address number | |
UChar_t | _module_id |
module ID number | |
UInt_t | _fem_trig_frame_number |
trigger frame id | |
UInt_t | _fem_trig_sample_number |
trigger time slice | |
UInt_t | _checksum |
checksum of readout events | |
UInt_t | _nwords |
# of event words readout | |
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. |
Definition at line 95 of file tpcfifo.hh.
larlight::event_tpcfifo::event_tpcfifo | ( | DATA::DATA_TYPE | type = DATA::FIFO |
) |
Default constructor ... provide an option to set the length of ch-wise data.
Definition at line 45 of file tpcfifo.cc.
References clear_data().
00045 : std::vector<larlight::tpcfifo>(), 00046 event_base(type) 00047 //*************************************************************************** 00048 { 00049 clear_data(); 00050 }
larlight::event_tpcfifo::event_tpcfifo | ( | const event_tpcfifo & | original | ) | [inline] |
Default copy constructor needed to avoid memory leak in ROOT streamer.
Definition at line 103 of file tpcfifo.hh.
00104 : std::vector<larlight::tpcfifo>(original), 00105 event_base(original), 00106 _event_number(original._event_number), 00107 _event_frame_number(original._event_frame_number), 00108 _module_address(original._module_address), 00109 _module_id(original._module_id), 00110 _fem_trig_frame_number(original._fem_trig_frame_number), 00111 _fem_trig_sample_number(original._fem_trig_sample_number), 00112 _checksum(original._checksum), 00113 _nwords(original._nwords) 00114 {}
larlight::event_tpcfifo::~event_tpcfifo | ( | ) | [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 }
UInt_t larlight::event_tpcfifo::checksum | ( | ) | const [inline] |
Getter for the checksum.
Definition at line 156 of file tpcfifo.hh.
References _checksum.
00156 {return _checksum;}
void larlight::event_tpcfifo::clear_data | ( | ) | [virtual] |
A function to reset data member variables.
Reimplemented from larlight::event_base.
Definition at line 53 of file tpcfifo.cc.
References init_vars().
Referenced by event_tpcfifo().
00053 { 00054 //*************************************************************************** 00055 event_base::clear_data(); 00056 clear(); 00057 init_vars(); 00058 }
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_tpcfifo::event_frame_number | ( | ) | const [inline] |
Getter for the frame ID.
Definition at line 147 of file tpcfifo.hh.
References _event_frame_number.
00147 {return _event_frame_number;}
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; }
UInt_t larlight::event_tpcfifo::event_number | ( | ) | const [inline] |
Getter for the event number.
Definition at line 144 of file tpcfifo.hh.
References _event_number.
00144 { return _event_number;}
UInt_t larlight::event_tpcfifo::fem_trig_frame_number | ( | ) | const [inline] |
Getter for the trigger frame number.
Definition at line 162 of file tpcfifo.hh.
References _fem_trig_frame_number.
00162 {return _fem_trig_frame_number;}
UInt_t larlight::event_tpcfifo::fem_trig_sample_number_16MHz | ( | ) | const [inline] |
Getter for the fem trigger sample number in 16 MHz.
Definition at line 171 of file tpcfifo.hh.
References _fem_trig_sample_number.
00171 {return _fem_trig_sample_number*8;}
UInt_t larlight::event_tpcfifo::fem_trig_sample_number_2MHz | ( | ) | const [inline] |
Getter for the fem trigger sample number in 2 MHz.
Definition at line 168 of file tpcfifo.hh.
References _fem_trig_sample_number.
00168 {return _fem_trig_sample_number;}
UInt_t larlight::event_tpcfifo::fem_trig_sample_number_64MHz | ( | ) | const [inline] |
Getter for the fem trigger sample number in 64 MHz.
Definition at line 174 of file tpcfifo.hh.
References _fem_trig_sample_number.
00174 {return _fem_trig_sample_number*32;}
UInt_t larlight::event_tpcfifo::fem_trig_sample_number_RAW | ( | ) | const [inline] |
Getter for the fem trigger sample number RAW.
Definition at line 165 of file tpcfifo.hh.
References _fem_trig_sample_number.
00165 {return _fem_trig_sample_number;}
void larlight::event_tpcfifo::init_vars | ( | ) | [protected, virtual] |
Definition at line 61 of file tpcfifo.cc.
References _checksum, _event_frame_number, _fem_trig_frame_number, _fem_trig_sample_number, _module_address, _module_id, _nwords, larlight::DATA::INVALID_UCHAR, and larlight::FEM::INVALID_WORD.
Referenced by clear_data().
00061 { 00062 //*************************************************************************** 00063 _event_frame_number=FEM::INVALID_WORD; 00064 _module_address=DATA::INVALID_UCHAR; 00065 _module_id=DATA::INVALID_UCHAR; 00066 _checksum=FEM::INVALID_WORD; 00067 _nwords=FEM::INVALID_WORD; 00068 _fem_trig_frame_number=FEM::INVALID_WORD; 00069 _fem_trig_sample_number=FEM::INVALID_WORD; 00070 }
UChar_t larlight::event_tpcfifo::module_address | ( | ) | const [inline] |
Getter for the module address.
Definition at line 150 of file tpcfifo.hh.
References _module_address.
00150 {return _module_address;}
UChar_t larlight::event_tpcfifo::module_id | ( | ) | const [inline] |
Getter for the module ID.
Definition at line 153 of file tpcfifo.hh.
References _module_id.
00153 {return _module_id;}
UInt_t larlight::event_tpcfifo::nwords | ( | ) | const [inline] |
Getter for the number of read words.
Definition at line 159 of file tpcfifo.hh.
References _nwords.
00159 {return _nwords;}
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_tpcfifo::set_checksum | ( | UInt_t | sum | ) | [inline] |
Setter for the checksum.
Definition at line 132 of file tpcfifo.hh.
References _checksum.
00132 {_checksum=sum;}
void larlight::event_tpcfifo::set_event_frame_number | ( | UInt_t | n | ) | [inline] |
Setter for the event frame number.
Definition at line 123 of file tpcfifo.hh.
References _event_frame_number.
00123 {_event_frame_number=n;}
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_tpcfifo::set_event_number | ( | UInt_t | n | ) | [inline] |
Setter for the evnet number.
Definition at line 120 of file tpcfifo.hh.
References _event_number.
00120 { _event_number = n; }
void larlight::event_tpcfifo::set_fem_trig_frame_number | ( | UInt_t | n | ) | [inline] |
Setter for the trigger frame id.
Definition at line 138 of file tpcfifo.hh.
References _fem_trig_frame_number.
00138 {_fem_trig_frame_number=n;}
void larlight::event_tpcfifo::set_fem_trig_sample_number | ( | UInt_t | n | ) | [inline] |
Setter for the trigger timeslice.
Definition at line 141 of file tpcfifo.hh.
References _fem_trig_sample_number.
00141 {_fem_trig_sample_number=n;}
void larlight::event_tpcfifo::set_module_address | ( | UChar_t | n | ) | [inline] |
Setter for the module address from which this event is read-out.
Definition at line 126 of file tpcfifo.hh.
References _module_address.
00126 {_module_address=n;}
void larlight::event_tpcfifo::set_module_id | ( | UChar_t | id | ) | [inline] |
Setter for the module ID.
Definition at line 129 of file tpcfifo.hh.
References _module_id.
00129 {_module_id=id;}
void larlight::event_tpcfifo::set_nwords | ( | UInt_t | n | ) | [inline] |
Setter for the # words read out.
Definition at line 135 of file tpcfifo.hh.
References _nwords.
00135 {_nwords=n;}
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().
UInt_t larlight::event_tpcfifo::_checksum [protected] |
checksum of readout events
Definition at line 192 of file tpcfifo.hh.
Referenced by checksum(), init_vars(), and set_checksum().
UInt_t larlight::event_tpcfifo::_event_frame_number [protected] |
event frame ID number
Definition at line 185 of file tpcfifo.hh.
Referenced by event_frame_number(), init_vars(), and set_event_frame_number().
UInt_t larlight::event_tpcfifo::_event_number [protected] |
Actual implementation function of resetting variables.
event number counter
Definition at line 184 of file tpcfifo.hh.
Referenced by event_number(), and set_event_number().
UInt_t larlight::event_tpcfifo::_fem_trig_frame_number [protected] |
trigger frame id
Definition at line 189 of file tpcfifo.hh.
Referenced by fem_trig_frame_number(), init_vars(), and set_fem_trig_frame_number().
UInt_t larlight::event_tpcfifo::_fem_trig_sample_number [protected] |
trigger time slice
Definition at line 190 of file tpcfifo.hh.
Referenced by fem_trig_sample_number_16MHz(), fem_trig_sample_number_2MHz(), fem_trig_sample_number_64MHz(), fem_trig_sample_number_RAW(), init_vars(), and set_fem_trig_sample_number().
UChar_t larlight::event_tpcfifo::_module_address [protected] |
module address number
Definition at line 186 of file tpcfifo.hh.
Referenced by init_vars(), module_address(), and set_module_address().
UChar_t larlight::event_tpcfifo::_module_id [protected] |
module ID number
Definition at line 187 of file tpcfifo.hh.
Referenced by init_vars(), module_id(), and set_module_id().
UInt_t larlight::event_tpcfifo::_nwords [protected] |
# of event words readout
Definition at line 193 of file tpcfifo.hh.
Referenced by init_vars(), nwords(), and set_nwords().
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 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().