source: trunk/MagicSoft/Mars/mmontecarlo/MMcEnerThre.cc@ 841

Last change on this file since 841 was 836, checked in by jlopez, 23 years ago
Container with the array of MMcEnerHisto TObjects which contains the informantion of the energy threshold
File size: 2.2 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): Javier Lopez (jlopez@ifae.es)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26// //
27// MMcEnerThre //
28// //
29// Hold the energy threshold information for the different trigger //
30// conditions //
31// //
32/////////////////////////////////////////////////////////////////////////////
33#include "MMcEnerThre.h"
34
35#include "MLog.h"
36
37ClassImp(MMcEnerThre)
38
39MMcEnerThre::MMcEnerThre(const int dim,
40 const char *name, const char *title) : fNumTrigCond(1)
41{
42 //
43 // default constructor
44 //
45
46 *fName = name ? name : "MMcEnerThre";
47 *fTitle = title ? title : "Storage container for Energy Threshold informantion for the different trigger conditions";
48
49 fNumTrigCond = dim;
50
51 fArray = new TClonesArray("MMcEnerHisto",fNumTrigCond);
52
53 //
54 // TClonesArray: The 'new operator with placement' must be used
55 //
56 for (int i=0; i<fNumTrigCond; i++)
57 new ((*fArray)[i]) MMcEnerHisto(i);
58
59}
60
61MMcEnerThre::~MMcEnerThre()
62{
63 // FIXME: Do we have to delete the objects itself?
64 delete fArray;
65}
Note: See TracBrowser for help on using the repository browser.