]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTMisc.cxx
Why the h*ll do we make a remote commit when pulling?
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTMisc.cxx
index 4417547240af12bc8480bb60ce883325e4f2de18..5795bb498260b5beb0bb5c3cb8acf0d5a014a326 100644 (file)
@@ -1,7 +1,7 @@
 // $Id$
 
 //**************************************************************************
-//* This file is property of and copyright by the ALICE HLT Project        * 
+//* This file is property of and copyright by the                          * 
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //*                                                                        *
 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
@@ -29,19 +29,24 @@ ClassImp(AliHLTMisc);
 
 AliHLTMisc::AliHLTMisc()
 {
-  // see header file for function documentation
+  // Abstract interface of various glue functions implemented in dynamically
+  // loaded libraries.
+  //
+  // The HLT base library is independent from AliRoot and binds AliRoot
+  // functionality via dynamic libraries. The provided methods can be used
+  // from any module library without introducing additional dependencies.
 }
 
 AliHLTMisc::~AliHLTMisc()
 {
-  // see header file for function documentation
+  // destructor
 }
 
 AliHLTMisc* AliHLTMisc::fgInstance=NULL;
 
 AliHLTMisc& AliHLTMisc::Instance()
 {
-  // see header file for function documentation
+  // get global instance of the interface implementation
   if (!fgInstance) {
     fgInstance=LoadInstance((AliHLTMisc*)NULL, "AliHLTMiscImplementation", ALIHLTMISC_LIBRARY);
   }
@@ -71,7 +76,7 @@ int AliHLTMisc::GetCDBRunNo() const
   return -1;
 }
 
-AliCDBEntry* AliHLTMisc::LoadOCDBEntry(const char* /*path*/, int /*runNo*/, int /*version*/, int /*subVersion*/) const
+AliCDBEntry* AliHLTMisc::LoadOCDBEntry(const char* /*path*/, int /*runNo*/) const
 {
   // default method, functionality is implemented in the child class
   return NULL;
@@ -101,6 +106,18 @@ AliHLTUInt64_t AliHLTMisc::GetTriggerMask(AliRawReader* /*rawReader*/) const
   return 0;
 }
 
+AliHLTUInt32_t AliHLTMisc::GetTimeStamp(AliRawReader* /*rawReader*/) const
+{
+  // default method, functionality is implemented in the child class
+  return kMaxUInt;
+}
+
+AliHLTUInt32_t AliHLTMisc::GetEventType(AliRawReader* /*rawReader*/) const
+{
+  // default method, functionality is implemented in the child class
+  return 0;
+}
+
 Double_t AliHLTMisc::GetBz()
 {
   // default method, functionality is implemented in the child class
@@ -132,6 +149,49 @@ int AliHLTMisc::Copy(const AliHLTGlobalTriggerDecision* /*pDecision*/, TObject*
   return -EFAULT;
 }
 
+int AliHLTMisc::InitStreamerInfos(const char* /*ocdbEntry*/) const
+{
+  // default method, functionality is implemented in the child class
+  return -EFAULT;
+}
+
+int AliHLTMisc::InitStreamerInfos(TObjArray* /*pSchemas*/) const
+{
+  // default method, functionality is implemented in the child class
+  return -EFAULT;
+}
+
+int AliHLTMisc::MergeStreamerInfo(TObjArray* /*tgt*/, const TObjArray* /*src*/, int /*iVerbosity*/) const
+{
+  // default method, functionality is implemented in the child class
+  return 0;
+}
+
+void AliHLTMisc::SetAliESDtrackOnlineModeFlag(bool /*mode*/) const
+{
+  // default method, functionality is implemented in the child class
+}
+
+bool AliHLTMisc::GetAliESDtrackOnlineModeFlag() const
+{
+  // default method, functionality is implemented in the child class
+  return false;
+}
+
+AliHLTMisc::AliOnlineGuard::AliOnlineGuard(bool mode)
+  : fMode(false)
+{
+  // store the current value and set the flag
+  fMode=AliHLTMisc::Instance().GetAliESDtrackOnlineModeFlag();
+  AliHLTMisc::Instance().SetAliESDtrackOnlineModeFlag(mode);
+}
+
+AliHLTMisc::AliOnlineGuard::~AliOnlineGuard()
+{
+  // restore old value of the flag
+  AliHLTMisc::Instance().SetAliESDtrackOnlineModeFlag(fMode);
+}
+
 ostream  &operator<<(ostream &out, const AliHLTComponentDataType &dt)
 {
   // printout of AliHLTComponentDataType struct