Skip to content
Snippets Groups Projects
Select Git revision
  • Dev
  • ModuleNoiseAnalyzer
  • cdce-writing
  • add_requirements
  • uplegger
  • 2s_cmnoise_multi_sigma
  • disable_stubs_for_pedestal_2S
  • fix_lpgbt_setting
  • croc_scc_tuning
  • fravera-Dev-patch-21673
  • fravera-Dev-patch-19658
  • ci/devPipeline
  • cmsinnertracker
  • fravera-Dev-patch-31094
  • atTB
  • PSv2
  • Dev_Merge_lpGBT_2S_PS
  • ProtoModule_Developments
  • daqSchool2021
  • daqSchool2021Solutions
  • v6-21
  • v6-20
  • v6-19
  • v6-18
  • v6-17
  • v6-16
  • v6-15
  • v6-14
  • v6-13
  • v6-12
  • v6-11
  • v6-10
  • v6-09
  • v6-08
  • v6-07
  • v6-06
  • v6-05
  • v6-04
  • v6-03
  • v6-02
40 results

Amc13Controller.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Amc13Controller.h 1.25 KiB
    #ifndef _AMC13_CONTROLLER_H__
    #define _AMC13_CONTROLLER_H__
    
    #include "Amc13Description.h"
    #include "Amc13Interface.h"
    #include "Utils/ConsoleColor.h"
    #include "pugixml/pugixml.hpp"
    #include <iostream>
    #include <map>
    #include <string>
    
    class Amc13Controller
    {
      public:
        Amc13Controller();
        ~Amc13Controller();
    
        void InitializeAmc13(const std::string& pFilename, std::ostream& os);
        void ConfigureAmc13(std::ostream& os);
        void HaltAmc13(std::ostream& os);
    
      public:
        Amc13Interface*   fAmc13Interface;
        Amc13Description* fAmc13;
    
      private:
        // Private methods for parsing!
        void parseAmc13xml(const std::string& pFilename, std::ostream& os);
    
        // low level helpers to parse specific xml TAGS
        std::vector<int> parseAMCMask(pugi::xml_node pNode, std::ostream& os);
        BGO*             parseBGO(pugi::xml_node pNode, std::ostream& os);
        Trigger*         parseTrigger(pugi::xml_node pNode, std::ostream& os);
    
        // a little helper to deal with strings
        uint32_t convertAnyInt(const char* pRegValue)
        {
            if(std::string(pRegValue).find("0x") != std::string::npos)
                return static_cast<uint32_t>(strtoul(pRegValue, 0, 16));
            else
                return static_cast<uint32_t>(strtoul(pRegValue, 0, 10));
        }
    };
    
    #endif