Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:34

0001 #ifndef DPGAnalysis_SiStripTools_EventWithHistory_H
0002 #define DPGAnalysis_SiStripTools_EventWithHistory_H
0003 
0004 #include <vector>
0005 #include "DPGAnalysis/SiStripTools/interface/TinyEvent.h"
0006 
0007 namespace edm {
0008   class Event;
0009   class EventAuxiliary;
0010 }  // namespace edm
0011 
0012 class EventBXHistory;
0013 class L1AcceptBunchCrossing;
0014 typedef std::vector<L1AcceptBunchCrossing> L1AcceptBunchCrossingCollection;
0015 class TCDSRecord;
0016 
0017 class EventWithHistory : public TinyEvent {
0018 public:
0019   EventWithHistory();
0020   explicit EventWithHistory(const TinyEvent& se);
0021   explicit EventWithHistory(const edm::EventNumber_t event, const int orbit, const int bx);
0022   explicit EventWithHistory(const edm::EventNumber_t event, const unsigned int orbit, const int bx);
0023   explicit EventWithHistory(const edm::Event& event);
0024   EventWithHistory(const std::vector<edm::EventAuxiliary>& he);
0025   EventWithHistory(const edm::Event& event,
0026                    const L1AcceptBunchCrossingCollection& l11bcc,
0027                    const long long orbitoffset = 0,
0028                    const int bxoffset = 0);
0029   EventWithHistory(const edm::Event& event,
0030                    const TCDSRecord& tcdsRecord,
0031                    const long long orbitoffset = 0,
0032                    const int bxoffset = 0);
0033   EventWithHistory(const EventWithHistory& he);
0034 
0035   EventWithHistory& operator=(const EventWithHistory& he);
0036 
0037   //  int operator<(const EventWithHistory& other) const;
0038   int operator==(const EventWithHistory& other) const;
0039 
0040   int add(const EventWithHistory& he, const int idepth);  // return false if depth limit reached or not consecutive
0041   int add(const TinyEvent& he, const int idepth);         // return false if depth limit reached or not consecutive
0042 
0043   const edm::EventNumber_t event() const;
0044   const unsigned int orbit() const;
0045   const int bx() const;
0046 
0047   const TinyEvent* get(const unsigned int ev) const;
0048   unsigned int depth() const;
0049   bool isFutureHistory() const;
0050 
0051   long long deltaBX(const unsigned int ev2, const unsigned int ev1) const;
0052   long long deltaBX(const unsigned int ev1) const;
0053   long long deltaBX() const;
0054   long long deltaBX(const TinyEvent& se) const;
0055 
0056   long long absoluteBX(const unsigned int ev1) const;
0057   long long absoluteBX() const;
0058 
0059   long long absoluteBXinCycle(const unsigned int ev1, const int bx0) const;
0060   long long absoluteBXinCycle(const int bx0) const;
0061 
0062   long long deltaBXinCycle(const unsigned int ev2, const unsigned int ev1, const int bx0) const;
0063   long long deltaBXinCycle(const unsigned int ev1, const int bx0) const;
0064   long long deltaBXinCycle(const int bx0) const;
0065   long long deltaBXinCycle(const TinyEvent& se, const int bx0) const;
0066 
0067 private:
0068   std::vector<TinyEvent> _prevse;
0069 };
0070 
0071 #endif  //  DPGAnalysis_SiStripTools_EventWithHistory_H