]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliCDBLocal.h
Renaming calibration classes (A.Colla)
[u/mrichter/AliRoot.git] / STEER / AliCDBLocal.h
1 #ifndef ALICDBLOCAL_H
2 #define ALICDBLOCAL_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 ///
10 ///  access class to a DB file inside an organized directory structure 
11 ///  file name = "DBFolder/detector/dbType/detSpecType/Run#firstRun-#lastRun _v#version.root"
12 ///
13
14 #include "AliCDBStorage.h"
15 #include "AliCDBMetaDataSelect.h"
16 #include "AliCDBMetaData.h"
17 #include "AliCDBEntry.h"
18
19 class AliCDBLocal: public AliCDBStorage {
20
21 public:
22 //  AliCDBLocal();
23   AliCDBLocal(const char* DBFolder = "$(ALICE_ROOT)/DB");
24   virtual ~AliCDBLocal();
25
26   TObjArray*   FindDBFiles(const char *name, Int_t runNumber); // return list of files valid for run number
27   void         TagForProduction(const AliCDBMetaDataSelect& selMetaData, UInt_t prodVers); // tag a DB file for production mode
28   
29 protected:
30   virtual AliCDBEntry*  GetEntry(AliCDBMetaDataSelect& selMetaData, Int_t runNumber);
31   virtual Bool_t        PutEntry(AliCDBEntry* entry);
32
33 private:
34   AliCDBLocal(const AliCDBLocal& db);
35   AliCDBLocal& operator = (const AliCDBLocal& db);
36   
37   Bool_t     DecodeFileName(const TString strName, int *numArray, TString prefix="_v"); // Gets firstRun, lastRun, version from file name "strName"
38   TString    EncodeFileName(int firstRun, int lastRun, int version, TString prefix="_v"); // returns file name from firstRun, lastRun, version  
39
40   TString    fDBFolder;   // the DB folder
41
42 ClassDef(AliCDBLocal, 0)      // access class to a DB file in an organized directory structure (DBFolder/detector/dbType/detSpecType)
43 };
44
45 #endif