ROOT logo
//-*- Mode: C++ -*-
// $Id: AliHLTPreprocessor.h 23318 2008-01-14 12:43:28Z hristov $

#ifndef ALIHLTPREPROCESSOR_H
#define ALIHLTPREPROCESSOR_H
//* This file is property of and copyright by the                          * 
//* ALICE Experiment at CERN, All rights reserved.                         *
//* See cxx source for full Copyright notice                               *

/// @file   AliHLTPreprocessor.h
/// @author Matthias Richter
/// @date   2008-01-22
/// @brief  Container for HLT module preprocessors, acts to the outside as
///         HLT preprocessor used by the Offline Shuttle 
/// 

#include "TList.h"
#include "AliPreprocessor.h"
#include "AliHLTShuttleInterface.h"

/**
 * @class AliHLTPreprocessor
 * Implementation of the HLT version for the Shuttle Preprocessor.
 * Since HLT requires a more modular concept of the pre-processors, this
 * class acts as HLT pre-processor to the outside and container class for
 * the specific HLT module pre-processors to the inside.
 *
 * The base class for HLT module preprocessors is provided by the
 * AliHLTModulePreprocessor class, which implements the same interface as
 * the AliPreprocessor.
 *
 * The main purpose of the container class is to loop over all module
 * preprocessors and to make the AliPreprocessor interface methods
 * publicly available.
 */
class AliHLTPreprocessor : public AliPreprocessor , public AliHLTShuttleInterface
{
 public:
  /**
   * Constructor for AliHLTPreprocessor
   *
   * @param shuttle pointer to the hosting shuttle
   */
  AliHLTPreprocessor(AliShuttleInterface* shuttle);
  /** Destructor */
  virtual ~AliHLTPreprocessor();

