Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zsneoks committed Jul 12, 2012
1 parent 8a16240 commit 1074f34
Show file tree
Hide file tree
Showing 1,262 changed files with 627,842 additions and 1,312 deletions.
210 changes: 210 additions & 0 deletions ApplicationRuntimeHandler-IRuntimeHandler-htmlname.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ApplicationRuntimeHandler及IRuntimeHandler文档解析</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
<link href="zsneoks.github.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="木大 Atom Feed" />

<link href="zsneoks.github.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="木大 RSS Feed" />


<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
<script src="./js/IE8.js" type="text/javascript"></script><![endif]-->

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->

</head>

<body id="index" class="home">

<header id="banner" class="body">
<h1><a href=".">木大 </a></h1>
<nav><ul>





<li class="active"><a href="./category/Ganga.html">Ganga</a></li>

<li ><a href="./category/linux.html">linux</a></li>

<li ><a href="./category/关于.html">关于</a></li>

<li ><a href="./category/测试.html">测试</a></li>

<li ><a href="./category/物理.html">物理</a></li>

</ul></nav>
</header><!-- /#banner -->

<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="ApplicationRuntimeHandler-IRuntimeHandler-htmlname.html" rel="bookmark"
title="Permalink to ApplicationRuntimeHandler及IRuntimeHandler文档解析">ApplicationRuntimeHandler及IRuntimeHandler文档解析</a></h1>

</header>

<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2012-06-28T00:00:00">
四 28 六月 2012
</abbr>


<address class="vcard author">
By <a class="url fn" href="./author/木大.html">木大</a>
</address>

<p>In <a href="./category/Ganga.html">Ganga</a>. </p>
<p>tags: <a href="./tag/ganga.html">ganga</a><a href="./tag/物理.html">物理</a></p>


</footer><!-- /.post-info -->
<h2>ApplicationRuntimeHandlers</h2>
<p>类图如下:</p>
<p><img alt="ApplicationRuntimeHandlers类图" src="static/images/applicationruntimehandlers.png" title="ApplicationRuntimeHandler类图" /></p>
<p>文档解析:</p>
<p>匹配app和backend的handlers机制。</p>
<h3>1.add(self,application,backend,handler)</h3>
<ul>
<li></li>
</ul>
<h3>2.get(self,application,backend)</h3>
<ul>
<li></li>
</ul>
<h3>3.getAllBackends(self,application=None)</h3>
<ul>
<li></li>
</ul>
<h3>4.getAllApplication(self,backend=None)</h3>
<ul>
<li></li>
</ul>
<h2>IRuntimeHandler</h2>
<p>类图如下:</p>
<p><img alt="IRuntimeHandler类图" src="static/images/iruntimehandler.png" /></p>
<p>文档解析:</p>
<p>RuntimeHandler是一个连接器,用来连接app和backend。app的configure方法产生appconfig对象。backend的submit方法使用jobconfig对象。RuntimeHandler将appconfig对象转换成jobconfig对象。该转换是作业提交的一部分。它在prepare方法中实现。</p>
<h3>1.master_prepare(self,app,appmasterconfig)</h3>
<ul>
<li>为作业提交的共性(共享)部分做一些准备</li>
<li>每个作业调用一次(包括要拆分作业或者不拆分的作业)</li>
<li>返回值为backend可理解的jobmasterconfig对象</li>
<li>参数
<ul>
<li>- app: 原始的app对象</li>
<li>- appmaster config:app.master_configure()的结果</li>
</ul></li>
</ul>
<h3>2.prepare(self,app,appsubconfig,appmasterconfig,jobmasterconfig)</h3>
<ul>
<li>为作业提交的特性(子作业)部分做一些准备工作</li>
<li>在拆分情况下每个子作业调用一次。</li>
<li>如果没有拆分成子作业,则只调用一次</li>
<li>返回值是backend可理解的subjobconfig对象的列表</li>
<li>参数
<ul>
<li>- app: 原始的app对象</li>
<li>- appmaster config: app.master_configure()的结果</li>
<li>- appsubconfig: app.configure()为每个子作业运行的结果的列表(不拆分的情况下则是主作业)</li>
<li>- jobmasterconfig: self.master_prepare()的返回结果</li>
<ul></li>
</ul>
</div><!-- /.entry-content -->

