]>
Commit | Line | Data |
---|---|---|
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 AliHLTMisc.h | |
20 | /// @author Matthias Richter | |
21 | /// @date 2009-07-07 | |
22 | /// @brief Definition of various glue functions implemented in dynamically | |
23 | /// loaded libraries | |
24 | ||
25 | #include "AliHLTMisc.h" | |
26 | ||
27 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
28 | ClassImp(AliHLTMisc); | |
29 | ||
30 | AliHLTMisc::AliHLTMisc() | |
31 | { | |
32 | // see header file for function documentation | |
33 | } | |
34 | ||
35 | AliHLTMisc::~AliHLTMisc() | |
36 | { | |
37 | // see header file for function documentation | |
38 | } | |
39 | ||
40 | AliHLTMisc* AliHLTMisc::fgInstance=NULL; | |
41 | ||
42 | AliHLTMisc& AliHLTMisc::Instance() | |
43 | { | |
44 | // see header file for function documentation | |
45 | if (!fgInstance) { | |
46 | fgInstance=LoadInstance((AliHLTMisc*)NULL, "AliHLTMiscImplementation", ALIHLTMISC_LIBRARY); | |
47 | } | |
48 | if (!fgInstance) { | |
49 | AliHLTLogging log; | |
50 | fgInstance=new AliHLTMisc; | |
51 | log.Logging(kHLTLogError, "AliHLTMisc::Instance", "HLT Analysis", "falling back to default AliHLTMisc instance"); | |
52 | } | |
53 | return *fgInstance; | |
54 | } | |
55 | ||
56 | int AliHLTMisc::InitCDB(const char* /*cdbpath*/) | |
57 | { | |
58 | // default method, functionality is implemented in the child class | |
59 | return -EFAULT; | |
60 | } | |
61 | ||
62 | int AliHLTMisc::SetCDBRunNo(int /*runNo*/) | |
63 | { | |
64 | // default method, functionality is implemented in the child class | |
65 | return -EFAULT; | |
66 | } | |
67 | ||
68 | int AliHLTMisc::GetCDBRunNo() const | |
69 | { | |
70 | // default method, functionality is implemented in the child class | |
71 | return -1; | |
72 | } | |
73 | ||
74 | AliCDBEntry* AliHLTMisc::LoadOCDBEntry(const char* /*path*/, int /*runNo*/, int /*version*/, int /*subVersion*/) const | |
75 | { | |
76 | // default method, functionality is implemented in the child class | |
77 | return NULL; | |
78 | } | |
79 | ||
80 | TObject* AliHLTMisc::ExtractObject(AliCDBEntry* /*entry*/) const | |
81 | { | |
82 | // default method, functionality is implemented in the child class | |
83 | return NULL; | |
84 | } | |
85 | ||
86 | int AliHLTMisc::CheckOCDBEntries(const TMap* const /*pMap*/) const | |
87 | { | |
88 | // default method, functionality is implemented in the child class | |
89 | return -ENOENT; | |
90 | } | |
91 | ||
92 | int AliHLTMisc::InitMagneticField() const | |
93 | { | |
94 | // default method, functionality is implemented in the child class | |
95 | return -EFAULT; | |
96 | } | |
97 | ||
98 | AliHLTUInt64_t AliHLTMisc::GetTriggerMask(AliRawReader* /*rawReader*/) const | |
99 | { | |
100 | // default method, functionality is implemented in the child class | |
101 | return 0; | |
102 | } | |
103 | ||
104 | Double_t AliHLTMisc::GetBz() | |
105 | { | |
106 | // default method, functionality is implemented in the child class | |
107 | return 0.0; | |
108 | } | |
109 | ||
110 | Double_t AliHLTMisc::GetBz(const Double_t */*r*/) | |
111 | { | |
112 | // default method, functionality is implemented in the child class | |
113 | return 0.0; | |
114 | } | |
115 | ||
116 | void AliHLTMisc::GetBxByBz(const Double_t r[3], Double_t b[3]) | |
117 | { | |
118 | // default method, functionality is implemented in the child class | |
119 | if (!r || !b) return; | |
120 | return; | |
121 | } | |
122 | ||
123 | const TClass* AliHLTMisc::IsAliESDHLTDecision() const | |
124 | { | |
125 | // default method, functionality is implemented in the child class | |
126 | return NULL; | |
127 | } | |
128 | ||
129 | int AliHLTMisc::Copy(const AliHLTGlobalTriggerDecision* /*pDecision*/, TObject* /*pESDHLTDecision*/) const | |
130 | { | |
131 | // default method, functionality is implemented in the child class | |
132 | return -EFAULT; | |
133 | } | |
134 | ||
135 | ostream &operator<<(ostream &out, const AliHLTComponentDataType &dt) | |
136 | { | |
137 | // printout of AliHLTComponentDataType struct | |
138 | char id[kAliHLTComponentDataTypefIDsize+1]; | |
139 | strncpy(id, dt.fID, kAliHLTComponentDataTypefIDsize); | |
140 | id[kAliHLTComponentDataTypefIDsize]=0; | |
141 | char origin[kAliHLTComponentDataTypefOriginSize+1]; | |
142 | strncpy(origin, dt.fOrigin, kAliHLTComponentDataTypefOriginSize); | |
143 | origin[kAliHLTComponentDataTypefOriginSize]=0; | |
144 | out << "{" << id << ":" << origin << "}"; | |
145 | return out; | |
146 | } |