Changeset 11360 for fact/tools/Edd
- Timestamp:
- 07/12/11 15:29:14 (14 years ago)
- Location:
- fact/tools/Edd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/Edd/Edd.cc
r11189 r11360 111 111 112 112 // Update event buffer 113 void EventScope::Update(QString Name, int Time, QByteArray Data, QString Format, QString) { 114 115 if (Name != this->Name) return; 113 void EventScope::Update(const QString &, int Time, const QByteArray &Data, const QString &Format, const QString &, int) { 116 114 117 115 // Check if service available 118 116 if (!SetStatus(this, Name, Time, Format)) return; 119 117 if (Data.size() < (int) sizeof(RunHeader)) return; 120 121 // Disconnect while processing to avoid queing of events122 disconnect(Handler, SIGNAL(YEP(QString, int, QByteArray, QString, QString)), this, SLOT(Update(QString, int, QByteArray, QString, QString)));118 119 // Ignore further data while processing this one 120 Handler->Ignore(Name, true); 123 121 124 122 // Clear temporary file and write event data to this file … … 132 130 // Open temporary raw data file 133 131 OpenRawFile(File.fileName()); 134 135 // Reconnect after processing 136 connect(Handler, SIGNAL(YEP(QString, int, QByteArray, QString, QString)), SLOT(Update(QString, int, QByteArray, QString, QString))); 132 133 134 // Process all pending events, then allow data again 135 QApplication::processEvents(); 136 Handler->Ignore(Name, false); 137 137 } 138 138 … … 191 191 192 192 // Display first event 193 NewEventNum( 0);193 NewEventNum(DAQPage->Channel->value()); 194 194 } 195 195 … … 316 316 void EventScope::SetActive(bool State) { 317 317 318 if (State && !Active) { 319 Handler->Subscribe(DRSBoard+"/EventData"); 320 connect(Handler, SIGNAL(YEP(QString, int, QByteArray, QString, QString)), SLOT(Update(QString, int, QByteArray, QString, QString))); 321 } 322 if (!State && Active) { 323 Handler->Unsubscribe(DRSBoard+"/EventData"); 324 disconnect(Handler, SIGNAL(YEP(QString, int, QByteArray, QString, QString)), this, SLOT(Update(QString, int, QByteArray, QString, QString))); 325 } 318 if (State && !Active) Handler->Subscribe(DRSBoard+"/EventData", this, -1); 319 if (!State && Active) Handler->Unsubscribe(DRSBoard+"/EventData", this); 320 326 321 Active = State; 327 322 } … … 929 924 connect(Timer, SIGNAL(timeout()), this, SLOT(CheckAlarm())); 930 925 Timer->start(5000); 931 932 // Force update of all widgets constructed (in thread for GUI responsiveness)933 QtConcurrent::run(Handler, &EddDim::ForceEmit);934 926 } 935 927 -
fact/tools/Edd/Edd.h
r11088 r11360 11 11 12 12 // Event oscilloscope 13 class EventScope: public EddBasePlot, public PixelMap {13 class EventScope: public EddBasePlot, public PixelMap, public EddWidget { 14 14 Q_OBJECT 15 15 … … 34 34 EventScope(class TP_DAQ *, QWidget * = NULL); 35 35 ~EventScope(); 36 36 37 void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int=-1); 37 38 void UpdateFirst(int, int, int); 38 39 void AddTrace(int, int, int); … … 43 44 44 45 private slots: 45 void Update(QString, int, QByteArray, QString, QString);46 46 void PlotTraces(); 47 47 void DeleteCurve(QwtPlotCurve *);
Note:
See TracChangeset
for help on using the changeset viewer.