00001 #ifndef FIFO_CC 00002 #define FIFO_CC 00003 00004 #include "pmtfifo.hh" 00005 00006 namespace larlight { 00007 00008 //*************************************************************************** 00009 pmtfifo::pmtfifo() : 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 } 00021 00022 //*************************************************************************** 00023 void pmtfifo::clear_data() 00024 //*************************************************************************** 00025 { 00026 00027 data_base::clear_data(); 00028 clear(); 00029 init_vars(); 00030 } 00031 00032 //*************************************************************************** 00033 void pmtfifo::init_vars() 00034 //*************************************************************************** 00035 { 00036 fifo::init_vars(); 00037 _disc_id=FEM::DISC_MAX; 00038 } 00039 00041 00042 //*************************************************************************** 00043 event_pmtfifo::event_pmtfifo(DATA::DATA_TYPE type) : std::vector<larlight::pmtfifo>(), 00044 event_base(type) 00045 //*************************************************************************** 00046 { 00047 clear_data(); 00048 } 00049 00050 //*************************************************************************** 00051 void event_pmtfifo::clear_data(){ 00052 //*************************************************************************** 00053 event_base::clear_data(); 00054 clear(); 00055 init_vars(); 00056 } 00057 00058 //*************************************************************************** 00059 void event_pmtfifo::init_vars(){ 00060 //*************************************************************************** 00061 _event_frame_number=FEM::INVALID_WORD; 00062 _module_address=DATA::INVALID_UCHAR; 00063 _module_id=DATA::INVALID_UCHAR; 00064 _checksum=FEM::INVALID_WORD; 00065 _nwords=FEM::INVALID_WORD; 00066 _fem_trig_frame_number=FEM::INVALID_WORD; 00067 _fem_trig_sample_number=FEM::INVALID_WORD; 00068 } 00069 00070 } 00071 #endif