]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/pendolino/AliHLTPendolino.cxx
adding correction maps for Hybrid tracks for PbPb (from 2010 - HIJING)
[u/mrichter/AliRoot.git] / HLT / pendolino / AliHLTPendolino.cxx
index 4d14799234f2b3f790d92c8fe2f4c9da8f42ed3b..531f9eb62945b9b1e2d798a8509d914a57ed7ab0 100644 (file)
 //* provided "as is" without express or implied warranty.                  *
 //**************************************************************************
 
-/** @file   AliHLTPendolino.cxx
-    @author Sebastian Bablok
-    @date   
-    @brief  
-*/
+/ @file   AliHLTPendolino.cxx
+//  @author Sebastian Bablok
+//  @date   
+//  @brief  
+//  @note   maintained by Matthias.Richter@ift.uib.no
 
 #include "AliHLTPendolino.h"
 
 #include "AliHLTPredictionProcessorInterface.h"
 #include "AliHLTPendolinoLogger.h"
 #include "AliHLTPendolinoLoggerOStream.h"
+#include "AliHLTLogging.h"
 
 #include <AliCDBPath.h>
 #include <AliCDBEntry.h>
 
 using namespace std;
 
-
 ClassImp(AliHLTPendolino)
-               
+
 
 /** Static string to define a local storage for the OCDB contact. */
-const TString AliHLTPendolino::kLOCAL_STORAGE_DEFINE = "local://";
+const TString AliHLTPendolino::fgkLocalStorageDefine = "local://";
 
-const char* AliHLTPendolino::kHLTInterfaceModule = "Pendolino-Core";
+const char* AliHLTPendolino::fgkHLTInterfaceModule = "Pendolino-Core";
 
-const TString AliHLTPendolino::kTaxiListBaseFolder = getenv("ALIHLT_T_HCDBDIR"); 
+const TString AliHLTPendolino::fgkTaxiListBaseFolder = getenv("ALIHLT_T_HCDBDIR"); 
 //"/opt/T-HCDB/lists/lists-taxi/";
 
-const TString AliHLTPendolino::kTaxiListFolderName = "lists/lists-taxi/";
+const TString AliHLTPendolino::fgkTaxiListFolderName = "lists/lists-taxi/";
 
-const TString AliHLTPendolino::kTaxiListPendolino = "Pendolino.list";
+const TString AliHLTPendolino::fgkTaxiListPendolino = "Pendolino.list";
 
-const Int_t AliHLTPendolino::kMAX_LINE_LENGTH = 256;
+const Int_t AliHLTPendolino::fgkMaxLineLength = 256;
 
-const Int_t AliHLTPendolino::kHLTPendolinoException = -10;
+const Int_t AliHLTPendolino::fgkHLTPendolinoException = -10;
 
-const Int_t AliHLTPendolino::kHLTPendolinoBadCast = -9;
+const Int_t AliHLTPendolino::fgkHLTPendolinoBadCast = -9;
 
-const Int_t AliHLTPendolino::kHLTPendolinoNotPredictProc = -8;
+const Int_t AliHLTPendolino::fgkHLTPendolinoNotPredictProc = -8;
 
-const Int_t AliHLTPendolino::kHLTPendolinoModuleNotExisting = -7;
+const Int_t AliHLTPendolino::fgkHLTPendolinoModuleNotExisting = -7;
 
-const Int_t AliHLTPendolino::kHLTPendolinoNoDCS = -6;
+const Int_t AliHLTPendolino::fgkHLTPendolinoNoDCS = -6;
 
 //const Int_t AliHLTPendolino::
 
