00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _OCS_RECEIVER_SUBSYSTEM_HH_
00015 #define _OCS_RECEIVER_SUBSYSTEM_HH_
00016
00017 #include "ocsOptSignal.hh"
00018
00019 #include "ocsOptFilter.hh"
00020 #include "ocsOptDemuxer.hh"
00021 #include "ocsPhotodetector.hh"
00022 #include "ocsElecFilter.hh"
00023 #include "ocsHistogram2D.hh"
00024 #include "ocsElecSignalStat.hh"
00025 #include "PostDispComp.hh"
00026 #include "ocsOptDataWriter.hh"
00027
00028
00029 class ReceiverSubsystem
00030 {
00031
00032
00033
00034 public:
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 ReceiverSubsystem();
00078
00079 ReceiverSubsystem(OptSignal * WDMSignal,RanNumGen *RNG2,
00080 string InDir, string Job2,
00081 int DemuxChannArrayIndex2,OptDataWriter * DataWriter2);
00082
00083
00084
00085
00086 ReceiverSubsystem(OptSignal *WDMSignal,
00087 int DemuxChannArrayIndex2,
00088 string OptFilterFileName,
00089 string ElecFilterFileName,
00090 string PhotodetectorFileName,
00091 string ElecSignalStatFileName);
00092
00093 void ReceiverSubsystemInit(OptSignal * WDMSignal,RanNumGen *RNG2,
00094 string InDir, string Job2,
00095 int DemuxChannArrayIndex2, OptDataWriter * DataWriter2);
00096
00097
00098
00099
00100 void ReceiverSubsystemInit(OptSignal * WDMSignal,RanNumGen *RNG2,
00101 string InDir, string Job2,
00102 int DemuxChannArrayIndex2,
00103 OptDataWriter * DataWriter2,
00104 string PostDispCompFileNameSuffix2,
00105 fftPowerMatrices & sfftPM2,
00106 fftPowerMatrices & WorksfftPM2,
00107 OptSignal * GlobalSCSignal,
00108 OptSpectrumAnalyzer * PowerMeter2,
00109 OptDemuxer *Demuxer2,
00110 cplx * MeasuredFilterFreq);
00111
00112 void SetReceiverMapNumber(int Value) { RecMapNum = Value;};
00113
00114
00115 void InitSimplifiedReceiver(OptSignal *WDMSignal,
00116 int DemuxChannArrayIndex2,
00117 string OptFilterFileName,
00118 string ElecFilterFileName,
00119 string PhotodetectorFileName,
00120 string ElecSignalStatFileName);
00121
00122 ~ReceiverSubsystem();
00123
00124 void ReceiveSignalBackToBack(OptSignal * WDMSignal);
00125
00126 void ReceiveSignal(OptSignal * WDMSignal, int UpdateIvansEDFlag,
00127 int OutputPD_DataFlag,int ExptNum,int MapNum,
00128 double PropagatedLength2);
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 void PostProcessReceiverStats(int ExptNum,int MapNum,int AppendFlag);
00142 void WriteStats(int ExptNum, int MapNum, int AppendFlag);
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153 void ReceiveSingleChannel(void);
00154 void ReceiveSingleChannel(int DemuxChannelArrayIndex2);
00155 void DemultiplexSingleChannnel(int DemuxChannArrayIndex2);
00156 void ReceivePreviouslyDemultiplexedSingleChannnel(void);
00157
00158
00159
00160 void ReceiveSignalBackToBackCenterFreq(
00161 OptSignal * WDMSignal,
00162 double CenterFreqOptFilter,
00163 BitString *SCBitString,
00164 bool OutputEye,
00165 bool DoDemuxFilter);
00166
00167 void ReceiveSignalCenterFreq(OptSignal * WDMSignal,
00168 double PropagatedLength2,
00169 int MapNum,
00170 double CenterFreqOptFilter,
00171 BitString *SCBitString,
00172 bool OutputEye,
00173 bool DoDemuxFilter);
00174
00175
00176 void WriteStatsCenterFreq(int MapNum,bool AppendFlag);
00177
00178
00179
00180 public:
00181
00182 OptFilter * TunableFilter;
00183 OptDemuxer *oOptDemuxer;
00184 OptSignal * SCSignal;
00185 OptFilter * oOptFilter;
00186 OptFilter * oOptFilterPD;
00187 Photodetector * oPhotodetector;
00188 ElecFilter * oElecFilter;
00189 ElecSignalStat * oElecSignalStat;
00190 Histogram2D *RonEyeDiagram;
00191 PostDispCompSubSystem *oPostDispComp;
00192 OptDataWriter * DataWriter;
00193
00194 private:
00195 OptSignal *WDM_OrigSignal;
00196 int FlagSimplifiedReceiver;
00197 int DemuxChannArrayIndex;
00198 string Job;
00199 int ObjectInitialized;
00200 double PropagatedLength;
00201
00202 int RecMapNum;
00203 string PostDispCompFileNameSuffix;
00204
00205 };
00206
00207
00208
00209 #endif
00210
00211
00212
00213