Ignore:
Timestamp:
09/15/04 22:28:41 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
4 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h

    r4986 r5047  
    1717#pragma link C++ class MCalibrationIntensityQECam+;
    1818#pragma link C++ class MCalibrationIntensityRelTimeCam+;
     19#pragma link C++ class MCalibrationIntensityTestCam+;
    1920#pragma link C++ class MCalibrationCam+;
    2021#pragma link C++ class MCalibrationPix+;
     
    3637#pragma link C++ class MCalibrationBlindCamOneOldStyle+;
    3738#pragma link C++ class MCalibrationBlindCamTwoNewStyle+;
    38 #pragma link C++ class MCalibrationChargeBlindCamOneOldStyle+;
    39 #pragma link C++ class MCalibrationChargeBlindCamTwoNewStyle+;
    4039#pragma link C++ class MCalibrationChargeBlindCam+;
    4140#pragma link C++ class MCalibrationChargeBlindPix+;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc

    r5043 r5047  
    115115// --------------------------------------------------------------------------
    116116//
    117 // Deletes the following TObjArray's of MCalibrationPix containers (if exist):
     117// Deletes the following TOrdCollection's of MCalibrationPix containers (if exist):
    118118// - fPixels
    119119// - fAverageAreas
    120120// - fAverageSectors
    121121// 
    122 // Deletes the following TObjArray's of MBadPixelsPix containers (if exist):
     122// Deletes the following TOrdCollection's of MBadPixelsPix containers (if exist):
    123123// - fAverageBadAreas
    124124// - fAverageBadSectors
     
    149149// --------------------------------------
    150150//
    151 // Calls the ForEach macro for the TObjArray fPixels with the argument Clear()
     151// Calls the ForEach macro for the TOrdCollection fPixels with the argument Clear()
    152152//
    153153// Loops over the fAverageAreas, calling the function Clear() for
     
    221221// -------------------------------------------------------------------
    222222//
     223// Initialize the objects inside the TOrdCollection using the
     224// virtual function Add().
     225//
     226//
     227// InitSize can only increase the size, but not shrink.
     228//
     229// It can be called more than one time. New Containers are
     230// added only from the current size to the argument i.
    223231//
    224232void MCalibrationCam::InitSize(const UInt_t i)
     
    230238    return;
    231239 
    232   // Pixels->Expand(i);
    233 
    234240  if (i>save)
    235241    Add(save,i);
     
    257263// -------------------------------------------------------------------
    258264//
    259 // Calls TObjArray::ExpandCreate() for:
     265// Initialize the objects inside the TOrdCollections
    260266// - fAverageAreas
    261267// - fAverageBadAreas
     268// using the virtual function Add().
     269//
     270// InitSize can only increase the size, but not shrink.
     271//
     272// It can be called more than one time. New Containers are
     273// added only from the current size to the argument i.
    262274//
    263275void MCalibrationCam::InitAverageAreas(const UInt_t i)
     
    269281    return;
    270282 
    271   //fAverageAreas->Expand(i);
    272   //fAverageBadAreas->Expand(i);
    273 
    274283  fNumUnsuitable.Set(i);
    275284  fNumUnreliable.Set(i);
     
    292301// -------------------------------------------------------------------
    293302//
    294 // Calls TObjArray::ExpandCreate() for:
     303// Initialize the objects inside the TOrdCollections
    295304// - fAverageSectors
    296305// - fAverageBadSectors
     306// using the virtual function Add().
     307//
     308// InitSize can only increase the size, but not shrink.
     309//
     310// It can be called more than one time. New Containers are
     311// added only from the current size to the argument i.
    297312//
    298313void MCalibrationCam::InitAverageSectors(const UInt_t i)
     
    304319    return;
    305320 
    306   //fAverageSectors->Expand(i);
    307   //fAverageBadSectors->Expand(i);
    308 
    309321  if (i < save)
    310322    return;
     
    399411// --------------------------------------------------------------------------
    400412//
    401 // Returns the current size of the TObjArray fAverageAreas
     413// Returns the current size of the TOrdCollection fAverageAreas
    402414// independently if the MCalibrationPix is filled with values or not.
    403415//
     
    409421// --------------------------------------------------------------------------
    410422//
    411 // Returns the current size of the TObjArray fAverageSectors
     423// Returns the current size of the TOrdCollection fAverageSectors
    412424// independently if the MCalibrationPix is filled with values or not.
    413425//
     
    438450// --------------------------------------------------------------------------
    439451//
    440 // Returns the current size of the TObjArray fPixels
     452// Returns the current size of the TOrdCollection fPixels
    441453// independently if the MCalibrationPix is filled with values or not.
    442454//
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r5045 r5047  
    8181/////////////////////////////////////////////////////////////////////////////
    8282#include "MCalibrationChargeCam.h"
     83#include "MCalibrationChargePix.h"
    8384
    8485#include <TOrdCollection.h>
     
    9697#include "MCalibrationQEPix.h"
    9798
    98 #include "MCalibrationChargePix.h"
    9999#include "MCalibrationChargeBlindPix.h"
    100100#include "MCalibrationChargePINDiode.h"
     
    165165*/
    166166
    167 
     167// -------------------------------------------------------------------
     168//
     169// Add MCalibrationChargePix's in the ranges from - to to fPixels
     170//
    168171void MCalibrationChargeCam::Add(const UInt_t a, const UInt_t b)
    169172{
     
    172175}
    173176
    174 
     177// -------------------------------------------------------------------
     178//
     179// Add MCalibrationChargePix's in the ranges from - to to fAverageAreas
     180//
    175181void MCalibrationChargeCam::AddArea(const UInt_t a, const UInt_t b)
    176182{
     
    179185}
    180186
     187// -------------------------------------------------------------------
     188//
     189// Add MCalibrationChargePix's in the ranges from - to to fAverageSectors
     190//
    181191void MCalibrationChargeCam::AddSector(const UInt_t a, const UInt_t b)
    182192{
     
    583593}
    584594
    585 // --------------------------------------------------------------------------
    586 //
    587 // Calls MCalibrationChargePix::DrawClone()
    588 //
    589 void MCalibrationChargeCam::DrawPixelContent(Int_t idx) const
    590 {
    591   MCalibrationChargePix &pix = (MCalibrationChargePix&)(*this)[idx];
    592   pix.DrawClone();
    593 }
    594 
    595595
    596596
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h

    r5045 r5047  
    44#ifndef MARS_MCalibrationCam
    55#include "MCalibrationCam.h"
    6 #endif
    7 
    8 #ifndef ROOT_TArrayI
    9 #include <TArrayI.h>
    106#endif
    117
     
    3632  void   Clear ( Option_t *o="" );
    3733 
    38   // Draws
    39   void   DrawPixelContent(Int_t num)   const;   
    40 
    4134  // Getters
    4235  Bool_t  GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &ffactor );
  • trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc

    r5043 r5047  
    103103}
    104104
     105// -------------------------------------------------------------------
     106//
     107// Add MCalibrationQEPix's in the ranges from - to to fPixels
     108//
    105109void MCalibrationQECam::Add(const UInt_t a, const UInt_t b)
    106110{
     
    109113}
    110114
     115// -------------------------------------------------------------------
     116//
     117// Add MCalibrationQEPix's in the ranges from - to to fAverageAreas
     118//
    111119void MCalibrationQECam::AddArea(const UInt_t a, const UInt_t b)
    112120{
     
    115123}
    116124
     125// -------------------------------------------------------------------
     126//
     127// Add MCalibrationQEPix's in the ranges from - to to fAverageSectors
     128//
    117129void MCalibrationQECam::AddSector(const UInt_t a, const UInt_t b)
    118130{
     
    163175 
    164176  qecam.fFlags        = fFlags;
    165 
    166177  qecam.fCorningBlues = fCorningBlues;
    167178  qecam.fCorningReds  = fCorningReds;
    168179 
    169 }
    170 
    171 
    172 // --------------------------------------------------------------------------
    173 //
    174 // Not yet implemented
    175 //
    176 void MCalibrationQECam::DrawPixelContent(Int_t idx) const
    177 {
    178   return;
    179180}
    180181
  • trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.h

    r5018 r5047  
    3333protected:
    3434
    35   MArrayD fCorningBlues;                   //! Corning blues of the pixels (if available)
    36   MArrayD fCorningReds;                    //! Corning reds  of the pixels (if available)
     35  MArrayD fCorningBlues;                   // Corning blues of the pixels (if available)
     36  MArrayD fCorningReds;                    //o Corning reds  of the pixels (if available)
    3737
    3838public:
     
    4444 
    4545  // Others
    46   void    DrawPixelContent( Int_t num ) const;   
    4746  Bool_t  GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0 ) const;
    4847
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc

    r5043 r5047  
    261261}
    262262
    263 // --------------------------------------------------------------------------
    264 //
    265 // Calls MCalibrationPix::DrawClone()
    266 //
    267 void MCalibrationRelTimeCam::DrawPixelContent(Int_t idx) const
    268 {
    269   (*this)[idx].DrawClone();
    270 }
    271 
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.h

    r5019 r5047  
    2323  // Others
    2424  Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    25   void DrawPixelContent(Int_t num) const;   
    2625
    2726  ClassDef(MCalibrationRelTimeCam, 2)   // Container Rel. Arrival Time Calibration Results Camera
  • trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.cc

    r4986 r5047  
    2929// same calibration run (see MHCalibrationTestCam and MHCalibrationTestPix).
    3030//
    31 // Contains TClonesArrays for the following objects:
    32 // - fPixels:         Array of classes derived from MCalibrationTestPix, one entry
    33 //                    per pixel.
    34 // - fAverageAreas:   Array of classes derived from MCalibrationTestPix, one entry
    35 //                    per pixel AREA.
    36 // - fAverageSectors: Array of classes derived from MCalibrationTestPix, one entry
    37 //                    per camera SECTOR.
    38 //
    39 // Averaged values over one whole area index (e.g. inner or outer pixels for
    40 // the MAGIC camera), can be retrieved via:
    41 // MCalibrationTestPix &avpix = fTestCam->GetAverageArea(i)
    42 //
    43 // Averaged values over one whole camera sector can be retrieved via:
    44 // MCalibrationTestPix &avpix = fTestCam->GetAverageSector(i)
    45 //
    4631// See also: MCalibrationTestPix, MCalibrationTestCalc, MCalibrationQECam
    4732//           MHCalibrationTestPix, MHCalibrationTestCam             
     
    5136#include "MCalibrationTestPix.h"
    5237
    53 #include <TClonesArray.h>
     38#include <TOrdCollection.h>
    5439
    5540#include "MLog.h"
     
    8974  fTitle = title ? title : "Storage container for the Calibration Test Information in the camera";
    9075 
    91   fPixels            = new TClonesArray("MCalibrationTestPix",1);
    92   fAverageAreas      = new TClonesArray("MCalibrationTestPix",1);
    93   fAverageSectors    = new TClonesArray("MCalibrationTestPix",1);
    94 
    9576  Clear();
    96 }
    97 
    98 // --------------------------------------------------------------------------
    99 //
    100 // Deletes the following TClonesArray's of MCalibrationPix containers (if exist):
    101 // - fPixels
    102 // - fAverageAreas
    103 // - fAverageSectors
    104 // 
    105 MCalibrationTestCam::~MCalibrationTestCam()
    106 {
    107 
    108   delete fPixels;
    109   delete fAverageAreas;
    110   delete fAverageSectors;
    111  
    11277}
    11378
     
    12388  fNumUninterpolatedInMaxCluster = 0;
    12489
    125   {  fPixels        ->ForEach(TObject, Clear)();  }
    126   {  fAverageAreas  ->ForEach(TObject, Clear)();  }
    127   {  fAverageSectors->ForEach(TObject, Clear)();  }
    128  
    12990  return;
    13091}
     
    13293// -------------------------------------------------------------------
    13394//
    134 // Calls TClonesArray::ExpandCreate() for fPixels
    135 //
    136 void MCalibrationTestCam::InitSize(const UInt_t i)
    137 {
    138   fPixels->ExpandCreate(i);
     95// Add MCalibrationTestPix's in the ranges from - to to fPixels
     96//
     97void MCalibrationTestCam::Add(const UInt_t a, const UInt_t b)
     98{
     99  for (UInt_t i=a; i<b; i++)
     100    fPixels->AddAt(new MCalibrationTestPix,i);
    139101}
    140102
    141103// -------------------------------------------------------------------
    142104//
    143 // Calls TClonesArray::ExpandCreate() for:
    144 // - fAverageAreas
    145 //
    146 void MCalibrationTestCam::InitAverageAreas(const UInt_t i)
    147 {
    148 
    149   fAverageAreas->ExpandCreate(i);
    150 
    151   for (UInt_t j=0; j<i; j++)
    152     GetAverageArea(j).SetPixId(j);
    153  
    154   fNumUninterpolated.Set(i);
     105// Add MCalibrationTestPix's in the ranges from - to to fAverageAreas
     106//
     107void MCalibrationTestCam::AddArea(const UInt_t a, const UInt_t b)
     108{
     109  for (UInt_t i=a; i<b; i++)
     110    fAverageAreas->AddAt(new MCalibrationTestPix,i);
    155111}
    156112
    157113// -------------------------------------------------------------------
    158114//
    159 // Calls TClonesArray::ExpandCreate() for:
    160 // - fAverageSectors
    161 //
    162 void MCalibrationTestCam::InitAverageSectors(const UInt_t i)
    163 {
    164 
    165   fAverageSectors->ExpandCreate(i);
    166 
    167   for (UInt_t j=0; j<i; j++)
    168     GetAverageSector(j).SetPixId(j);
    169 
    170 }
    171 
    172 // -------------------------------------------------------------------
    173 //
    174 // Calls:
    175 // - InitSize()
    176 // - InitAverageAreas()
    177 // - InitAverageSectors()
    178 //
    179 void MCalibrationTestCam::Init(const MGeomCam &geom)
    180 {
    181 
    182   InitSize          (geom.GetNumPixels() );
    183   InitAverageAreas  (geom.GetNumAreas()  );
    184   InitAverageSectors(geom.GetNumSectors());
    185 }
    186 
    187 // --------------------------------------------------------------------------
    188 //
    189 // Returns the current size of the TClonesArray fAverageAreas
    190 // independently if the MCalibrationPix is filled with values or not.
    191 //
    192 const Int_t MCalibrationTestCam::GetAverageAreas() const
    193 {
    194   return fAverageAreas->GetEntriesFast();
    195 }
    196 
    197 // --------------------------------------------------------------------------
    198 //
    199 // Returns the current size of the TClonesArray fAverageSectors
    200 // independently if the MCalibrationPix is filled with values or not.
    201 //
    202 const Int_t MCalibrationTestCam::GetAverageSectors() const
    203 {
    204   return fAverageSectors->GetEntriesFast();
    205 }
    206 
    207 
    208 // --------------------------------------------------------------------------
    209 //
    210 // Get i-th pixel (pixel number)
    211 //
    212 MCalibrationTestPix &MCalibrationTestCam::operator[](UInt_t i)
    213 {
    214   return *static_cast<MCalibrationTestPix*>(fPixels->UncheckedAt(i));
    215 }
    216 
    217 // --------------------------------------------------------------------------
    218 //
    219 // Get i-th pixel (pixel number)
    220 //
    221 const MCalibrationTestPix &MCalibrationTestCam::operator[](UInt_t i) const
    222 {
    223   return *static_cast<MCalibrationTestPix*>(fPixels->UncheckedAt(i));
    224 }
    225 
    226 // --------------------------------------------------------------------------
    227 //
    228 // Returns the current size of the TClonesArray fPixels
    229 // independently if the MCalibrationTestPix is filled with values or not.
    230 //
    231 const Int_t MCalibrationTestCam::GetSize() const
    232 {
    233   return fPixels->GetEntriesFast();
    234 }
    235 
    236 // --------------------------------------------------------------------------
    237 //
    238 // Get i-th average pixel (area number)
    239 //
    240 MCalibrationTestPix &MCalibrationTestCam::GetAverageArea(UInt_t i)
    241 {
    242   return *static_cast<MCalibrationTestPix*>(fAverageAreas->UncheckedAt(i));
    243 }
    244 
    245 // --------------------------------------------------------------------------
    246 //
    247 // Get i-th average pixel (area number)
    248 //
    249 const MCalibrationTestPix &MCalibrationTestCam::GetAverageArea(UInt_t i) const
    250 {
    251   return *static_cast<MCalibrationTestPix*>(fAverageAreas->UncheckedAt(i));
    252 }
    253 
    254 // --------------------------------------------------------------------------
    255 //
    256 // Get i-th average pixel (sector number)
    257 //
    258 MCalibrationTestPix &MCalibrationTestCam::GetAverageSector(UInt_t i)
    259 {
    260   return *static_cast<MCalibrationTestPix*>(fAverageSectors->UncheckedAt(i));
    261 }
    262 
    263 // --------------------------------------------------------------------------
    264 //
    265 // Get i-th average pixel (sector number)
    266 //
    267 const MCalibrationTestPix &MCalibrationTestCam::GetAverageSector(UInt_t i) const
    268 {
    269   return *static_cast<MCalibrationTestPix*>(fAverageSectors->UncheckedAt(i));
    270 }
     115// Add MCalibrationTestPix's in the ranges from - to to fAverageSectors
     116//
     117void MCalibrationTestCam::AddSector(const UInt_t a, const UInt_t b)
     118{
     119  for (UInt_t i=a; i<b; i++)
     120    fAverageSectors->AddAt(new MCalibrationTestPix,i);
     121}
     122
    271123
    272124// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.h

    r4882 r5047  
    22#define MARS_MCalibrationTestCam
    33
    4 #ifndef MARS_MParContainer
    5 #include "MParContainer.h"
    6 #endif
    7 
    8 #ifndef MARS_MCamEvent
    9 #include "MCamEvent.h"
     4#ifndef MARS_MCalibrationCam
     5#include "MCalibrationCam.h"
    106#endif
    117
     
    1410#endif
    1511
    16 class TClonesArray;
    17 class MCalibrationTestPix;
    18 
    19 class MCalibrationTestCam : public MParContainer, public MCamEvent
     12class MCalibrationTestCam : public MCalibrationCam
    2013{
    2114private:
     
    2417  Int_t   fNumUninterpolatedInMaxCluster; // Number of not interpolateable pixels in biggest cluster
    2518
    26   TClonesArray *fPixels;                  //-> Array of MCalibrationTestPix, one per pixel
    27   TClonesArray *fAverageAreas;            //-> Array of MCalibrationTestPix, one per pixel area
    28   TClonesArray *fAverageSectors;          //-> Array of MCalibrationTestPix, one per camera sector
     19  void Add(const UInt_t a, const UInt_t b);
     20  void AddArea(const UInt_t a, const UInt_t b);
     21  void AddSector(const UInt_t a, const UInt_t b);
    2922 
    3023public:
    3124
    3225  MCalibrationTestCam(const char *name=NULL, const char *title=NULL);
    33   ~MCalibrationTestCam();
    3426 
    35   void   Clear ( Option_t *o="" );
     27  void Clear (Option_t *o="");
    3628 
    37   // Getters
    38   const Int_t                GetAverageAreas      ()             const;
    39         MCalibrationTestPix &GetAverageArea       ( UInt_t i );
    40   const MCalibrationTestPix &GetAverageArea       ( UInt_t i )   const;
    41         MCalibrationTestPix &GetAverageSector     ( UInt_t i );
    42   const Int_t                GetAverageSectors    ()             const; 
    43   const MCalibrationTestPix &GetAverageSector     ( UInt_t i   ) const;
    4429  const Int_t                GetNumUninterpolated ( Int_t aidx ) const {
    4530        return fNumUninterpolated[aidx];  }
     
    4833  Bool_t                     GetPixelContent      ( Double_t &val, Int_t idx,
    4934                                                    const MGeomCam &cam, Int_t type=0) const;
    50   const Int_t                GetSize              ()             const; 
    51 
    52         MCalibrationTestPix &operator[]           ( UInt_t i );
    53   const MCalibrationTestPix &operator[]           ( UInt_t i ) const;
    54 
    55   // Inits
    56   void  Init               ( const MGeomCam &geom );
    57   void  InitSize           ( const UInt_t i       );
    58   void  InitAverageAreas   ( const UInt_t i       );
    59   void  InitAverageSectors ( const UInt_t i       );
    6035 
    6136  // Prints
    62   void  Print              ( Option_t *o=""       ) const;
     37  void  Print (Option_t *o="") const;
    6338
    6439  // Setters   
  • trunk/MagicSoft/Mars/mcalib/Makefile

    r4986 r5047  
    4141           MCalibrationIntensityQECam.cc \
    4242           MCalibrationIntensityRelTimeCam.cc \
     43           MCalibrationIntensityTestCam.cc \
    4344           MCalibrationCam.cc \
    4445           MCalibrationPix.cc  \
     
    6061           MCalibrationBlindCamOneOldStyle.cc  \
    6162           MCalibrationBlindCamTwoNewStyle.cc  \
    62            MCalibrationChargeBlindCamOneOldStyle.cc  \
    63            MCalibrationChargeBlindCamTwoNewStyle.cc  \
    6463           MCalibrationChargeBlindCam.cc  \
    6564           MCalibrationChargeBlindPix.cc  \
Note: See TracChangeset for help on using the changeset viewer.