CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/DPGAnalysis/SiStripTools/interface/EventWithHistory.h

Go to the documentation of this file.
00001 #ifndef DPGAnalysis_SiStripTools_EventWithHistory_H
00002 #define DPGAnalysis_SiStripTools_EventWithHistory_H
00003 
00004 #include <vector>
00005 #include "DPGAnalysis/SiStripTools/interface/TinyEvent.h"
00006 
00007 namespace edm{
00008   class Event;
00009   class EventAuxiliary;
00010 }
00011 
00012 class EventBXHistory;
00013 class L1AcceptBunchCrossing;
00014 typedef std::vector<L1AcceptBunchCrossing> L1AcceptBunchCrossingCollection;
00015 
00016 class EventWithHistory: public TinyEvent {
00017 
00018  public:
00019   
00020   EventWithHistory();
00021   explicit EventWithHistory(const TinyEvent& se);
00022   explicit EventWithHistory(const unsigned int event,const int orbit,const int bx);
00023   explicit EventWithHistory(const unsigned int event,const unsigned int orbit,const int bx);
00024   explicit EventWithHistory(const edm::Event& event);
00025   EventWithHistory(const std::vector<edm::EventAuxiliary>& he);
00026   EventWithHistory(const edm::Event& event, const L1AcceptBunchCrossingCollection& l11bcc, 
00027                    const long long orbitoffset=0, const int bxoffset=0);
00028   EventWithHistory(const EventWithHistory& he);
00029 
00030   EventWithHistory& operator=(const EventWithHistory& he);
00031 
00032   //  int operator<(const EventWithHistory& other) const;
00033   int operator==(const EventWithHistory& other) const;
00034 
00035   int add(const EventWithHistory& he, const int idepth);  // return false if depth limit reached or not consecutive
00036   int add(const TinyEvent& he, const int idepth);  // return false if depth limit reached or not consecutive
00037 
00038   const unsigned int event() const;
00039   const unsigned int orbit() const;
00040   const int bx() const;
00041 
00042   const TinyEvent* get(const unsigned int ev) const;
00043   unsigned int depth() const;
00044   bool isFutureHistory() const;
00045 
00046   long long deltaBX(const unsigned int ev2, const unsigned int ev1) const;
00047   long long deltaBX(const unsigned int ev1) const;
00048   long long deltaBX() const;
00049   long long deltaBX(const TinyEvent& se) const;
00050 
00051   long long absoluteBX(const unsigned int ev1) const;
00052   long long absoluteBX() const;
00053 
00054   long long absoluteBXinCycle(const unsigned int ev1, const int bx0) const;
00055   long long absoluteBXinCycle(const int bx0) const;
00056 
00057   long long deltaBXinCycle(const unsigned int ev2, const unsigned int ev1, const int bx0) const;
00058   long long deltaBXinCycle(const unsigned int ev1, const int bx0) const;
00059   long long deltaBXinCycle(const int bx0) const;
00060   long long deltaBXinCycle(const TinyEvent& se, const int bx0) const;
00061 
00062  private:
00063 
00064   std::vector<TinyEvent> _prevse;
00065 
00066 };
00067 
00068 
00069 
00070 
00071 #endif //  DPGAnalysis_SiStripTools_EventWithHistory_H
00072