source: MML/trunk/at/simulator/element/monitor.m @ 8

Last change on this file since 8 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 932 bytes
Line 
1function z = monitor(fname,method)
2% monitor('FAMILYNAME','METHOD')
3%       creates a new family in the FAMLIST - a structure with fields
4%               FamName                 family name
5%               Length                  = 0 for  bpm type
6%               PassMethod              name of the function on disk to use fortracking
7%                                                       use 'IdentityPass' for bpms that have no action
8%
9% returns assigned address in the FAMLIST that is uniquely identifies
10% the family
11% declare bpms in the lattice file  as BPM = monitor('BPM','IdentityPass');
12
13
14ElemData.FamName = fname;  % add check for identical family names
15ElemData.Name='BPM';
16ElemData.Length=0;
17ElemData.PassMethod=method;
18
19global FAMLIST
20z = length(FAMLIST)+1; % number of declare families including this one
21FAMLIST{z}.FamName = fname;
22FAMLIST{z}.NumKids = 0;
23FAMLIST{z}.KidsList= [];
24FAMLIST{z}.ElemData= ElemData;
Note: See TracBrowser for help on using the repository browser.