Production Dipoles SSS Applications Gregory Bevillard AT MAS
Production Dipoles & SSS Applications Gregory Bevillard AT / MAS / Magnet design – Analysis and database Gregory. Bevillard@cern. ch Gregory Bevillard
Outline Features of pda. cern. ch Tools for analysis Automatic Holding Point To come… Conclusion 1/22/2022 Gregory Bevillard 2
Outline Features of pda. cern. ch Tools for analysis Automatic Holding Point To come… Conclusion 1/22/2022 Gregory Bevillard 3
http: //pda. cern. ch Java (java. sun. com) Java technology (J 2 EE Enterprise / Server) Oracle Internet Application Server Apache Tomcat to come with J 2 EE Public Service JDBC connection (Oracle database) ch. cern. pda library NEW 1/22/2022 Gregory Bevillard 4
Java (http: //java. sun. com) Object-Oriented language Support Web-based applications (JSP, Servlet) JSP: Java code in a HTML page. Servlet: HTML code in a Java page (more used for big applications). Example (JSP): <%@ page content. Type="text/html; charset=windows-1252"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Hello World</title> </head> <body> The current time is: <p><%= new java. util. Date() %></p> </body> </html> 1/22/2022 Gregory Bevillard 5
Java 2 platform, Enterprise Edition (J 2 EE) Web services support Development tools (SDK) 1/22/2022 Gregory Bevillard 6
Oracle Internet Application Server SSH connection via Unix or Win. SCP (Windows). Example (Unix): ssh pda. cern. ch –l login pda@pda. cern. ch’s password: password opt/home/oracle>… 1/22/2022 Gregory Bevillard 7
Oracle Applications Server Containers for J 2 EE /opt/home/oracle/product/ias 903/j 2 ee/pda_oc 4 j/applications/ Application. HTML or. JSP files WEB-INF web. xml classes. CLASS files WAR file Support of Information Technology department 1/22/2022 Gregory Bevillard 8
Java Database Connectivity (Oracle database) Example (package java. sql): Driver. Manager. register. Driver(new oracle. jdbc. driver. Oracle. Driver()); Connection con = Driver. Manager. get. Connection( « jdbc: oracle: thin: @myhost: 1521: orc 1 » , « scott » , « tiger » ); Statement stmt = con. create. Statement(); Resultset rset = stmt. execute. Query( « select RENTAL_ID, STATUS from ACME_RENTALS » ); while (rset. next()) { int id = rset. get. Int(1); … } rset. close(); stmt. close(); con. close(); ch. cern. pda. connection. Pda. DBConnection class with the pda library. 1/22/2022 Gregory Bevillard 9
ch. cern. pda library Packages: ch. cern. pda. auth: authentication (NICE & basic) for pda applications. ch. cern. pda. connection: connection to accdb database with the account « mas_pda » . ch. cern. pda. file: read configuration files. ch. cern. pda. hoding. Point: utilities for the automatic holding point. ch. cern. pda. mail: automatic mails for pda applications. [ch. cern. pda. maintenance: utilities to start, stop, and check the maintenance on the Internet Application Server). ] Property files: login. properties: users who are allowed to access the applications. connection. properties: login, pasword and JDBC URL. webapps. properties: urls and phyical address of each application. 1/22/2022 Gregory Bevillard 10
Outline Features of pda. cern. ch Tools for analysis Automatic Holding Point To come… Conclusion 1/22/2022 Gregory Bevillard 11
Tools for analysis Mag. Meas. Similarity Check Geometry Viewer Magnets derived data Report Maker 1/22/2022 Gregory Bevillard 12
Mag. Meas. Similarity Check Compute the difference of coil waviness between one magnet and all the other which are present in the database. If this result is less than 10 microns, the two magnets are the same. http: //pda. cern. ch: 9000/pda/prog. Test/index. jsp 1/22/2022 Gregory Bevillard 13
Viewers [1/3] Dipoles and Short Straight Sections viewer. JFree. Chart 9. 0. 15 library (http: //www. jfree. org/jfreechart/index. html). Viewers showing the mechanical shape and spool pieces positions of dipoles, and the magnetic and mechanical measurements on SSS. Functions to export data to MS EXCEL and to GNUPLOT files. User can save the graph as. PNG picture. 1/22/2022 Gregory Bevillard 14
Viewers [2/3] Example with j. Free. Viewer. java: do. Get() do. Post() generate. Chart. From. Magnet. Request() generate. Chart. From. Step. Request() get. MCDOData() get. MCSData() get. WP 08 Data() set. Data. From. Magnet. Request() set. Data. From. Step. Request() set. Marker. Line() 1/22/2022 Standard methods for servlets Gregory Bevillard Create chart for magnet selection Create chart for step selection return MCDO data return MCS data get correctors data at WP 08 draw a curve for magnet selection draw a curve for step selection draw a line for C and L planes 15
Viewers [3/3] Export to EXCEL 1/22/2022 Export to GNUPLOT Gregory Bevillard 16
Magnet’s derived data [1/2] i. Text library (http: //lowagie. com/i. Text/) To create a pdf file. Derived data for each magnet at ITP 20 -GEO and WP 08? -FID. http: //pda. cern. ch: 9000/pda/holding. Point/derived. jsp 1/22/2022 Gregory Bevillard 17
Magnet’s derived data [2/2] Oracle DB Derived data CRYOGEO_DERIVED_DATA (WP 08? ) CRYOGEO_CORRECTORS (ITP 20) Info sheet Class data CRYOGEO_CLASSIFICATION http: //pda. cern. ch Twists data 1/22/2022 CRYOGEO_TWIST WMF_LENGTH (TWIST_INTEGRAL) Gregory Bevillard 18
Report Maker [1/2] Servlet which build. gnu and. dat files for Gnuplot. Local script (APACHE ANT) which build. eps graphs with previous files. MS Word macro which call. eps files and build the geometry report. http: //pda. cern. ch: 9000/pda/report. Maker/report. Selection. jsp 1/22/2022 Gregory Bevillard 19
Report Maker [2/2] Gnuplot. zip build. Gnuplot. xml C: / User 1/22/2022 Gregory Bevillard 20
Outline Features of pda. cern. ch Tools for analysis Automatic Holding Point To come… Conclusion 1/22/2022 Gregory Bevillard 21
Automatic Holding Point FIRM Pda. cern. ch Txt Files Analyst Txt Files Automatic mail with PDA Project Engineer 1/22/2022 Gregory Bevillard 22
Upload [1/2] com. oreilly. servlet (http: //www. servlets. com/cos/inde x. html) Allow the Firm to send txt files directly on PDA server, an automatic mail is sending to MASMA CERN analysts. http: //pda. cern. ch: 9000/pda/holding. Point/index. Upload. html 1/22/2022 Gregory Bevillard 23
Upload [2/2] PDA server 2 txt files (created by measurement system) Firm 1 info_file created by application’s servlet http: //pda. cern. ch /info_files Sender Date Magnet … smtp. cern. ch Standard mail 1/22/2022 /files Measurements Date of test Operator … Mail trace in PDA Mail box. Gregory Bevillard 24
Download Java Server Page. Main page for analysts, they can download txt files, check the magnet similarity, and start automatic mails procedure. http: //pda. cern. ch: 9000/pda/holding. Point/download. jsp 1/22/2022 Gregory Bevillard 25
Send mail to Project Engineer & Send mail to Firm [1/4] Java. Mail library (J 2 EE) (http: //java. sun. com/products/javamail/) Servlet which send mails to Projects Engineers and to Firm, comments comes from Oracle database (WMF_HOLDING_POINT). Dates are stored in this table. Mailing list in a txt file. http: //pda. cern. ch: 9000/pda/holding. Point/index. To. PE. jsp http: //pda. cern. ch: 9000/pda/holding. Point/index. To. Firm. jsp 1/22/2022 Gregory Bevillard 26
Send mail to Project Engineer & Send mail to Firm [2/4] Oracle DB 3 txt files to WMF_DATA_SOURCE FILE_CONTENT FILE_INFO txt. Files. To. DB. sqlj Analyst Dates in WMF_HOLDING_POINT http: //pda. cern. ch Store. Date. sqlj CERN_ARRIVAL ANSWER 2 MMSLD ANSWER 2 MANUFACTURER Mail in WMF_HOLDING_POINT PDA library ch. cern. pda. holding. Point COMMENTS 2 PE comment. To. DB. sqlj file: Java class which contain standard SQL query 1/22/2022 Gregory Bevillard 27
Send mail to Project Engineer & Send mail to Firm [3/4] Send. Mail class (PDA library): n Send. Mail() -> read address in the mailing list file. n get. Address() -> return the list of address in a String. n send() -> send the mail. send() method: String from = "Server. Pda@cern. ch"; // one email address String host = "smtp. cern. ch"; // CERN SMTP server(s) String msg = “message”; String subject = “subject”; … // config where to send the email msg. set. Subject(subject); msg. set. Text(msg. Txt 1); msg. set. Sent. Date(new Date()); // send the message Transport. send(msg); 1/22/2022 Gregory Bevillard 28
Send mail to Project Engineer & Send mail to Firm [4/4] Example of mail (to P. E. ): Dear colleagues, cold mass 3141 has been measured. Data are OK for us Please use the following web address to send a mail to firm: http: //pda. cern. ch: 9000/pda/holding. Point/index. To. Firm. jsp? num=27 -APR-2004_3141 Regards, P. Hagen 1/22/2022 Gregory Bevillard 29
Outline Features of pda. cern. ch Tools for analysis Automatic Holding Point To come… Conclusion 1/22/2022 Gregory Bevillard 30
To come… SSS tools MEB table. Classification application (Java & Mathematica). Deployment on J 2 EE Public services First application deployed (prog. Test). Migration of all applications (during 2005). 1/22/2022 Gregory Bevillard 31
Outline Features of pda. cern. ch Tools for analysis Automatic Holding Point To come… Conclusion 1/22/2022 Gregory Bevillard 32
Conclusion PDA applications built in a clean language. Java support at CERN (IT department – J 2 EE Public Services) on 2005. PDA Web tools as prototype for this new service. 1/22/2022 Gregory Bevillard 33
Acknowledgements Elena Wildner AT-MAS Jerome Beauquis AT-MAS Eric Grancher IT-DB Nilo Segura Chinchilla IT-DB Bertrand Rousseau TS-CSE 1/22/2022 Gregory Bevillard 34
- Slides: 34