<div class="comments">
<h2>Comments !</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_identifier = "ApplicationRuntimeHandler-IRuntimeHandler-htmlname.html";
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://zsneoks.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>


</article>
</section>

<section id="extras" class="body">

<div class="blogroll">
<h2>blogroll</h2>
<ul>

<li><a href="http://docs.notmyidea.org/alexis/pelican/">Pelican</a></li>

<li><a href="http://python.org">Python.org</a></li>

<li><a href="http://jinja.pocoo.org">Jinja2</a></li>

</ul>
</div><!-- /.blogroll -->


<div class="social">
<h2>social</h2>
<ul>
<li><a href="zsneoks.github.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>

<li><a href="zsneoks.github.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>



<li><a href="http://twitter.com/zsneoks">twitter</a></li>

<li><a href="http://lastfm.com/user/zsneoks">lastfm</a></li>

<li><a href="http://github.com/zsneoks">github</a></li>

</ul>
</div><!-- /.social -->

</section><!-- /#extras -->

<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://pelican.notmyidea.org/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->

<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->


<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-32881388-1");
pageTracker._trackPageview();
} catch(err) {}</script>



<script type="text/javascript">
var disqus_shortname = 'zsneoks';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>

</body>
</html>
166 changes: 166 additions & 0 deletions Geant4-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Geant4模拟总结(一)</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
<link href="zsneoks.github.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="木大 Atom Feed" />

<link href="zsneoks.github.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="木大 RSS Feed" />


<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
<script src="./js/IE8.js" type="text/javascript"></script><![endif]-->

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->

</head>

<body id="index" class="home">

<header id="banner" class="body">
<h1><a href=".">木大 </a></h1>
<nav><ul>





<li ><a href="./category/Ganga.html">Ganga</a></li>

<li ><a href="./category/linux.html">linux</a></li>

<li ><a href="./category/关于.html">关于</a></li>

<li ><a href="./category/测试.html">测试</a></li>

<li class="active"><a href="./category/物理.html">物理</a></li>

</ul></nav>
</header><!-- /#banner -->

<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="Geant4-1.html" rel="bookmark"
title="Permalink to Geant4模拟总结(一)">Geant4模拟总结(一)</a></h1>

</header>

<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2011-07-29T00:00:00">
五 29 七月 2011
</abbr>


<address class="vcard author">
By <a class="url fn" href="./author/木大.html">木大</a>
</address>

<p>In <a href="./category/物理.html">物理</a>. </p>
<p>tags: <a href="./tag/geant4.html">geant4</a><a href="./tag/模拟.html">模拟</a><a href="./tag/学术.html">学术</a></p>


