CMS 3D CMS Logo

List of all members | Public Member Functions
AlignmentPayloadInfo< PayloadType > Class Template Reference

#include <PPSAlignmentConfigurationHelper.h>

Inheritance diagram for AlignmentPayloadInfo< PayloadType >:
cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV > cond::payloadInspector::PlotImpl< IOV_M, 0 > cond::payloadInspector::PlotBase

Public Member Functions

 AlignmentPayloadInfo ()
 
bool fill () override
 
- 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<class PayloadType>
class AlignmentPayloadInfo< PayloadType >

Definition at line 30 of file PPSAlignmentConfigurationHelper.h.

Constructor & Destructor Documentation

◆ AlignmentPayloadInfo()

template<class PayloadType >
AlignmentPayloadInfo< PayloadType >::AlignmentPayloadInfo ( )
inline

Member Function Documentation

◆ fill()

template<class PayloadType >
bool AlignmentPayloadInfo< PayloadType >::fill ( )
inlineoverridevirtual

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

Definition at line 36 of file PPSAlignmentConfigurationHelper.h.

References svgfig::canvas(), cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::fetchPayload(), MillePedeFileConverter_cfg::fileName, createfilelist::int, mps_splice::line, groupFilesInBlocks::lines, cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::m_imageFileName, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, makeGlobalPositionRcd_cfg::tag, createPayload::tagname, and y.

36  {
37  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
38  auto tagname = tag.name;
39  auto iov = tag.iovs.back();
40  auto m_payload = this->fetchPayload(std::get<1>(iov));
41 
42  if (m_payload != nullptr) {
44  std::vector<std::string> lines;
45  std::stringstream ss;
46  ss << *m_payload;
47  while (getline(ss, line)) {
48  lines.push_back(line);
49  }
50 
51  TCanvas canvas(
52  "PPSAlignmentConfiguration payload information", "PPSAlignmentConfiguration payload information", 1000, 1400);
53  canvas.cd(1);
54  TLatex t;
55  t.SetTextSize(0.018);
56 
57  int index = 0;
58  for (float y = 0.98; index < int(lines.size()); y -= 0.02) {
59  if (index < int(lines.size() / 2) + 3)
60  t.DrawLatex(0.02, y, lines[index++].c_str());
61  else if (index == int(lines.size() / 2) + 3) {
62  y = 0.98;
63  t.DrawLatex(0.5, y, lines[index++].c_str());
64  } else
65  t.DrawLatex(0.5, y, lines[index++].c_str());
66  }
67  t.Draw();
68 
70  canvas.SaveAs(fileName.c_str());
71 
72  return true;
73  } else {
74  return false;
75  }
76  }
def canvas(sub, attr)
Definition: svgfig.py:482
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)