]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliMetaData.h
Removing obsolete macro
[u/mrichter/AliRoot.git] / STEER / AliMetaData.h
CommitLineData
2c8628dd 1#ifndef ALIMETADATA_H
2#define ALIMETADATA_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8///
f05209ee 9/// base class of the meta data of run dependent objects
10/// Derived classes: AliObjectMetaData, AliSelectionMetaData
2c8628dd 11///
12
13#include <TObject.h>
14#include <TString.h>
15
16
17class AliMetaData: public TObject {
18public:
19 AliMetaData();
20 AliMetaData(const char* name,
21 Int_t firstRun = -1, Int_t lastRun = -1, Int_t version = -1);
22 virtual ~AliMetaData() {};
23
24 AliMetaData(const AliMetaData& entry);
25 AliMetaData& operator = (const AliMetaData& entry);
26
f05209ee 27 virtual void SetName(const char* name) {fName = name; DecodeName();}
28 /*virtual*/ void SetRunRange(Int_t firstRun = -1, Int_t lastRun = 1)
2c8628dd 29 {fFirstRun = firstRun; fLastRun = lastRun;}
f05209ee 30 /*virtual*/ void SetVersion(Int_t version = -1) {fVersion = version;}
31
32 void SetDetector(const char* Detector) {fDetector = Detector; EncodeName();}
33 void SetDBType(const char* DBType) {fDBType = DBType; EncodeName();}
34 void SetDetSpecType(const char* DetSpecType) {fDetSpecType = DetSpecType; EncodeName();}
2c8628dd 35
f05209ee 36 const char* GetDetector() const;
37 const char* GetDBType() const;
38 const char* GetDetSpecType() const;
39
2c8628dd 40
f05209ee 41 /*virtual*/ const char* GetName() const;
42 /*virtual*/ Int_t GetFirstRun() const {return fFirstRun;}
43 /*virtual*/ Int_t GetLastRun() const {return fLastRun;}
44 /*virtual*/ Int_t GetVersion() const {return fVersion;}
45
46 /*virtual*/ Bool_t IsValid(Int_t runNumber,
47 AliMetaData* metaData = NULL) const;
48 /*virtual*/ Bool_t IsStrictlyValid(Int_t runNumber,
2c8628dd 49 AliMetaData* metaData = NULL) const;
f05209ee 50 /*virtual*/ Int_t Compare(const TObject* object) const;
51 /*virtual*/ Bool_t Matches(const char* name, Int_t runNumber) const;
2c8628dd 52
f05209ee 53protected:
2c8628dd 54 TString fName; // name of the entry
f05209ee 55 TString fDetector; // name of the detector (ZDC, TPC, etc...)
56 TString fDBType; // name of the database type (Calib, Align)
57 TString fDetSpecType; // name of the detector's specific data type (pedestals, gain coeffs...)
2c8628dd 58 Int_t fFirstRun; // index of first valid run
59 Int_t fLastRun; // index of last valid run
60 Int_t fVersion; // version of the entry
61
f05209ee 62 void EncodeName();
63 void DecodeName();
64
65
66 ClassDef(AliMetaData, 2) // base class of the meta data of run dependent objects
2c8628dd 67};
68
69extern Bool_t operator == (const AliMetaData& entry1,
70 const AliMetaData& entry2);
71
72#endif