Changeset 4019


Ignore:
Timestamp:
05/08/04 01:29:22 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4018 r4019  
    109109   * mjobs/MJCalibration.cc
    110110     - changed names of the MHCameras to contain run name
     111
     112
    111113
    112114 2004/05/04: Raquel de los Reyes
  • trunk/MagicSoft/Mars/mona.cc

    r2578 r4019  
    8989}
    9090
     91#include "MPedPhotCam.h"
    9192Bool_t Loop(MOnlineDisplay *display, Int_t port)
    9293{
     
    110111    plist.AddToList(&tasks);
    111112    tasks.AddToList(&reader);
     113
     114    MPedPhotCam pcam;
     115    plist.AddToList(&pcam);
    112116
    113117    MGeomApply geomapl;
     
    152156    MFillH hfilla("MaxIdxHi", "MRawEvtData", "FillMaxIdxHi");
    153157    MFillH hfillb("MaxIdxLo", "MRawEvtData", "FillMaxIdxLo");
    154     MFillH hfillc("Pedestals [MHCamEvent]", "MPedestalCam", "FillPedestal");
    155     MFillH hfilld("PedestalRms", "MPedestalCam", "FillPedestalRms");
     158    MFillH hfillc("Pedestals [MHCamEvent]", "MPedPhotCam", "FillPedestal");
     159    MFillH hfilld("PedestalRms", "MPedPhotCam", "FillPedestalRms");
    156160    tasks.AddToList(&hfilla);
    157161    tasks.AddToList(&hfillb);
  • trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc

    r3183 r4019  
    4444#include "MRawSocketRead.h"
    4545
    46 #include <stdlib.h> // atoi
     46#include <stdlib.h>  // atoi
     47
     48#include <TArrayC.h> // TAraayC
    4749
    4850#include "MReadSocket.h"
     
    180182Int_t MRawSocketRead::Process()
    181183{
    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];
    198190    fIn->read(dummy, 4);   // \nEVT
    199191
     
    205197    }
    206198
    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());
    217215
    218216    //
     
    224222
    225223    if (!rc)
    226         return kFALSE;
     224    {
     225        *fLog << err << "Reading MRawRunHeader failed." << endl;
     226        return kFALSE;
     227    }
    227228
    228229    if (fRunNumber!=fRawRunHeader->GetRunNumber())
     
    243244    }
    244245
    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)
    246253    {
    247254        *fLog << dbg << "Event contains only run header information... skipped." << endl;
Note: See TracChangeset for help on using the changeset viewer.