SummaryPlotXmlParser

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
#ifndef DQM_SiStripCommissioningClients_SummaryPlotXmlParser_H
#define DQM_SiStripCommissioningClients_SummaryPlotXmlParser_H

#include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
#include "DQM/SiStripCommissioningSummary/interface/SummaryPlot.h"
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <cassert>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/property_tree/ptree.hpp>

class SummaryPlotXmlParser;

/** Debug information. */
std::ostream& operator<<(std::ostream&, const SummaryPlotXmlParser&);

/** 
    @class SummaryPlotXmlParser
    @author P.Kalavase, R.Bainbridge
    
    @brief Parses the "summary plot" xml configuration file
*/
class SummaryPlotXmlParser {
public:
  // ---------- Co(de)nstructors and consts ----------

  /** Default constructor. */
  SummaryPlotXmlParser();

  /** Default destructor. */
  ~SummaryPlotXmlParser() { ; }

  // ---------- Public interface ----------

  /** Fill the map with the required tag/names and values */
  void parseXML(const std::string& xml_file);

  /** Returns SummaryPlot objects for given commissioning task. */
  std::vector<SummaryPlot> summaryPlots(const sistrip::RunType&);

  /** Debug print method. */
  void print(std::stringstream&) const;

private:
  // ---------- Private member data ----------

  /** Container holding the SummaryPlot objects. */
  std::map<sistrip::RunType, std::vector<SummaryPlot> > plots_;

  // RunType tags and attributes
  static const std::string rootTag_;
  static const std::string runTypeTag_;
  static const std::string runTypeAttr_;

  // SummaryPlot tags and attributes
  static const std::string summaryPlotTag_;
  static const std::string monitorableAttr_;
  static const std::string presentationAttr_;
  static const std::string viewAttr_;
  static const std::string levelAttr_;
  static const std::string granularityAttr_;
};

#endif  // DQM_SiStripCommissioningClients_SummaryPlotXmlParser_H