Revision: | 1.2 |
Committed: | Tue Apr 7 14:59:08 2009 UTC (16 years, 1 month ago) by loizides |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, Mit_009a, Mit_009 |
Changes since 1.1: | +22 -1 lines |
Log Message: | Add HaveCorrections so that at analysis time one can figure out if corrections are stored or not. This method will go away when we move to 010. |
# | Content |
---|---|
1 | // $Id: Met.cc,v 1.1 2008/07/07 16:02:25 loizides Exp $ |
2 | |
3 | #include "MitAna/DataTree/interface/Met.h" |
4 | #include <TFile.h> |
5 | #include <TStreamerInfo.h> |
6 | |
7 | ClassImp(mithep::Met) |
8 | |
9 | //-------------------------------------------------------------------------------------------------- |
10 | Bool_t mithep::Met::HasCorrections() const |
11 | { |
12 | // Return kTRUE if class version is larger than 1. |
13 | |
14 | Bool_t ret = (IsA()->GetBaseClass("mithep::Met")->GetClassVersion()>1); |
15 | |
16 | if (!gFile) |
17 | return ret; |
18 | |
19 | TStreamerInfo *si = |
20 | dynamic_cast<TStreamerInfo*>(gFile->GetStreamerInfoList()->FindObject("mithep::Met")); |
21 | if (!si) |
22 | return ret; |
23 | |
24 | ret = (si->GetClassVersion()>1); |
25 | return ret; |
26 | } |