CMS 3D CMS Logo

List of all members | Public Member Functions
ParametersPerChannel< db, plane, param, PayloadType > Class Template Reference

#include <PPSTimingCalibrationPayloadInspectorHelper.h>

Inheritance diagram for ParametersPerChannel< db, plane, param, PayloadType >:
cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV > cond::payloadInspector::PlotImpl< IOV_M, 0 > cond::payloadInspector::PlotBase

Public Member Functions

bool fill () override
 
 ParametersPerChannel ()
 
- Public Member Functions inherited from cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >
std::shared_ptr< PayloadType > fetchPayload (const cond::Hash &payloadHash)
 
 PlotImage (const std::string &title)
 
std::string serializeData () override
 
- Public Member Functions inherited from cond::payloadInspector::PlotImpl< IOV_M, 0 >
 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::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >
typedef PlotImpl< IOV_M, 0 > Base
 
- Protected Attributes inherited from cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >
std::string m_imageFileName
 
- 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<PPSTimingCalibrationPI::conditions_db db, PPSTimingCalibrationPI::conditions_plane plane, PPSTimingCalibrationPI::parameter param, class PayloadType>
class ParametersPerChannel< db, plane, param, PayloadType >

Definition at line 178 of file PPSTimingCalibrationPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ ParametersPerChannel()

template<PPSTimingCalibrationPI::conditions_db db, PPSTimingCalibrationPI::conditions_plane plane, PPSTimingCalibrationPI::parameter param, class PayloadType >
ParametersPerChannel< db, plane, param, PayloadType >::ParametersPerChannel ( )
inline

Member Function Documentation

◆ fill()

template<PPSTimingCalibrationPI::conditions_db db, PPSTimingCalibrationPI::conditions_plane plane, PPSTimingCalibrationPI::parameter param, class PayloadType >
bool ParametersPerChannel< db, plane, param, PayloadType >::fill ( )
inlineoverridevirtual

Implements cond::payloadInspector::PlotImpl< IOV_M, 0 >.

Definition at line 184 of file PPSTimingCalibrationPayloadInspectorHelper.h.

References svgfig::canvas(), dqmiodatasetharvest::db, cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::fetchPayload(), MillePedeFileConverter_cfg::fileName, PPSTimingCalibrationPI::getStringFromDbEnum(), PPSTimingCalibrationPI::getStringFromParamEnum(), PPSTimingCalibrationPI::getStringFromPlaneEnum(), mps_fire::i, cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::m_imageFileName, dqmiodumpmetadata::n, AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, createPayload::tagname, x, and y.

184  {
185  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
186  auto tagname = tag.name;
187  auto iov = tag.iovs.back();
188  auto m_payload = this->fetchPayload(std::get<1>(iov));
189 
190  if (m_payload != nullptr) {
191  TCanvas canvas(
192  "PPSTimingCalibration parameters per channel", "PPSTimingCalibration parameters per channel", 1400, 1000);
193  canvas.cd(1);
194  canvas.SetGrid();
195  const Int_t n = 12;
196  Double_t x[n];
197  Double_t y[n];
198  for (int i = 0; i < n; i++) {
199  y[i] = m_payload->parameters(db, 1, plane, i)[param];
200  x[i] = i;
201  }
202 
203  TGraph* graph = new TGraph(n, x, y);
204  graph->SetTitle(("PPSTimingCalibration " + PPSTimingCalibrationPI::getStringFromDbEnum(db) + " " +
206  PPSTimingCalibrationPI::getStringFromParamEnum(param) + " per channel; channel; parameter")
207  .c_str());
208  graph->SetMarkerColor(2);
209  graph->SetMarkerSize(1.5);
210  graph->SetMarkerStyle(21);
211  graph->GetXaxis()->SetRangeUser(-.5, 11.5);
212  graph->GetXaxis()->SetNdivisions(16);
213  graph->GetYaxis()->SetNdivisions(32);
214  graph->Draw("AP");
215 
217  canvas.SaveAs(fileName.c_str());
218 
219  return true;
220  } else {
221  return false;
222  }
223  }
static std::string getStringFromPlaneEnum(const conditions_plane &plane)
static std::string getStringFromParamEnum(const parameter &parameter)
static std::string getStringFromDbEnum(const conditions_db &db)
def canvas(sub, attr)
Definition: svgfig.py:482
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)