Changeset 4019
- Timestamp:
- 05/08/04 01:29:22 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4018 r4019 109 109 * mjobs/MJCalibration.cc 110 110 - changed names of the MHCameras to contain run name 111 112 111 113 112 114 2004/05/04: Raquel de los Reyes -
trunk/MagicSoft/Mars/mona.cc
r2578 r4019 89 89 } 90 90 91 #include "MPedPhotCam.h" 91 92 Bool_t Loop(MOnlineDisplay *display, Int_t port) 92 93 { … … 110 111 plist.AddToList(&tasks); 111 112 tasks.AddToList(&reader); 113 114 MPedPhotCam pcam; 115 plist.AddToList(&pcam); 112 116 113 117 MGeomApply geomapl; … … 152 156 MFillH hfilla("MaxIdxHi", "MRawEvtData", "FillMaxIdxHi"); 153 157 MFillH hfillb("MaxIdxLo", "MRawEvtData", "FillMaxIdxLo"); 154 MFillH hfillc("Pedestals [MHCamEvent]", "MPed estalCam", "FillPedestal");155 MFillH hfilld("PedestalRms", "MPed estalCam", "FillPedestalRms");158 MFillH hfillc("Pedestals [MHCamEvent]", "MPedPhotCam", "FillPedestal"); 159 MFillH hfilld("PedestalRms", "MPedPhotCam", "FillPedestalRms"); 156 160 tasks.AddToList(&hfilla); 157 161 tasks.AddToList(&hfillb); -
trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc
r3183 r4019 44 44 #include "MRawSocketRead.h" 45 45 46 #include <stdlib.h> // atoi 46 #include <stdlib.h> // atoi 47 48 #include <TArrayC.h> // TAraayC 47 49 48 50 #include "MReadSocket.h" … … 180 182 Int_t MRawSocketRead::Process() 181 183 { 182 /* 183 sprintf(report_str, " %8.8d %8.8d %6.6d", 184 run_header->RunNumber, run.event_number, 185 time.tv_sec - run.time_start_secs); 186 if (send(sd, report_str, strlen(report_str), flags) == -1) { 187 return -1; 188 } 189 190 sprintf(report_str, " %6.1f %6.1f %6.6d %7.4f %8.8d %6.6d ", 191 trigrate_hz, storerate_hz, storerate_kbps, gammarate_hz, 192 diskspace_kb, remtime_sec); 193 if (send(sd, report_str, strlen(report_str), flags) == -1) { 194 return -1; 195 } 196 */ 197 char dummy[126]; 184 // 185 // Tag which could possibly be used for synchronizing the 186 // data stream. At the moment we check only its correctness. 187 // Synchronisation seems to work well - Why? 188 // 189 char dummy[4]; 198 190 fIn->read(dummy, 4); // \nEVT 199 191 … … 205 197 } 206 198 207 char size[6] = {0,0,0,0,0,0}; 208 fIn->read(size, 5); 209 fIn->read(dummy, 126); //00000[CC-DATA]\n 210 211 /* 212 int numevt; 213 sscanf(dummy, "%*s %*d %*d %*d %*d %*d %*d %*d " 214 "%*d %*d %*d %*d %*d %*d %*d %*d %*d %*d " 215 "%d %*d %*f %*f %*d %*f %*d %*d", &numevt); 216 */ 199 // 200 // No we get some size information (each 5 bytes ascii) 201 // 202 char sizecc[6] = {0,0,0,0,0,0}; // 5 bytes plus trailing 0-byte 203 char sizerh[6] = {0,0,0,0,0,0}; // 5 bytes plus trailing 0-byte 204 char sizeev[6] = {0,0,0,0,0,0}; // 5 bytes plus trailing 0-byte 205 fIn->read(sizecc, 5); // Size CC info string 206 fIn->read(sizerh, 5); // Size run header 207 fIn->read(sizeev, 5); // Size Event (+ event header) 208 209 // 210 // Currently we skip the CC info string. We may decode this string 211 // in the future to get additional information 212 // 213 TArrayC dummy2(atoi(sizecc)); 214 fIn->read(dummy2.GetArray(), dummy2.GetSize()); 217 215 218 216 // … … 224 222 225 223 if (!rc) 226 return kFALSE; 224 { 225 *fLog << err << "Reading MRawRunHeader failed." << endl; 226 return kFALSE; 227 } 227 228 228 229 if (fRunNumber!=fRawRunHeader->GetRunNumber()) … … 243 244 } 244 245 245 if (atoi(size)==fRawRunHeader->GetNumTotalBytes()) 246 if (atoi(sizerh)==fRawRunHeader->GetNumTotalBytes()) 247 { 248 *fLog << err << "Retrieved size of run header mismatch... stopped." << endl; 249 return kFALSE; 250 } 251 252 if (atoi(sizeev)==0) 246 253 { 247 254 *fLog << dbg << "Event contains only run header information... skipped." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.