00001 #ifndef DataFormats_Provenance_EventAuxiliary_h
00002 #define DataFormats_Provenance_EventAuxiliary_h
00003
00004 #include <iosfwd>
00005
00006 #include "DataFormats/Provenance/interface/ProcessHistoryID.h"
00007 #include "DataFormats/Provenance/interface/EventID.h"
00008 #include "DataFormats/Provenance/interface/Timestamp.h"
00009 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00010
00011
00012
00013 namespace edm
00014 {
00015 struct EventAuxiliary {
00016
00017 enum ExperimentType {
00018 Any = 0,
00019 Align = 1,
00020 Calib = 2,
00021 Cosmic = 3,
00022 Data = 4,
00023 Mc = 5,
00024 Raw = 6,
00025 Test = 7
00026 };
00027 static int const invalidBunchXing = -1;
00028 static int const invalidStoreNumber = 0;
00029 EventAuxiliary() :
00030 processHistoryID_(),
00031 id_(),
00032 processGUID_(),
00033 time_(),
00034 luminosityBlock_(),
00035 isRealData_(false),
00036 experimentType_(Any),
00037 bunchCrossing_(invalidBunchXing),
00038 orbitNumber_(invalidBunchXing),
00039 storeNumber_(invalidStoreNumber) {}
00040 EventAuxiliary(EventID const& theId, std::string const& theProcessGUID, Timestamp const& theTime,
00041 LuminosityBlockNumber_t lb, bool isReal, ExperimentType eType = Any,
00042 int bunchXing = invalidBunchXing, int storeNumber = invalidStoreNumber,
00043 int orbitNum = invalidBunchXing) :
00044 processHistoryID_(),
00045 id_(theId),
00046 processGUID_(theProcessGUID),
00047 time_(theTime),
00048 luminosityBlock_(lb),
00049 isRealData_(isReal),
00050 experimentType_(eType),
00051 bunchCrossing_(bunchXing),
00052 orbitNumber_(orbitNum),
00053 storeNumber_(storeNumber) {}
00054 ~EventAuxiliary() {}
00055 void write(std::ostream& os) const;
00056 ProcessHistoryID& processHistoryID() const {return processHistoryID_;}
00057 EventID const& id() const {return id_;}
00058 std::string const& processGUID() const {return processGUID_;}
00059 Timestamp const& time() const {return time_;}
00060 LuminosityBlockNumber_t const& luminosityBlock() const {return luminosityBlock_;}
00061 EventNumber_t event() const {return id_.event();}
00062 RunNumber_t run() const {return id_.run();}
00063 bool isRealData() const {return isRealData_;}
00064 ExperimentType experimentType() const {return experimentType_;}
00065 int bunchCrossing() const {return bunchCrossing_;}
00066 int orbitNumber() const {return orbitNumber_;}
00067 int storeNumber() const {return storeNumber_;}
00068
00069
00070
00071 mutable ProcessHistoryID processHistoryID_;
00072
00073 EventID id_;
00074
00075 std::string processGUID_;
00076
00077 Timestamp time_;
00078
00079 LuminosityBlockNumber_t luminosityBlock_;
00080
00081 bool isRealData_;
00082
00083 ExperimentType experimentType_;
00084
00085 int bunchCrossing_;
00086
00087 int orbitNumber_;
00088
00089 int storeNumber_;
00090 };
00091
00092 bool
00093 isSameEvent(EventAuxiliary const& a, EventAuxiliary const& b);
00094
00095 inline
00096 std::ostream&
00097 operator<<(std::ostream& os, const EventAuxiliary& p) {
00098 p.write(os);
00099 return os;
00100 }
00101
00102 }
00103
00104 #endif