]>
Commit | Line | Data |
---|---|---|
f1207f29 | 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 AliHLTEsdManager.cxx | |
20 | @author Matthias Richter | |
21 | @date | |
22 | @brief Manager for merging and writing of HLT ESDs | |
23 | */ | |
24 | ||
25 | #include "AliHLTEsdManager.h" | |
aa43fc6e | 26 | #include "AliHLTMisc.h" |
f1207f29 | 27 | #include "TSystem.h" |
28 | #include "TClass.h" | |
29 | #include "TROOT.h" | |
30 | ||
31 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
32 | ClassImp(AliHLTEsdManager) | |
33 | ||
34 | AliHLTEsdManager::AliHLTEsdManager() | |
35 | : | |
36 | AliHLTLogging() | |
37 | { | |
38 | // see header file for class documentation | |
39 | // or | |
40 | // refer to README to build package | |
41 | // or | |
42 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
43 | } | |
44 | ||
45 | AliHLTEsdManager::~AliHLTEsdManager() | |
46 | { | |
47 | // see header file for class documentation | |
48 | } | |
49 | ||
50 | const char* AliHLTEsdManager::fgkImplName="AliHLTEsdManagerImplementation"; | |
51 | const char* AliHLTEsdManager::fgkImplLibrary="libHLTrec.so"; | |
52 | ||
53 | ||
54 | AliHLTEsdManager* AliHLTEsdManager::New() | |
55 | { | |
56 | // see header file for class documentation | |
aa43fc6e | 57 | return AliHLTMisc::LoadInstance((AliHLTEsdManager*)NULL, fgkImplName, fgkImplLibrary); |
f1207f29 | 58 | } |
59 | ||
60 | void AliHLTEsdManager::Delete(AliHLTEsdManager* instance) | |
61 | { | |
62 | // see header file for class documentation | |
63 | if (!instance) return; | |
64 | ||
65 | // check if the library is still there in order to have the | |
66 | // destructor available | |
acc2e692 | 67 | TClass* pCl=TClass::GetClass(fgkImplName); |
68 | if (!pCl) { | |
69 | AliHLTLogging log; | |
70 | log.Logging(kHLTLogError, "AliHLTEsdManager::Delete", "ESD handling", "potential memory leak: libHLTrec library not available, skipping destruction %p", instance); | |
71 | return; | |
72 | } | |
f1207f29 | 73 | |
74 | delete instance; | |
75 | } |