00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DATAFORMATS_SCALERS_L1ACCEPTBUNCHCROSSING_H
00022 #define DATAFORMATS_SCALERS_L1ACCEPTBUNCHCROSSING_H
00023
00024 #include <ostream>
00025 #include <vector>
00026
00035
00036
00037
00038 class L1AcceptBunchCrossing
00039 {
00040 public:
00041
00042 L1AcceptBunchCrossing();
00043 L1AcceptBunchCrossing(const int l1AcceptOffset__,
00044 const unsigned int orbitNumber__,
00045 const unsigned int bunchCrossing__,
00046 const unsigned int eventType__);
00047 L1AcceptBunchCrossing(const int index,
00048 const unsigned long long data);
00049 virtual ~L1AcceptBunchCrossing();
00050
00051 enum
00052 {
00053 ORBIT_NUMBER_SHIFT = 32ULL,
00054 ORBIT_NUMBER_MASK = 0xFFFFFFFFULL,
00055 BUNCH_CROSSING_SHIFT = 4ULL,
00056 BUNCH_CROSSING_MASK = 0xFFFULL,
00057 EVENT_TYPE_SHIFT = 0,
00058 EVENT_TYPE_MASK = 0xFULL
00059 };
00060
00062 std::string name() const { return "L1AcceptBunchCrossing"; }
00063
00065 bool empty() const { return false; }
00066
00067 int l1AcceptOffset() const { return(l1AcceptOffset_);}
00068 unsigned int orbitNumber() const { return(orbitNumber_);}
00069 unsigned int bunchCrossing() const { return(bunchCrossing_);}
00070 unsigned int eventType() const { return(eventType_);}
00071
00073 int operator==(const L1AcceptBunchCrossing& e) const { return false; }
00074
00076 int operator!=(const L1AcceptBunchCrossing& e) const { return false; }
00077
00078 protected:
00079
00080 int l1AcceptOffset_;
00081 unsigned int orbitNumber_;
00082 unsigned int bunchCrossing_;
00083 unsigned int eventType_;
00084
00085 };
00086
00088 std::ostream& operator<<(std::ostream& s, const L1AcceptBunchCrossing& c);
00089
00090 typedef std::vector<L1AcceptBunchCrossing> L1AcceptBunchCrossingCollection;
00091
00092 #endif