ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/EventHeader.h
Revision: 1.17
Committed: Mon Jul 13 11:00:29 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010
Changes since 1.16: +1 -2 lines
Log Message:
Include files checked.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.17 // $Id: EventHeader.h,v 1.16 2009/07/06 13:37:39 loizides Exp $
3 loizides 1.1 //
4     // EventHeader
5     //
6 loizides 1.14 // Class to hold event specific information. If Skimmed() returns value > 0 then the event
7 loizides 1.9 // content has been removed from events tree, and only meta information for book keeping
8     // purposes have been kept. This is used in conjunction with skimming.
9 loizides 1.1 //
10     // Authors: C.Loizides
11     //--------------------------------------------------------------------------------------------------
12    
13 loizides 1.11 #ifndef MITANA_DATATREE_EVENTHEADER_H
14     #define MITANA_DATATREE_EVENTHEADER_H
15 loizides 1.2
16 loizides 1.8 #include "MitAna/DataTree/interface/DataBase.h"
17 loizides 1.2
18 loizides 1.1 namespace mithep
19     {
20 loizides 1.8 class EventHeader : public DataBase
21 loizides 1.1 {
22     public:
23 loizides 1.16 EventHeader();
24     EventHeader(UInt_t run, UInt_t evt, UInt_t lumi);
25    
26     Int_t BunchCrossing() const { return fBunchCrossing; }
27     Int_t ExpType() const { return fExpType; }
28     UInt_t EvtNum() const { return fEvtNum; }
29     Bool_t IsMC() const { return fIsMC; }
30     UInt_t LumiSec() const { return fLumiSec; }
31     EObjType ObjType() const { return kEventHeader; }
32     Int_t OrbitNumber() const { return fOrbitNumber; }
33     Int_t RunEntry() const { return fRunEntry; }
34     UInt_t RunNum() const { return fRunNum; }
35     UChar_t Skimmed() const { return fSkimmed; }
36     Int_t StoreNumber() const { return fStoreNumber; }
37     ULong64_t TimeStamp() const { return fTimeStamp; }
38     Double_t Weight() const { return fWeight; }
39     void SetBunchCrossing(Int_t b) { fBunchCrossing = b; }
40     void SetEvtNum(UInt_t i) { fEvtNum = i; }
41     void SetExpType(Int_t e) { fExpType = e; }
42     void SetIsMC(Bool_t b) { fIsMC = b; }
43     void SetLumiSec(UInt_t i) { fLumiSec = i; }
44     void SetOrbitNumber(Int_t o) { fOrbitNumber = o; }
45     void SetRunEntry(Int_t i) { fRunEntry = i; }
46     void SetRunNum(UInt_t i) { fRunNum = i; }
47     void SetSkimmed(UChar_t s) { fSkimmed = s; }
48     void SetStoreNumber(Int_t s) { fStoreNumber = s; }
49     void SetTimeStamp(ULong64_t t) { fTimeStamp = t; }
50     void SetWeight(Double_t w) { fWeight = w; }
51    
52 loizides 1.14 Bool_t operator!=(const EventHeader &other) const;
53     Bool_t operator==(const EventHeader &other) const;
54    
55 loizides 1.1 protected:
56 loizides 1.16
57     ULong64_t fTimeStamp; //time stamp of event (h32 -> sec, l32 -> musec)
58     Int_t fBunchCrossing; //bunch crossing
59     Int_t fOrbitNumber; //orbit number
60     Int_t fStoreNumber; //store number
61 loizides 1.6 UInt_t fRunNum; //run number
62     UInt_t fEvtNum; //event number
63     UInt_t fLumiSec; //luminosity block number
64     Int_t fRunEntry; //entry for run block
65 loizides 1.14 Double32_t fWeight; //event weight
66 loizides 1.16 UChar_t fExpType; //experiment type (as assigned in EventAuxiliary)
67 loizides 1.13 UChar_t fSkimmed; //level of skimming (0 == non-skimmed)
68 loizides 1.14 Bool_t fIsMC; //==true for MC data
69 loizides 1.9
70 loizides 1.16 ClassDef(EventHeader, 2) // Event header class
71 loizides 1.1 };
72     }
73 loizides 1.14
74     //--------------------------------------------------------------------------------------------------
75     inline Bool_t mithep::EventHeader::operator!=(const mithep::EventHeader &other) const
76     {
77     // Unequal operator.
78    
79     if (fEvtNum != other.EvtNum())
80     return kTRUE;
81     if (fLumiSec != other.LumiSec())
82     return kTRUE;
83     if (fRunNum != other.RunNum())
84     return kTRUE;
85     if(fIsMC != other.IsMC())
86     return kTRUE;
87    
88     return kFALSE;
89     }
90    
91     //--------------------------------------------------------------------------------------------------
92     inline Bool_t mithep::EventHeader::operator==(const mithep::EventHeader &other) const
93     {
94     // Equal operator.
95    
96     if (fEvtNum != other.EvtNum())
97     return kFALSE;
98     if (fLumiSec != other.LumiSec())
99     return kFALSE;
100     if (fRunNum != other.RunNum())
101     return kFALSE;
102     if(fIsMC != other.IsMC())
103     return kFALSE;
104    
105     return kTRUE;
106     }
107 loizides 1.1 #endif