1 / 14

OO Decoder Upgrade for Podd (hall A/C analyzer)

OO Decoder Upgrade for Podd (hall A/C analyzer) To include new CODA3 Hardware and Data Structures . Podd already has a decoder. It works. Goals of Upgrade

tasha
Download Presentation

OO Decoder Upgrade for Podd (hall A/C analyzer)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OO Decoder Upgrade for Podd(hall A/C analyzer) To include new CODA3 Hardware and Data Structures Podd already has a decoder. It works. Goals of Upgrade 1. Maintain existing public interface ; no need to rewrite dependent classes, e.g. detectors. However, some new public methods will be available. 2. Support for new CODA3 Pipelining Hardware * using software from DAQ group * FADC250, F1TDC, SSP, CTP modules 3. Support for Multiblock data structure. Using EVIO library from DAQ group 4. Cleaner Object-oriented design  easier to add new modules and new event types  easier to extend to hall-specific implementations R. Michaels, Dec 18, 2013 HA Software Mtg

  2. Motivation, 1 NEW WAY OLD WAY Database defines event types An EventTypeHandler, defined for each event type, decodes the evbuffer. e.g. EpicsEventHandler ScalerEventHandler are EventTypeHandlers event_type = evbuffer[1]>>16; switch(event_type) { case EPICS_EVTYPE : ret = epics_decode(evbuffer); break; case SCALER_EVTYPE : ret = scaler_event_decode(evbuffer); break; R. Michaels, Dec 18, 2013 HA Software Mtg

  3. Motivation, 2 NEW WAY OLD WAY p = evbuffer + ipt; model = fMap->getModel(roc,slot); switch(model) { case 1182 : // LeCroy 1182 ADC for (chan = 0; chan < 8; chan++){ crateslot[roc,slot]-> loadData(chan,*p); } break; case 7510 : // Struck 7510 ADC // etc Database defines modules in crates A Module, defined for each slot in a crate, decodes the relevant portion of evbuffer e.g. LeCroy1182 Struck7510 are Modules R. Michaels, Dec 18, 2013 HA Software Mtg

  4. * 14 year old class in Podd Public Interface Will not change, but new methods added * CODA Decoder Data R. Michaels, Dec 18, 2013 HA Software Mtg

  5. Output Detectors Analyzers Public Interface CODA Decoder Data • Change inner-workings because: • Podd philosophy : “Everything is a plug-in” -- should include Modules and Event Type Handlers • Make extensible (e.g. Hall C scalers) R. Michaels, Dec 18, 2013 HA Software Mtg

  6. OO Design : A verbal description of the problem defines the classes and their relationships. TheCODA-data-decoder ( type of Event Data “EvData”) containsEvent Type Handlersto process events. TheEvTypeHandlers are of type Epics, Scalers, Physics Triggers, etc TheCODA-decoderuses aCrate Map to define Slots / Crates. A Module belongs to aSlot / Crate. -- examples are the Fastbus1881M and FADC250. A Module knows how to decode the EvData and uses EvData::Load to store data so that Detectors, Output, and Analyzers can EvData::Get the data Classes (capital, underlined) R. Michaels, Dec 18, 2013 HA Software Mtg

  7. OO Design : A verbal description of the problem defines the classes and their relationships. inheritance containment TheCODA-data-decoder ( type of Event Data “EvData”) containsEvent Type Handlers to process events. TheEvTypeHandlers are of type Epics, Scalers, Physics Triggers, etc TheCODA-decoderuses aCrate Map to define Slots / Crates. A Module belongs to aSlot / Crate. -- examples are the Fastbus1881M and FADC250. A Module knows how to decode the EvData and uses EvData::Load to store data so that Detectors, Output, and Analyzers can EvData::Get the data Classes (capital, underlined) usage

  8. OO Decoder Design, 1 EvData Existing class. Public interface preserved and augmented. Modules (new class) belong to CrateSlot data member. inheritance CodaDecoder Existing class. New EVIO library incorporated. Support for multiblockdata structure. EventTypeHandler New class. Handles events. Belongs to CodaDecoder inheritance EpicsEventHandler ScalerEventHandler PhysicsEventHandler New class. Uses parent class (EvData) to obtain event buffer. Loads EvData’sCrateSlot data using Module methods. R. Michaels, 12 GeV Software Review

  9. OO Decoder Design, 2 CrateMap Existing class. Uses database to define location of modules and “decoder rules” Module New , abstract inheritance VmeModule FastBusModule New , abstract inheritance Scaler3801 TDC1877 TDC1881 FADC250 Caen550 TDC1872 F1TDC How to add a new module: 1) Write a new Module class; 2) Add to CrateMap database; 3) Data appears in EvData’s “Get” methods R. Michaels, 12 GeV Software Review

  10. Dec. 2013 Status : “Toy” Code written 7 New classes + small mods to existing classes Obtain code from https://github.com/rwmichaels/analyzer/tree/master/oodecoder ToyCodaDecoder ToyEvtTypeHandler ToyPhysicsHandler ToyScalerEvtHandler ToyModule ToyFastbusModule ToyModuleX R. Michaels, Dec 18, 2013 HA Software Mtg

  11. A few highlights of “Toy” Code, 1 * class ToyCodaDecoder : public THaEvData { protected: void InitHandlers(); // initialize event type handlers vector<ToyEvtTypeHandler *> event_handler; } * Obtain code from https://github.com/rwmichaels/analyzer/tree/master/oodecoder R. Michaels, Dec 18, 2013 HA Software Mtg

  12. A few highlights of “Toy” Code, 2 // Event processing in ToyCodaDecoder::LoadEvent event_handler[event_type]->Decode(this); THaEvData R. Michaels, Dec 18, 2013 HA Software Mtg

  13. A few highlights of “Toy” Code, 3 // Event processing ToyFastbusModule::Decode(THaEvData *evdata, Int_t start) { // index: loops from “start” to “end” of module’s data Int_trawdata = evdata->GetRawData(index); while (IsSlot(rawdata) ) { rawdata = evdata->GetRawData(index++); Int_tchan = (rawdata & fChanMask)>>fChanShift; Int_tmdata = (rawdata & fDataMask); evdata->LoadData(fCrate, fSlot, chan, mdata); } R. Michaels, Dec 18, 2013 HA Software Mtg

  14. OO Decoder : Summary&Plan • Design--done, checked by Ole • “Toy” code -- done, available for scrutiny • Beta code test on Compton test stand (FADC, etc) May 2014 check on old HRS data Aug 2014 • Release for PoddOct 2014 Goal to finish R. Michaels, Dec 18, 2013 HA Software Mtg

More Related