00001 #ifndef ISNOISEOCCUPANCYSUMMARYDATA_H 00002 #define ISNOISEOCCUPANCYSUMMARYDATA_H 00003 00004 #include <ISSummaryData.h> 00005 00006 #include <string> 00007 00008 00009 // <<BeginUserCode>> 00010 00011 // <<EndUserCode>> 00019 class ISNoiseOccupancySummaryData : public ISSummaryData { 00020 public: 00021 00025 double * offsetByChip; 00029 size_t offsetByChip_size; 00030 00034 double * occupancyByChip; 00038 size_t occupancyByChip_size; 00039 00043 double * occupancyRMSByChip; 00047 size_t occupancyRMSByChip_size; 00048 00052 double * noiseByChip; 00056 size_t noiseByChip_size; 00057 00061 unsigned long version; 00062 00063 00064 static const ISType & type() { 00065 static const ISType type_ = ISNoiseOccupancySummaryData( ).ISInfo::type(); 00066 return type_; 00067 } 00068 00069 ISNoiseOccupancySummaryData( ) 00070 : ISSummaryData( "ISNoiseOccupancySummaryData" ) 00071 { 00072 initialize(); 00073 } 00074 00075 ~ISNoiseOccupancySummaryData(){ 00076 if ( offsetByChip_size != 0 ) delete[] offsetByChip; 00077 if ( occupancyByChip_size != 0 ) delete[] occupancyByChip; 00078 if ( occupancyRMSByChip_size != 0 ) delete[] occupancyRMSByChip; 00079 if ( noiseByChip_size != 0 ) delete[] noiseByChip; 00080 00081 // <<BeginUserCode>> 00082 00083 // <<EndUserCode>> 00084 } 00085 00086 protected: 00087 ISNoiseOccupancySummaryData( const std::string & type ) 00088 : ISSummaryData( type ) 00089 { 00090 initialize(); 00091 } 00092 00093 void publishGuts( ISostream & out ){ 00094 ISSummaryData::publishGuts( out ); 00095 out.put( offsetByChip, offsetByChip_size ); 00096 out.put( occupancyByChip, occupancyByChip_size ); 00097 out.put( occupancyRMSByChip, occupancyRMSByChip_size ); 00098 out.put( noiseByChip, noiseByChip_size ); 00099 out << version; 00100 } 00101 00102 void refreshGuts( ISistream & in ){ 00103 ISSummaryData::refreshGuts( in ); 00104 if ( offsetByChip_size != 0 ) delete[] offsetByChip; 00105 in.get( &offsetByChip, offsetByChip_size ); 00106 if ( occupancyByChip_size != 0 ) delete[] occupancyByChip; 00107 in.get( &occupancyByChip, occupancyByChip_size ); 00108 if ( occupancyRMSByChip_size != 0 ) delete[] occupancyRMSByChip; 00109 in.get( &occupancyRMSByChip, occupancyRMSByChip_size ); 00110 if ( noiseByChip_size != 0 ) delete[] noiseByChip; 00111 in.get( &noiseByChip, noiseByChip_size ); 00112 in >> version; 00113 } 00114 00115 private: 00116 void initialize() 00117 { 00118 offsetByChip_size = 0; 00119 occupancyByChip_size = 0; 00120 occupancyRMSByChip_size = 0; 00121 noiseByChip_size = 0; 00122 version = 1; 00123 00124 // <<BeginUserCode>> 00125 00126 // <<EndUserCode>> 00127 } 00128 00129 00130 // <<BeginUserCode>> 00131 00132 // <<EndUserCode>> 00133 }; 00134 00135 // <<BeginUserCode>> 00136 00137 // <<EndUserCode>> 00138 #endif // ISNOISEOCCUPANCYSUMMARYDATA_H