]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALTick.cxx
changes to warn when delete on global object is called, and init variables
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTick.cxx
CommitLineData
51ecce10 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 **************************************************************************/
15
16/* $Id$ */
17
18//_________________________________________________________________________
14ce0a6e 19// Auxiliary class to
20// help calculate the
21// time of crossing
22// of the threshold by
23// the front edge of the
24// time signal
51ecce10 25//
26//*-- Author : Dmitri Peressounko (SUBATECH)
27//////////////////////////////////////////////////////////////////////////////
28
29// --- ROOT system ---
30
31// --- Standard library ---
32
33// --- AliRoot header files ---
34#include "AliEMCALTick.h"
35
36ClassImp(AliEMCALTick)
37
38
39//____________________________________________________________________________
18a21c7c 40AliEMCALTick::AliEMCALTick()
41 : TObject(),
42 fTime(0),
43 fA(0),
44 fB(0)
51ecce10 45{
d64c959b 46 //ctor
51ecce10 47}
48
49//____________________________________________________________________________
18a21c7c 50AliEMCALTick::AliEMCALTick(Float_t time, Float_t a, Float_t slope)
51 : TObject(),
52 fTime(time),
53 fA(a),
54 fB(slope)
51ecce10 55{
d64c959b 56 //ctor
51ecce10 57}
0a4cb131 58
59
60
51ecce10 61//____________________________________________________________________________
d64c959b 62Int_t AliEMCALTick::Compare(const TObject * obj) const
63{
64 // compares time values
51ecce10 65 if(obj->InheritsFrom("AliEMCALTick")){
66 AliEMCALTick * tick = (AliEMCALTick *) obj ;
67 if(fTime < tick->fTime)
68 return -1 ;
69 else
70 if(fTime == tick->fTime)
71 return 0 ;
72 else
73 return 1 ;
74 }
75 else
76 return 1 ;
77}
78//____________________________________________________________________________
79void AliEMCALTick::operator+=(AliEMCALTick const & tick)
80{
81 // Adds the amplitude of digits and completes the list of primary particles
82 // if amplitude is larger than
83
84 fA = fA + fB*(tick.fTime - fTime) + tick.fA ;
85 fB = fB + tick.fB ;
86 if(tick.fTime > fTime)
87 fTime = tick.fTime ;
88
89}