ROOT logo
#ifndef ALI_SHUTTLE_INTERFACE_H
#define ALI_SHUTTLE_INTERFACE_H

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

/* $Id$ */

//
// abstract interface class to AliShuttle
//

#include <TObject.h>
#include <TString.h>

class TList;
class AliPreprocessor;
class AliCDBMetaData;
class AliCDBPath;
class AliCDBEntry;

class AliShuttleInterface : public TObject
{
  public:
    enum System { kDAQ = 0, kDCS, kHLT, kDQM };
    enum { kNDetectors = 22 }; // number of subdetectors in ALICE

    virtual Bool_t Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData,
        Int_t validityStart = 0, Bool_t validityInfinite = kFALSE) = 0;
    virtual Bool_t StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData) = 0;
    virtual Bool_t StoreReferenceFile(const char* detector, const char* localFile, const char* gridFileName) = 0;
    virtual Bool_t StoreRunMetadataFile(const char* localFile, const char* gridFileName) = 0;

    virtual const char* GetFile(Int_t system, const char* detector, const char* id, const char* source) = 0;

    virtual TList* GetFileSources(Int_t system, const char* detector, const char* id = 0) = 0;
    virtual TList* GetFileIDs(Int_t system, const char* detector, const char* source) = 0;

    virtual const char* GetRunParameter(const char* lbEntry) = 0;
    virtual UInt_t GetStartTimeDCSQuery() = 0;
    virtual UInt_t GetEndTimeDCSQuery() = 0;
    virtual const char* GetRunType() = 0;
    virtual Bool_t GetHLTStatus() = 0;
    virtual const char* GetTriggerConfiguration() = 0;
    virtual const char* GetCTPTimeParams() = 0;
    virtual const char* GetTriggerDetectorMask() = 0;

    virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path) = 0;

    virtual void Log(const char* detector, const char* message, UInt_t level=3) = 0;

    virtual void RegisterPreprocessor(AliPreprocessor* preprocessor) = 0;

    static const char* GetSystemName(UInt_t system) {return (system < 4) ? fkSystemNames[system] : 0;}

    static const char* GetOfflineDetName(const char* detName);
    static const char* GetDetName(UInt_t detPos);
    static Int_t GetDetPos(const char* detName);
    static UInt_t NDetectors() {return kNDetectors;}

    static TString GetMainCDB () {return fgkMainCDB;}
    static TString GetLocalCDB () {return fgkLocalCDB;}
    static TString GetMainRefStorage() {return fgkMainRefStorage;}
    static TString GetLocalRefStorage() {return fgkLocalRefStorage;}
    static TString GetMirrorSEs () {return fgkMirrorSEs;}

    static const char* GetShuttleLogDir() {return fgkShuttleLogDir.Data();}
    static const char* GetShuttleTempDir() {return fgkShuttleTempDir.Data();}

    virtual void SendMLFromDet(const char* value) = 0;
    virtual TString* GetLTUConfig(const char* det) =0;

  protected:

    static const char* fkSystemNames[4];  		// names of the systems providing data to the shuttle
    static const char* fgkDetName[kNDetectors]; 	// names of detectors' preprocessors (3-letter code convention)
    static const char* fgkOfflineDetName[kNDetectors];  // names of detectors in OCDB (AliRoot naming convention)

    static TString fgkMainCDB;		// URI of the main (Grid) CDB storage
    static TString fgkLocalCDB;		// URI of the local backup CDB storage
    static TString fgkMainRefStorage;	// URI of the main (Grid) REFERENCE storage
    static TString fgkLocalRefStorage;	// URI of the local REFERENCE storage
    static TString fgkMirrorSEs;	// mirror SEs for the main (Grid) CDB storage

    static TString fgkShuttleTempDir;	// path of SHUTTLE temp folder
    static TString fgkShuttleLogDir;	// path of SHUTTLE log folder

  private:
    ClassDef(AliShuttleInterface, 0);
};

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