NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
SlotConfigReader.h
Go to the documentation of this file.
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2017.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Authors:
11  Ron Fox
12  Giordano Cerriza
13  NSCL
14  Michigan State University
15  East Lansing, MI 48824-1321
16 */
17 
21 #ifndef SLOTCONFIGREADER_H
22 #define SLOTCONFIGREADER_H
23 #include <vector>
24 #include <string>
25 #include <tinyxml2.h>
26 
27 namespace DDAS {
28 
44 private:
45  std::string m_filename;
46 public:
47  SlotConfigReader(const char* file);
50 private:
51  int operator==(const SlotConfigReader& rhs);
52  int operator!=(const SlotConfigReader& rhs);
53 public:
54  std::vector<unsigned> read();
55 private:
56  std::vector<unsigned> processSlots(tinyxml2::XMLElement& root);
57  unsigned getSlot(tinyxml2::XMLElement& el);
58  void checkSlotMap(const std::vector<unsigned>& slots);
59  void checkError(tinyxml2::XMLError err, tinyxml2::XMLDocument& doc);
60 };
61 } // DDAS namespace.
62 
63 
64  #endif
Definition: tinyxml2.h:1258
Definition: tinyxml2.h:1691
Definition: SlotConfigReader.h:43
SlotConfigReader(const char *file)
Definition: SlotConfigReader.cpp:35
std::vector< unsigned > read()
Definition: SlotConfigReader.cpp:66
SlotConfigReader & operator=(const SlotConfigReader &rhs)
Definition: SlotConfigReader.cpp:49
Definition: functions.h:26