</footer><!-- /.post-info -->
<p>笔者是Geant4的初学者,在Geant4学习过程中经历了一段只有例程为师的“痛苦”历程(据说学习Geant4的各位前辈都经历过相同的磨练,并毅然决定把这种心灵与肉体的双重磨砺传播发扬下去。于是在神功初成之后就果断归隐山林,从此不为世人所知。=.- :))。</p>
<p>在摸索学习Geant4三个月后,笔者对Geant4的使用建立了初步基本的认识。一方面想整理自己对Geant4基本使用方法的粗浅认识,更好的组织和精练自己的知识系统;另一方面也想总结分享下自己学习Geant4的过程和方法以及一些体会,但愿能为后来的Geant4初学者提供绵薄微助。于是有了写这个系列博文的想法。(其实你能看到这些东西还有一个更大的原因,那就是笔者最近迷上了用wordpress写博客=.=!)</p>
<p>本文正如题目所说,是针对没有任何Geant4基础的初学者。不过笔者暂时还没有写如何安装Geant4的教程的想法。笔者也不打算普及计算机教育,默认读者有C++编程基础(如果你还不能阅读C++代码,那还是快先去学一学C++,不用对C++有多么深刻的体会和丰富的实践经验,你只要能读懂一个由数个或者十数个C++类写成的简单C++程序即可),因为Geant4是用C++编写的,你要在Geant4基础上开发模拟程序也要使用C++语言。(鉴于笔者的人生经验尚十分不丰富,如有出现不懂C++却依然能学好Geant4的,纯属奇迹,不管你信不信,反正笔者信;或者说,你丫就是天才!)</p>
<p>好言归正传!</p>
<p>先概括讲一下笔者对Geant4的整体印象。初识Geant4(就是半年前),是因为笔者的本科毕业设计是模拟宇宙线的一个小题目。还没怎么开始做,指导老师量才为用就中途给换了题目(为了能更好的锻炼我以及其他一些原因,老师让我转去做一些物理软件相关的develop编程工作),于是就放下了。可是不久之后由于另一个新项目软件模拟方面的人手不够我于是被转手,又再度回到了Geant4上来。真可谓一波三折。</p>
<p>刚接触Geant4的时候笔者真是为这个类库深度折服和惊叹拍手(笔者当时当场欢呼起来,心里唯一的感受就是不可思议)。从一个用户的角度去看,这个类库的设计使它的使用方法真是绝妙方便和简单。它把一切都设计好了,你不需要想你的模拟要从哪里开始怎么开始如何进行,不需要去设计模拟的结构算法,不需要去思考用什么框架架构,因为这一切Geant4都已经为你设计好了。你只需要告诉Geant4你模拟的实验装置的几何形状尺寸位置以及材料等等几个参数,再告诉Geant4模拟中可能会出现的物理过程和粒子,然后给Geant4初始事例,然后再在适当的实验装置上放上眼睛(敏感探测器SD),最后做为牛顿的上帝你再轻轻伸出手指给你的模拟那个神秘的第一推动力,OK!你的模拟就完成了。你几乎不需要任何计算机方面的专业知识(看懂和编写C++代码除外)。而且,几乎所有的物理过程和粒子Geant4都已经为你写好了,你使用的时候只需要为程序提供相关过程和粒子的名称即可(这叫注册)。</p>
<p>Geant4的使用就是这么简单!好了,今天先到这里。因为我要去吃饭了!~.~</p>
</div><!-- /.entry-content -->

<div class="comments">
<h2>Comments !</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_identifier = "Geant4-1.html";
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://zsneoks.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>


</article>
</section>

<section id="extras" class="body">

<div class="blogroll">
<h2>blogroll</h2>
<ul>

<li><a href="http://docs.notmyidea.org/alexis/pelican/">Pelican</a></li>

<li><a href="http://python.org">Python.org</a></li>

<li><a href="http://jinja.pocoo.org">Jinja2</a></li>

</ul>
</div><!-- /.blogroll -->


<div class="social">
<h2>social</h2>
<ul>
<li><a href="zsneoks.github.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>

<li><a href="zsneoks.github.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>



<li><a href="http://twitter.com/zsneoks">twitter</a></li>

<li><a href="http://lastfm.com/user/zsneoks">lastfm</a></li>

<li><a href="http://github.com/zsneoks">github</a></li>

</ul>
</div><!-- /.social -->

</section><!-- /#extras -->

<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://pelican.notmyidea.org/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->

<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->


<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-32881388-1");
pageTracker._trackPageview();
} catch(err) {}</script>



<script type="text/javascript">
var disqus_shortname = 'zsneoks';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>

</body>
</html>
Loading

0 comments on commit 1074f34

Please sign in to comment.