CMS 3D CMS Logo

List of all members | Public Member Functions
BeamSpotPI::BeamSpot_history< my_param, PayloadType > Class Template Reference

#include <BeamSpotPayloadInspectorHelper.h>

Inheritance diagram for BeamSpotPI::BeamSpot_history< my_param, PayloadType >:
cond::payloadInspector::HistoryPlot< PayloadType, std::pair< double, double > > cond::payloadInspector::Plot2D< PayloadType, unsigned long long, std::pair< double, double >, MULTI_IOV, 1 > cond::payloadInspector::PlotImpl< IOV_M, NTAGS > cond::payloadInspector::PlotBase

Public Member Functions

 BeamSpot_history ()
 
std::pair< double, double > getFromPayload (PayloadType &payload) override
 
- Public Member Functions inherited from cond::payloadInspector::HistoryPlot< PayloadType, std::pair< double, double > >
bool fill () override
 
 HistoryPlot (const std::string &title, const std::string &yLabel)
 
 ~HistoryPlot () override=default
 
- Public Member Functions inherited from cond::payloadInspector::Plot2D< PayloadType, unsigned long long, std::pair< double, double >, MULTI_IOV, 1 >
std::shared_ptr< PayloadType > fetchPayload (const cond::Hash &payloadHash)
 
 Plot2D (const std::string &type, const std::string &title, const std::string xLabel, const std::string &yLabel)
 
std::string serializeData () override
 
 ~Plot2D () override=default
 
- Public Member Functions inherited from cond::payloadInspector::PlotImpl< IOV_M, NTAGS >
 PlotImpl (const std::string &type, const std::string &title)
 
std::string processData () override
 
 ~PlotImpl () override=default
 
- Public Member Functions inherited from cond::payloadInspector::PlotBase
void addInputParam (const std::string &paramName)
 
cond::persistency::Session dbSession ()
 
template<typename PayloadType >
std::shared_ptr< PayloadType > fetchPayload (const cond::Hash &payloadHash)
 
template<int index>
TagReference getTag ()
 
cond::Tag_t getTagInfo (const std::string &tag)
 
virtual void init ()
 
const std::map< std::string, std::string > & inputParamValues () const
 
bool isSingleIov () const
 
bool isTwoTags () const
 
unsigned int ntags () const
 
std::string payloadType () const
 
 PlotBase ()
 
std::string title () const
 
std::string type () const
 
virtual ~PlotBase ()=default
 

Additional Inherited Members

- Public Types inherited from cond::payloadInspector::HistoryPlot< PayloadType, std::pair< double, double > >
typedef Plot2D< PayloadType, unsigned long long, std::pair< double, double >, MULTI_IOV, 1 > Base
 
- Public Types inherited from cond::payloadInspector::Plot2D< PayloadType, unsigned long long, std::pair< double, double >, MULTI_IOV, 1 >
typedef PlotImpl< IOV_M, NTAGS > Base
 
- Protected Attributes inherited from cond::payloadInspector::Plot2D< PayloadType, unsigned long long, std::pair< double, double >, MULTI_IOV, 1 >
std::vector< std::tuple< unsigned long long, std::pair< double, double > > > m_plotData
 
- Protected Attributes inherited from cond::payloadInspector::PlotBase
std::set< std::string > m_inputParams
 
std::map< std::string, std::string > m_inputParamValues
 
PlotAnnotations m_plotAnnotations
 
std::vector< std::pair< cond::Time_t, cond::Time_t > > m_tagBoundaries
 
std::vector< std::vector< std::tuple< cond::Time_t, cond::Hash > > > m_tagIovs
 
std::vector< std::string > m_tagNames
 

Detailed Description

template<parameters my_param, class PayloadType>
class BeamSpotPI::BeamSpot_history< my_param, PayloadType >

Definition at line 154 of file BeamSpotPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ BeamSpot_history()

template<parameters my_param, class PayloadType >
BeamSpotPI::BeamSpot_history< my_param, PayloadType >::BeamSpot_history ( )
inline

Definition at line 156 of file BeamSpotPayloadInspectorHelper.h.

158  getStringFromParamEnum(my_param) + " vs run number", getStringFromParamEnum(my_param)) {}
std::string getStringFromParamEnum(const parameters &parameter, const bool addUnits=false)

Member Function Documentation

◆ getFromPayload()

template<parameters my_param, class PayloadType >
std::pair<double, double> BeamSpotPI::BeamSpot_history< my_param, PayloadType >::getFromPayload ( PayloadType &  payload)
inlineoverridevirtual

Implements cond::payloadInspector::HistoryPlot< PayloadType, std::pair< double, double > >.

Definition at line 160 of file BeamSpotPayloadInspectorHelper.h.

References BeamSpotPI::dxdz, BeamSpotPI::dydz, BeamSpotPI::END_OF_TYPES, jetsAK4_Puppi_cff::payload, runTheMatrix::ret, BeamSpotPI::sigmaX, BeamSpotPI::sigmaY, BeamSpotPI::sigmaZ, BeamSpotPI::X, BeamSpotPI::Y, and BeamSpotPI::Z.

160  {
161  auto ret = std::make_pair<double, double>(-9999., -9999.);
162 
163  switch (my_param) {
164  case X:
165  return std::make_pair<double, double>(payload.x(), payload.xError());
166  case Y:
167  return std::make_pair<double, double>(payload.y(), payload.yError());
168  case Z:
169  return std::make_pair<double, double>(payload.z(), payload.zError());
170  case sigmaX:
171  return std::make_pair<double, double>(payload.beamWidthX(), payload.beamWidthXError());
172  case sigmaY:
173  return std::make_pair<double, double>(payload.beamWidthY(), payload.beamWidthYError());
174  case sigmaZ:
175  return std::make_pair<double, double>(payload.sigmaZ(), payload.sigmaZError());
176  case dxdz:
177  return std::make_pair<double, double>(payload.dxdz(), payload.dxdzError());
178  case dydz:
179  return std::make_pair<double, double>(payload.dydz(), payload.dydzError());
180  case END_OF_TYPES:
181  return ret;
182  default:
183  return ret;
184  }
185  }
ret
prodAgent to be discontinued