source: tags/Mars-V0.10.2/mcalib/MCalibrationIntensityBlindCam.cc

Last change on this file was 5046, checked in by gaug, 20 years ago
*** empty log message ***
File size: 3.1 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Markus Gaug 11/2003 <mailto:markus@ifae.es>
19!
20! Copyright: MAGIC Software Development, 2000-2004
21!
22!
23\* ======================================================================== */
24/////////////////////////////////////////////////////////////////////////////
25//
26// MCalibrationIntensityBlindCam
27//
28// Storage container for intensity charge calibration results.
29//
30// Individual MCalibrationBlindCam's can be retrieved with:
31// - GetCam() yielding the current cam.
32// - GetCam("name") yielding the current camera with name "name".
33// - GetCam(i) yielding the i-th camera.
34//
35// See also: MCalibrationIntensityCam, MCalibrationBlindCam,
36// MCalibrationBlindPix, MCalibrationChargeCalc, MCalibrationQECam
37// MHCalibrationChargeBlindPix, MHCalibrationChargeBlindCam
38//
39/////////////////////////////////////////////////////////////////////////////
40#include "MCalibrationIntensityBlindCam.h"
41#include "MCalibrationBlindCam.h"
42
43#include <TOrdCollection.h>
44
45ClassImp(MCalibrationIntensityBlindCam);
46
47using namespace std;
48
49// --------------------------------------------------------------------------
50//
51// Default constructor.
52//
53MCalibrationIntensityBlindCam::MCalibrationIntensityBlindCam(const char *name, const char *title)
54{
55
56 fName = name ? name : "MCalibrationIntensityBlindCam";
57 fTitle = title ? title : "Results of the Intensity Calibration";
58
59 InitSize(1);
60}
61
62// -------------------------------------------------------------------
63//
64// Add MCalibrationBlindCam's in the ranges from - to.
65//
66void MCalibrationIntensityBlindCam::Add(const UInt_t from, const UInt_t to)
67{
68 for (UInt_t i=from; i<to; i++)
69 fCams->AddAt(new MCalibrationBlindCam,i);
70}
71
72// --------------------------------------------------------------------------
73//
74// Calls TOrdCollection::Expand() for fCams and initialze one MCalibrationBlindCam
75// and copy the entries
76//
77void MCalibrationIntensityBlindCam::InitSize(const UInt_t n)
78{
79
80 MCalibrationBlindCam *oldcam = NULL;
81
82 if (n>1)
83 oldcam = (MCalibrationBlindCam*)GetCam();
84
85 MCalibrationIntensityCam::InitSize(n);
86
87 MCalibrationBlindCam *newcam = (MCalibrationBlindCam*)GetCam();
88
89 if (oldcam)
90 oldcam->Copy(*newcam);
91}
92
Note: See TracBrowser for help on using the repository browser.