source: trunk/MagicSoft/Mars/mhist/MHMcEnergies.cc@ 852

Last change on this file since 852 was 851, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.6 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 05/2001 (jlopez@ifae.es)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25#include "MHMcEnergies.h"
26
27#include "MParList.h"
28#include "MHMcEnergy.h"
29
30ClassImp(MHMcEnergies)
31
32MHMcEnergies::MHMcEnergies(const UInt_t count, const char *name, const char *title)
33 : fNum(count)
34{
35 //
36 // default constructor
37 //
38 char aux[25]="MHMcEnergies";
39 sprintf(aux+12, "[%i]", fNum);
40
41 *fName = name ? name : aux;
42 *fTitle = title ? title : "Container for a MC enegry histogram" ;
43
44 fHists = new TClonesArray("MHMcEnergy", fNum);
45
46 for (UInt_t i=0; i<fNum; i++)
47 new ((*fHists)[i]) MHMcEnergy(i);
48}
49
50MHMcEnergies::~MHMcEnergies()
51{
52 delete fHists;
53}
54
55void MHMcEnergies::AddEntriesToList(MParList *plist)
56{
57 for (UInt_t i=0; i<fNum; i++)
58 plist->AddToList((MParContainer*)(*fHists)[i]);
59}
Note: See TracBrowser for help on using the repository browser.