Changeset 6962 for trunk/MagicSoft


Ignore:
Timestamp:
04/20/05 11:51:59 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6961 r6962  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/04/20 Thomas Bretz
     25
     26   * callisto.cc:
     27     - added a comment which shows how to correctly skip job2 if
     28       extractor doesn't inherit from MExtractTimeAndCharge, but...
     29       // This could skip job2 if extractor doesn't inherit from
     30       // MExtractTimeand Charge... but this is not necessary.
     31       // We only get the same pedestal twice (which we want to have
     32       // anyhow. A switch when using the result of job2 later is also
     33       // not necessary, because without running job2 it is identical
     34       // with job1
     35
     36
     37
     38 2005/04/20 Daniel Mazin (2005/04/18)
     39
     40   * mreport/MReportCamera.[h,cc]
     41     - added necessary changes to include Active Load and Central Pixel
     42       info from Camera reports
     43   
     44   * mcamera/MCameraActiveLoad.[h,cc]
     45     - added to store Active Load info from the Camera reports
     46
     47   * mcamera/MCameraCentralPix.[h,cc]
     48     - added to store Central Pixel info from the Camera reports
     49
     50   * mcamera/Makefile
     51   * mcamera/CameraLinkDef.h
     52     - added MCameraActiveLoad and MCameraCentralPix classes
     53
     54
     55
     56 2005/04/20 Markus Gaug (2005/04/15)
     57
     58   * mcalib/MCalibrationChargeCam.[h,cc]
     59     - added new function CopyHiLoConversionFactors
     60
     61
     62
     63 2005/04/20 Markus Gaug (2005/04/14)
     64
     65   * mcalib/MCalibColorSteer.[h,cc]
     66     - fixed a bug in the recognition of the calibration bit pattern.
     67       Concerns only intensity calibration.
     68
     69   * mcalib/MCalibrationRelTimeCalc.cc
     70     - return kTRUE instaed of kFALSE in case that the Process() has
     71       never been executed.
     72
     73   * mjobs/MJCalibration.cc
     74     - add a filter against PIn Diode events since some of the recent
     75       calibration runs have been taken with Pin Diode.
     76
     77
     78
     79 2005/04/12 Markus Gaug
     80
     81   * mcalib/MCalibrationCam.[h,cc]
     82     - added a storage place for the run number
     83
     84   * mcalib/MCalibCalcFromCalc.[h,cc]
     85     - store the run number in the individual MCalibrationCams
     86
     87
    2388
    2489 2005/04/19 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r6958 r6962  
    44   - added a full featured spectrum program (sponde) which reads
    55     ganymed output and monte carlos and compiles a spectrum
     6
     7   - added new histograms for image parameters versus size (MHVsSize)
     8
     9   - support for cc file versions newer than V200504130. Added
     10     support for active loads (MCameraActiveLoad) and central pixel
     11     (MCameraCentralPixel)
     12
     13   - fixed a bug in the recognition of the calibration bit pattern.
     14     Concerns only intensity calibration. (The strength of the
     15     intensity has been updated in some cases)
    616
    717
  • trunk/MagicSoft/Mars/callisto.cc

    r6906 r6962  
    394394        job2.SetBadPixels(job1.GetBadPixels());
    395395
     396        // Please check the Changelog of 2005/04/20 about further deatils of the next comment
     397        //if (job1.GetExtractor().InheritsFrom("MExtractTimeAndCharge"))
    396398        if (!job2.ProcessFile())
    397399        {
     
    528530        job2.SetUseHists(kMoon);
    529531
     532        // Please check the Changelog of 2005/04/20 about further deatils of the next comment
     533        //if (job1.GetExtractor().InheritsFrom("MExtractTimeAndCharge"))
    530534        if (!job2.ProcessFile())
    531535        {
  • trunk/MagicSoft/Mars/mreport/MReportCamera.cc

    r4935 r6962  
    1717!
    1818!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!   Author(s): Daniel Mazin, 04/2005 <mailto:mazin@mppmu.mpg.de>
    1920!
    2021!   Copyright: MAGIC Software Development, 2000-2003
     
    4546#include "MCameraLV.h"
    4647#include "MCameraAUX.h"
     48#include "MCameraActiveLoad.h"
     49#include "MCameraCentralPix.h"
    4750#include "MCameraLids.h"
    4851
     
    5053
    5154using namespace std;
     55
     56const Int_t  MReportCamera::gkActiveLoadControlVersNum = 200504130;
    5257
    5358// --------------------------------------------------------------------------
     
    95100    fCalibration = (MCameraCalibration*)plist.FindCreateObj("MCameraCalibration");
    96101    if (!fCalibration)
     102        return kFALSE;
     103
     104    fActiveLoad = (MCameraActiveLoad*)plist.FindCreateObj("MCameraActiveLoad");
     105    if (!fActiveLoad)
     106        return kFALSE;
     107
     108    fCentralPix = (MCameraCentralPix*)plist.FindCreateObj("MCameraCentralPix");
     109    if (!fCentralPix)
    97110        return kFALSE;
    98111
     
    406419// --------------------------------------------------------------------------
    407420//
     421// Interprete the Active Load REPORT part
     422//
     423Bool_t MReportCamera::InterpreteActiveLoad(TString &str)
     424{
     425    if (!CheckTag(str, "ACTLOAD "))
     426        return kFALSE;
     427
     428    Int_t len;
     429    Short_t v360a, i360a, v360b, i360b, v175a, i175a, v175b, i175b;
     430    Int_t n=sscanf(str.Data(), " %hd %hd %hd %hd %hd %hd %hd %hd %n",
     431                   &v360a, &i360a, &v360b, &i360b, &v175a, &i175a, &v175b, &i175b, &len);
     432    if (n!=8)
     433    {
     434        *fLog << warn << "WARNING - Reading information of 'ACTLOAD' section." << endl;
     435        return kFALSE;
     436    }
     437
     438    fActiveLoad->fVoltage360A = (float)v360a*0.1;
     439    fActiveLoad->fIntens360A  = (float)i360a*0.01;
     440    fActiveLoad->fVoltage360B = (float)v360b*0.1;
     441    fActiveLoad->fIntens360B  = (float)i360b*0.01;
     442    fActiveLoad->fVoltage175A = (float)v175a*0.1;
     443    fActiveLoad->fIntens175A  = (float)i175a*0.01;
     444    fActiveLoad->fVoltage175B = (float)v175b*0.1;
     445    fActiveLoad->fIntens175B  = (float)i175b*0.01;
     446
     447    str.Remove(0, len);
     448    str=str.Strip(TString::kBoth);
     449
     450    return kTRUE;
     451}
     452
     453// --------------------------------------------------------------------------
     454//
     455// Interprete the Central Pixel part
     456//
     457Bool_t MReportCamera::InterpreteCentralPix(TString &str)
     458{
     459    if (!CheckTag(str, "CPIX "))
     460        return kFALSE;
     461
     462    Int_t len;
     463    Short_t status;
     464    Int_t n=sscanf(str.Data(), " %hd %n",
     465                   &status, &len);
     466    if (n!=1)
     467    {
     468        *fLog << warn << "WARNING - Reading information of 'CPIX' section." << endl;
     469        return kFALSE;
     470    }
     471
     472    fCentralPix->fStatus = (Bool_t)status;
     473
     474    str.Remove(0, len);
     475    str=str.Strip(TString::kBoth);
     476
     477    return kTRUE;
     478}
     479// --------------------------------------------------------------------------
     480//
    408481// Interprete the CAMERA-REPORT part
    409482//
    410 Bool_t MReportCamera::InterpreteCamera(TString &str)
     483Bool_t MReportCamera::InterpreteCamera(TString &str, Int_t ver)
    411484{
    412485    //
    413486    // I have tried to do it with pure pointer arithmentics, but most of the time is spent
    414487    // to do the sscanf. So we gain less than 5% not using TString like it is done here.
    415     Int_t len;
     488    Int_t len1=0;
    416489    Short_t cal, stat, hvps, lid, lv, cool, hv, dc, led, fan, can, io, clv;
    417     Int_t n=sscanf(str.Data(), " %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %n",
    418                    &cal, &stat, &hvps, &lid, &lv, &cool, &hv,
    419                    &dc, &led, &fan, &can, &io, &clv, &len);
     490    Int_t n;
     491
     492    n=sscanf(str.Data(), " %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %hd %n",
     493             &cal, &stat, &hvps, &lid, &lv, &cool, &hv,
     494             &dc, &led, &fan, &can, &io, &clv, &len1);
    420495    if (n!=13)
    421496    {
     
    423498        return kFALSE;
    424499    }
    425     str.Remove(0, len);
    426     str=str.Strip(TString::kLeading);
    427500
    428501    fHV->fStatus                   = (Byte_t)hvps;
     
    439512    fStatus                        = (Byte_t)stat;
    440513    fStatusDC                      = (Byte_t)dc;
     514    fActiveLoad->fStatus           = 0xff;
     515
     516    Int_t len2=0;
     517    if (ver > gkActiveLoadControlVersNum)
     518    {
     519        Short_t actl;
     520        n=sscanf(str.Data()+len1, " %hd %n", &actl, &len2);
     521        if (n!=1)
     522        {
     523            *fLog << warn << "WARNING - Cannot interprete status of active load." << endl;
     524            return kFALSE;
     525        }
     526        fActiveLoad->fStatus = (Byte_t)actl;
     527    }
     528    str.Remove(0, len1+len2);
     529    str=str.Strip(TString::kLeading);
    441530
    442531    return kTRUE;
     
    449538Int_t MReportCamera::InterpreteBody(TString &str, Int_t ver)
    450539{
    451     if (!InterpreteCamera(str))
     540    if (!InterpreteCamera(str, ver))
    452541        return kCONTINUE;
    453542
     
    479568        return kCONTINUE;
    480569
     570    if (ver > gkActiveLoadControlVersNum)
     571    {
     572         if (!InterpreteActiveLoad(str))
     573            return kCONTINUE;
     574         if (!InterpreteCentralPix(str))
     575            return kCONTINUE;
     576    }
     577
    481578    if (str!="OVER")
    482579    {
Note: See TracChangeset for help on using the changeset viewer.