ROOT logo

/////////////////////////////////////////////////////////////////
// Class to generate temperature sensor data base entries.
//
// Existing data base structure read at start of processsing.
// 20/12-2006 HH.
// Modification log:
/////////////////////////////////////////////////////////////////

#ifndef AliDCSGenDB_h
#define AliDCSGenDB_h

#include <TROOT.h>
#include <TProfile.h>
#include <TProfile2D.h>
#include <TH1F.h>
#include <TFile.h>
#include <TObjArray.h>

#include "AliCDBMetaData.h"
#include "AliCDBManager.h"
#include "AliCDBId.h"
#include "AliCDBStorage.h"
#include "AliDCSSensorArray.h"
#include "AliLog.h"
#include "TSystem.h"

class AliDCSGenDB : public TObject {

public:

// Constructors

  AliDCSGenDB();
  AliDCSGenDB(const char* defaultStorage, const char* specificStorage);
  ~AliDCSGenDB();

// Functionality

  void            MakeCalib(const char *file, const char *fMap,
                            const TTimeStamp& startTime,
			    const TTimeStamp& endTime,
			    Int_t firstRun, Int_t lastRun, const char *calibDir);
  void            MakeConfig(const char *file, Int_t firstRun, Int_t lastRun, 
                             const char *confDir);
  AliCDBMetaData* CreateMetaObject(const char *objectClassName);
  void            StoreObject(const char* cdbPath, TObject* object, AliCDBMetaData* metaData);
  void            Init(Int_t run, const char *configDir, 
                       const char *specificDir, 
		       const char *sensorClass="AliDCSSensorArray");
  static TClonesArray *  ReadList(const char* fname, const char *title="dcsConf");
  static TTree        *  ReadListTree(const char* fname, const char *title="dcsConf");

// Getters/Setters

  void            SetFirstRun(Int_t frun){fFirstRun=frun;}
  void            SetLastRun(Int_t lrun) {fLastRun=lrun;}
  TMap*           SetGraphFile(const char* fname);
  void            SetConfTree(TTree *tree) {fConfTree=tree;}
  TTree*          GetConfTree() const {return fConfTree;}
  const TString&  GetSpecificStorage() const { return fSpecificStorage;}
  void            SetSpecificStorage (const TString& specificStorage) { fSpecificStorage=specificStorage; }
  const TString&  GetDefaultStorage() const { return fDefaultStorage;}
  void            SetDefaultStorage (const TString& defaultStorage) { fDefaultStorage=defaultStorage; }
  const AliDCSSensorArray* GetSensorArray() const {return fSensor;}
  void            SetSensorArray(AliDCSSensorArray *arr) { fSensor=arr; }


protected:
  AliDCSGenDB(const AliDCSGenDB& org);
  AliDCSGenDB& operator= (const AliDCSGenDB& org);

   Int_t          fFirstRun;        // first run in validity period
   Int_t          fLastRun;         // last run in validity period
   TString        fSpecificStorage; // specific storage for data base
   TString        fDefaultStorage;  // default storage for data base
   AliDCSSensorArray  *fSensor;     // array of DCS sensors
   AliCDBStorage  *fStorLoc;        // pointer to CDB storage
   AliCDBMetaData *fMetaData;       // data base metadata
   TTree          *fConfTree;	    // configuration tree

   ClassDef(AliDCSGenDB,1)
 };
#endif

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