Fixes for Coverity defects
[u/mrichter/AliRoot.git] / PHOS / AliPHOSv2.cxx
CommitLineData
bea63bea 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
bea63bea 15/* $Id$ */
702ab87e 16
17/* History of cvs commits:
18 *
19 * $Log$
e939a978 20 * Revision 1.24 2005/05/28 14:19:05 schutz
21 * Compilation warnings fixed by T.P.
22 *
702ab87e 23 */
24
bea63bea 25//_________________________________________________________________________
5f20d3fb 26// Version of AliPHOSv1 which keeps all hits in TreeH
27// AddHit, StepManager,and FinishEvent are redefined
bea63bea 28//
5f20d3fb 29//*-- Author: Gines MARTINEZ (SUBATECH)
ed4205d8 30//*-- Modified Nov. 22 2000 by Dmitri Peressounko
31// All hits are stored.
32// Note, that primaries will not be assigned to digits:
2f04ed65 33// because of tiny energy deposition at each step.
ed4205d8 34//
bea63bea 35
36// --- ROOT system ---
cede8016 37#include "TClonesArray.h"
bea63bea 38
39// --- Standard library ---
40
bea63bea 41
42// --- AliRoot header files ---
43
44#include "AliPHOSv2.h"
45#include "AliPHOSHit.h"
bea63bea 46
47ClassImp(AliPHOSv2)
48
49//____________________________________________________________________________
5f20d3fb 50AliPHOSv2::AliPHOSv2()
51{
52 // default ctor
ed4205d8 53
5f20d3fb 54}
55
56//____________________________________________________________________________
bea63bea 57AliPHOSv2::AliPHOSv2(const char *name, const char *title):
e04976bd 58AliPHOSv1(name,title)
bea63bea 59{
5f20d3fb 60 // ctor
bea63bea 61}
b37750a6 62//__________________________________________________________________________
5f20d3fb 63AliPHOSv2::~AliPHOSv2()
bea63bea 64{
5f20d3fb 65 // dtor
bea63bea 66}
67
68//____________________________________________________________________________
2af5445a 69void AliPHOSv2::AddHit(Int_t shunt, Int_t primary, Int_t Id, Float_t * hits)
5f20d3fb 70{
71 // Add a hit to the hit list.
5f20d3fb 72
5f20d3fb 73 AliPHOSHit *newHit ;
5f20d3fb 74
2af5445a 75 newHit = new AliPHOSHit(shunt, primary, Id, hits) ;
5f20d3fb 76
ed4205d8 77 new((*fHits)[fNhits]) AliPHOSHit(*newHit) ;
fca6f6ef 78 fNhits++ ;
bea63bea 79
fca6f6ef 80 delete newHit;
5f20d3fb 81
bea63bea 82}
83
fca6f6ef 84