Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:12:51

0001 /*
0002  * XMLEventWriter.h
0003  *
0004  *  Created on: Oct 12, 2017
0005  *      Author: kbunkow
0006  */
0007 
0008 #ifndef L1T_OmtfP1_XMLEVENTWRITER_H_
0009 #define L1T_OmtfP1_XMLEVENTWRITER_H_
0010 
0011 #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"
0012 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0013 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/AlgoMuon.h"
0014 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IOMTFEmulationObserver.h"
0015 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/XMLConfigWriter.h"
0016 #include "xercesc/util/XercesDefs.hpp"
0017 #include <memory>
0018 #include <string>
0019 #include <vector>
0020 
0021 class XMLEventWriter : public IOMTFEmulationObserver {
0022 public:
0023   XMLEventWriter(const OMTFConfiguration* aOMTFConfig, std::string fName);
0024 
0025   ~XMLEventWriter() override;
0026 
0027   void observeProcesorEmulation(unsigned int iProcessor,
0028                                 l1t::tftype mtfType,
0029                                 const std::shared_ptr<OMTFinput>& input,
0030                                 const AlgoMuons& algoCandidates,
0031                                 const AlgoMuons& gbCandidates,
0032                                 const std::vector<l1t::RegionalMuonCand>& candMuons) override;
0033 
0034   void observeEventBegin(const edm::Event& iEvent) override;
0035 
0036   void observeEventEnd(const edm::Event& iEvent,
0037                        std::unique_ptr<l1t::RegionalMuonCandBxCollection>& finalCandidates) override;
0038 
0039   void endJob() override;
0040 
0041 private:
0042   const OMTFConfiguration* omtfConfig;
0043   XMLConfigWriter xmlWriter;
0044   xercesc::DOMElement* currentElement;
0045 
0046   std::string fName;
0047 
0048   unsigned int eventNum = 0;
0049 
0050   unsigned int eventId = 0;
0051 };
0052 
0053 #endif /* L1T_OmtfP1_XMLEVENTWRITER_H_ */