ATLAS Offline Software
MuctpiXMLParser.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //--------------------------------
6 // This is the MuctpiXMLParser class. It containts all the methods required to
7 // parse the configuration XML. The parsed information is stored in a container
8 // class MuctpiConfigAlg. This container is sent to the TopoSteering and its contents
9 // are unloaded and used to configurate the decision algorithm.
10 //-------------------------------
11 
12 #ifndef MUCTPIXMLPARSER_HPP
13 #define MUCTPIXMLPARSER_HPP
14 
15 
16 
17 #include "TrigConfBase/TrigConfMessaging.h"//inheritance
18 
19 
20 // boost libraries
21 #include <boost/property_tree/ptree.hpp>
22 
23 #include "TrigConfMuctpi/MuCTPiGeometry.h"//member
24 #include "TrigConfMuctpi/MuctpiXMLHelper.h"//member
25 #include <string>
26 
27 class MioctGeometry;
29 class MioctROIGeometry;
31 class L1MuonPtEncoding;
32 
34 {
35 
36 public:
37 
38  //Constructor
40 
41  //Destructor
42  virtual ~MuctpiXMLParser() override = default;
43 
44  // print the parsed configuration
45  void printConfiguration() const;
46 
47  // set verbosity (level out output to screen)
48  // something like 3=high, 2=med, 1=low
49  void setVerbosity(int v) { m_verbosity=v; }
50 
51  // method to get a single algorithm from the parsed configuration file
52  const MuCTPiGeometry& getMuCTPiGeometry() const {return m_muctpi; }
53 
54  // read input configuration and check for errors
55  void readConfiguration(const std::string & inputfile);
56 
57  // read input configuration and check for errors
59 
60  // parse configuration and fill algorithm containers
61  void parseConfiguration();
62 
63 
64 private:
65 
66  // methods to set parameters for menu objects
67  void setOctant( boost::property_tree::ptree menuElement, MioctGeometry &octant);
68  void setSector( boost::property_tree::ptree menuElement, MioctSectorGeometry &sector);
69  void setROI( boost::property_tree::ptree menuElement, MioctROIGeometry &roi);
71  void setPtEncoding(boost::property_tree::ptree menuElement, L1MuonPtEncoding & ptEncoding);
72 
73 
74  // input validation variables
75  int m_verbosity {0};
76 
77  // configuration variables
81 };
82 
83 
84 
85 #endif
MuctpiXMLHelper
Definition: MuctpiXMLHelper.h:13
MuCTPiGeometry
Definition: MuCTPiGeometry.h:18
MuctpiXMLParser::m_muctpi
MuCTPiGeometry m_muctpi
Definition: MuctpiXMLParser.h:79
MuctpiXMLParser::~MuctpiXMLParser
virtual ~MuctpiXMLParser() override=default
MuctpiXMLParser::readConfiguration
void readConfiguration(const std::string &inputfile)
Definition: MuctpiXMLParser.cxx:43
MuctpiXMLParser::setPtEncoding
void setPtEncoding(boost::property_tree::ptree menuElement, L1MuonPtEncoding &ptEncoding)
Definition: MuctpiXMLParser.cxx:91
MuctpiXMLParser::setOctant
void setOctant(boost::property_tree::ptree menuElement, MioctGeometry &octant)
Definition: MuctpiXMLParser.cxx:111
L1MuonPtEncoding
Definition: L1MuonPtEncoding.h:10
MioctROIGeometry
Definition: MioctROIGeometry.h:22
MuctpiXMLParser::MuctpiXMLParser
MuctpiXMLParser()
Definition: MuctpiXMLParser.cxx:29
MuctpiXMLParser::setConfiguration
void setConfiguration(boost::property_tree::ptree ptree)
Definition: MuctpiXMLParser.h:58
MuctpiXMLHelper.h
MuctpiXMLParser::setROI
void setROI(boost::property_tree::ptree menuElement, MioctROIGeometry &roi)
Definition: MuctpiXMLParser.cxx:167
MuctpiXMLParser::parseConfiguration
void parseConfiguration()
Definition: MuctpiXMLParser.cxx:55
MuctpiXMLParser::setTopoCell
void setTopoCell(boost::property_tree::ptree menuElement, MioctTopoCellGeometry &topocell)
Definition: MuctpiXMLParser.cxx:190
MuctpiXMLParser::m_verbosity
int m_verbosity
Definition: MuctpiXMLParser.h:75
ptree
boost::property_tree::ptree ptree
Definition: JsonFileLoader.cxx:16
MuctpiXMLParser::m_muctpiPT
boost::property_tree::ptree m_muctpiPT
Definition: MuctpiXMLParser.h:78
MuctpiXMLParser::setVerbosity
void setVerbosity(int v)
Definition: MuctpiXMLParser.h:49
TrigConf::TrigConfMessaging
Class to provide easy access to TrigConf::MsgStream for TrigConf classes.
Definition: TrigConfMessaging.h:28
MuctpiXMLParser::m_xmlHelper
MuctpiXMLHelper m_xmlHelper
Definition: MuctpiXMLParser.h:80
python.PyAthena.v
v
Definition: PyAthena.py:154
MuctpiXMLParser::setSector
void setSector(boost::property_tree::ptree menuElement, MioctSectorGeometry &sector)
Definition: MuctpiXMLParser.cxx:145
MioctSectorGeometry
Definition: MioctSectorGeometry.h:20
MuctpiXMLParser::getMuCTPiGeometry
const MuCTPiGeometry & getMuCTPiGeometry() const
Definition: MuctpiXMLParser.h:52
MioctTopoCellGeometry
Definition: MioctTopoCellGeometry.h:15
MuctpiXMLParser
Definition: MuctpiXMLParser.h:34
MuCTPiGeometry.h
FullCPAlgorithmsTest_CA.inputfile
dictionary inputfile
Definition: FullCPAlgorithmsTest_CA.py:62
TrigConfMessaging.h
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging)
MioctGeometry
Definition: MioctGeometry.h:14
MuctpiXMLParser::printConfiguration
void printConfiguration() const
Definition: MuctpiXMLParser.cxx:35