  /**
   * Initialize the Preprocessor.
   *
   * @param run run number
   * @param startTime start time of data
   * @param endTime end time of data
   */
  virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);

  /**
   * Function to process data. Inside the preparation and storing to OCDB
   * should be handled.
   *
   * @param dcsAliasMap the map containing aliases and corresponding DCS
   * 			values and timestamps
   *
   * @return 0 on success; a value greater than 0 refers to an error
   */
  virtual UInt_t Process(TMap* dcsAliasMap);

  /**
   * Indicates if DCS data can be processed.
   *
   * @return true if DCS data can be processed, else false. 
   */
  virtual Bool_t ProcessDCS() {return kFALSE;}

  /** Define for name of the HLT Preproc */
  static const char* fgkHLTPreproc; 			// see above

  /** Get the run no which has been previously initialized */
  Int_t PreprocessorGetRun() {return fRun;}

  /** Get the start time no which has been previously initialized */
  UInt_t PreprocessorGetStartTime() {return fStartTime;}

  /** Get the end time no which has been previously initialized */
  UInt_t PreprocessorGetEndTime() {return fEndTime;}

  // AliPreprocessor methods made publicly available
  // the subsequent functions map the AliPreprocessor interface functions in order
  // to be used by the module proprocessors.
  Bool_t PreprocessorStore(const char* pathLevel2, const char* pathLevel3, TObject* object,
	       AliCDBMetaData* metaData, Int_t validityStart = 0, Bool_t validityInfinite = kFALSE) {
    return AliPreprocessor::Store(pathLevel2, pathLevel3, object, metaData, validityStart, validityInfinite);
  }

  Bool_t PreprocessorStoreReferenceData(const char* pathLevel2, const char* pathLevel3, TObject* object,
			    AliCDBMetaData* metaData) {
    return AliPreprocessor::StoreReferenceData(pathLevel2, pathLevel3, object, metaData);
  }

  Bool_t PreprocessorStoreReferenceFile(const char* localFile, const char* gridFileName) {
    return AliPreprocessor::StoreReferenceFile(localFile, gridFileName);
  }

  Bool_t PreprocessorStoreRunMetadataFile(const char* localFile, const char* gridFileName) {
    return AliPreprocessor::StoreRunMetadataFile(localFile, gridFileName);
  }
    
  const char* PreprocessorGetFile(Int_t system, const char* id, const char* source) {
    return AliPreprocessor::GetFile(system, id, source);
  }

  TList* PreprocessorGetFileSources(Int_t system, const char* id = 0) {
    return AliPreprocessor::GetFileSources(system, id);
  }

  TList* PreprocessorGetFileIDs(Int_t system, const char* source) {
    return AliPreprocessor::GetFileIDs(system, source);
  }

  const char* PreprocessorGetRunParameter(const char* param) {
    return AliPreprocessor::GetRunParameter(param);
  }

  AliCDBEntry* PreprocessorGetFromOCDB(const char* pathLevel2, const char* pathLevel3) {
    return AliPreprocessor::GetFromOCDB(pathLevel2, pathLevel3);
  }

  const char* PreprocessorGetRunType() {
    return AliPreprocessor::GetRunType();
  }

  void PreprocessorLog(const char* message) {
    AliPreprocessor::Log(message);
  }

 protected:

 private:
  /** copy constructor prohibited */
  AliHLTPreprocessor(const AliHLTPreprocessor& preproc);
  /** assignment operator prohibited */
  AliHLTPreprocessor& operator=(const AliHLTPreprocessor& rhs);

  /** list of HLT module processors */
  TList fProcessors;                                               //!transient

  /** determine which which detectors were active */
  Int_t fActiveDetectors; // bit array of active detectors
  
  /** array of default libraries */
  static const char* fgkHLTDefaultShuttleLibs[];                   //!transient

  ClassDef(AliHLTPreprocessor, 1);
};
#endif


 AliHLTPreprocessor.h:1
 AliHLTPreprocessor.h:2
 AliHLTPreprocessor.h:3
 AliHLTPreprocessor.h:4
 AliHLTPreprocessor.h:5
 AliHLTPreprocessor.h:6
 AliHLTPreprocessor.h:7
 AliHLTPreprocessor.h:8
 AliHLTPreprocessor.h:9
 AliHLTPreprocessor.h:10
 AliHLTPreprocessor.h:11
 AliHLTPreprocessor.h:12
 AliHLTPreprocessor.h:13
 AliHLTPreprocessor.h:14
 AliHLTPreprocessor.h:15
 AliHLTPreprocessor.h:16
 AliHLTPreprocessor.h:17
 AliHLTPreprocessor.h:18
 AliHLTPreprocessor.h:19
 AliHLTPreprocessor.h:20
 AliHLTPreprocessor.h:21
 AliHLTPreprocessor.h:22
 AliHLTPreprocessor.h:23
 AliHLTPreprocessor.h:24
 AliHLTPreprocessor.h:25
 AliHLTPreprocessor.h:26
 AliHLTPreprocessor.h:27
 AliHLTPreprocessor.h:28
 AliHLTPreprocessor.h:29
 AliHLTPreprocessor.h:30
 AliHLTPreprocessor.h:31
 AliHLTPreprocessor.h:32
 AliHLTPreprocessor.h:33
 AliHLTPreprocessor.h:34
 AliHLTPreprocessor.h:35
 AliHLTPreprocessor.h:36
 AliHLTPreprocessor.h:37
 AliHLTPreprocessor.h:38
 AliHLTPreprocessor.h:39
 AliHLTPreprocessor.h:40
 AliHLTPreprocessor.h:41
 AliHLTPreprocessor.h:42
 AliHLTPreprocessor.h:43
 AliHLTPreprocessor.h:44
 AliHLTPreprocessor.h:45
 AliHLTPreprocessor.h:46
 AliHLTPreprocessor.h:47
 AliHLTPreprocessor.h:48
 AliHLTPreprocessor.h:49
 AliHLTPreprocessor.h:50
 AliHLTPreprocessor.h:51
 AliHLTPreprocessor.h:52
 AliHLTPreprocessor.h:53
 AliHLTPreprocessor.h:54
 AliHLTPreprocessor.h:55
 AliHLTPreprocessor.h:56
 AliHLTPreprocessor.h:57
 AliHLTPreprocessor.h:58
 AliHLTPreprocessor.h:59
 AliHLTPreprocessor.h:60
 AliHLTPreprocessor.h:61
 AliHLTPreprocessor.h:62
 AliHLTPreprocessor.h:63
 AliHLTPreprocessor.h:64
 AliHLTPreprocessor.h:65
 AliHLTPreprocessor.h:66
 AliHLTPreprocessor.h:67
 AliHLTPreprocessor.h:68
 AliHLTPreprocessor.h:69
 AliHLTPreprocessor.h:70
 AliHLTPreprocessor.h:71
 AliHLTPreprocessor.h:72
 AliHLTPreprocessor.h:73
 AliHLTPreprocessor.h:74
 AliHLTPreprocessor.h:75
 AliHLTPreprocessor.h:76
 AliHLTPreprocessor.h:77
 AliHLTPreprocessor.h:78
 AliHLTPreprocessor.h:79
 AliHLTPreprocessor.h:80
 AliHLTPreprocessor.h:81
 AliHLTPreprocessor.h:82
 AliHLTPreprocessor.h:83
 AliHLTPreprocessor.h:84
 AliHLTPreprocessor.h:85
 AliHLTPreprocessor.h:86
 AliHLTPreprocessor.h:87
 AliHLTPreprocessor.h:88
 AliHLTPreprocessor.h:89
 AliHLTPreprocessor.h:90
 AliHLTPreprocessor.h:91
 AliHLTPreprocessor.h:92
 AliHLTPreprocessor.h:93
 AliHLTPreprocessor.h:94
 AliHLTPreprocessor.h:95
 AliHLTPreprocessor.h:96
 AliHLTPreprocessor.h:97
 AliHLTPreprocessor.h:98
 AliHLTPreprocessor.h:99
 AliHLTPreprocessor.h:100
 AliHLTPreprocessor.h:101
 AliHLTPreprocessor.h:102
 AliHLTPreprocessor.h:103
 AliHLTPreprocessor.h:104
 AliHLTPreprocessor.h:105
 AliHLTPreprocessor.h:106
 AliHLTPreprocessor.h:107
 AliHLTPreprocessor.h:108
 AliHLTPreprocessor.h:109
 AliHLTPreprocessor.h:110
 AliHLTPreprocessor.h:111
 AliHLTPreprocessor.h:112
 AliHLTPreprocessor.h:113
 AliHLTPreprocessor.h:114
 AliHLTPreprocessor.h:115
 AliHLTPreprocessor.h:116
 AliHLTPreprocessor.h:117
 AliHLTPreprocessor.h:118
 AliHLTPreprocessor.h:119
 AliHLTPreprocessor.h:120
 AliHLTPreprocessor.h:121
 AliHLTPreprocessor.h:122
 AliHLTPreprocessor.h:123
 AliHLTPreprocessor.h:124
 AliHLTPreprocessor.h:125
 AliHLTPreprocessor.h:126
 AliHLTPreprocessor.h:127
 AliHLTPreprocessor.h:128
 AliHLTPreprocessor.h:129
 AliHLTPreprocessor.h:130
 AliHLTPreprocessor.h:131
 AliHLTPreprocessor.h:132
 AliHLTPreprocessor.h:133
 AliHLTPreprocessor.h:134
 AliHLTPreprocessor.h:135
 AliHLTPreprocessor.h:136
 AliHLTPreprocessor.h:137
 AliHLTPreprocessor.h:138
 AliHLTPreprocessor.h:139
 AliHLTPreprocessor.h:140
 AliHLTPreprocessor.h:141
 AliHLTPreprocessor.h:142
 AliHLTPreprocessor.h:143
 AliHLTPreprocessor.h:144
 AliHLTPreprocessor.h:145
 AliHLTPreprocessor.h:146
 AliHLTPreprocessor.h:147
 AliHLTPreprocessor.h:148
 AliHLTPreprocessor.h:149
 AliHLTPreprocessor.h:150
 AliHLTPreprocessor.h:151
 AliHLTPreprocessor.h:152
 AliHLTPreprocessor.h:153
 AliHLTPreprocessor.h:154
 AliHLTPreprocessor.h:155
 AliHLTPreprocessor.h:156
 AliHLTPreprocessor.h:157