hardware mapper service
play

Hardware Mapper Service 1 18 August 2016 Jonathan Davies - PowerPoint PPT Presentation

Jonathan Davies DAQ Simula3ons, 2016 Hardware Mapper Service 1 18 August 2016 Jonathan Davies Mo3va3on Hardware Mapper Service Trigger algorithms (or


  1. Jonathan ¡Davies ¡ DAQ ¡Simula3ons, ¡2016 ¡ Hardware ¡Mapper ¡Service ¡ 1 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

  2. Mo3va3on ¡ Hardware ¡Mapper ¡Service ¡ • Trigger ¡algorithms ¡(or ¡algorithms ¡that ¡generate ¡primi?ves) ¡could ¡live ¡at ¡many ¡ different ¡levels ¡of ¡hardware ¡within ¡the ¡DUNE ¡detector: ¡ • APA ¡– ¡detector ¡has ¡many ¡APAs ¡ • APAGroup ¡– ¡some ¡collec?on ¡of ¡APAs ¡ • Board ¡– ¡APAs ¡could ¡have ¡many ¡read ¡out ¡boards ¡ • ASIC ¡– ¡Boards ¡could ¡see ¡many ¡ASICs, ¡could ¡have ¡a ¡primi?ve ¡per ¡ASIC ¡ • Offline ¡soSware ¡/ ¡simula?on ¡only ¡supplies ¡ALL ¡channels ¡in ¡the ¡detector ¡ (std::vector<raw::RawDigits>) ¡ • Need ¡a ¡service ¡that ¡users ¡can ¡interrogate ¡to ¡supply ¡a ¡subset ¡of ¡channels ¡for ¡a ¡ par?cular ¡hardware ¡“Element” ¡ • Need ¡to ¡be ¡able ¡to ¡tag ¡a ¡trigger ¡primi?ve ¡as ¡coming ¡from ¡a ¡par?cular ¡hardware ¡ “Element” ¡ 2 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

  3. Requirements ¡ Hardware ¡Mapper ¡Service ¡ • Able ¡to ¡dynamically ¡adjust ¡to ¡different ¡geometries ¡ • Does ¡all ¡the ¡heavy ¡liSing ¡upon ¡ini?alisa?on ¡ • Exposes ¡easy ¡to ¡use ¡func?ons ¡and ¡return ¡types ¡for ¡users ¡ ¡ • std::vector<ChannelID_t> ¡ ¡ • pass ¡it ¡a ¡vector ¡of ¡all ¡channel’s ¡raw ¡digits, ¡it ¡returns ¡a ¡subset ¡as ¡a ¡vector ¡ • Defines ¡some ¡class ¡for ¡iden?fying ¡various ¡types ¡of ¡hardware ¡element ¡ • Integrate ¡this ¡class ¡into ¡the ¡BasicTrigger ¡data ¡product ¡-­‑> ¡insert ¡into ¡event ¡ • i.e. ¡We ¡got ¡a ¡trigger ¡of ¡some ¡type ¡with ¡some ¡parameters ¡from ¡ this ¡ piece ¡of ¡ hardware ¡ • Can ¡be ¡expanded ¡to ¡include ¡new ¡“Hardware ¡Elements” ¡that ¡we ¡have ¡not ¡thought ¡ of ¡yet ¡ 3 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

  4. What’s ¡Been ¡Done? ¡ Hardware ¡Mapper ¡Service ¡ I’ve ¡wriGen ¡a ¡v1.0 ¡– ¡most ¡of ¡the ¡core ¡func3onality ¡is ¡in ¡place! ¡ ¡ HardwareMapperService{.h,_service.cc}, ¡TestHardwareMapper_module.cc, ¡ HardwareElements.h ¡+ ¡some ¡fcls ¡ ¡ Lives ¡within ¡the ¡dunetpc ¡repository ¡ ¡DAQTriggerSim/Service ¡ ¡DAQTriggerSim/TestHardwareMapper ¡ ¡DAQTriggerSim/TriggerDataProducts ¡ ¡ On ¡the ¡DAQ ¡trigger ¡Sim ¡feature ¡branch, ¡which ¡is ¡where ¡Michael’s ¡trigger ¡code ¡exists ¡ ¡feature/mbaird42_DAQtriggerSim ¡ ¡ I ¡refer ¡you ¡to ¡Michael’s ¡“geing ¡started” ¡wiki ¡for ¡how ¡to ¡get ¡going ¡with ¡the ¡trigger ¡ framework. ¡hkps://cdcvs.fnal.gov/redmine/projects/dunetpc/wiki/ Using_the_DAQTriggerSim_module ¡ ¡ ¡ 4 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

  5. Some ¡Code ¡ Hardware ¡Mapper ¡Service ¡ ¡ DAQTriggerSim/Service/HardwareMapperService.h ¡ Some of the public member functions exposed to users void printTPCMap(unsigned int num_tpcs_to_print=10); void printAPAMap(unsigned int num_apas_to_print=10); void printHardwareMaps(); //jpd -- prints both the tpc and apa maps void printGeometryInfo(); //jpd -- testing function to print geometry information once loaded unsigned int getNAPAs() const { return fAPAMap.size();} unsigned int getNTPCs() const { return fTPCMap.size();} //jpd -- These are the main user accessible functions - dish out vectors of channel ids std::vector<raw::ChannelID_t> const& getTPCChannels(Hardware::ID tpc_id); std::vector<raw::ChannelID_t> const& getAPAChannels(Hardware::ID apa_id); 5 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

  6. Some ¡Code ¡ Hardware ¡Mapper ¡Service ¡ ¡ DAQTriggerSim/TriggerDataProducts/HardwareElements.h ¡ namespace Hardware Typedef ID -> unsigned int HardwareID -> class containing std::string fType;//(i.e. “APA”) ID fID;//(i.e. APA “2”) Element -> same as (inherits from) HardwareID but with list of channels exposes addChannel, getChannels ASIC, Board, TPC, APA, APAGroup, Cryostat -> these are all specialisations of Element 6 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

  7. Some ¡Code ¡ Hardware ¡Mapper ¡Service ¡ ¡ DAQTriggerSim/TestHardwareMapper/TestHardwareMapper_module.cc ¡ art::ServiceHandle<HardwareMapperService> mapperService; mapperService->printGeometryInfo(); unsigned int num_tpcs = mapperService->getNTPCs(); for(unsigned int tpc_id = 0; tpc_id < num_tpcs; tpc_id++){ //jpd -- now get the vector of channels std::vector<raw::ChannelID_t> tpc_channel_vector = mapperService->getTPCChannels(tpc_id); INFO << "Got TPC number: " << tpc_id << " - it has " << tpc_channel_vector.size() << " channels" << " - first channel is " << tpc_channel_vector.at(0) << std::endl; }//loop over TPCs unsigned int num_apas = mapperService->getNAPAs(); for(unsigned int apa_id = 0; apa_id < num_apas; apa_id++){ //jpd -- now get the vector of channels std::vector<raw::ChannelID_t> apa_channel_vector = mapperService->getAPAChannels(apa_id); INFO << "Got APA number: " << apa_id << " - it has " << apa_channel_vector.size() << " channels" << " - first channel is " << apa_channel_vector.at(0) << std::endl; }//loop over APAs 7 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

  8. Some ¡Code ¡ Hardware ¡Mapper ¡Service ¡ ¡ DAQTriggerSim/TestHardwareMapper/TestHardwareMapper_module.cc ¡ art::ServiceHandle<HardwareMapperService> mapperService; mapperService->printGeometryInfo(); unsigned int num_tpcs = mapperService->getNTPCs(); for(unsigned int tpc_id = 0; tpc_id < num_tpcs; tpc_id++){ //jpd -- now get the vector of channels std::vector<raw::ChannelID_t> tpc_channel_vector = mapperService->getTPCChannels(tpc_id); INFO << "Got TPC number: " << tpc_id << " - it has " << tpc_channel_vector.size() << " channels" << " - first channel is " << tpc_channel_vector.at(0) << std::endl; }//loop over TPCs unsigned int num_apas = mapperService->getNAPAs(); for(unsigned int apa_id = 0; apa_id < num_apas; apa_id++){ //jpd -- now get the vector of channels std::vector<raw::ChannelID_t> apa_channel_vector = mapperService->getAPAChannels(apa_id); INFO << "Got APA number: " << apa_id << " - it has " << apa_channel_vector.size() << " channels" << " - first channel is " << apa_channel_vector.at(0) << std::endl; }//loop over APAs 8 ¡ 18 ¡August ¡2016 ¡ Jonathan Davies

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend