AIDALIST * What are all the attributes of BPMS:LI27:501, and how would AIDA get each one? This includes EPICS PVs, SLC secondaries still out there, stuff AIDA knows about this BPM from the LCLS_INFRASTRUCTURE schema, XAL modelling things, etc. [softegr@lcls-builder script]$ ./aidalist -m BPMS:LI27:501% BPMS:LI27:501 ABKT SLC BPMS:LI27:501:ACCESS HIST.lcls Chads_lcls BPMS:LI27:501:ACCESS HIST.lcls Chads_lcls BPMS:LI27:501:ACCESS VAL EPICS_lcls ... * How many attributes are there of BPMS:LI27:501? [softegr@lcls-builder script]$ ./aidalist -m BPMS:LI27:501% | wc -l 443 * What are the EPICS PVs presently relating to BPMS:LI27:501? [softegr@lcls-builder script]$ ./aidalist -m BPMS:LI27:501% | grep EPICS_lcls BPMS:LI27:501:ACCESS VAL EPICS_lcls BPMS:LI27:501:ACTL VAL EPICS_lcls BPMS:LI27:501:AODL VAL EPICS_lcls BPMS:LI27:501:ATT1 VAL EPICS_lcls ... * Ignoring EPICS PVs, what else does AIDA know about BPMS:LI27:501? Note the missing % at the end of the argument - this is because EPICS PVs always include the field name, like ":XH1", so if I only give the prim:micro:unit, I'll get only non-PV things. I include this to emphasize the difference in the syntax of SLC and EPICS naming with respect to the plans for the Linac upgrade. Exercise for the reader: how else could I have done this? [softegr@lcls-builder script]$ ./aidalist -m BPMS:LI27:501 BPMS:LI27:501 ABKT SLC BPMS:LI27:501 ANGL SLC BPMS:LI27:501 ASCL SLC BPMS:LI27:501 CBLR SLC BPMS:LI27:501 element.effective_le Database /select effective_length from lcls_infrastructure.v_lcls_elements_report where epics_channel_access_name = '&instance' ... * How does AIDA get the effective length of BPMS:LI27:501? [softegr@lcls-builder script]$ ./aidalist -m BPMS:LI27:501% element.effective_length BPMS:LI27:501 element.effective_le Database /select effective_length from lcls_infrastructure.v_lcls_elements_report where epics_channel_access_name = '&instance' * Which modelling systems are used to model each BPM unit in LI27? [softegr@lcls-builder script]$ ./aidalist -m BPMS:LI27:% | egrep -i '*model' BPMS:LI27:201 R Model BPMS:LI27:201 twiss Model BPMS:LI27:301 R Model BPMS:LI27:301 twiss Model BPMS:LI27:401 R Model BPMS:LI27:401 twiss Model BPMS:LI27:501 R Model BPMS:LI27:501 twiss Model BPMS:LI27:5731 R SLCModel BPMS:LI27:5731 twiss SLCModel BPMS:LI27:601 R Model BPMS:LI27:601 twiss Model BPMS:LI27:701 R Model BPMS:LI27:701 twiss Model BPMS:LI27:801 R Model BPMS:LI27:801 twiss Model BPMS:LI27:8731 R SLCModel BPMS:LI27:8731 twiss SLCModel BPMS:LI27:901 R Model BPMS:LI27:901 twiss Model * What is the PV configuration of all the Y something PV in BPMS:LI27:501? ./aidalist BPMS:LI27:501:Y% | xargs cainfo Non-device examples =================== * How does aida get the elementInfo report? [softegr@lcls-builder script]$ ./aidalist -m LCLS elementInfo.byS LCLS elementInfo.byS Database select distinct element, element_type, epics_device_name, S_display, obstruction from lcls_infrastructure.v_lcls_elements_report_public where epics_device_name is not null and active_flag != 'I' and s_display != 0.0 order by s_display * What things relating to modelling in general does AIDA know (not the model of a specific device, but generally)? [softegr@lcls-builder script]$ ./aidalist -m model % model golds Database SELECT GOLD_STATUS, date_golded, run_id, run_mode, model_mode, model_line_name, gold_comments from machine_model.v_gold_report model modes Database select mo.id as "MODEL_MODES_ID", l.id as "MODEL_LINES_ID", model_line_name from machine_model.model_lines l, machine_model.model_modes mo where mo.model_lines_id = l.id The output shows that AIDA asks the Oracle database, using the given SQL statement. GETTING DATA WITH AIDALIST AND AIDAGET OR CAGET =============================================== Ok, so aidalist is cool. How do I get data with aida? Ans: aidaget can get almost all data, including EPICS, model, archiver, Oracle database, SLC DB, SLC klystron stuff etc, etc. But for straight EPICS, you're probably better off using caget because its faster. Examples of both below. * How do I get the value of a single PV using aida? Use aidaget with the PV name, with the attribute //VAL. Note, Aida can't get EPICS waveforms. No problem to add, but it can't right now. [softegr@lcls-builder script]$ aidaget BPMS:LI27:501:YF2//VAL 29-Oct-2009 02:54:58 0 0 0.06536301705613731 * How do I get all the BDESes of all the XCORs in LI27? [softegr@lcls-builder script]$ ./aidalist XCOR:LI27:%:BDES | xargs caget XCOR:LI27:202:BDES -0.00406615 XCOR:LI27:302:BDES 0.000993321 XCOR:LI27:402:BDES 0.00592224 XCOR:LI27:502:BDES 0.00131972 XCOR:LI27:602:BDES -0.00216162 XCOR:LI27:702:BDES 0.000854686 XCOR:LI27:802:BDES -6.95997e-05 XCOR:LI27:900:BDES -0.000109804 ... * How do I get all the R matrix of all devices in LI27? [softegr@lcls-builder script]$ ./aidalist %:LI27:% R | cut -f1 | xargs -I{} -t aidaget '{}//R' Long output ... * How do I get the design model twiss of all XCORS in LI27? ./aidalist BPMS:LI27:% twiss | cut -f1 | xargs -I{} -t aidaget '{}//twiss' -DTYPE=DESIGN aidaget BPMS:LI27:201//twiss -DTYPE=DESIGN 7.668964 39.559261 63.011063 0.053122 0.0 0.0 37.640143 35.039251 -0.073278 ... [why the funny cut -f1? Answer: because you want only the instances that matched a 'twiss' attribute, so the aidalist gave 2 columns, but you only want the first to form the aidaget call.] * How do I get the X1H PV archived history of BPMS:LI27:501? [softegr@lcls-builder script]$ aidaget BPMS:LI27:501:X1H//HIST.lcls -DSTARTTIME='10/29/2009 00:00:00' -DENDTIME='10/29/2009 00:00:05' -0.4021525169610977 28-Oct-2009 23:59:59 0 1256799599 2971 1 1 -0.38872569155693054 29-Oct-2009 00:00:00 0 1256799600 3331 1 1 -0.3939171518087387 29-Oct-2009 00:00:01 0 1256799601 3691 1 1 -0.3860021765232086 29-Oct-2009 00:00:02 0 1256799602 4051 1 1 -0.397000216960907 29-Oct-2009 00:00:03 0 1256799603 4411 1 1 -0.3886553729772568 29-Oct-2009 00:00:04 0 1256799604 4771 1 1 ...