Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:56:23

0001 #ifndef DQM_SiStripCommissioningClients_SummaryPlotXmlParser_H
0002 #define DQM_SiStripCommissioningClients_SummaryPlotXmlParser_H
0003 
0004 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0005 #include "DQM/SiStripCommissioningSummary/interface/SummaryPlot.h"
0006 #include <iostream>
0007 #include <sstream>
0008 #include <string>
0009 #include <vector>
0010 #include <map>
0011 #include <cassert>
0012 #include <boost/property_tree/xml_parser.hpp>
0013 #include <boost/property_tree/ptree.hpp>
0014 
0015 class SummaryPlotXmlParser;
0016 
0017 /** Debug information. */
0018 std::ostream& operator<<(std::ostream&, const SummaryPlotXmlParser&);
0019 
0020 /** 
0021     @class SummaryPlotXmlParser
0022     @author P.Kalavase, R.Bainbridge
0023     
0024     @brief Parses the "summary plot" xml configuration file
0025 */
0026 class SummaryPlotXmlParser {
0027 public:
0028   // ---------- Co(de)nstructors and consts ----------
0029 
0030   /** Default constructor. */
0031   SummaryPlotXmlParser();
0032 
0033   /** Default destructor. */
0034   ~SummaryPlotXmlParser() { ; }
0035 
0036   // ---------- Public interface ----------
0037 
0038   /** Fill the map with the required tag/names and values */
0039   void parseXML(const std::string& xml_file);
0040 
0041   /** Returns SummaryPlot objects for given commissioning task. */
0042   std::vector<SummaryPlot> summaryPlots(const sistrip::RunType&);
0043 
0044   /** Debug print method. */
0045   void print(std::stringstream&) const;
0046 
0047 private:
0048   // ---------- Private member data ----------
0049 
0050   /** Container holding the SummaryPlot objects. */
0051   std::map<sistrip::RunType, std::vector<SummaryPlot> > plots_;
0052 
0053   // RunType tags and attributes
0054   static const std::string rootTag_;
0055   static const std::string runTypeTag_;
0056   static const std::string runTypeAttr_;
0057 
0058   // SummaryPlot tags and attributes
0059   static const std::string summaryPlotTag_;
0060   static const std::string monitorableAttr_;
0061   static const std::string presentationAttr_;
0062   static const std::string viewAttr_;
0063   static const std::string levelAttr_;
0064   static const std::string granularityAttr_;
0065 };
0066 
0067 #endif  // DQM_SiStripCommissioningClients_SummaryPlotXmlParser_H