00001 #ifndef FIFO_CC 00002 #define FIFO_CC 00003 00004 #include "tpcfifo.hh" 00005 00006 namespace larlight { 00007 00008 //*************************************************************************** 00009 tpcfifo::tpcfifo() : 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 } 00022 00023 //*************************************************************************** 00024 void tpcfifo::clear_data() 00025 //*************************************************************************** 00026 { 00027 00028 data_base::clear_data(); 00029 clear(); 00030 init_vars(); 00031 } 00032 00033 //*************************************************************************** 00034 void tpcfifo::init_vars() 00035 //*************************************************************************** 00036 { 00037 fifo::init_vars(); 00038 _plane=larlight::GEO::kUnknown; 00039 _signal=larlight::GEO::kMysteryType; 00040 } 00041 00043 00044 //*************************************************************************** 00045 event_tpcfifo::event_tpcfifo(DATA::DATA_TYPE type) : std::vector<larlight::tpcfifo>(), 00046 event_base(type) 00047 //*************************************************************************** 00048 { 00049 clear_data(); 00050 } 00051 00052 //*************************************************************************** 00053 void event_tpcfifo::clear_data(){ 00054 //*************************************************************************** 00055 event_base::clear_data(); 00056 clear(); 00057 init_vars(); 00058 } 00059 00060 //*************************************************************************** 00061 void event_tpcfifo::init_vars(){ 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 } 00071 00072 } 00073 #endif