CMS 3D CMS Logo

GFHistArray.h
Go to the documentation of this file.
1 #ifndef __GFHISTARRAY_H
2 #define __GFHISTARRAY_H
3 
4 // ROOT includes
5 #include <TObjArray.h>
6 #include <TH1.h>
7 
8 class TObject;
9 
10 class GFHistArray : public TObjArray{
11  // FIXME: friends needed?
12 friend class TObjArrayIter;
13 friend class TClonesArray;
14 
15 public:
16  explicit GFHistArray(Int_t s = TCollection::kInitCapacity, Int_t lowerBound = 0);
17  virtual ~GFHistArray();
18 
19  // TObject **GetObjectRef(TObject *obj) const;
20 // void Add(TObject *obj) { AddLast(hist); }
21  virtual void AddFirst(TObject *obj);
22  virtual void AddLast(TObject *obj);
23  virtual void AddAll(const TCollection *collection);
24  virtual void AddAll(const GFHistArray *hists);
25  virtual void AddAt(TObject *obj, Int_t idx);
26  virtual void AddAtAndExpand(TObject *obj, Int_t idx);
27  virtual Int_t AddAtFree(TObject *obj);
28  virtual void AddAfter(const TObject *after, TObject *obj);
29  virtual void AddBefore(const TObject *before, TObject *obj);
30  virtual TH1 *RemoveAt(Int_t idx);
31  virtual TH1 *Remove(TObject *obj);
32 
33  TH1 *At(Int_t idx) const;
34  TH1 *UncheckedAt(Int_t i) const;
35  TH1 *Before(const TObject *obj) const;
36  TH1 *After(const TObject *obj) const;
37  TH1 *First() const;
38  TH1 *Last() const;
39  virtual TH1* operator[](Int_t i) const;
40 // virtual TH1*&operator[](Int_t i); ??? warum nicht?
41 
42 protected:
43  Bool_t CheckObjOK (TObject * histObj);
44  private:
45  virtual TObject*& operator[](Int_t i); // invalidate const version, since cannot be overwritten
46 
47  ClassDef(GFHistArray,1) // type safe array of histograms
48 };
49 #endif // __GFHISTARRAY_H
GFHistArray::~GFHistArray
virtual ~GFHistArray()
GFHistArray::Last
TH1 * Last() const
GFHistArray::AddAt
virtual void AddAt(TObject *obj, Int_t idx)
mps_fire.i
i
Definition: mps_fire.py:428
GFHistArray::Before
TH1 * Before(const TObject *obj) const
GFHistArray::Remove
virtual TH1 * Remove(TObject *obj)
GFHistArray::RemoveAt
virtual TH1 * RemoveAt(Int_t idx)
GFHistArray::AddAtAndExpand
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
compare.hists
hists
Definition: compare.py:319
GFHistArray::GFHistArray
GFHistArray(Int_t s=TCollection::kInitCapacity, Int_t lowerBound=0)
GFHistArray::At
TH1 * At(Int_t idx) const
GFHistArray::CheckObjOK
Bool_t CheckObjOK(TObject *histObj)
GFHistArray::TObjArrayIter
friend class TObjArrayIter
Definition: GFHistArray.h:12
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
alignCSCRings.s
s
Definition: alignCSCRings.py:92
GFHistArray::AddFirst
virtual void AddFirst(TObject *obj)
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
GFHistArray::AddAtFree
virtual Int_t AddAtFree(TObject *obj)
GFHistArray::First
TH1 * First() const
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
GFHistArray::AddAfter
virtual void AddAfter(const TObject *after, TObject *obj)
GFHistArray::AddAll
virtual void AddAll(const TCollection *collection)
GFHistArray::After
TH1 * After(const TObject *obj) const
GFHistArray::AddBefore
virtual void AddBefore(const TObject *before, TObject *obj)
GFHistArray::UncheckedAt
TH1 * UncheckedAt(Int_t i) const
GFHistArray::operator[]
virtual TH1 * operator[](Int_t i) const
GFHistArray::AddLast
virtual void AddLast(TObject *obj)
GFHistArray
Definition: GFHistArray.h:10
GFHistArray::TClonesArray
friend class TClonesArray
Definition: GFHistArray.h:13