CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/DataFormats/Scalers/interface/BeamSpotOnline.h

Go to the documentation of this file.
00001 /*
00002  *  File: DataFormats/Scalers/interface/BeamSpotOnline.h   (W.Badgett)
00003  *
00004  *  The online computed BeamSpotOnline value
00005  *
00006  */
00007 
00008 #ifndef DATAFORMATS_SCALERS_BEAMSPOT_H
00009 #define DATAFORMATS_SCALERS_BEAMSPOT_H
00010 
00011 #include "DataFormats/Scalers/interface/TimeSpec.h"
00012 
00013 #include <ctime>
00014 #include <iosfwd>
00015 #include <vector>
00016 #include <string>
00017 
00025 
00026 
00027 
00028 class BeamSpotOnline
00029 {
00030  public:
00031 
00032   BeamSpotOnline();
00033   BeamSpotOnline(const unsigned char * rawData);
00034   virtual ~BeamSpotOnline();
00035 
00037   std::string name() const { return "BeamSpotOnline"; }
00038 
00040   bool empty() const { return false; }
00041 
00042   unsigned int trigType() const            { return(trigType_);}
00043   unsigned int eventID() const             { return(eventID_);}
00044   unsigned int sourceID() const            { return(sourceID_);}
00045   unsigned int bunchNumber() const         { return(bunchNumber_);}
00046 
00047   int version() const                      { return(version_);}
00048   timespec collectionTime() const          { return(collectionTime_.get_timespec());}
00049 
00050   float x()  const                         { return(x_);}
00051   float y()  const                         { return(y_);}
00052   float z()  const                         { return(z_);}
00053   float dxdz()  const                      { return(dxdz_);}
00054   float dydz()  const                      { return(dydz_);}
00055   float err_x()  const                     { return(err_x_);}
00056   float err_y()  const                     { return(err_y_);}
00057   float err_z()  const                     { return(err_z_);}
00058   float err_dxdz()  const                  { return(err_dxdz_);}
00059   float err_dydz()  const                  { return(err_dydz_);}
00060   float width_x()  const                   { return(width_x_);}
00061   float width_y()  const                   { return(width_y_);}
00062   float sigma_z()  const                   { return(sigma_z_);}
00063   float err_width_x()  const               { return(err_width_x_);}
00064   float err_width_y()  const               { return(err_width_y_);}
00065   float err_sigma_z()  const               { return(err_sigma_z_);}
00066 
00068   int operator==(const BeamSpotOnline& e) const { return false; }
00069 
00071   int operator!=(const BeamSpotOnline& e) const { return false; }
00072 
00073 protected:
00074 
00075   unsigned int trigType_;
00076   unsigned int eventID_;
00077   unsigned int sourceID_;
00078   unsigned int bunchNumber_;
00079 
00080   int version_;
00081 
00082   TimeSpec collectionTime_;
00083   float x_;
00084   float y_;
00085   float z_;
00086   float dxdz_;
00087   float dydz_;
00088   float err_x_;
00089   float err_y_;
00090   float err_z_;
00091   float err_dxdz_;
00092   float err_dydz_;
00093   float width_x_;
00094   float width_y_;
00095   float sigma_z_;
00096   float err_width_x_;
00097   float err_width_y_;
00098   float err_sigma_z_;
00099 };
00100 
00102 std::ostream& operator<<(std::ostream& s, const BeamSpotOnline& c);
00103 
00104 typedef std::vector<BeamSpotOnline> BeamSpotOnlineCollection;
00105 
00106 #endif