Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:03

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   void initialiseXMLDocument(const std::string& docName);
0033 
0034   void finaliseXMLDocument(const std::string& fName);
0035 
0036   xercesc::DOMElement* writeEventHeader(unsigned int eventId, unsigned int mixedEventId = 0);
0037 
0038   xercesc::DOMElement* writeEventData(xercesc::DOMElement* aTopElement, const OmtfName& board, const OMTFinput& aInput);
0039 
0040   void writeAlgoMuon(xercesc::DOMElement* aTopElement, unsigned int iRefHit, const AlgoMuon& aMuon);
0041 
0042   void writeCandMuon(xercesc::DOMElement* aTopElement, const l1t::RegionalMuonCand& aCand);
0043 
0044   void writeResultsData(xercesc::DOMElement* aTopElement,
0045                         unsigned int iRegion,
0046                         const Key& aKey,
0047                         const OMTFResult& aResult);
0048 
0049   void writeGPData(const GoldenPattern& aGP);
0050 
0051   void writeGPData(const GoldenPattern& aGP1,
0052                    const GoldenPattern& aGP2,
0053                    const GoldenPattern& aGP3,
0054                    const GoldenPattern& aGP4);
0055 
0056   void writeConnectionsData(const std::vector<std::vector<OMTFConfiguration::vector2D> >& measurements4D);
0057 
0058   unsigned int findMaxInput(const OMTFConfiguration::vector1D& myCounts);
0059 
0060 private:
0061   xercesc::DOMImplementation* domImpl;
0062   xercesc::DOMElement* theTopElement;
0063   xercesc::DOMDocument* theDoc;
0064 
0065   const OMTFConfiguration* myOMTFConfig;
0066 };
0067 
0068 //////////////////////////////////
0069 //////////////////////////////////
0070 #endif