Changeset 2914 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
01/26/04 15:25:08 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2913 r2914  
    44
    55                                                 -*-*- END OF LINE -*-*-
    6 
    76 2004/01/26: Markus Gaug
    87
    9    * manalysis/MArrivalTime.[h,cc]:
    10    * manalysis/MArrivalTimeCalc.[h,cc]:
     8   * manalysis/MArrivalTime.[h,cc], manalysis/MArrivalTimeCalc.[h,cc]:
    119     - moved calculation of arrival time from MArrivalTime to
    12        MArrivalTimeCalc. MArrivalTime does not do any Process -job any
    13        more
     10       MArrivalTimeCalc. MArrivalTime does not do any Process-job
     11       anymore
    1412     - TSpline5 now on stack.
    1513
    1614   * mcalib/MHCalibrationBlindPixel.[h,cc]:
    1715     - force mu_0 in Blind Pixel Fit to be around 0 in fKPoisson4
     16
    1817
    1918 2004/01/26: Thomas Bretz
     
    3433     - fixed usage of InitSize
    3534     - removed CleanArray. Reset() is called automatically before Process()
     35
     36   * manalysis/MExtractedSignalCam.[h,cc]:
     37     - added SetLogStream
     38     - removed obsolete include MGeomCam
     39     - replaced PrintOut by Print
     40     - added const-qualifiers to all Getters
     41     - fixed documentation
     42     
     43   * manalysis/MExtractedSignalPix.[h,cc]:
     44     - replaced PrintOut by Print
     45     - fixed documentation
    3646
    3747
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.cc

    r2640 r2914  
    1919!   Author(s): Thomas Bretz 12/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2003
     21!   Copyright: MAGIC Software Development, 2000-2004
    2222!
    2323!
     
    2525
    2626/////////////////////////////////////////////////////////////////////////////
    27 //                                                                         //
    28 // MExtractedSignalCam                                                     //
    29 //                                                                         //
    30 // Hold the Extracted Signal information for all pixels in the camera      //
    31 //                                                                         //
     27//
     28// MExtractedSignalCam
     29//
     30// Hold the Extracted Signal information for all pixels in the camera
     31//
    3232/////////////////////////////////////////////////////////////////////////////
    3333#include "MExtractedSignalCam.h"
    34 #include "MExtractedSignalPix.h"
    3534
    3635#include <TClonesArray.h>
     
    3938#include "MLogManip.h"
    4039
    41 #include "MGeomCam.h"
     40#include "MExtractedSignalPix.h"
    4241
    4342ClassImp(MExtractedSignalCam);
     
    5554
    5655    fArray = new TClonesArray("MExtractedSignalPix", 1);
    57 
    5856}
    5957
     
    6563{
    6664    delete fArray;
     65}
     66
     67// --------------------------------------------------------------------------
     68//
     69// Distribute logging stream to all childs
     70//
     71void MExtractedSignalCam::SetLogStream(MLog *lg)
     72{
     73    fArray->ForEach(MParContainer, SetLogStream)(lg);
     74    MParContainer::SetLogStream(lg);
    6775}
    6876
     
    8795// --------------------------------------------------------------------------
    8896//
    89 // Get i-th pixel (pixel number)
     97// Get i-th pixel (pixel index)
    9098//
    9199MExtractedSignalPix &MExtractedSignalCam::operator[](Int_t i)
     
    96104// --------------------------------------------------------------------------
    97105//
    98 // Get i-th pixel (pixel number)
     106// Get i-th pixel (pixel index)
    99107//
    100 MExtractedSignalPix &MExtractedSignalCam::operator[](Int_t i) const
     108const MExtractedSignalPix &MExtractedSignalCam::operator[](Int_t i) const
    101109{
    102110    return *static_cast<MExtractedSignalPix*>(fArray->UncheckedAt(i));
    103111}
    104 
    105112
    106113void MExtractedSignalCam::Clear(Option_t *o)
     
    112119{
    113120    *fLog << all << GetDescriptor() << ":" << endl;
    114     int id = 0;
     121    int idx = -1;
    115122
    116123    TIter Next(fArray);
     
    118125    while ((pix=(MExtractedSignalPix*)Next()))
    119126    {
    120         id++;
     127        idx++;
    121128
    122129        if (!pix->IsValid())
    123130            continue;
    124131
    125         *fLog << id-1 << ": " << endl;
    126         pix->PrintOut();
     132        *fLog << idx << ": ";
     133        pix->Print();
    127134    }
    128135}
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h

    r2806 r2914  
    2525    ~MExtractedSignalCam();
    2626
     27    void Print(Option_t *o="") const;
    2728    void Clear(Option_t *o="");
     29    void SetLogStream(MLog *lg);
    2830
    2931    void InitSize(const UInt_t i);
    3032    Int_t GetSize() const;
    3133
    32     Byte_t GetNumUsedFADCSlices()          { return fLastUsedSliceHiGain-fFirstUsedSliceHiGain+1; }
    33     Byte_t GetNumUsedHiGainFADCSlices()   { return fLastUsedSliceHiGain-fFirstUsedSliceHiGain+1; }
    34     Byte_t GetNumUsedLoGainFADCSlices()   { return fLastUsedSliceLoGain-fFirstUsedSliceLoGain+1; }
     34    Byte_t GetNumUsedFADCSlices() const       { return fLastUsedSliceHiGain-fFirstUsedSliceHiGain+1; }
     35    Byte_t GetNumUsedHiGainFADCSlices() const { return fLastUsedSliceHiGain-fFirstUsedSliceHiGain+1; }
     36    Byte_t GetNumUsedLoGainFADCSlices() const { return fLastUsedSliceLoGain-fFirstUsedSliceLoGain+1; }
    3537
    36     Byte_t GetFirstUsedSliceHiGain()       { return fFirstUsedSliceHiGain; }
    37     Byte_t GetLastUsedSliceHiGain()        { return fLastUsedSliceHiGain; }
     38    Byte_t GetFirstUsedSliceHiGain() const    { return fFirstUsedSliceHiGain; }
     39    Byte_t GetLastUsedSliceHiGain() const     { return fLastUsedSliceHiGain; }
    3840
    39     Byte_t GetFirstUsedSliceLoGain()       { return fFirstUsedSliceLoGain; }
    40     Byte_t GetLastUsedSliceLoGain()        { return fLastUsedSliceLoGain; }
     41    Byte_t GetFirstUsedSliceLoGain() const    { return fFirstUsedSliceLoGain; }
     42    Byte_t GetLastUsedSliceLoGain() const     { return fLastUsedSliceLoGain; }
    4143
    4244    void   SetUsedFADCSlices(Byte_t firsth, Byte_t lasth,
    43                        Byte_t firstl, Byte_t lastl)
     45                             Byte_t firstl, Byte_t lastl)
    4446    {
    4547      fFirstUsedSliceHiGain    = firsth;
     
    5052
    5153    MExtractedSignalPix &operator[](Int_t i);
    52     MExtractedSignalPix &operator[](Int_t i) const;
    53 
    54     void Print(Option_t *o="") const;
     54    const MExtractedSignalPix &operator[](Int_t i) const;
    5555
    5656    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalPix.cc

    r2902 r2914  
    2525
    2626/////////////////////////////////////////////////////////////////////////////
    27 //                                                                         //
    28 // MExtractedSignalPix                                                     //
    29 //                                                                         //
    30 // This is the storage container to hold informations about the pedestal   //
    31 // (offset) value of one Pixel (PMT).                                      //
    32 //                                                                         //
     27//
     28// MExtractedSignalPix
     29//
     30// This is the storage container to hold informations about the pedestal
     31// (offset) value of one Pixel (PMT).
     32//
    3333/////////////////////////////////////////////////////////////////////////////
    3434#include "MExtractedSignalPix.h"
     35
    3536#include "MLog.h"
    3637#include "MLogManip.h"
     
    3940
    4041using namespace std;
     42
    4143static const Float_t gkSignalInitializer = 99999.9;
     44
     45// ------------------------------------------------------------------------
    4246//
    4347// MExtractedSignalPix holds the extracted signal (HiGain and LoGain)
     
    5761    fNumLoGainSaturated(0)
    5862{
    59 
    6063  fName  = name  ? name  : "MExtractedSignalPix";
    6164  fTitle = title ? title : "Container of the Extracted Signals";
    62 
    6365}
    64 
    65 
    6666
    6767// ------------------------------------------------------------------------
     
    7171void MExtractedSignalPix::Clear(Option_t *o)
    7272{
    73 
    7473  fExtractedSignalHiGain      = gkSignalInitializer;
    7574  fExtractedSignalHiGainError = gkSignalInitializer;
     
    7877 
    7978  fIsLoGainUsed = kFALSE;
     79
    8080  fNumHiGainSaturated = 0;
    8181  fNumLoGainSaturated = 0;
    82 
    8382}
    8483
    8584void MExtractedSignalPix::SetExtractedSignal(Float_t sig, Float_t sigerr)   
    8685{
    87  
    8886  fExtractedSignalHiGain      = sig;
    8987  fExtractedSignalHiGainError = sigerr;
    90 
    91   return;
    9288}
    93 
    9489
    9590void MExtractedSignalPix::SetExtractedSignal(Float_t sighi, Float_t sighierr,
     
    10095  fExtractedSignalLoGain = siglo;
    10196  fExtractedSignalLoGainError = sigloerr;
    102  
    103   return;
    10497}
    10598
    10699Bool_t MExtractedSignalPix::IsValid() const
    107100{
    108 
    109  return fExtractedSignalHiGain >= 0. || fExtractedSignalHiGainError >= 0.;
    110  
     101    return fExtractedSignalHiGain >= 0. || fExtractedSignalHiGainError >= 0.;
    111102}
    112 
    113103
    114104void MExtractedSignalPix::SetGainSaturation(Bool_t sat, Byte_t higain, Byte_t logain)
     
    118108  fNumHiGainSaturated = higain;
    119109  fNumLoGainSaturated = logain;
    120 
    121   return;
    122 
    123110}
    124111
    125 
    126 
    127 void MExtractedSignalPix::PrintOut()
     112void MExtractedSignalPix::Print(Option_t *o) const
    128113{
    129 
    130   *fLog << all << GetDescriptor() << ":" << endl;
    131 
    132   *fLog << " Signal: " << fExtractedSignalHiGain
    133         << " +- " << fExtractedSignalHiGainError
    134         << " LoGain? " << fIsLoGainUsed
    135         << " Nr. Sat. Hi Gain: " <<  fNumHiGainSaturated
    136         << " Nr. Sat. Lo Gain: " <<  fNumLoGainSaturated
    137         << endl;
    138 
     114    *fLog << " Signal: " << fExtractedSignalHiGain
     115        << " +- " << fExtractedSignalHiGainError
     116        << " LoGain? " << fIsLoGainUsed
     117        << " Nr. Sat. Hi Gain: " <<  fNumHiGainSaturated
     118        << " Nr. Sat. Lo Gain: " <<  fNumLoGainSaturated
     119        << endl;
    139120}
    140 
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalPix.h

    r2902 r2914  
    99{
    1010private:
    11 
    1211  Float_t fExtractedSignalHiGain;      // mean value of the extracted signal
    1312  Float_t fExtractedSignalHiGainError; // error of the mean value of the extracted signal
     
    2019
    2120public:
    22 
    2321    MExtractedSignalPix(const char* name=NULL, const char* title=NULL);
    2422
    2523    void Clear(Option_t *o="");
     24    void Print(Option_t *o="") const;
    2625
    2726    // Setter
     
    4241    Bool_t IsValid() const;   
    4342
    44     void PrintOut();
    45 
    4643    ClassDef(MExtractedSignalPix, 0)    // Storage Container for Extracted Signal information of one pixel
    4744};
    4845
    4946#endif
    50 
Note: See TracChangeset for help on using the changeset viewer.