]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTReconstructorBase.cxx
Minor cleanup of code.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTReconstructorBase.cxx
1 // $Id$
2
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //*                                                                        *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
8 //*                  for The ALICE HLT Project.                            *
9 //*                                                                        *
10 //* Permission to use, copy, modify and distribute this software and its   *
11 //* documentation strictly for non-commercial purposes is hereby granted   *
12 //* without fee, provided that the above copyright notice appears in all   *
13 //* copies and that both the copyright notice and this permission notice   *
14 //* appear in the supporting documentation. The authors make no claims     *
15 //* about the suitability of this software for any purpose. It is          *
16 //* provided "as is" without express or implied warranty.                  *
17 //**************************************************************************
18
19 /** @file   AliHLTReconstructorBase.cxx
20     @author Matthias Richter
21     @date   
22     @brief  Base class for HLT reconstruction classes.
23 */
24
25 #include "AliHLTReconstructorBase.h"
26 #include "AliHLTSystem.h"
27
28 /** ROOT macro for the implementation of ROOT specific class methods */
29 ClassImp(AliHLTReconstructorBase)
30
31 AliHLTReconstructorBase::AliHLTReconstructorBase()
32 {
33   // see header file for class documentation
34   // or
35   // refer to README to build package
36   // or
37   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
38   fNofInstances++;
39 }
40
41 AliHLTReconstructorBase::~AliHLTReconstructorBase()
42 {
43   // see header file for class documentation
44   if (--fNofInstances<=0) delete fpSystem;
45   fpSystem=NULL;
46 }
47
48 void AliHLTReconstructorBase::InitInstance()
49 {
50   // see header file for class documentation
51   if (!fpSystem) fpSystem=new AliHLTSystem;
52 }
53
54 AliHLTSystem* AliHLTReconstructorBase::GetInstance()
55 {
56   // see header file for class documentation
57   if (!fpSystem) InitInstance();
58   return fpSystem;
59 }
60
61
62 AliHLTSystem* AliHLTReconstructorBase::fpSystem=NULL;
63
64 int AliHLTReconstructorBase::fNofInstances=0;