CMS 3D CMS Logo

BeamSpot_PayloadInspector.cc
Go to the documentation of this file.
4 
6 
7 #include <memory>
8 #include <sstream>
9 
10 namespace {
11 
12  class BeamSpot_hx : public cond::payloadInspector::HistoryPlot<BeamSpotObjects,std::pair<double,double> > {
13  public:
14  BeamSpot_hx(): cond::payloadInspector::HistoryPlot<BeamSpotObjects,std::pair<double,double> >( "x vs run number", "x"){
15  }
16 
17  std::pair<double,double> getFromPayload( BeamSpotObjects& payload ) override{
18  return std::make_pair(payload.GetX(),payload.GetXError());
19  }
20  };
21 
22  class BeamSpot_rhx : public cond::payloadInspector::RunHistoryPlot<BeamSpotObjects,std::pair<double,double> > {
23  public:
24  BeamSpot_rhx(): cond::payloadInspector::RunHistoryPlot<BeamSpotObjects,std::pair<double,double> >( "x vs run number", "x"){
25  }
26 
27  std::pair<double,double> getFromPayload( BeamSpotObjects& payload ) override{
28  return std::make_pair(payload.GetX(),payload.GetXError());
29  }
30  };
31  class BeamSpot_x : public cond::payloadInspector::TimeHistoryPlot<BeamSpotObjects,std::pair<double,double> > {
32  public:
33  BeamSpot_x(): cond::payloadInspector::TimeHistoryPlot<BeamSpotObjects,std::pair<double,double> >( "x vs time", "x"){
34  }
35 
36  std::pair<double,double> getFromPayload( BeamSpotObjects& payload ) override{
37  return std::make_pair(payload.GetX(),payload.GetXError());
38  }
39  };
40 
41  class BeamSpot_y : public cond::payloadInspector::TimeHistoryPlot<BeamSpotObjects,std::pair<double,double> >{
42  public:
43  BeamSpot_y(): cond::payloadInspector::TimeHistoryPlot<BeamSpotObjects,std::pair<double,double> >( "y vs time", "y"){
44  }
45 
46  std::pair<double,double> getFromPayload( BeamSpotObjects& payload ) override{
47  return std::make_pair(payload.GetY(),payload.GetYError());
48  }
49  };
50 
51  class BeamSpot_xy : public cond::payloadInspector::ScatterPlot<BeamSpotObjects,double,double>{
52  public:
53  BeamSpot_xy(): cond::payloadInspector::ScatterPlot<BeamSpotObjects,double,double>("BeamSpot x vs y","x","y" ){
54  }
55 
56  std::tuple<double,double> getFromPayload( BeamSpotObjects& payload ) override{
57  return std::make_tuple( payload.GetX(), payload.GetY() );
58  }
59  };
60 
61 
62 }
63 
65  PAYLOAD_INSPECTOR_CLASS( BeamSpot_hx );
66  PAYLOAD_INSPECTOR_CLASS( BeamSpot_rhx );
67  PAYLOAD_INSPECTOR_CLASS( BeamSpot_x );
68  PAYLOAD_INSPECTOR_CLASS( BeamSpot_y );
69  PAYLOAD_INSPECTOR_CLASS( BeamSpot_xy );
70 }
double GetY() const
get Y beam position
double GetYError() const
get Y beam position Error
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
virtual Y getFromPayload(PayloadType &payload)=0
double GetX() const
get X beam position
double GetXError() const
get X beam position Error
Definition: plugin.cc:24