]>
Commit | Line | Data |
---|---|---|
7bf6c76d | 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 AliHLTPluginBase.cxx | |
20 | @author Matthias Richter | |
21 | @date | |
22 | @brief Base class for AliRoot HLT plugins. | |
23 | */ | |
24 | ||
25 | #include "AliHLTPluginBase.h" | |
26 | #include "AliHLTSystem.h" | |
27 | ||
28 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
29 | ClassImp(AliHLTPluginBase) | |
30 | ||
31 | AliHLTPluginBase::AliHLTPluginBase() | |
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 | AliHLTPluginBase::~AliHLTPluginBase() | |
42 | { | |
43 | // see header file for class documentation | |
44 | if (--fNofInstances<=0) delete fpSystem; | |
45 | fpSystem=NULL; | |
46 | } | |
47 | ||
48 | void AliHLTPluginBase::InitInstance() | |
49 | { | |
50 | // see header file for class documentation | |
51 | if (!fpSystem) fpSystem=new AliHLTSystem; | |
52 | } | |
53 | ||
54 | AliHLTSystem* AliHLTPluginBase::GetInstance() | |
55 | { | |
56 | // see header file for class documentation | |
57 | if (!fpSystem) InitInstance(); | |
58 | return fpSystem; | |
59 | } | |
60 | ||
61 | ||
62 | AliHLTSystem* AliHLTPluginBase::fpSystem=NULL; | |
63 | ||
64 | int AliHLTPluginBase::fNofInstances=0; |