Changeset 6231 for trunk


Ignore:
Timestamp:
02/03/05 11:55:25 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6214 r6231  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22
     23 2005/02/03 Markus Gaug
     24
     25   * mcalib/MCalibColorSet.[h,cc]
     26     - implement possibility to set colour explicitely (e.g. for MC).
     27
    2228
    2329 2005/02/02 Markus Gaug
  • trunk/MagicSoft/Mars/callisto.rc

    r6180 r6231  
    5656# -------------------------------------------------------------------------
    5757MJPedestalC1.ExtractSignal: MExtractTimeAndChargeDigitalFilter
     58# -------------------------------------------------------------------------
     59# Define here an extractor which can be used for the December 04 data.
     60# -------------------------------------------------------------------------
     61#MJPedestalC1.ExtractSignal: MExtractTimeAndChargeSpline
     62#MJCalibration.ExtractSignal.Amplitude
     63#MJCalibrateSignal.ExtractSignal.Amplitude
     64#MJCalibrateSignal.ExtractInterlaced.Amplitude
    5865
    5966# -------------------------------------------------------------------------
     
    182189# Use this to change the behaviour of the calibration
    183190# -------------------------------------------------------------------------
     191# Type if you set a colour explicitely from outside (only for MC!!!)
     192#MJCalibration.MCalibColorSet.ExplicitColor: green,blue,uv,ct1
     193
    184194#MJCalibration.MCalibrationChargeCalc.ChargeLimit:        2.5
    185195#MJCalibration.MCalibrationChargeCalc.ChargeErrLimit:     0
     
    304314# Type of used data format: raw,root,MC
    305315#MJCalibrateSignal.DataType: Root
     316# Type if you set a colour explicitely from outside (only for MC!!!)
     317#MJCalibrateSignal.MCalibColorSet.ExpicitColor: green,blue,uv,ct1
    306318#MJCalibrateSignal.MCalibrateData.PedestalFlag: Event
    307319#MJCalibrateSignal.MCalibrateData.CalibrationMode: Default
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc

    r6185 r6231  
    6565//
    6666MCalibColorSet::MCalibColorSet(const char *name, const char *title)
    67   : fPattern(0), fHeader(0)
     67    : fPattern(0), fHeader(0), fIsExplicitColor(kFALSE)
    6868{
    6969  fName  = name  ? name  : "MCalibColorSet";
     
    7676{
    7777 
    78   fColor    = MCalibrationCam::kNONE;
    79   fStrength = -1.;
    80   fIsValid  = kFALSE;
    81 
     78  fIsValid         = kFALSE;
     79
     80  if (fIsExplicitColor)
     81    return;
     82
     83  fColor           = MCalibrationCam::kNONE;
     84  fStrength        = -1.;
    8285}
    8386
     
    169172    }
    170173 
     174  if (fIsExplicitColor)
     175    {
     176      fIsValid = kTRUE;
     177      return kTRUE;
     178    }
     179
    171180  const Int_t num = header->GetRunNumber();
    172181
     
    535544  return kTRUE;
    536545}
     546
     547Int_t MCalibColorSet::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     548{
     549
     550  Bool_t rc = kFALSE;
     551
     552  if (IsEnvDefined(env, prefix, "ExplicitColor", print))
     553    {
     554      TString dat = GetEnvValue(env, prefix, "ExplicitColor", "");
     555      if (dat.BeginsWith("green", TString::kIgnoreCase))
     556        SetExplicitColor(MCalibrationCam::kGREEN);
     557      if (dat.BeginsWith("blue", TString::kIgnoreCase))
     558        SetExplicitColor(MCalibrationCam::kBLUE);
     559      if (dat.BeginsWith("uv", TString::kIgnoreCase))
     560        SetExplicitColor(MCalibrationCam::kUV);
     561      if (dat.BeginsWith("ct1", TString::kIgnoreCase))
     562        SetExplicitColor(MCalibrationCam::kCT1);
     563      rc = kTRUE;
     564    }
     565
     566  return rc;
     567}
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h

    r6013 r6231  
    2929
    3030  Bool_t fIsValid;                             //  Have to set the pulse pattern?
    31 
     31  Bool_t fIsExplicitColor;                     //  Is colour set explicitely from outside (for MC)?
     32 
    3233  void CheckAndSet(const TString &str, const char *regexp, MCalibrationCam::PulserColor_t col, Float_t strength);
    3334
     
    3536  Int_t  PreProcess(MParList *pList);
    3637  Int_t  Process();
     38
     39  Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
    3740 
    3841public:
     
    4144 
    4245  void Clear(const Option_t *o="");
     46
     47  void SetExplicitColor( const MCalibrationCam::PulserColor_t col, const Float_t strength=10.)
     48    {
     49      fIsExplicitColor = kTRUE;
     50      fColor    = col;
     51      fStrength = 10.;
     52    }
    4353 
    4454  ClassDef(MCalibColorSet, 0) // Task to workaround missing colors
Note: See TracChangeset for help on using the changeset viewer.