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

Last change on this file since 867 was 867, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.3 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/////////////////////////////////////////////////////////////////////////////
26//
27// MHMcEnergies
28//
29// This class holds and array of MHMcEnergy objects in order to be able
30// to compute the threshold for each of the different trigger conditions
31// in a root file.
32//
33////////////////////////////////////////////////////////////////////////////
34#include "MHMcEnergies.h"
35
36#include "MParList.h"
37#include "MHMcEnergy.h"
38
39ClassImp(MHMcEnergies);
40
41// --------------------------------------------------------------------------
42//
43// Default Constructor.
44//
45MHMcEnergies::MHMcEnergies(const UInt_t count, const char *name, const char *title)
46 : fNum(count)
47{
48 char aux[25]="MHMcEnergies";
49 sprintf(aux+12, "[%i]", fNum);
50
51 *fName = name ? name : aux;
52 *fTitle = title ? title : "Container for a MC enegry histogram" ;
53
54 fHists = new TClonesArray("MHMcEnergy", fNum);
55
56 for (UInt_t i=0; i<fNum; i++)
57 new ((*fHists)[i]) MHMcEnergy(i);
58}
59
60// --------------------------------------------------------------------------
61//
62// Default Destructor.
63//
64MHMcEnergies::~MHMcEnergies()
65{
66 delete fHists;
67}
68
69// --------------------------------------------------------------------------
70//
71// Add to the parameter list all the MHMcEnergy objects contained in the array.
72//
73void MHMcEnergies::AddEntriesToList(MParList *plist)
74{
75 for (UInt_t i=0; i<fNum; i++)
76 plist->AddToList((MParContainer*)(*fHists)[i]);
77}
Note: See TracBrowser for help on using the repository browser.