ROOT logo
#ifndef ALI_PREPROCESSOR_H
#define ALI_PREPROCESSOR_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

//
// This class is the CDBPreProcessor interface,
// supposed to be implemented by any detector
// interested in immediate processing of data 
// which is retrieved from DCS, DAQ or HLT.
//

#include <TNamed.h>
#include <TList.h>

class TMap;

class AliCDBMetaData;
class AliCDBEntry;
class AliShuttleInterface;

class AliPreprocessor : public TNamed
{
  public:

    enum { kDAQ = 0, kDCS, kHLT, kDQM };

    AliPreprocessor(const char* detector, AliShuttleInterface* shuttle);
    virtual ~AliPreprocessor();

    virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
    virtual UInt_t Process(TMap* dcsAliasMap) = 0;

    virtual Bool_t ProcessDCS() { return kTRUE; }
    Bool_t ProcessRunType();

  protected:
    Bool_t Store(const char* pathLevel2, const char* pathLevel3, TObject* object,
        AliCDBMetaData* metaData, Int_t validityStart = 0, Bool_t validityInfinite = kFALSE);
    Bool_t StoreReferenceData(const char* pathLevel2, const char* pathLevel3, TObject* object,
        AliCDBMetaData* metaData);
    Bool_t StoreReferenceFile(const char* localFile, const char* gridFileName);
    Bool_t StoreRunMetadataFile(const char* localFile, const char* gridFileName);

    const char* GetFile(Int_t system, const char* id, const char* source);
    TList* GetFileSources(Int_t system, const char* id = 0);
    const char* GetForeignFile(const char* detector, Int_t system, const char* id, const char* source);
    TList* GetForeignFileSources(const char* detector, Int_t system, const char* id);
    TList* GetFileIDs(Int_t system, const char* source);
    const char* GetRunParameter(const char* param);
    AliCDBEntry* GetFromOCDB(const char* pathLevel2, const char* pathLevel3);
    AliCDBEntry* GetGeometryFromOCDB();
    const char* GetRunType();
    Bool_t GetHLTStatus();
    const char* GetTriggerConfiguration();
    const char* GetCTPTimeParams();
    const char* GetTriggerDetectorMask();
    void Log(const char* message, UInt_t level=3);
    UInt_t GetStartTimeDCSQuery();
    UInt_t GetEndTimeDCSQuery();

    void AddRunType(const char* runType);

    void SendToML(const char*);
    TString* GetLTUConfig(const char* det);

    Int_t fRun;         // current run
    UInt_t fStartTime;  // starttime of current run
    UInt_t fEndTime;    // endtime of current run

  private:
    AliPreprocessor(const AliPreprocessor & source);
    AliPreprocessor & operator=(const AliPreprocessor & source);
    AliShuttleInterface* fShuttle;   // link to Shuttle

    TList fRunTypes;    // list of run types that are processed by this preprocessor

    ClassDef(AliPreprocessor, 0);
};

#endif
 AliPreprocessor.h:1
 AliPreprocessor.h:2
 AliPreprocessor.h:3
 AliPreprocessor.h:4
 AliPreprocessor.h:5
 AliPreprocessor.h:6
 AliPreprocessor.h:7
 AliPreprocessor.h:8
 AliPreprocessor.h:9
 AliPreprocessor.h:10
 AliPreprocessor.h:11
 AliPreprocessor.h:12
 AliPreprocessor.h:13
 AliPreprocessor.h:14
 AliPreprocessor.h:15
 AliPreprocessor.h:16
 AliPreprocessor.h:17
 AliPreprocessor.h:18
 AliPreprocessor.h:19
 AliPreprocessor.h:20
 AliPreprocessor.h:21
 AliPreprocessor.h:22
 AliPreprocessor.h:23
 AliPreprocessor.h:24
 AliPreprocessor.h:25
 AliPreprocessor.h:26
 AliPreprocessor.h:27
 AliPreprocessor.h:28
 AliPreprocessor.h:29
 AliPreprocessor.h:30
 AliPreprocessor.h:31
 AliPreprocessor.h:32
 AliPreprocessor.h:33
 AliPreprocessor.h:34
 AliPreprocessor.h:35
 AliPreprocessor.h:36
 AliPreprocessor.h:37
 AliPreprocessor.h:38
 AliPreprocessor.h:39
 AliPreprocessor.h:40
 AliPreprocessor.h:41
 AliPreprocessor.h:42
 AliPreprocessor.h:43
 AliPreprocessor.h:44
 AliPreprocessor.h:45
 AliPreprocessor.h:46
 AliPreprocessor.h:47
 AliPreprocessor.h:48
 AliPreprocessor.h:49
 AliPreprocessor.h:50
 AliPreprocessor.h:51
 AliPreprocessor.h:52
 AliPreprocessor.h:53
 AliPreprocessor.h:54
 AliPreprocessor.h:55
 AliPreprocessor.h:56
 AliPreprocessor.h:57
 AliPreprocessor.h:58
 AliPreprocessor.h:59
 AliPreprocessor.h:60
 AliPreprocessor.h:61
 AliPreprocessor.h:62
 AliPreprocessor.h:63
 AliPreprocessor.h:64
 AliPreprocessor.h:65
 AliPreprocessor.h:66
 AliPreprocessor.h:67
 AliPreprocessor.h:68
 AliPreprocessor.h:69
 AliPreprocessor.h:70
 AliPreprocessor.h:71
 AliPreprocessor.h:72
 AliPreprocessor.h:73
 AliPreprocessor.h:74
 AliPreprocessor.h:75
 AliPreprocessor.h:76
 AliPreprocessor.h:77
 AliPreprocessor.h:78
 AliPreprocessor.h:79
 AliPreprocessor.h:80
 AliPreprocessor.h:81
 AliPreprocessor.h:82
 AliPreprocessor.h:83
 AliPreprocessor.h:84