ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/EventHeader.h
Revision: 1.20
Committed: Sun Jan 24 21:00:18 2010 UTC (15 years, 3 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, HEAD
Branch point for: Mit_025c_branch
Changes since 1.19: +2 -2 lines
Log Message:
Fix compiler errors and warnings moving to slc5_ia32_gcc434

File Contents

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