Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-05-27 01:56:23

0001 #ifndef OMTF_XMLConfigWriter_H
0002 #define OMTF_XMLConfigWriter_H
0003 
0004 #include <string>
0005 #include <vector>
0006 
0007 #include "xercesc/util/XercesDefs.hpp"
0008 
0009 #include "L1Trigger/L1TMuonOverlap/interface/OMTFConfiguration.h"
0010 #include "L1Trigger/L1TMuonOverlap/interface/OmtfName.h"
0011 
0012 class GoldenPattern;
0013 class OMTFConfiguration;
0014 class OMTFinput;
0015 class OMTFResult;
0016 class AlgoMuon;
0017 namespace l1t {
0018   class RegionalMuonCand;
0019 }
0020 struct Key;
0021 
0022 namespace XERCES_CPP_NAMESPACE {
0023   class DOMElement;
0024   class DOMDocument;
0025   class DOMImplementation;
0026 }  // namespace XERCES_CPP_NAMESPACE
0027 
0028 class XMLConfigWriter {
0029 public:
0030   XMLConfigWriter(const OMTFConfiguration* aOMTFConfig);
0031 
0032   ~XMLConfigWriter();
0033 
0034   void initialiseXMLDocument(const std::string& docName);
0035 
0036   void finaliseXMLDocument(const std::string& fName);
0037 
0038   xercesc::DOMElement* writeEventHeader(unsigned int eventId, unsigned int mixedEventId = 0);
0039 
0040   xercesc::DOMElement* writeEventData(xercesc::DOMElement* aTopElement, const OmtfName& board, const OMTFinput& aInput);
0041 
0042   void writeAlgoMuon(xercesc::DOMElement* aTopElement, unsigned int iRefHit, const AlgoMuon& aMuon);
0043 
0044   void writeCandMuon(xercesc::DOMElement* aTopElement, const l1t::RegionalMuonCand& aCand);
0045 
0046   void writeResultsData(xercesc::DOMElement* aTopElement,
0047                         unsigned int iRegion,
0048                         const Key& aKey,
0049                         const OMTFResult& aResult);
0050 
0051   void writeGPData(const GoldenPattern& aGP);
0052 
0053   void writeGPData(const GoldenPattern& aGP1,
0054                    const GoldenPattern& aGP2,
0055                    const GoldenPattern& aGP3,
0056                    const GoldenPattern& aGP4);
0057 
0058   void writeConnectionsData(const std::vector<std::vector<OMTFConfiguration::vector2D> >& measurements4D);
0059 
0060   unsigned int findMaxInput(const OMTFConfiguration::vector1D& myCounts);
0061 
0062 private:
0063   xercesc::DOMImplementation* domImpl;
0064   xercesc::DOMElement* theTopElement;
0065   xercesc::DOMDocument* theDoc;
0066 
0067   const OMTFConfiguration* myOMTFConfig;
0068 };
0069 
0070 //////////////////////////////////
0071 //////////////////////////////////
0072 #endif