TV792Data.cxx
Go to the documentation of this file.00001 #include "TV792Data.hxx"
00002
00003
00004
00005 TV792Data::TV792Data(int bklen, int bktype, const char* name, void *pdata):
00006 TGenericData(bklen, bktype, name, pdata)
00007 {
00008
00009 fAdc_header_word = 0;
00010 fAdc_trailer_word = 0;
00011
00012 for(int i = 0; i < GetSize(); i++){
00013
00014 uint32_t word = GetData32()[i];
00015 if((word & 0x07000000) == 0x02000000){
00016 fAdc_header_word = word;
00017 }
00018
00019
00020 if((word & 0x07000000) == 0x00000000)
00021 fMeasurements.push_back(VADCMeasurement(fAdc_header_word,word));
00022
00023 if((word & 0x07000000) == 0x04000000)
00024 fAdc_trailer_word = word;
00025
00026
00027 }
00028
00029 }
00030
00031 void TV792Data::Print(){
00032
00033 std::cout << "V792 decoder for bank " << GetName().c_str() << std::endl;
00034
00035 std::cout << "Geo-Add = " << GetGeoAddress() << ", crate number = " << GetCrate()
00036 << ", Number of channels= " << GetNumberChannels() << ", event counter = "
00037 << GetEventCounter() << std::endl;
00038 for(int i = 0; i < fMeasurements.size(); i++){
00039 std::cout << "chan " << fMeasurements[i].GetChannel()
00040 << " meas = " << fMeasurements[i].GetMeasurement() << " " ;
00041 std::cout << " [UN/OV=" << fMeasurements[i].IsUnderThreshold() << "/" << fMeasurements[i].IsOverFlow() << "], ";
00042
00043 if((i-2)%3 == 0) std::cout << std::endl;
00044
00045 }
00046 std::cout << std::endl;
00047
00048
00049
00050 }