ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/BranchTable.h
Revision: 1.2
Committed: Mon Mar 16 19:31:14 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre2
Changes since 1.1: +2 -1 lines
Log Message:
Added more convenient print

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.2 // $Id: BranchTable.h,v 1.1 2009/03/13 20:24:51 loizides Exp $
3 loizides 1.1 //
4     // BranchTable
5     //
6     // A convenient table to store dependencies among branches.
7     //
8     // Authors: C.Loizides
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef MITANA_DATATREE_BRANCHTABLE_H
12     #define MITANA_DATATREE_BRANCHTABLE_H
13    
14     #include <THashTable.h>
15     #include "MitAna/DataTree/interface/BranchName.h"
16    
17     namespace mithep
18     {
19     class BranchTable : public THashTable
20     {
21     public:
22     BranchTable(Int_t capacity = TCollection::kInitHashTableCapacity, Int_t rehash = 0) :
23     THashTable(capacity,rehash) {}
24    
25 loizides 1.2 TList *GetBranches() const;
26 loizides 1.1 const BranchName *Get(const char *name) const;
27     Bool_t Find(const char *brname, const char *brdep) const;
28     Bool_t Find(const BranchName &bn) const;
29     using TCollection::Print;
30     void Print(Option_t *opt="") const;
31    
32     ClassDef(BranchTable, 1) // Table to store branch dependencies
33     };
34     }
35    
36     //--------------------------------------------------------------------------------------------------
37     inline const mithep::BranchName *mithep::BranchTable::Get(const char *name) const
38     {
39     // Return a pointer to BranchName for given name.
40    
41     return dynamic_cast<const BranchName *>(FindObject(name));
42     }
43     #endif