]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Authors: Oystein Djuvsland <oysteind@ift.uib.no> * | |
5 | * * | |
6 | * Permission to use, copy, modify and distribute this software and its * | |
7 | * documentation strictly for non-commercial purposes is hereby granted * | |
8 | * without fee, provided that the above copyright notice appears in all * | |
9 | * copies and that both the copyright notice and this permission notice * | |
10 | * appear in the supporting documentation. The authors make no claims * | |
11 | * about the suitability of this software for any purpose. It is * | |
12 | * provided "as is" without express or implied warranty. * | |
13 | **************************************************************************/ | |
14 | ||
15 | #include "AliHLTCaloRecoParamHandler.h" | |
16 | #include "AliDetectorRecoParam.h" | |
17 | #include "AliCDBEntry.h" | |
18 | #include "AliCDBManager.h" | |
19 | #include "TObjArray.h" | |
20 | ||
21 | AliHLTCaloRecoParamHandler::AliHLTCaloRecoParamHandler ( TString det ) : | |
22 | AliHLTCaloConstantsHandler(det) | |
23 | ,fLogWeight(4.5) | |
24 | ,fRecPointMemberThreshold(0.01) | |
25 | ,fRecPointThreshold(0.1) | |
26 | ,fRecoParamPtr(0) | |
27 | ,fRecoParamPath(det, "Calib", "RecoParam") | |
28 | { | |
29 | // See header file for class documentation | |
30 | ||
31 | } | |
32 | ||
33 | ||
34 | AliHLTCaloRecoParamHandler::~AliHLTCaloRecoParamHandler() | |
35 | { | |
36 | // See header file for class documentation | |
37 | ||
38 | } | |
39 | ||
40 | ||
41 | ||
42 | Int_t AliHLTCaloRecoParamHandler::GetParametersFromCDB() | |
43 | { | |
44 | // See header file for documentation | |
45 | ||
46 | if(fRecoParamPath.GetPath()) | |
47 | { | |
48 | // HLTInfo("configure from entry %s", path.GetPath()); | |
49 | AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(fRecoParamPath/*,GetRunNo()*/); | |
50 | if (pEntry) | |
51 | { | |
52 | TObjArray *paramArray = dynamic_cast<TObjArray*>(pEntry->GetObject()); | |
53 | fRecoParamPtr = dynamic_cast<AliDetectorRecoParam*>((paramArray)->At(0)); | |
54 | ||
55 | if(!fRecoParamPtr) | |
56 | { | |
57 | return -1; | |
58 | } | |
59 | } | |
60 | else | |
61 | { | |
62 | // HLTError("can not fetch object \"%s\" from OCDB", path); | |
63 | return -1; | |
64 | } | |
65 | } | |
66 | FillParameters(); | |
67 | return 0; | |
68 | } |