Add method to trace back the first common ancestor of 2 generated particles
[u/mrichter/AliRoot.git] / OADB / AliOADBContainer.h
CommitLineData
cc336771 1#ifndef AliOADBContainer_H
2#define AliOADBContainer_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------------------------
9// Offline Analysis Database Container and Service Class
10// Author: Andreas Morsch, CERN
11//-------------------------------------------------------------------------
12
13#include <TNamed.h>
14#include <TArrayI.h>
35f37af6 15#include <TObjArray.h>
cc336771 16
17class TObjArray;
18class TArrayI;
19
20class AliOADBContainer : public TNamed {
21
22 public :
23 AliOADBContainer();
24 AliOADBContainer(char* name);
25 virtual ~AliOADBContainer();
26 AliOADBContainer(const AliOADBContainer& cont);
27 AliOADBContainer& operator=(const AliOADBContainer& cont);
35f37af6 28// Object adding and removal
29 void AppendObject(TObject* obj, Int_t lower, Int_t upper);
30 void UpdateObject(Int_t index, TObject* obj, Int_t lower, Int_t upper);
31 void RemoveObject(Int_t index);
bad1b400 32 void AddDefaultObject(TNamed* obj);
33 void CleanDefaultList();
35f37af6 34 Int_t GetIndexForRun(Int_t run) const;
35// I/O
36 void WriteToFile(char* fname) const;
37 Int_t InitFromFile(char* fname, char* key);
38// Getters
39 Int_t GetNumberOfEntries() const {return fEntries;}
40 Int_t LowerLimit(Int_t idx) const {return fLowerLimits[idx];}
41 Int_t UpperLimit(Int_t idx) const {return fUpperLimits[idx];}
bad1b400 42 TObject* GetObject(Int_t run, char* def = "") const;
43 TObject* GetObjectByIndex(Int_t run) const;
35f37af6 44// Debugging
cc336771 45 void List();
46 private :
bad1b400 47 TObjArray* fArray; // Array with objects corresponding to run ranges
48 TList* fDefaultList; // List with default arrays
cc336771 49 TArrayI fLowerLimits; // lower limit of run range
50 TArrayI fUpperLimits; // upper limit of run range
51 Int_t fEntries; // Number of entries
52 ClassDef(AliOADBContainer, 1);
53};
54
55#endif