Ignore:
Timestamp:
09/14/04 20:59:35 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc

    r4910 r5019  
    3434//   MCalibrationIntensityChargeCam
    3535//   MCalibrationIntensityRelTimeCam
     36//   MBadPixelsIntensityCam
    3637//
    3738//  Output Containers:
    3839//   MCalibrationIntensityChargeCam
    3940//   MCalibrationIntensityRelTimeCam
     41//   MBadPixelsIntensityCam
    4042//
    4143//////////////////////////////////////////////////////////////////////////////
     
    5355#include "MCalibrationIntensityRelTimeCam.h"
    5456
     57#include "MBadPixelsIntensityCam.h"
     58
    5559#include "MCalibrationChargeCalc.h"
    5660#include "MCalibrationRelTimeCalc.h"
     
    7074MCalibColorSteer::MCalibColorSteer(const char *name, const char *title)
    7175    : fHeader(NULL), fGeom(NULL), fParList(NULL),
    72       fIntensCharge(NULL), fIntensRelTime(NULL),
     76      fIntensCharge(NULL), fIntensRelTime(NULL), fIntensBad(NULL),
    7377      fChargeCalc(NULL), fRelTimeCalc(NULL),
    7478      fPattern(0)
     
    111115
    112116  //
     117  // Look for the MBadPixels Intensity Cam
     118  //
     119  fIntensBad = (MBadPixelsIntensityCam*)pList->FindCreateObj("MBadPixelsIntensityCam");
     120
     121  //
    113122  // Look for the MFillH name "FillChargeCam". In case yes, initialize the
    114123  // corresponding IntensityCam
     
    116125  if (pList->FindObject(AddSerialNumber("FillChargeCam")))
    117126  {
     127
    118128    fIntensCharge = (MCalibrationIntensityChargeCam*)pList->FindCreateObj("MCalibrationIntensityChargeCam");
    119129    fIntensQE     = (MCalibrationIntensityQECam*)    pList->FindCreateObj("MCalibrationIntensityQECam");
     
    167177// --------------------------------------------------------------------------
    168178//
    169 // Sets the pattern to MRawEvtHeader from outside, if fIsValid is set.
     179// Reads the pattern from MRawEvtHeader and initializes new containers in the
     180// Intensity Cams, if the pattern has changed
    170181//
    171182Int_t MCalibColorSteer::Process()
     
    208219}
    209220
     221// --------------------------------------------------------------------------
     222//
     223// Searches for name in the MParList and calls, if existing:
     224// - MHCalibrationCam::Finalize()
     225// - MHCalibrationCam::ResetHists()
     226//
    210227Bool_t MCalibColorSteer::Finalize(const char* name)
    211228{
     
    223240}
    224241
     242// --------------------------------------------------------------------------
     243//
     244// Re-Intitializes new containers inside the Intensity Cams.
     245// From now on, a call to the IntensityCam functions returns pointers
     246// to the newly created Containers.
     247//
    225248Bool_t MCalibColorSteer::ReInitialize()
    226249{
    227250
     251  if (fIntensBad)
     252    {
     253      fIntensBad->AddToList(Form("MBadPixelsCam%s",GetNamePattern()),*fGeom);
     254      *fLog << inf << "New MBadPixelsCam with " << GetNamePattern() << endl;
     255    }
    228256  if (fIntensCharge)
    229257    {
    230258      fIntensCharge->AddToList(Form("MCalibrationChargeCam%s",GetNamePattern()),*fGeom);
    231       *fLog << inf << "New MHCalibrationChargeCam with " << GetNamePattern() << endl;
    232     }
    233   else
    234     *fLog << warn << GetDescriptor()
    235           << ": No MCalibrationIntensityChargeCam loaded, but MHCalibrationChargeCam found "
    236           << endl;
     259      *fLog << inf << "New MCalibrationChargeCam with " << GetNamePattern() << endl;
     260    }
    237261  if (fIntensQE)
    238262    {
    239263      fIntensQE->AddToList(Form("MCalibrationQECam%s",GetNamePattern()),*fGeom);
    240       *fLog << inf << "New MHCalibrationQECam with " << GetNamePattern() << endl;
    241     }
    242   else
    243     *fLog << warn << GetDescriptor()
    244           << ": No MCalibrationIntensityQECam loaded, but MHCalibrationChargeCam found "
    245           << endl;
     264      *fLog << inf << "New MCalibrationQECam with " << GetNamePattern() << endl;
     265    }
    246266  if (fIntensRelTime)
    247267    {
    248268      fIntensRelTime->AddToList(Form("MCalibrationRelTimeCam%s",GetNamePattern()),*fGeom);
    249       *fLog << inf << "New MHCalibrationRelTimeCam with " << GetNamePattern() << endl;
    250     }
    251   else
    252     *fLog << warn << GetDescriptor()
    253           << ": No MCalibrationIntensityRelTimeCam loaded, but MHCalibrationRelTimeCam found "
    254           << endl;
     269      *fLog << inf << "New MCalibrationRelTimeCam with " << GetNamePattern() << endl;
     270    }
    255271
    256272  return kTRUE;
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h

    r4910 r5019  
    1414class MCalibrationIntensityQECam;
    1515class MCalibrationIntensityRelTimeCam;
     16class MBadPixelsIntensityCam;
    1617class MCalibColorSteer : public MTask
    1718{
    1819private:
    1920
    20     MRawEvtHeader                   *fHeader;
    21     MGeomCam                        *fGeom;
    22     MParList                        *fParList;
    23     MCalibrationIntensityChargeCam  *fIntensCharge;
    24     MCalibrationIntensityQECam      *fIntensQE;
    25     MCalibrationIntensityRelTimeCam *fIntensRelTime;
    26     MCalibrationChargeCalc          *fChargeCalc;
    27     MCalibrationRelTimeCalc         *fRelTimeCalc;   
    28    
    29     UInt_t fPattern;
    30 
    31     Int_t  PreProcess(MParList *pList);
    32     Int_t  Process();
    33 
    34     Bool_t ReInitialize();
    35     Bool_t Finalize(const char* name);
    36     const char* GetNamePattern();
    37    
     21  MRawEvtHeader                   *fHeader;          //!
     22  MGeomCam                        *fGeom;            //!
     23  MParList                        *fParList;         //!
     24  MCalibrationIntensityChargeCam  *fIntensCharge;    //!
     25  MCalibrationIntensityQECam      *fIntensQE;        //!
     26  MCalibrationIntensityRelTimeCam *fIntensRelTime;   //!
     27  MBadPixelsIntensityCam          *fIntensBad;       //!
     28 
     29  MCalibrationChargeCalc          *fChargeCalc;      //!
     30  MCalibrationRelTimeCalc         *fRelTimeCalc;     //!
     31                                                     
     32  UInt_t fPattern;                                   
     33 
     34  Int_t  PreProcess(MParList *pList);
     35  Int_t  Process();
     36 
     37  Bool_t ReInitialize();
     38  Bool_t Finalize(const char* name);
     39  const char* GetNamePattern();
     40 
    3841public:
    3942
  • trunk/MagicSoft/Mars/mcalib/MCalibrationBlindCam.cc

    r4989 r5019  
    3030// the actual values of the MCalibrationBlindPix's.
    3131//
    32 // Contains TClonesArrays for the following objects:
     32// Contains TObjArrays for the following objects:
    3333// - fBlindPixels:    Array of classes derived from MCalibrationBlindPix, one entry
    3434//                    per blind pixel.
    3535//
    36 // All TClonesArrays have to enlarged by the corresponding calls to (e.g. in MGeomApply):
     36// All TObjArrays have to enlarged by the corresponding calls to (e.g. in MGeomApply):
    3737// - InitSize()
    3838//
     
    4343#include "MCalibrationBlindPix.h"
    4444
     45#include <TObjArray.h>
     46
    4547#include "MLogManip.h"
    46 
    47 #include <TClonesArray.h>
    4848
    4949ClassImp(MCalibrationBlindCam);
     
    5454// Default constructor.
    5555//
    56 // Creates a TClonesArray of MCalibrationBlindPix containers for the TClonesArray's:
    57 // - fPixels
    58 //
    5956MCalibrationBlindCam::MCalibrationBlindCam(Int_t nblind,const char *name, const char *title)
    6057{
     
    6360  fTitle = title ? title : "Calibration Information of blinded pixels in camera";
    6461
    65   fPixels = new TClonesArray("MCalibrationBlindPix",nblind);
     62  InitSize(nblind);
     63}
    6664
    67   InitSize(nblind);
     65void MCalibrationBlindCam::Add(const UInt_t a, const UInt_t b)
     66{
     67  for (UInt_t i=a; i<b; i++)
     68    (*fPixels)[i] = new MCalibrationBlindPix;
    6869}
    6970
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r4986 r5019  
    8282#include "MCalibrationChargeCam.h"
    8383
    84 #include <TClonesArray.h>
     84#include <TObjArray.h>
    8585
    8686#include "MLog.h"
     
    107107// Default constructor.
    108108//
    109 // Sets all pointers to 0
    110 //
    111 // Creates a TClonesArray of MCalibrationChargePix containers, initialized to 1 entry, destinated
    112 // to hold one container per pixel. Later, a call to MCalibrationChargeCam::InitSize()
    113 // has to be performed (in MGeomApply).
    114 //
    115 // Creates a TClonesArray of MCalibrationChargePix containers, initialized to 1 entry, destinated
    116 // to hold one container per pixel AREA. Later, a call to MCalibrationChargeCam::InitAreas()
    117 // has to be performed (in MGeomApply).
    118 //
    119 // Creates a TClonesArray of MCalibrationChargePix containers, initialized to 1 entry, destinated
    120 // to hold one container per camera SECTOR. Later, a call to MCalibrationChargeCam::InitSectors()
    121 // has to be performed (in MGeomApply).
    122 //
    123109// Calls:
    124110// - Clear()
     
    129115  fTitle = title ? title : "Storage container for the Calibration Information in the camera";
    130116 
    131   fPixels            = new TClonesArray("MCalibrationChargePix",1);
    132   fAverageAreas      = new TClonesArray("MCalibrationChargePix",1);
    133   fAverageSectors    = new TClonesArray("MCalibrationChargePix",1);
    134   fAverageBadAreas   = new TClonesArray("MBadPixelsPix",1);
    135   fAverageBadSectors = new TClonesArray("MBadPixelsPix",1);
    136 
    137117  Clear();
    138118}
     119
     120
     121void MCalibrationChargeCam::Add(const UInt_t a, const UInt_t b)
     122{
     123  for (UInt_t i=a; i<b; i++)
     124    (*fPixels)[i] = new MCalibrationChargePix;
     125}
     126
     127
     128void MCalibrationChargeCam::AddArea(const UInt_t a, const UInt_t b)
     129{
     130  for (UInt_t i=a; i<b; i++)
     131    (*fAverageAreas)[i] = new MCalibrationChargePix;
     132}
     133
     134void MCalibrationChargeCam::AddSector(const UInt_t a, const UInt_t b)
     135{
     136  for (UInt_t i=a; i<b; i++)
     137    (*fAverageSectors)[i] = new MCalibrationChargePix;
     138}
     139
    139140
    140141// --------------------------------------
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h

    r4882 r5019  
    2626  enum  { kFFactorMethodValid };
    2727
     28  void Add(const UInt_t a, const UInt_t b);
     29  void AddArea(const UInt_t a, const UInt_t b);
     30  void AddSector(const UInt_t a, const UInt_t b);
     31 
    2832public:
    2933
     
    7276  void  SetNumPhotonsPINDiodeMethodErr  ( const Float_t f )  { fNumPhotonsPINDiodeMethodErr   = f; }   
    7377 
    74   ClassDef(MCalibrationChargeCam, 4) // Container Charge Calibration Results Camera
     78  ClassDef(MCalibrationChargeCam, 5) // Container Charge Calibration Results Camera
    7579};
    7680
  • trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityBlindCam.h

    r5015 r5019  
    1616  MCalibrationIntensityBlindCam(const char *name=NULL, const char *title=NULL);
    1717
    18   void InitSize( const UInt_t n ); 
     18  void InitSize( const UInt_t n );
    1919 
    2020  ClassDef(MCalibrationIntensityBlindCam, 1) // Container Intensity Blind Calibration Results Camera
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc

    r4986 r5019  
    7676#include "MCalibrationCam.h"
    7777
    78 #include <TClonesArray.h>
     78#include <TObjArray.h>
    7979
    8080#include "MLog.h"
     
    9494// Default constructor.
    9595//
    96 // Creates a TClonesArray of MCalibrationRelTimePix containers, initialized to 1 entry, destinated
    97 // to hold one container per pixel. Later, a call to MCalibrationRelTimeCam::InitSize()
    98 // has to be performed (in MGeomApply).
    99 //
    100 // Creates a TClonesArray of MCalibrationRelTimePix containers, initialized to 1 entry, destinated
    101 // to hold one container per pixel AREA. Later, a call to MCalibrationRelTimeCam::InitAreas()
    102 // has to be performed (in MGeomApply).
    103 //
    104 // Creates a TClonesArray of MCalibrationRelTimePix containers, initialized to 1 entry, destinated
    105 // to hold one container per camera SECTOR. Later, a call to MCalibrationRelTimeCam::InitSectors()
    106 // has to be performed (in MGeomApply).
    107 //
    10896MCalibrationRelTimeCam::MCalibrationRelTimeCam(const char *name, const char *title)
    10997{
     
    112100  fTitle = title ? title : "Container for Relative Time Calibration Information";
    113101 
    114   fPixels             = new TClonesArray("MCalibrationRelTimePix",1);
    115   fAverageAreas       = new TClonesArray("MCalibrationRelTimePix",1);
    116   fAverageSectors     = new TClonesArray("MCalibrationRelTimePix",1);
    117   fAverageBadAreas    = new TClonesArray("MBadPixelsPix",1);
    118   fAverageBadSectors  = new TClonesArray("MBadPixelsPix",1);
    119  
     102}
     103
     104void MCalibrationRelTimeCam::Add(const UInt_t a, const UInt_t b)
     105{
     106  for (UInt_t i=a; i<b; i++)
     107    (*fPixels)[i] = new MCalibrationRelTimePix;
     108}
     109
     110
     111void MCalibrationRelTimeCam::AddArea(const UInt_t a, const UInt_t b)
     112{
     113  for (UInt_t i=a; i<b; i++)
     114    (*fAverageAreas)[i] = new MCalibrationRelTimePix;
     115}
     116
     117void MCalibrationRelTimeCam::AddSector(const UInt_t a, const UInt_t b)
     118{
     119  for (UInt_t i=a; i<b; i++)
     120    (*fAverageSectors)[i] = new MCalibrationRelTimePix;
    120121}
    121122
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.h

    r4882 r5019  
    88class MCalibrationRelTimeCam : public MCalibrationCam
    99{
     10private:
     11
     12  void Add(const UInt_t a, const UInt_t b);
     13  void AddArea(const UInt_t a, const UInt_t b);
     14  void AddSector(const UInt_t a, const UInt_t b);
     15
    1016public:
    1117
     
    1925  void DrawPixelContent(Int_t num) const;   
    2026
    21   ClassDef(MCalibrationRelTimeCam, 1)   // Container Rel. Arrival Time Calibration Results Camera
     27  ClassDef(MCalibrationRelTimeCam, 2)   // Container Rel. Arrival Time Calibration Results Camera
    2228};
    2329
Note: See TracChangeset for help on using the changeset viewer.