Line data Source code
1 : #ifndef ALIPRODINFO_H
2 : #define ALIPRODINFO_H
3 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : //---------------------------------------------------------------//
7 : // Base class for parsing alirootVersion //
8 : // TNamed object stored in ESD/AOD data //
9 : // and setup easy getters for end user //
10 : // //
11 : // Origin: Pietro Antonioli, INFN-BO, pietro.antonioli@cern.ch //
12 : // //
13 : //---------------------------------------------------------------//
14 : #include <TList.h>
15 : #include <TNamed.h>
16 : #include <TObject.h>
17 : #include <TString.h>
18 : #include <TObjString.h>
19 :
20 : class AliProdInfo : public TNamed {
21 : public:
22 : enum {kParsedBit=BIT(14)};
23 : enum ETagType {kAliroot,kRoot,kOutDir,kPass,kProdType,kProdTag,kPeriod, kNTags};
24 :
25 : AliProdInfo();
26 : AliProdInfo(const TString& name, const TString& title);
27 : AliProdInfo(TList *userInfo);
28 : virtual ~AliProdInfo();
29 :
30 : void Init(TList *userInfo);
31 : void List() const;
32 : //
33 0 : const TString& GetTag(ETagType tag) { return fTags[tag]; }
34 : //
35 0 : TString GetLHCPeriod() const {return fPeriod;}
36 0 : TString GetAlirootVersion() const {return fAlirootVersion;}
37 0 : Int_t GetAlirootSvnVersion() const {return fAlirootSvnVersion;}
38 0 : TString GetRootVersion() const {return fRootVersion;}
39 0 : Int_t GetRootSvnVersion() const {return fRootSvnVersion;}
40 0 : Int_t GetRecoPass() const {return fRecoPass;}
41 0 : Bool_t IsMC() const {return fMcFlag;}
42 : //
43 0 : Bool_t HasLPMPass() const { return !fTags[kPass].IsNull() && fTags[kPass].IsDigit(); }
44 : //
45 0 : Bool_t IsParsed() const {return TestBit(kParsedBit);}
46 0 : void SetParsed(Bool_t v=kTRUE) {SetBit(kParsedBit);}
47 : //
48 : protected:
49 : void ParseProdInfo(TNamed *uList);
50 :
51 : private:
52 : AliProdInfo(const AliProdInfo&);
53 : AliProdInfo &operator=(const AliProdInfo&);
54 : //
55 : Bool_t fMcFlag; // MC data: kTrue ; raw data: kFalse
56 : Int_t fAlirootSvnVersion; // aliroot svn numbering
57 : Int_t fRootSvnVersion; // root svn numbering
58 : Int_t fRecoPass; // Reconstruction pass
59 : //
60 : TString fTags[kNTags]; // Array with tag values
61 : TString fPeriod; // LHC period
62 : TString fProductionTag; // production tag
63 : TString fAlirootVersion; // aliroot version used producing data
64 : TString fRootVersion; // root version used producing data
65 :
66 : //
67 176 : ClassDef(AliProdInfo, 3); // Combined PID using priors
68 : };
69 :
70 : #endif
|