CMS 3D CMS Logo

XMLEventWriter.h
Go to the documentation of this file.
1 /*
2  * XMLEventWriter.h
3  *
4  * Created on: Oct 12, 2017
5  * Author: kbunkow
6  */
7 
8 #ifndef L1T_OmtfP1_XMLEVENTWRITER_H_
9 #define L1T_OmtfP1_XMLEVENTWRITER_H_
10 
15 
16 #include <boost/property_tree/ptree.hpp>
17 
18 #include <memory>
19 #include <string>
20 #include <vector>
21 
23 public:
25 
26  ~XMLEventWriter() override;
27 
28  void observeProcesorBegin(unsigned int iProcessor, l1t::tftype mtfType) override;
29 
30  void addProcesorData(std::string key, boost::property_tree::ptree& procDataTree) override {
31  procTree.add_child(key, procDataTree);
32  }
33 
34  void observeProcesorEmulation(unsigned int iProcessor,
35  l1t::tftype mtfType,
36  const std::shared_ptr<OMTFinput>& input,
37  const AlgoMuons& algoCandidates,
38  const AlgoMuons& gbCandidates,
39  const std::vector<l1t::RegionalMuonCand>& candMuons) override;
40 
41  void observeEventBegin(const edm::Event& iEvent) override;
42 
43  void observeEventEnd(const edm::Event& iEvent,
44  std::unique_ptr<l1t::RegionalMuonCandBxCollection>& finalCandidates) override;
45 
46  void endJob() override;
47 
48 private:
50 
51  boost::property_tree::ptree tree;
52 
53  boost::property_tree::ptree* eventTree = nullptr;
54 
55  boost::property_tree::ptree procTree;
56 
58 
59  unsigned int eventNum = 0;
60 
61  unsigned int eventId = 0;
62 };
63 
64 #endif /* L1T_OmtfP1_XMLEVENTWRITER_H_ */
void observeProcesorEmulation(unsigned int iProcessor, l1t::tftype mtfType, const std::shared_ptr< OMTFinput > &input, const AlgoMuons &algoCandidates, const AlgoMuons &gbCandidates, const std::vector< l1t::RegionalMuonCand > &candMuons) override
static std::string const input
Definition: EdmProvDump.cc:50
int iEvent
Definition: GenABIO.cc:224
unsigned int eventNum
void addProcesorData(std::string key, boost::property_tree::ptree &procDataTree) override
key
prepare the HTCondor submission files and eventually submit them
std::string fName
std::vector< AlgoMuonPtr > AlgoMuons
Definition: AlgoMuon.h:176
void endJob() override
unsigned int eventId
boost::property_tree::ptree * eventTree
void observeEventEnd(const edm::Event &iEvent, std::unique_ptr< l1t::RegionalMuonCandBxCollection > &finalCandidates) override
XMLEventWriter(const OMTFConfiguration *aOMTFConfig, std::string fName)
boost::property_tree::ptree procTree
boost::property_tree::ptree tree
void observeEventBegin(const edm::Event &iEvent) override
~XMLEventWriter() override
const OMTFConfiguration * omtfConfig
void observeProcesorBegin(unsigned int iProcessor, l1t::tftype mtfType) override