Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 2 // See the file tools.license for terms. 3 4 #ifndef tools_sg_plotter_style 5 #define tools_sg_plotter_style 6 7 #include "../xml/styles" 8 9 #include "plotter" 10 11 namespace tools { 12 namespace sg { 13 14 inline void style_from_res(const xml::styles& 15 {typedef xml::styles::style_t style_t; 16 const style_t* style = a_styles.find_style(a 17 if(style){ 18 a_axis.set_from_style(a_styles.out(),*styl 19 } else { 20 if(a_verbose) { 21 a_styles.out() << "tools::sg::style_from 22 << " style " << sout(a_pa 23 << std::endl; 24 } 25 }} 26 27 a_styles.res_sg_style<line_style>(a_path+".l 28 a_styles.res_sg_style<line_style>(a_path+".t 29 a_styles.res_sg_style<text_style>(a_path+".l 30 a_styles.res_sg_style<text_style>(a_path+".m 31 a_styles.res_sg_style<text_style>(a_path+".t 32 } 33 34 inline void style_from_res(const xml::styles& 35 //sg::fields of plotter : 36 {typedef xml::styles::style_t style_t; 37 const style_t* _style = a_styles.find_style( 38 if(_style){ 39 a_plotter.set_from_style(a_styles.out(),*_ 40 } else { 41 if(a_verbose) { 42 a_styles.out() << "tools::sg::style_from 43 << " style " << sout(a_pa 44 << std::endl; 45 } 46 }} 47 48 //sg::fields of various xml::styles : 49 a_styles.res_sg_style<style>(a_path+".bins_s 50 a_styles.res_sg_style<style>(a_path+".errors 51 a_styles.res_sg_style<style>(a_path+".func_s 52 a_styles.res_sg_style<style>(a_path+".points 53 54 a_styles.res_sg_style<style>(a_path+".backgr 55 a_styles.res_sg_style<text_style>(a_path+".t 56 a_styles.res_sg_style<text_style>(a_path+".i 57 a_styles.res_sg_style<text_style>(a_path+".t 58 a_styles.res_sg_style<style>(a_path+".inner_ 59 a_styles.res_sg_style<style>(a_path+".grid_s 60 a_styles.res_sg_style<style>(a_path+".wall_s 61 62 style_from_res(a_styles,a_path+".x_axis",a_p 63 style_from_res(a_styles,a_path+".y_axis",a_p 64 style_from_res(a_styles,a_path+".z_axis",a_p 65 style_from_res(a_styles,a_path+".colormap_ax 66 67 } 68 69 }} 70 71 #endif