3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* for The ALICE HLT Project. *
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 //**************************************************************************
19 /** @file AliHLTPluginBase.cxx
20 @author Matthias Richter
22 @brief Base class for AliRoot HLT plugins.
25 #include "AliHLTPluginBase.h"
26 #include "AliHLTSystem.h"
27 #include "AliHLTDataBuffer.h"
29 /** ROOT macro for the implementation of ROOT specific class methods */
30 ClassImp(AliHLTPluginBase)
32 AliHLTPluginBase::AliHLTPluginBase()
34 // see header file for class documentation
36 // refer to README to build package
38 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
42 AliHLTPluginBase::~AliHLTPluginBase()
44 // see header file for class documentation
45 if (--fNofInstances<=0) {
49 // 2010-04-07 not sure whether this is the best place for
50 // the global cleanup of memory pages. In case of AliReconstruction
51 // there is no cleanup method for the reconstructor plugins. They
52 // are just deleted at the end.
53 // However, here we can assume that some global cleanup takes place
54 // when we arrive at this point.
55 AliHLTDataBuffer::AliHLTRawPage::GlobalClean();
59 void AliHLTPluginBase::InitInstance()
61 // see header file for class documentation
62 if (!fpSystem) fpSystem=new AliHLTSystem;
65 AliHLTSystem* AliHLTPluginBase::GetInstance()
67 // see header file for class documentation
68 if (!fpSystem) InitInstance();
73 AliHLTSystem* AliHLTPluginBase::fpSystem=NULL;
75 int AliHLTPluginBase::fNofInstances=0;