Changeset 2466 for trunk/MagicSoft
- Timestamp:
- 11/04/03 13:47:39 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2465 r2466 30 30 * mimage/MImgCleanStd.cc, mimage/MImgCleanTGB.cc: 31 31 - directly use MGeomCam::GetPixRatioSqrt() now 32 33 * mraw/MRawSocketRead.cc: 34 - updated comment header 35 - updated class description 36 - removed obsolete fMutex, Lock() and UnLock() 37 - moved code from Do() to Process() 38 - added comments 32 39 33 40 -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r2458 r2466 58 58 #include <TGraph.h> 59 59 #include <TArrayC.h> 60 #include <TVirtualPad.h> 60 61 61 62 #include "MLog.h" … … 213 214 // <index> The pixel with the given index is drawn 214 215 // 215 #include <TVirtualPad.h>216 216 void MRawEvtData::Draw(Option_t *opt) 217 217 { -
trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc
r2386 r2466 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de>19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 118 ! Author(s): Thomas Bretz, 10/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! 20 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! 22 22 ! … … 24 24 25 25 ////////////////////////////////////////////////////////////////////////////// 26 // //27 // MRawSocketRead //28 // //29 // This tasks reads the raw binary file like specified in the TDAS??? //30 // and writes the data in the corresponding containers which are //31 // either retrieved from the parameter list or created and added. //32 // //33 // Input Containers: //34 // -/- //35 // //36 // Output Containers: //37 // MRawRunHeader, MRawEvtHeader, MRawEvtData, MRawCrateArray, MRawEvtTime //38 // //26 // 27 // MRawSocketRead 28 // 29 // This tasks reads the raw binary file like specified in the TDAS??? 30 // and writes the data in the corresponding containers which are 31 // either retrieved from the parameter list or created and added. 32 // 33 // Input Containers: 34 // -/- 35 // 36 // Output Containers: 37 // MRawRunHeader, MRawEvtHeader, MRawEvtData, MRawCrateArray, MRawEvtTime 38 // 39 39 ////////////////////////////////////////////////////////////////////////////// 40 40 #include "MRawSocketRead.h" 41 41 42 #include < TMutex.h>42 #include <stdlib.h> // atoi 43 43 44 44 #include "MReadSocket.h" … … 58 58 #include "MRawCrateArray.h" 59 59 60 //#include "../mmain/MStatusDisplay.h" 61 60 62 ClassImp(MRawSocketRead); 61 63 … … 73 75 74 76 fIn = new MReadSocket(7000); 75 fMutex = new TMutex;76 77 } 77 78 … … 82 83 MRawSocketRead::~MRawSocketRead() 83 84 { 84 delete fMutex;85 85 delete fIn; 86 86 } … … 140 140 } 141 141 142 Int_t MRawSocketRead::Do() 142 // -------------------------------------------------------------------------- 143 // 144 // The Process reads one event from the binary file: 145 // - The event header is read 146 // - the run header is read 147 // - all crate information is read 148 // - the raw data information of one event is read 149 // 150 Int_t MRawSocketRead::Process() 143 151 { 144 152 /* … … 254 262 } 255 263 264 // 265 // If no new event was recorded the DAQ resends an old event 266 // 256 267 if (fEvtNumber==fRawEvtHeader->GetDAQEvtNumber()) 257 268 return kCONTINUE; 258 269 259 270 fEvtNumber=fRawEvtHeader->GetDAQEvtNumber(); 260 261 //*fLog << dbg << "Evt " << fRawEvtHeader->GetDAQEvtNumber() << endl; 262 271 /* 272 if (fDisplay) 273 fDisplay->SetProgressBarPosition((Float_t)fEvtNumber/fRawRunHeader->GetNumEvents()); 274 */ 263 275 return kTRUE; 264 276 } 265 277 266 // -------------------------------------------------------------------------- 267 // 268 // The Process reads one event from the binary file: 269 // - The event header is read 270 // - the run header is read 271 // - all crate information is read 272 // - the raw data information of one event is read 273 // 274 Int_t MRawSocketRead::Process() 275 { 276 Lock(); 277 Int_t rc = Do(); 278 UnLock(); 279 return rc; 280 } 281 282 Int_t MRawSocketRead::Lock() 283 { 284 return fMutex->Lock(); 285 } 286 287 Int_t MRawSocketRead::UnLock() 288 { 289 return fMutex->UnLock(); 290 } 278 Int_t MRawSocketRead::PostProcess() 279 { /* 280 if (fDisplay) 281 fDisplay->SetProgressBarPosition(1); 282 */ 283 return kTRUE; 284 } -
trunk/MagicSoft/Mars/mraw/MRawSocketRead.h
r2386 r2466 6 6 #endif 7 7 8 // gcc 3.2 9 //class ifstream; 8 #ifndef __IOSFWD__ 10 9 #include <iosfwd> 10 #endif 11 11 12 12 class MTime; 13 13 class MParList; 14 class MReadSocket; 15 class MRawEvtData; 16 class MRawEvtHeader; 14 17 class MRawRunHeader; 15 class MRawEvtHeader;16 class MRawEvtData;17 18 class MRawCrateArray; 18 class MReadSocket;19 class TMutex;20 19 21 20 class MRawSocketRead : public MTask … … 28 27 MTime *fRawEvtTime; // raw evt time information container to fill from file 29 28 30 TMutex *fMutex;31 32 29 MReadSocket *fIn; //! buffered input stream (file to read from) 33 30 MParList *fParList; //! … … 36 33 UInt_t fEvtNumber; //! 37 34 38 Int_t Do();39 40 35 Int_t PreProcess(MParList *pList); 41 36 Int_t Process(); 37 Int_t PostProcess(); 42 38 43 39 public: … … 45 41 ~MRawSocketRead(); 46 42 47 Int_t Lock();48 Int_t UnLock();49 50 43 ClassDef(MRawSocketRead, 0) //Task to read DAQ binary data from tcp/ip socket 51 44 };
Note:
See TracChangeset
for help on using the changeset viewer.