pulse_info.cc

Go to the documentation of this file.
00001 #ifndef PULSE_INFO_CC
00002 #define PULSE_INFO_CC
00003 
00004 #include "pulse_info.hh"
00005 
00006 void pulse_info::clear_data() {
00007 
00008   _channel_number=PMT::INVALID_CH;
00009   _ped_mean=-1;
00010   _ped_rms=-1;
00011   _charge=-1;
00012   _start_time=-1;
00013   _start_time_reco=-1;
00014   _end_time=-1;
00015   _max_time=-1;
00016 
00017 }
00018 
00020 
00021 void pulse_collection::clear_data(){
00022 
00023   clear();
00024   _sum_charge=-1;
00025   _sum_peak=-1;
00026   _npulse=0;
00027 
00028 }
00029 
00030 void pulse_collection::calculate_sum(){
00031 
00032   std::vector<pulse_info>::const_iterator iter(this->begin());
00033   _sum_charge=0;
00034   _sum_peak=0;
00035   _npulse=0;
00036   while(iter!=this->end()){
00037 
00038     _sum_charge+=(*iter).charge();
00039     _sum_peak+=(*iter).pulse_peak();
00040     _npulse++;
00041   }
00042 
00043 }
00044 
00045 #endif 

Generated on Mon Apr 7 15:35:12 2014 for MyProject by  doxygen 1.4.7