Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:08

0001 /*
0002  *  File: DataFormats/Scalers/interface/BeamSpotOnline.h   (W.Badgett)
0003  *
0004  *  The online computed BeamSpotOnline value
0005  *
0006  */
0007 
0008 #ifndef DATAFORMATS_SCALERS_BEAMSPOT_H
0009 #define DATAFORMATS_SCALERS_BEAMSPOT_H
0010 
0011 #include "DataFormats/Scalers/interface/TimeSpec.h"
0012 
0013 #include <ctime>
0014 #include <iosfwd>
0015 #include <vector>
0016 #include <string>
0017 
0018 /*! \file BeamSpotOnline.h
0019  * \Header file for online BeamSpotOnline value
0020  * 
0021  * \author: William Badgett
0022  *
0023  */
0024 
0025 /// \class BeamSpotOnline.h
0026 /// \brief Persistable copy of online BeamSpotOnline value
0027 
0028 class BeamSpotOnline {
0029 public:
0030   BeamSpotOnline();
0031   BeamSpotOnline(const unsigned char* rawData);
0032   virtual ~BeamSpotOnline();
0033 
0034   /// name method
0035   std::string name() const { return "BeamSpotOnline"; }
0036 
0037   /// empty method (= false)
0038   bool empty() const { return false; }
0039 
0040   unsigned int trigType() const { return (trigType_); }
0041   unsigned int eventID() const { return (eventID_); }
0042   unsigned int sourceID() const { return (sourceID_); }
0043   unsigned int bunchNumber() const { return (bunchNumber_); }
0044 
0045   int version() const { return (version_); }
0046   timespec collectionTime() const { return (collectionTime_.get_timespec()); }
0047 
0048   float x() const { return (x_); }
0049   float y() const { return (y_); }
0050   float z() const { return (z_); }
0051   float dxdz() const { return (dxdz_); }
0052   float dydz() const { return (dydz_); }
0053   float err_x() const { return (err_x_); }
0054   float err_y() const { return (err_y_); }
0055   float err_z() const { return (err_z_); }
0056   float err_dxdz() const { return (err_dxdz_); }
0057   float err_dydz() const { return (err_dydz_); }
0058   float width_x() const { return (width_x_); }
0059   float width_y() const { return (width_y_); }
0060   float sigma_z() const { return (sigma_z_); }
0061   float err_width_x() const { return (err_width_x_); }
0062   float err_width_y() const { return (err_width_y_); }
0063   float err_sigma_z() const { return (err_sigma_z_); }
0064 
0065   /// equality operator
0066   int operator==(const BeamSpotOnline& e) const { return false; }
0067 
0068   /// inequality operator
0069   int operator!=(const BeamSpotOnline& e) const { return false; }
0070 
0071 protected:
0072   unsigned int trigType_;
0073   unsigned int eventID_;
0074   unsigned int sourceID_;
0075   unsigned int bunchNumber_;
0076 
0077   int version_;
0078 
0079   TimeSpec collectionTime_;
0080   float x_;
0081   float y_;
0082   float z_;
0083   float dxdz_;
0084   float dydz_;
0085   float err_x_;
0086   float err_y_;
0087   float err_z_;
0088   float err_dxdz_;
0089   float err_dydz_;
0090   float width_x_;
0091   float width_y_;
0092   float sigma_z_;
0093   float err_width_x_;
0094   float err_width_y_;
0095   float err_sigma_z_;
0096 };
0097 
0098 /// Pretty-print operator for BeamSpotOnline
0099 std::ostream& operator<<(std::ostream& s, const BeamSpotOnline& c);
0100 
0101 typedef std::vector<BeamSpotOnline> BeamSpotOnlineCollection;
0102 
0103 #endif