CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DataFormats/L1Trigger/interface/L1DataEmulDigi.h

Go to the documentation of this file.
00001 #ifndef DataFormats_L1DataEmulDigi_h
00002 #define DataFormats_L1DataEmulDigi_h
00003 
00004 /*\class L1DataEmulDigi
00005  *\description L1 trigger data|emulation digi
00006  *\author Nuno Leonardo (CERN)
00007  *\date 07.07
00008  */
00009 
00010 #include <ostream>
00011 #include <string>
00012 #include <utility>
00013 #include <vector>
00014 
00015 #include "DataFormats/L1Trigger/interface/L1MonitorDigi.h"
00016 
00017 class L1DataEmulDigi {
00018 
00019  public:
00020 
00021   L1DataEmulDigi();
00022   L1DataEmulDigi(int sid, int cid, double x1, double x2, double x3, int n);
00023   L1DataEmulDigi(int sid, int cid, double x1, double x2, double x3, int n,
00024                  unsigned int dw, unsigned int ew, float dr, float er, 
00025                  L1MonitorDigi dm, L1MonitorDigi em); 
00026   ~L1DataEmulDigi();
00027   
00028   void setSid (int sid) {m_sid = sid;}
00029   void setCid (int cid) {m_cid = cid;}
00030   void setLocation (double x1, double x2, double x3) 
00031     { m_location[0]=x1; m_location[1]=x2; m_location[2]=x3;}
00032   void setType (int n) {m_type = n;}
00033   void setData(unsigned int d, unsigned int e) {m_data[0]=d; m_data[1]=e;}
00034   void setRank(float d, float e) {m_rank[0]=d; m_rank[1]=e;}
00035   void setDEpair(L1MonitorDigi d, L1MonitorDigi e) 
00036     {m_DEpair[0]=d; m_DEpair[1]=e; }
00037 
00038   int sid() const {return m_sid;}
00039   int cid() const {return m_cid;}
00040   double x1() const {return m_location[0];}
00041   double x2() const {return m_location[1];}
00042   double x3() const {return m_location[2];}
00043   int type() const {return m_type;}
00044   void data(unsigned int *d) const {d[0]=m_data[0]; d[1]=m_data[1];}
00045   void rank(float *r) const {r[0]=m_rank[0]; r[1]=m_rank[1];}
00046   L1MonitorDigi data() const {return m_DEpair[0];}
00047   L1MonitorDigi emul() const {return m_DEpair[1];}
00048 
00049   int reset();
00050   bool empty() const;
00051 
00052  private:
00053 
00054   int m_sid;
00055   int m_cid;
00056   double m_location[3];
00057   int m_type;
00058   unsigned int m_data[2];
00059   float m_rank[2];
00060   int m_null;
00061   L1MonitorDigi m_DEpair[2]; 
00062 
00063 };
00064 
00065 std::ostream& operator<<(std::ostream&, const L1DataEmulDigi&);
00066 
00067 struct GltDEDigi {
00068   typedef std::vector<bool> GltBits;
00069   GltDEDigi();
00070   void reset();
00071   GltDEDigi(bool glbit[], GltBits dbits[], GltBits tbits[]);
00072   void set(bool glbit[], GltBits dbits[], GltBits tbits[]);
00073   bool globalDBit[2];
00074   GltBits gltDecBits[2], gltTchBits[2];
00075 };
00076 
00077 std::ostream& operator<<(std::ostream&, const GltDEDigi&);
00078 
00079 #endif