/[PAMELA software]/PamCut/doc/PamCutDevGuide.tex
ViewVC logotype

Diff of /PamCut/doc/PamCutDevGuide.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by pam-fi, Tue Oct 27 10:24:36 2009 UTC revision 1.6 by pam-fi, Wed Oct 28 14:52:29 2009 UTC
# Line 130  in that bunch, and then the analysis wil Line 130  in that bunch, and then the analysis wil
130  event. If a certain cut in a bunch fails, then {\bf OnBad} is called for the  event. If a certain cut in a bunch fails, then {\bf OnBad} is called for the
131  actions of the bunch, but successive bunches are ignored; the current event is  actions of the bunch, but successive bunches are ignored; the current event is
132  discarded and the focus switches on the next one (the {\bf  discarded and the focus switches on the next one (the {\bf
133  SmartBlindCollection} behaves a little different; see the Doxygen  SmartBlindCollection} behaves a little differently; see the Doxygen
134  documentation for more details.)  documentation for more details.)
135  \\  \\
136  Loosely speaking, after defining an action one simply has to instantiate it,  Loosely speaking, after defining an action one simply has to instantiate it,
# Line 292  are shown; an on-line guide for Doxygen Line 292  are shown; an on-line guide for Doxygen
292  \verb1            http://www.stack.nl/~dimitri/doxygen/manual.html1    \verb1            http://www.stack.nl/~dimitri/doxygen/manual.html1  
293    
294  \vspace{.5cm}  \vspace{.5cm}
295  Once the header has been prepared, it's time to implement the cut into {\it  Once the header has been prepared, it's time to implement the cut in {\it
296  DummyCut.cpp}:  DummyCut.cpp}:
297    
298  \begin{verbatim}  \begin{verbatim}
# Line 584  PamCut} inside the analysis code would l Line 584  PamCut} inside the analysis code would l
584        
585    PamCutCollection collection("Collection");    PamCutCollection collection("Collection");
586    
587    DummyCut1 dummy1;    DummyCut1 *dummy1 = new DummyCut1("name1");
588    collection.AddCut(dummy1);    collection.AddCut(dummy1);
589    DummyCut2 dummy2(param);    // The two lines above can be summarized also as:
590      // collection.AddCut(new DummyCut1("name1"));
591      
592      DummyCut2 *dummy2 = new DummyCut2("name2", <eventual params>);
593    collection.AddCut(dummy2);    collection.AddCut(dummy2);
594    
595    collection.Process(event, 0, event->GetEntries()-1);    collection.Process(event, 0, event->GetEntries()-1);
# Line 646  append the above line at the end of your Line 649  append the above line at the end of your
649  be automatically executed every time you set your PAMELA environment.  be automatically executed every time you set your PAMELA environment.
650    
651  \section{Usage summary}  \section{Usage summary}
652  Here's a short summary on how to develop a cut, build and use it. If one only  Here's a short summary on how to develop a cut, build and use it.
653  \begin{enumerate}  \begin{enumerate}
654    \item Obtain the code (from tarball, repository\ldots) and go in the root    \item Obtain the code (from tarball, repository\ldots) and go in the root
655    code directory.    code directory.
656    \item Check if the \verb1C++1 option in the Build section of {\it makefile}    \item Check if the \verb1C++1 option in the Build section of {\it makefile}
657    is correctly set with the C++ compiler name present in your system (for many    is correctly set with the C++ compiler name present in your system (for many
658    Linux platform, \verb1g++1 is a safe choice).    Linux platforms, \verb1g++1 is a safe choice).
659    \item Create a directory named as the cut class you want to develop.    \item Create a directory named as the cut class you want to develop.
660    \item Place inside the newly created directory a {\it .h} file and a {\it    \item Place inside the newly created directory a {\it .h} file and a {\it
661    .cpp} file, named as the direcory; edit the files to define and implement the    .cpp} file, named as the direcory; edit the files to define and implement the
# Line 676  Here's a short summary on how to develop Line 679  Here's a short summary on how to develop
679    \item Develop the analysis code    \item Develop the analysis code
680  \end{enumerate}  \end{enumerate}
681    
682    \section{Online documentation}
683    The code is provided with a full set of Doxygen tags; documentation can then be
684    built using the doxygen documentation system. However, an online documentation
685    is availbale at:
686    \newline
687    \newline
688    \verb1   http://hep.fi.infn.it/PAMELA/documents/PamCut_documentation/1
689    
690    \vspace{.5cm}
691    It is updated frequently, but it may lack the description of the most recent
692    features. Please notify any fault in the online documentation for a quick fix.
693    
694    
695  \section{Some advices and suggestions}  \section{Some advices and suggestions}
696  \begin{itemize}  \begin{itemize}
697    \item Derive your cuts. Try to define a new class every time you need a new    \item Derive your cuts. Try to define a new class every time you need a new
# Line 726  Here's a short summary on how to develop Line 742  Here's a short summary on how to develop
742    likely to be used and modified by other people, please take your time to    likely to be used and modified by other people, please take your time to
743    write the documentation. Documenting the code is a boring and time-consuming    write the documentation. Documenting the code is a boring and time-consuming
744    task, but can save you and your colleagues a lot of headaches and    task, but can save you and your colleagues a lot of headaches and
745    misunderstandings. The better a code is documented, the lesser are the    misunderstandings. The better a code is documented, the lesser the
746    questions other people will ask you.    questions other people will ask you.
747  \end{itemize}  \end{itemize}
748    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23