ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DataBase.h
Revision: 1.3
Committed: Thu Dec 11 17:04:29 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.2: +10 -9 lines
Log Message:
Provide Is function to check class type.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.3 // $Id: DataBase.h,v 1.2 2008/12/09 17:46:59 loizides Exp $
3 loizides 1.1 //
4     // DataBase
5     //
6     // This is the common base class for all objects in the tree that do not require the TObject
7     // bits to be written out (as opposed to DataObject).
8     //
9     // Authors: C.Loizides, J.Bendavid
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITANA_DATATREE_DATABASE_H
13     #define MITANA_DATATREE_DATABASE_H
14    
15 loizides 1.2 #include "MitAna/DataTree/interface/ObjTypes.h"
16 loizides 1.1 #include <TObject.h>
17    
18     namespace mithep
19     {
20     class DataBase : public TObject
21     {
22     public:
23     DataBase() {}
24     ~DataBase() {}
25    
26 loizides 1.3 Bool_t Is(EObjType t) const { return (ObjType()==t); }
27     Bool_t IsCached() const { return TestBit(23); }
28     Bool_t MustClear() const { return TestBit(14); }
29     Bool_t MustDelete() const { return TestBit(15); }
30     virtual EObjType ObjType() const { return kDataBase; }
31 loizides 1.1
32     protected:
33 loizides 1.3 void ResetCacheBit() { SetBit(23,0); }
34     void SetCacheBit() { SetBit(23); }
35     void SetClearBit() { SetBit(14); }
36     void SetDeleteBit() { SetBit(15); }
37 loizides 1.1
38     ClassDef(DataBase, 1)
39     };
40     }
41     #endif