@@ -82,9 +82,16 @@ AliHLTPendolino::AliHLTPendolino(Int_t run, TString HCDBbase, TString runType,
                        fRunType(runType), fRunNumber(run),
                        fHCDBPath(""), fPredictionProcessorMap(),
                        fpLogger(0), fOwnLogger(kFALSE),
-                       fStartTime(startTime), fEndTime(endTime) {
+                       fStartTime(startTime), fEndTime(endTime) 
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
        // C-tor of AliHLTPendolino
-       fHCDBPath = kLOCAL_STORAGE_DEFINE + HCDBbase;
+       fHCDBPath = fgkLocalStorageDefine + HCDBbase;
        if (logger == 0) {
                fpLogger = new AliHLTPendolinoLoggerOStream();
                fOwnLogger = kTRUE;
@@ -112,29 +119,29 @@ AliHLTPendolino::~AliHLTPendolino() {
                     (fPredictionProcessorMap.GetValue(key));
 
             if (aPredict == 0) {
-                Log(kHLTInterfaceModule, 
+                Log(fgkHLTInterfaceModule, 
                                                " *** ERROR, cannot delete registered processor '"
                                                + detector + "'; does not seem to be a PredictionProcessor.");
                 continue;
             }
-                       Log(kHLTInterfaceModule, " ### [DEBUG] deleting PredictProc '" + 
+                       Log(fgkHLTInterfaceModule, " ### [DEBUG] deleting PredictProc '" + 
                                        detector + "'.");
                        delete aPredict;
         } catch (std::bad_cast) {
             // failed -> is not a AliHLTPredictionProcessorInterface implementation
             // -> discarding call
-            Log(kHLTInterfaceModule, " *** ERROR, cannot delete registered processor '"
+            Log(fgkHLTInterfaceModule, " *** ERROR, cannot delete registered processor '"
                     + detector + "'; does not seem to be a PredictionProcessor..");
             continue;
 
         } catch (std::exception& e) {
-            Log(kHLTInterfaceModule, 
+            Log(fgkHLTInterfaceModule, 
                                        " *** Exception in call for deleting PrecitionProcessor '"
                     + detector + "'.");
             continue;
         }
     }
-       Log(kHLTInterfaceModule, " ### [DEBUG] Deleting of PredictionProcessors finished.");
+       Log(fgkHLTInterfaceModule, " ### [DEBUG] Deleting of PredictionProcessors finished.");
 
        // clean up logger
        if ((fOwnLogger) && (fpLogger != 0)) {
@@ -153,23 +160,23 @@ Bool_t AliHLTPendolino::Store(const AliCDBPath& path, TObject* object,
        Int_t startNumber = 0;
        Int_t endNumber = 0;
        AliCDBManager* man = 0; 
-       AliCDBStorage* local_hcdb = 0;  
+       AliCDBStorage* localHCDB = 0;   
 
        startNumber = ((fRunNumber - validityStart) <= 0) ? 0 : (fRunNumber - validityStart);
        endNumber = (validityInfinite) ? AliCDBRunRange::Infinity() : fRunNumber;
 
        man = AliCDBManager::Instance();
     if (man == 0) {
-               Log(kHLTInterfaceModule, " *** ERROR cannot obtain a CDB Manager reference.");
+               Log(fgkHLTInterfaceModule, " *** ERROR cannot obtain a CDB Manager reference.");
                return kFALSE;
        }
 
     // contact local storage (HCDB)
-    local_hcdb = man->GetStorage(fHCDBPath.Data());
-    if (local_hcdb == 0) {
+    localHCDB = man->GetStorage(fHCDBPath.Data());
+    if (localHCDB == 0) {
                TString msg(" *** ERROR in initiating HCDB: ");
                msg += fHCDBPath;
-        Log(kHLTInterfaceModule, msg.Data());
+        Log(fgkHLTInterfaceModule, msg.Data());
         man->DestroyActiveStorages();
         return kFALSE;
     }
@@ -185,12 +192,12 @@ Bool_t AliHLTPendolino::Store(const AliCDBPath& path, TObject* object,
     // Why using current run number as version number ???
        AliCDBId entryID(path, startNumber, endNumber, fRunNumber, -1);
        
-       if (local_hcdb->Put(object, entryID, metaData)) {
+       if (localHCDB->Put(object, entryID, metaData)) {
                retVal = kTRUE;
        } else {
                TString msg(" *** Unable to store DCS data to HCDB: ");
                msg += entryID.ToString();
-       Log(kHLTInterfaceModule, msg.Data());
+       Log(fgkHLTInterfaceModule, msg.Data());
     }
 
        man->DestroyActiveStorages();
@@ -204,7 +211,7 @@ Bool_t AliHLTPendolino::StoreReferenceData(const AliCDBPath& path,
        // Disabled Function inherited from interface
        TString msg(" ~~~ PredictProc tries to store reference data to '" 
                        + path.GetPath() + "'. Discarding call in Pendolino.");
-       Log(kHLTInterfaceModule, msg.Data());
+       Log(fgkHLTInterfaceModule, msg.Data());
 
        return kFALSE;
 }
@@ -220,7 +227,7 @@ Bool_t AliHLTPendolino::StoreReferenceFile(const char* detector,
        msg = " ~~~ PredictProc (" + det + ") tries to store reference file (" +
                        filename + ") to '" + gridname + 
                        "'. Discarding call in Pendolino.";
-    Log(kHLTInterfaceModule, msg.Data());
+    Log(fgkHLTInterfaceModule, msg.Data());
 
     return kFALSE;
 }
@@ -235,7 +242,7 @@ Bool_t AliHLTPendolino::StoreRunMetadataFile(const char* localFile,
     TString gridname(gridFileName);
     msg = " ~~~ PredictProc tries to store 'run meta data' file (" +
             filename + ") to '" + gridname + "'. Discarding call in Pendolino.";
-    Log(kHLTInterfaceModule, msg.Data());
+    Log(fgkHLTInterfaceModule, msg.Data());
 
     return kFALSE;
 }
@@ -251,7 +258,7 @@ const char* AliHLTPendolino::GetFile(Int_t system, const char* detector,
        TString from(GetSystemName(system));
        msg = " ~~~ PredictProc (" + det + ") requests file (" + filename + ") from '" 
                        + src + "' at " + from + ". Discarding call in Pendolino.";
-       Log(kHLTInterfaceModule, msg.Data());
+       Log(fgkHLTInterfaceModule, msg.Data());
 
        return NULL;
 }
@@ -260,7 +267,16 @@ const char* AliHLTPendolino::GetTriggerConfiguration() {
     // Disabled Function inherited from interface
     TString msg;
     msg = " ~~~ PredictProc tries to request Trigger configuration, this is disabled. Discarding call in Pendolino.";
-       Log(kHLTInterfaceModule, msg.Data());
+       Log(fgkHLTInterfaceModule, msg.Data());
+
+       return NULL;
+}
+
+const char* AliHLTPendolino::GetTriggerDetectorMask() {
+    // Disabled Function inherited from interface
+    TString msg;
+    msg = " ~~~ PredictProc tries to request Trigger configuration, this is disabled. Discarding call in Pendolino.";
+       Log(fgkHLTInterfaceModule, msg.Data());
 
        return NULL;
 }
@@ -275,7 +291,7 @@ TList* AliHLTPendolino::GetFileSources(Int_t system, const char* detector,
     TString from(GetSystemName(system));
     msg = " ~~~ PredictProc (" + det + ") requests file sources for (" + filename 
                        + ") from '" + from + ". Discarding call in Pendolino.";
-    Log(kHLTInterfaceModule, msg.Data());
+    Log(fgkHLTInterfaceModule, msg.Data());
 
     return NULL;
 }
@@ -290,7 +306,7 @@ TList* AliHLTPendolino::GetFileIDs(Int_t system, const char* detector,
     TString from(GetSystemName(system));
     msg = " ~~~ PredictProc (" + det + ") requests file IDs for (" + filename
             + ") from '" + from + ". Discarding call in Pendolino.";
-    Log(kHLTInterfaceModule, msg.Data());
+    Log(fgkHLTInterfaceModule, msg.Data());
 
     return NULL;
 }
@@ -303,7 +319,7 @@ const char* AliHLTPendolino::GetRunParameter(const char* /*lbEntry*/) {
 // maybe using a parameter file, where these settings are stored at start up by
 // the starting script and a dedicated class read and stores its content.
 
-       Log(kHLTInterfaceModule, 
+       Log(fgkHLTInterfaceModule, 
                        " ### GetRunParameter are not defined, yet. Feature will be available soon.");
        return NULL;
 }
@@ -320,12 +336,11 @@ AliCDBEntry* AliHLTPendolino::GetFromOCDB(const char* detector,
                        const AliCDBPath& path) {
        // fetches entry from HCDB
        AliCDBManager *man = AliCDBManager::Instance();
-       AliCDBEntry* entry = 0;
        
        if (man == 0) {
                TString msg(" *** ERROR, cannot obtain a CDB Manager reference for: ");
                msg += detector;
-               Log(kHLTInterfaceModule, msg.Data());
+               Log(fgkHLTInterfaceModule, msg.Data());
                return NULL;
        }
 
@@ -333,19 +348,19 @@ AliCDBEntry* AliHLTPendolino::GetFromOCDB(const char* detector,
        if (hcdb == 0) {
                TString msg(" *** ERROR, cannot acquire HCDB storage (");
                msg += fHCDBPath + ") for fetching data for Pendolino.";
-               Log(kHLTInterfaceModule, msg.Data());
+               Log(fgkHLTInterfaceModule, msg.Data());
                return NULL;
        }
        
-       entry = hcdb->Get(path, fRunNumber);
-
-       if (entry == 0) {
-               TString msg(" ~~~ WARNING: no valid entry for '");
-               msg += path.GetPath() + "' in HCDB for run number ";
-               msg += fRunNumber;
-               Log(kHLTInterfaceModule, msg.Data());
+       AliCDBEntry* entry=NULL;
+       try {
+         // exceptions for the loading of OCDB objects have been introduced in r61012 on
+         // Feb 20 2013. This allows to reduce this function to try and catch of AliCDBManager::Get
+         entry=hcdb->Get(path, fRunNumber);
+       }
+       catch (...) {
+         // for now we just ignore the exception and return NULL
        }
-
        return entry;
        
 /*
@@ -355,7 +370,7 @@ AliCDBEntry* AliHLTPendolino::GetFromOCDB(const char* detector,
        } catch (std::bad_cast) {
                TString msg(" *** ERROR, bad cast of HCDB entry (");
                msg += path.GetPath() + ") after fetching from HCDB.";
-               Log(kHLTInterfaceModule, msg.Data());
+               Log(fgkHLTInterfaceModule, msg.Data());
                return NULL;
        }
        return entry;
@@ -364,7 +379,7 @@ AliCDBEntry* AliHLTPendolino::GetFromOCDB(const char* detector,
 }
 
 
-Bool_t AliHLTPendolino::includeAliCDBEntryInList(const TString& entryPath) {
+Bool_t AliHLTPendolino::IncludeAliCDBEntryInList(const TString& entryPath) {
        // includes entry in Taxi list (objects to be fetched from OCDB)
        Bool_t bRet = kFALSE;
        ifstream infile;
@@ -372,21 +387,21 @@ Bool_t AliHLTPendolino::includeAliCDBEntryInList(const TString& entryPath) {
        TString filename;
        TTimeStamp ts;
 
-       filename = kTaxiListBaseFolder + "/" + kTaxiListFolderName + 
-                       kTaxiListPendolino;
-       Log(kHLTInterfaceModule, filename + " [DEBUG] filename");
+       filename = fgkTaxiListBaseFolder + "/" + fgkTaxiListFolderName + 
+                       fgkTaxiListPendolino;
+       Log(fgkHLTInterfaceModule, filename + " [DEBUG] filename");
 
        infile.open(filename, ios_base::in);
        if (infile.is_open()) {
-               char line[kMAX_LINE_LENGTH];
+               char line[fgkMaxLineLength];
 
                while (!infile.eof()) {
-                       infile.getline(line, kMAX_LINE_LENGTH);
+                       infile.getline(line, fgkMaxLineLength);
                        if (strncmp(line, entryPath.Data(), entryPath.Length()) == 0) {
                                        // entry already exists, leave function after proper clean up
                                TString msg(" --- Entry '");
                                msg += entryPath + "' is already included in Taxi list file.";
-                               Log(kHLTInterfaceModule, msg.Data());   
+                               Log(fgkHLTInterfaceModule, msg.Data()); 
                                infile.close();
                                return kTRUE;
                        }
@@ -398,7 +413,7 @@ Bool_t AliHLTPendolino::includeAliCDBEntryInList(const TString& entryPath) {
                if (!outfile.is_open()) {
                        TString msg(" *** Unable to create Pendolino list file '");
                        msg += filename + "' for Taxi. Continueing without list update...";
-                       Log(kHLTInterfaceModule, msg.Data());
+                       Log(fgkHLTInterfaceModule, msg.Data());
                        return kFALSE;
                }
 //             outfile.seekp(-1, ios::end);
@@ -410,13 +425,13 @@ Bool_t AliHLTPendolino::includeAliCDBEntryInList(const TString& entryPath) {
 
                TString msg(" +++ Included missing entry '");
                msg += entryPath + "' in Taxi list file.";
-               Log(kHLTInterfaceModule, msg.Data());
+               Log(fgkHLTInterfaceModule, msg.Data());
                bRet = kTRUE;
                
        } else {
                TString msg(" ~~~ Unable to open Pendolino list file '");
                msg += filename + "' for Taxi. Creating new one.";
-               Log(kHLTInterfaceModule, msg.Data());
+               Log(fgkHLTInterfaceModule, msg.Data());
                outfile.open(filename, ios_base::out);
                
                if (outfile.is_open()) {
@@ -434,7 +449,7 @@ Bool_t AliHLTPendolino::includeAliCDBEntryInList(const TString& entryPath) {
                } else {
                        msg=" *** Unable to create Pendolino list file '";
                        msg += filename + "' for Taxi. Continueing without list update...";
-                       Log(kHLTInterfaceModule, msg.Data());
+                       Log(fgkHLTInterfaceModule, msg.Data());
                }       
        }
        
@@ -444,7 +459,7 @@ Bool_t AliHLTPendolino::includeAliCDBEntryInList(const TString& entryPath) {
 
 void AliHLTPendolino::Log(const char* detector, const char* message) {
        // logging function
-       fpLogger->log(detector, message);
+        if (fpLogger) fpLogger->log(detector, message);
        // refer data to a Pendolino Logger, which can take care of it
 }
 
@@ -452,7 +467,7 @@ void AliHLTPendolino::Log(const char* detector, const char* message) {
 void AliHLTPendolino::RegisterPreprocessor(AliPreprocessor* preprocessor) {
        // registers a PredictionProcessor
        if (preprocessor == 0) {
-               Log(kHLTInterfaceModule, 
+               Log(fgkHLTInterfaceModule, 
                                " *** ERROR: Cannot register NULL pointer as PredictionProcessor.");
                return; 
        }
@@ -460,7 +475,7 @@ void AliHLTPendolino::RegisterPreprocessor(AliPreprocessor* preprocessor) {
     TString detector(preprocessor->GetName());
 
     if (fPredictionProcessorMap.GetValue(detector.Data())) {
-        Log(kHLTInterfaceModule, " ~~~ Already registered PredictionProcessor '" +
+        Log(fgkHLTInterfaceModule, " ~~~ Already registered PredictionProcessor '" +
                 detector + "'. Ignoring call.");
         return;
     }
@@ -476,17 +491,17 @@ void AliHLTPendolino::RegisterPreprocessor(AliPreprocessor* preprocessor) {
        // TODO move this in seperated call outside RegisterPreprocessor(..)
        // safety reason, since preprocessor is not completely generated yet
        if (!preprocessor->ProcessDCS()) {
-               Log(kHLTInterfaceModule, " *** PredictionProcessor '" + detector +
+               Log(fgkHLTInterfaceModule, " *** PredictionProcessor '" + detector +
                                "' not registered, because it will not process DCS values.");
                return;
        }
-       Log(kHLTInterfaceModule, "Module Processes DCS values, Registering PredictionProc " 
+       Log(fgkHLTInterfaceModule, "Module Processes DCS values, Registering PredictionProc " 
                        + detector);
        
        // don't use this check, if there are several PreProcs from one detector
        // they will have all have different names
        //if (GetDetPos(detector.Data()) < 0) {
-       //      Log(kHLTInterfaceModule, "   *** Invalid detector name: " + detector);
+       //      Log(fgkHLTInterfaceModule, "   *** Invalid detector name: " + detector);
        //}
 
        // Check if preprocessor is actually PredictionProcessor
@@ -507,15 +522,15 @@ void AliHLTPendolino::RegisterPreprocessor(AliPreprocessor* preprocessor) {
        } catch (std::bad_cast) { 
                // failed -> is not a AliHLTPredictionProcessorInterface implementation
                // -> discarding call
-               Log(kHLTInterfaceModule, " *** Cannot register PredictionProcessor '" + detector +
+               Log(fgkHLTInterfaceModule, " *** Cannot register PredictionProcessor '" + detector +
                                "'. Does not implement the AliHLTPredictionProcessorInterface.");
                return;
        } catch (std::exception& e) {
-               Log(kHLTInterfaceModule, " *** Exception in the registering of the PredictProc.");              
+               Log(fgkHLTInterfaceModule, " *** Exception in the registering of the PredictProc.");            
        }
 
        if (fPredictionProcessorMap.GetValue(detector.Data())) {
-               Log(kHLTInterfaceModule, " ~~~ Already registered PredictionProcessor '" +
+               Log(fgkHLTInterfaceModule, " ~~~ Already registered PredictionProcessor '" +
                                detector + "'. Ignoring call.");
                return;
        }
@@ -525,7 +540,7 @@ void AliHLTPendolino::RegisterPreprocessor(AliPreprocessor* preprocessor) {
 }
 
 
-UInt_t AliHLTPendolino::setToPredictMaking() {
+UInt_t AliHLTPendolino::SetToPredictMaking() {
        // switches prdiction making on in all registered PredictioProcessors
        UInt_t retVal = 0;
 
@@ -544,7 +559,7 @@ UInt_t AliHLTPendolino::setToPredictMaking() {
                                        (fPredictionProcessorMap.GetValue(key));
                
                        if (aPredict == 0) {
-                               Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+                               Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                                                + detector +
                                                "'. Does not implement the AliHLTPredictionProcessorInterface.");
                                continue;
@@ -554,19 +569,19 @@ UInt_t AliHLTPendolino::setToPredictMaking() {
                        if ((aPredict->ProcessDCS()) && (aPredict->makePrediction() == 0)) {
                                retVal++;
                        } else {
-                               Log(kHLTInterfaceModule, " *** PredictionProcessor '" + detector
+                               Log(fgkHLTInterfaceModule, " *** PredictionProcessor '" + detector
                                                + "' does not allow DCS processing or failed to init prediction making.");
                        }
                } catch (std::bad_cast) {
                // failed -> is not a AliHLTPredictionProcessorInterface implementation
            // -> discarding call
-               Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '" 
+               Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '" 
                                        + detector +
                    "'. Does not implement the AliHLTPredictionProcessorInterface.");
                continue;
 
                } catch (std::exception& e) {
-                       Log(kHLTInterfaceModule, " *** Exception in call for makePrediction of " 
+                       Log(fgkHLTInterfaceModule, " *** Exception in call for makePrediction of " 
                                        + detector + ".");
                        continue;
                }
@@ -585,46 +600,46 @@ Int_t AliHLTPendolino::setToPredictMaking(TString detector) {
                TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
 
                if (object == 0) {
-                       Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
+                       Log(fgkHLTInterfaceModule, " *** No PredictionProcessor for '" +
                                        detector + "' registered.");
-                       return kHLTPendolinoModuleNotExisting;
+                       return fgkHLTPendolinoModuleNotExisting;
                }
                                
                aPredict = dynamic_cast<AliHLTPredictionProcessorInterface*> (object);
 
                if (aPredict == 0) {
-                       Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+                       Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                                        + detector +
                                        "'. Does not implement the AliHLTPredictionProcessorInterface.");
-                       return kHLTPendolinoNotPredictProc;
+                       return fgkHLTPendolinoNotPredictProc;
                }
 //            detector = aPredict->GetName();
 
                if (!((aPredict->ProcessDCS()) && (aPredict->makePrediction() == 0))) {
-                       Log(kHLTInterfaceModule, " *** PredictionProcessor '" + detector +
+                       Log(fgkHLTInterfaceModule, " *** PredictionProcessor '" + detector +
                                        "' does not allow DCS processing or failed to init prediction making.");
-                       retVal = kHLTPendolinoNoDCS;
+                       retVal = fgkHLTPendolinoNoDCS;
                }
                
        } catch (std::bad_cast) {
                // failed -> is not a AliHLTPredictionProcessorInterface implementation
                // -> discarding call
-               Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+               Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                                + detector +
                                "'. Does not implement the AliHLTPredictionProcessorInterface.");
-               retVal = kHLTPendolinoBadCast;
+               retVal = fgkHLTPendolinoBadCast;
 
        } catch (std::exception& e) {
-               Log(kHLTInterfaceModule, " *** Exception in call for makePrediction of "
+               Log(fgkHLTInterfaceModule, " *** Exception in call for makePrediction of "
                                + detector + ".");
-               retVal = kHLTPendolinoException;
+               retVal = fgkHLTPendolinoException;
     }
        
     return retVal;
 }
 
 
-Int_t AliHLTPendolino::prepareDCSValues(TString detector, TMap* DCSValues) {
+Int_t AliHLTPendolino::PrepareDCSValues(TString detector, TMap* DCSValues) {
        // function to prepare retrieved DCS values
        Int_t retVal = 0;
        AliHLTPredictionProcessorInterface* aPredict = 0;
@@ -634,18 +649,18 @@ Int_t AliHLTPendolino::prepareDCSValues(TString detector, TMap* DCSValues) {
                TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
                
                if (object == 0) {
-                       Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
+                       Log(fgkHLTInterfaceModule, " *** No PredictionProcessor for '" +
                                        detector + "' registered.");
-                       return kHLTPendolinoModuleNotExisting;
+                       return fgkHLTPendolinoModuleNotExisting;
                }
                                
                aPredict = dynamic_cast<AliHLTPredictionProcessorInterface*> (object);
 
                if (aPredict == 0) {
-                       Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+                       Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                                        + detector +
                                        "'. Does not implement the AliHLTPredictionProcessorInterface.");
-                       return kHLTPendolinoNotPredictProc;
+                       return fgkHLTPendolinoNotPredictProc;
                }
 
                retVal = aPredict->Process(DCSValues);
@@ -654,21 +669,21 @@ Int_t AliHLTPendolino::prepareDCSValues(TString detector, TMap* DCSValues) {
        } catch (std::bad_cast) {
                // failed -> is not a AliHLTPredictionProcessorInterface implementation
                // -> discarding call
-               Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+               Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                                + detector +
                                "'. Does not implement the AliHLTPredictionProcessorInterface.");
-               retVal = kHLTPendolinoBadCast;
+               retVal = fgkHLTPendolinoBadCast;
 
        } catch (std::exception& e) {
-               Log(kHLTInterfaceModule, " *** Exception in call prepareDCSValues of "
+               Log(fgkHLTInterfaceModule, " *** Exception in call prepareDCSValues of "
                                + detector + ".");
-               retVal = kHLTPendolinoException;
+               retVal = fgkHLTPendolinoException;
        }
        
        return retVal;  
 }
 
-TMap* AliHLTPendolino::emulateDCSMap(TString detector, TString aliasName) {
+TMap* AliHLTPendolino::EmulateDCSMap(TString detector, TString aliasName) {
        // function to generate test data of given PredictionProcessor
        TMap* result = NULL;
        AliHLTPredictionProcessorInterface* aPredict = 0;
@@ -678,7 +693,7 @@ TMap* AliHLTPendolino::emulateDCSMap(TString detector, TString aliasName) {
         TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
 
         if (object == 0) {
-            Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
+            Log(fgkHLTInterfaceModule, " *** No PredictionProcessor for '" +
                     detector + "' registered.");
             return result;
         }
@@ -686,7 +701,7 @@ TMap* AliHLTPendolino::emulateDCSMap(TString detector, TString aliasName) {
         aPredict = dynamic_cast<AliHLTPredictionProcessorInterface*> (object);
 
         if (aPredict == 0) {
-            Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+            Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                     + detector +
                     "'. Does not implement the AliHLTPredictionProcessorInterface.");
             return result;
@@ -698,12 +713,12 @@ TMap* AliHLTPendolino::emulateDCSMap(TString detector, TString aliasName) {
     } catch (std::bad_cast) {
         // failed -> is not a AliHLTPredictionProcessorInterface implementation
         // -> discarding call
-        Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+        Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                 + detector +
                 "'. Does not implement the AliHLTPredictionProcessorInterface.");
 
     } catch (std::exception& e) {
-        Log(kHLTInterfaceModule, " *** Exception in call emulateDCSMap of "
+        Log(fgkHLTInterfaceModule, " *** Exception in call emulateDCSMap of "
                 + detector + ".");
     }
        return result;
@@ -721,18 +736,18 @@ Int_t AliHLTPendolino::initPredictProc(TString detector, Int_t run,
         TObject* object = fPredictionProcessorMap.GetValue(detector.Data());
 
         if (object == 0) {
-            Log(kHLTInterfaceModule, " *** No PredictionProcessor for '" +
+            Log(fgkHLTInterfaceModule, " *** No PredictionProcessor for '" +
                     detector + "' registered.");
-            return kHLTPendolinoModuleNotExisting;
+            return fgkHLTPendolinoModuleNotExisting;
         }
 
         aPredict = dynamic_cast<AliHLTPredictionProcessorInterface*> (object);
 
         if (aPredict == 0) {
-            Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+            Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                     + detector +
                     "'. Does not implement the AliHLTPredictionProcessorInterface.");
-            return kHLTPendolinoNotPredictProc;
+            return fgkHLTPendolinoNotPredictProc;
         }
                
                // Initialize Prediction Processor
@@ -741,27 +756,49 @@ Int_t AliHLTPendolino::initPredictProc(TString detector, Int_t run,
     } catch (std::bad_cast) {
         // failed -> is not a AliHLTPredictionProcessorInterface implementation
         // -> discarding call
-        Log(kHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
+        Log(fgkHLTInterfaceModule, " *** Cannot use PredictionProcessor '"
                 + detector +
                 "'. Does not implement the AliHLTPredictionProcessorInterface.");
-        retVal = kHLTPendolinoBadCast;
+        retVal = fgkHLTPendolinoBadCast;
 
     } catch (std::exception& e) {
-        Log(kHLTInterfaceModule, " *** Exception in call prepareDCSValues of "
+        Log(fgkHLTInterfaceModule, " *** Exception in call prepareDCSValues of "
                 + detector + ".");
-        retVal = kHLTPendolinoException;
+        retVal = fgkHLTPendolinoException;
     }
 
     return retVal;
 }
 
 
-const UInt_t AliHLTPendolino::GetStartTimeDCSQuery() {
+UInt_t AliHLTPendolino::GetStartTimeDCSQuery()
+{
        return fStartTime;
 }
 
-const UInt_t AliHLTPendolino::GetEndTimeDCSQuery() {
+UInt_t AliHLTPendolino::GetEndTimeDCSQuery()
+{
        return fEndTime;
 }
 
+void AliHLTPendolino::Log(const char* name , const char* message, UInt_t level)
+{
+  // overloaded function of the shuttle interface
+  // translate into HLT log message
+  AliHLTLogging log;
+  AliHLTComponentLogSeverity severity=kHLTLogInfo;
+  switch (level) {
+  case 1: severity=kHLTLogBenchmark; break;
+  case 2: severity=kHLTLogDebug; break;
+  case 3: severity=kHLTLogInfo; break;
+  case 4: severity=kHLTLogWarning; break;
+  default: severity=kHLTLogError;
+  }
+  log.LoggingVarargs(severity, "AliHLTPendolino", name , __FILE__ , __LINE__ , message);
+}
 
+// this global object is not for use, it just makes sure that
+// AliHLTPendolino can be instantiated. In case of missing virtual
+// functions a compilation error will indicate potential problems in
+// the pendolino macros
+AliHLTPendolino gAliHLTPendolino(0,"");