]>
Commit | Line | Data |
---|---|---|
77f350f7 | 1 | // $Id: AliHLTCaloConstantsHandler.cxx 34223 2009-08-12 07:55:37Z richterm $ |
2 | ||
3 | //************************************************************************** | |
4 | //* This file is property of and copyright by the ALICE HLT Project * | |
5 | //* ALICE Experiment at CERN, All rights reserved. * | |
6 | //* * | |
4f4b7ba4 | 7 | //* Primary Authors: Svein Lindal <slindal@fys.uio.no> |
77f350f7 | 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 AliHLTCaloConstantsHandler.h | |
20 | /// @author Svein Lindal | |
21 | /// @date 2009-10-21 | |
22 | /// @brief Handler class that helps create an instance of the right | |
23 | /// AliHLTCaloConstants child class | |
24 | /// (e.g. AliHLTPHOSConstants or AliHLTEMCALConstants) | |
25 | ||
26 | ||
27 | #include "TString.h" | |
28 | #include "AliHLTCaloConstantsHandler.h" | |
29 | #include "AliHLTCaloConstants.h" | |
30 | #include "AliHLTMisc.h" | |
714c51de | 31 | #include "AliHLTLogging.h" |
32 | ||
77f350f7 | 33 | |
8daca632 | 34 | ClassImp(AliHLTCaloConstantsHandler) |
4f4b7ba4 | 35 | |
76ffc0ce | 36 | |
77f350f7 | 37 | AliHLTCaloConstantsHandler::AliHLTCaloConstantsHandler(TString det): |
714c51de | 38 | fCaloConstants(0) |
77f350f7 | 39 | { |
40 | if (det.CompareTo("PHOS") == 0) { | |
76ffc0ce | 41 | fCaloConstants = AliHLTMisc::LoadInstance( ( AliHLTCaloConstants* ) NULL, |
42 | "AliHLTPHOSConstants", "libAliHLTPHOS.so"); | |
43 | } | |
44 | else | |
45 | { | |
46 | fCaloConstants = AliHLTMisc::LoadInstance( ( AliHLTCaloConstants* ) NULL, | |
47 | "AliHLTEMCALConstants" , "libAliHLTEMCAL.so"); | |
48 | } | |
714c51de | 49 | |
50 | if( fCaloConstants == 0 ) | |
51 | { | |
52 | AliHLTLogging *log = new AliHLTLogging(); | |
53 | log->Logging(kHLTLogFatal, __FILE__, "fCaloConstants == ZERO ", "fCaloConstants == ZERO " ); | |
54 | delete log; | |
55 | } | |
77f350f7 | 56 | } |
57 | ||
58 | ||
59 | AliHLTCaloConstantsHandler::~AliHLTCaloConstantsHandler() | |
60 | { | |
61 | //Default destructor | |
62 | } |