EventWithHistory

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
#ifndef DPGAnalysis_SiStripTools_EventWithHistory_H
#define DPGAnalysis_SiStripTools_EventWithHistory_H

#include <vector>
#include "DPGAnalysis/SiStripTools/interface/TinyEvent.h"

namespace edm {
  class Event;
  class EventAuxiliary;
}  // namespace edm

class EventBXHistory;
class L1AcceptBunchCrossing;
typedef std::vector<L1AcceptBunchCrossing> L1AcceptBunchCrossingCollection;
class TCDSRecord;

class EventWithHistory : public TinyEvent {
public:
  EventWithHistory();
  explicit EventWithHistory(const TinyEvent& se);
  explicit EventWithHistory(const edm::EventNumber_t event, const int orbit, const int bx);
  explicit EventWithHistory(const edm::EventNumber_t event, const unsigned int orbit, const int bx);
  explicit EventWithHistory(const edm::Event& event);
  EventWithHistory(const std::vector<edm::EventAuxiliary>& he);
  EventWithHistory(const edm::Event& event,
                   const L1AcceptBunchCrossingCollection& l11bcc,
                   const long long orbitoffset = 0,
                   const int bxoffset = 0);
  EventWithHistory(const edm::Event& event,
                   const TCDSRecord& tcdsRecord,
                   const long long orbitoffset = 0,
                   const int bxoffset = 0);
  EventWithHistory(const EventWithHistory& he);

  EventWithHistory& operator=(const EventWithHistory& he);

  //  int operator<(const EventWithHistory& other) const;
  int operator==(const EventWithHistory& other) const;

  int add(const EventWithHistory& he, const int idepth);  // return false if depth limit reached or not consecutive
  int add(const TinyEvent& he, const int idepth);         // return false if depth limit reached or not consecutive

  const edm::EventNumber_t event() const;
  const unsigned int orbit() const;
  const int bx() const;

  const TinyEvent* get(const unsigned int ev) const;
  unsigned int depth() const;
  bool isFutureHistory() const;

  long long deltaBX(const unsigned int ev2, const unsigned int ev1) const;
  long long deltaBX(const unsigned int ev1) const;
  long long deltaBX() const;
  long long deltaBX(const TinyEvent& se) const;

  long long absoluteBX(const unsigned int ev1) const;
  long long absoluteBX() const;

  long long absoluteBXinCycle(const unsigned int ev1, const int bx0) const;
  long long absoluteBXinCycle(const int bx0) const;

  long long deltaBXinCycle(const unsigned int ev2, const unsigned int ev1, const int bx0) const;
  long long deltaBXinCycle(const unsigned int ev1, const int bx0) const;
  long long deltaBXinCycle(const int bx0) const;
  long long deltaBXinCycle(const TinyEvent& se, const int bx0) const;

private:
  std::vector<TinyEvent> _prevse;
};

#endif  //  DPGAnalysis_SiStripTools_EventWithHistory_H