ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/CacheFlag.h
Revision: 1.1
Committed: Tue Feb 17 15:52:51 2009 UTC (16 years, 2 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Log Message:
Added CacheFlag

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: ProcIDRef.h,v 1.3 2008/12/10 11:26:52 loizides Exp $
3     //
4     // CacheFlag
5     //
6     // Container for a transient Bool_t which is set by the reading streamer to kFALSE
7     // This meant to be used as a cache valid flag for transient cached quantities.
8     //
9     // Authors: J.Bendavid
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITANA_DATATREE_CACHEFLAG
13     #define MITANA_DATATREE_CACHEFLAG
14    
15     #include <TObject.h>
16     #include "MitAna/DataTree/interface/Types.h"
17    
18     namespace mithep
19     {
20     class CacheFlag : public TObject
21     {
22     public:
23     CacheFlag() : fIsValid(kFALSE) {};
24     ~CacheFlag() {}
25    
26     Bool_t IsValid() const { return fIsValid; }
27     void ClearCache() { fIsValid = kFALSE; }
28     void SetCache(Bool_t v = kTRUE) { fIsValid = v; }
29    
30     protected:
31     Bool_t fIsValid; //!flag whether cache is valid
32    
33     ClassDef(CacheFlag, 1) // Implementation of our own TProcIDRef
34     };
35     }
36     #endif