CMS 3D CMS Logo

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

#include <DAQMappingPayloadInspectorHelper.h>

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

Public Member Functions

 DAQMappingPayloadInfo ()
 
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 DAQMappingPayloadInfo< PayloadType >

Definition at line 41 of file DAQMappingPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ DAQMappingPayloadInfo()

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

Member Function Documentation

◆ fill()

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

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

Definition at line 48 of file DAQMappingPayloadInspectorHelper.h.

References svgfig::canvas(), cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::fetchPayload(), MillePedeFileConverter_cfg::fileName, mps_splice::line, cond::payloadInspector::PlotImage< PayloadType, cond::payloadInspector::SINGLE_IOV >::m_imageFileName, DAQMappingPI::resolveDetIDForDAQMapping(), AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, and createPayload::tagname.

48  {
49  auto tag = cond::payloadInspector::PlotBase::getTag<0>();
50  auto tagname = tag.name;
51  auto iov = tag.iovs.back();
52  auto m_payload = this->fetchPayload(std::get<1>(iov));
53 
54  if (m_payload != nullptr) {
55  std::stringstream payloadInfo, lineCountStream;
56  int subDet = CTPPSDetId(m_payload->VFATMapping.begin()->second.symbolicID.symbolicID).subdetId();
57  payloadInfo << "TAG: " << tagname << ", the mapping for: " << DAQMappingPI::resolveDetIDForDAQMapping(subDet)
58  << std::endl;
59  payloadInfo << *m_payload;
60  lineCountStream << *m_payload;
62 
63  //created to dynamically set canvas height
64  int lineCounter = 0;
65  while (std::getline(lineCountStream, line)) {
66  lineCounter++;
67  }
68 
69  TCanvas canvas("canvas", "Canvas", 800, 20 * lineCounter);
70 
71  TLatex latex;
72  latex.SetNDC();
73  latex.SetTextSize(0.015);
74  double yPos = 0.95;
75 
76  while (std::getline(payloadInfo, line)) {
77  yPos -= 0.015;
78  latex.DrawLatex(0.1, yPos, line.c_str());
79  }
80 
82  canvas.SaveAs(fileName.c_str());
83 
84  return true;
85  } else {
86  return false;
87  }
88  }
std::string resolveDetIDForDAQMapping(int detIDNumber)
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
def canvas(sub, attr)
Definition: svgfig.py:482
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)