classfilval_1_1DerivedValue.tex 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. \hypertarget{classfilval_1_1DerivedValue}{}\section{filval\+:\+:Derived\+Value$<$ T $>$ Class Template Reference}
  2. \label{classfilval_1_1DerivedValue}\index{filval\+::\+Derived\+Value$<$ T $>$@{filval\+::\+Derived\+Value$<$ T $>$}}
  3. A generic, derived, value.
  4. {\ttfamily \#include $<$value.\+hpp$>$}
  5. Inheritance diagram for filval\+:\+:Derived\+Value$<$ T $>$\+:
  6. \nopagebreak
  7. \begin{figure}[H]
  8. \begin{center}
  9. \leavevmode
  10. \includegraphics[width=350pt]{classfilval_1_1DerivedValue__inherit__graph}
  11. \end{center}
  12. \end{figure}
  13. Collaboration diagram for filval\+:\+:Derived\+Value$<$ T $>$\+:
  14. \nopagebreak
  15. \begin{figure}[H]
  16. \begin{center}
  17. \leavevmode
  18. \includegraphics[width=243pt]{classfilval_1_1DerivedValue__coll__graph}
  19. \end{center}
  20. \end{figure}
  21. \subsection*{Public Member Functions}
  22. \begin{DoxyCompactItemize}
  23. \item
  24. \hypertarget{classfilval_1_1DerivedValue_a9725de2e3291d27e51e70cc830e19836}{}\label{classfilval_1_1DerivedValue_a9725de2e3291d27e51e70cc830e19836}
  25. {\bfseries Derived\+Value} (const std\+::string \&\hyperlink{classfilval_1_1GenValue_a007e38c03ee041c2a657afa3d6e91ab1}{name})
  26. \item
  27. \hypertarget{classfilval_1_1DerivedValue_a0c18a631ea057510200906e73198fa0c}{}\label{classfilval_1_1DerivedValue_a0c18a631ea057510200906e73198fa0c}
  28. T \& \hyperlink{classfilval_1_1DerivedValue_a0c18a631ea057510200906e73198fa0c}{get\+\_\+value} ()
  29. \begin{DoxyCompactList}\small\item\em Calculate, if necessary, and return the value held by this object. \end{DoxyCompactList}\end{DoxyCompactItemize}
  30. \subsection*{Protected Member Functions}
  31. \begin{DoxyCompactItemize}
  32. \item
  33. virtual void \hyperlink{classfilval_1_1DerivedValue_a74e04450a550454510329a9e6b941304}{update\+\_\+value} ()=0
  34. \begin{DoxyCompactList}\small\item\em Updates the internal value. \end{DoxyCompactList}\end{DoxyCompactItemize}
  35. \subsection*{Protected Attributes}
  36. \begin{DoxyCompactItemize}
  37. \item
  38. \hypertarget{classfilval_1_1DerivedValue_a2b010ce280e2e3b06156870ea08804cc}{}\label{classfilval_1_1DerivedValue_a2b010ce280e2e3b06156870ea08804cc}
  39. T {\bfseries value}
  40. \item
  41. \hypertarget{classfilval_1_1DerivedValue_ae946e1157648857534b5da312be3edf7}{}\label{classfilval_1_1DerivedValue_ae946e1157648857534b5da312be3edf7}
  42. bool {\bfseries value\+\_\+valid}
  43. \end{DoxyCompactItemize}
  44. \subsection*{Private Member Functions}
  45. \begin{DoxyCompactItemize}
  46. \item
  47. void \hyperlink{classfilval_1_1DerivedValue_a07fef8f98ae4b47e2c4d0f467aa0d6e3}{\+\_\+reset} ()
  48. \begin{DoxyCompactList}\small\item\em Mark the internal value as invalid. \end{DoxyCompactList}\end{DoxyCompactItemize}
  49. \subsection*{Additional Inherited Members}
  50. \subsection{Detailed Description}
  51. \subsubsection*{template$<$typename T$>$\newline
  52. class filval\+::\+Derived\+Value$<$ T $>$}
  53. A generic, derived, value.
  54. A \hyperlink{classfilval_1_1DerivedValue}{Derived\+Value} is generally defined as some function of other \hyperlink{classfilval_1_1Value}{Value} objects. For example, a \hyperlink{classfilval_1_1Pair}{Pair} is a function of two other \hyperlink{classfilval_1_1Value}{Value} objects that makes a pair of them. Note that these other \hyperlink{classfilval_1_1Value}{Value} objects are free to be either Observed\+Values or other Derived\+Values.
  55. It is desireable from a performance standpoint that each \hyperlink{classfilval_1_1DerivedValue}{Derived\+Value} be calculated no more than once per observation. Therefore, when a get\+\_\+value is called on a \hyperlink{classfilval_1_1DerivedValue}{Derived\+Value}, it first checks whether the value that it holds is {\bfseries valid}, meaning it has already been calculated for this observation. If so, it simply returns the value. If not, the update\+\_\+value function is called to calculate the value. and then the newly calculated value is marked as valid and returned.
  56. \subsection{Member Function Documentation}
  57. \hypertarget{classfilval_1_1DerivedValue_a07fef8f98ae4b47e2c4d0f467aa0d6e3}{}\label{classfilval_1_1DerivedValue_a07fef8f98ae4b47e2c4d0f467aa0d6e3}
  58. \index{filval\+::\+Derived\+Value@{filval\+::\+Derived\+Value}!\+\_\+reset@{\+\_\+reset}}
  59. \index{\+\_\+reset@{\+\_\+reset}!filval\+::\+Derived\+Value@{filval\+::\+Derived\+Value}}
  60. \subsubsection{\texorpdfstring{\+\_\+reset()}{\_reset()}}
  61. {\footnotesize\ttfamily template$<$typename T$>$ \\
  62. void \hyperlink{classfilval_1_1DerivedValue}{filval\+::\+Derived\+Value}$<$ T $>$\+::\+\_\+reset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}
  63. Mark the internal value as invalid.
  64. This is needed for \hyperlink{classfilval_1_1DerivedValue}{Derived\+Value} to force a recalculation of the internal value when a new observation is loaded into memory. It is called automatically for all \hyperlink{classfilval_1_1GenValue}{Gen\+Value} objects when reset is called.
  65. Implements \hyperlink{classfilval_1_1GenValue_ae9d5bd9fde2d04f6cd05d5b901a8c78a}{filval\+::\+Gen\+Value}.
  66. \hypertarget{classfilval_1_1DerivedValue_a74e04450a550454510329a9e6b941304}{}\label{classfilval_1_1DerivedValue_a74e04450a550454510329a9e6b941304}
  67. \index{filval\+::\+Derived\+Value@{filval\+::\+Derived\+Value}!update\+\_\+value@{update\+\_\+value}}
  68. \index{update\+\_\+value@{update\+\_\+value}!filval\+::\+Derived\+Value@{filval\+::\+Derived\+Value}}
  69. \subsubsection{\texorpdfstring{update\+\_\+value()}{update\_value()}}
  70. {\footnotesize\ttfamily template$<$typename T$>$ \\
  71. virtual void \hyperlink{classfilval_1_1DerivedValue}{filval\+::\+Derived\+Value}$<$ T $>$\+::update\+\_\+value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [pure virtual]}}
  72. Updates the internal value.
  73. This function should be overridden by any child class to do the actual work of updating value based on whatever rules the class chooses. Normally, this consists of geting the values from some associated \hyperlink{classfilval_1_1Value}{Value} objects, doing some calculation on them, and storing the result in value.
  74. Implemented in \hyperlink{classfilval_1_1ConstantValue_a2814dd032b5688fc91e844f1592d1b09}{filval\+::\+Constant\+Value$<$ T $>$}, \hyperlink{classfilval_1_1BoundValue_a90be966f85204cac57075e4ee66f2fa9}{filval\+::\+Bound\+Value$<$ T $>$}, \hyperlink{classfilval_1_1MultiFunc_ad8552619e8a9d32401fb7ec84532648b}{filval\+::\+Multi\+Func$<$ R, T $>$}, \hyperlink{classfilval_1_1ReduceIndex_a9c842f80d772c4c77cd3fe132a0f8730}{filval\+::\+Reduce\+Index$<$ T $>$}, \hyperlink{classfilval_1_1Reduce_a7f6bc3bed99c9d41e045f675895d8f67}{filval\+::\+Reduce$<$ T $>$}, \hyperlink{classfilval_1_1ZipMapFour_a0a228a51d603e70af7db4fb27ed1c186}{filval\+::\+Zip\+Map\+Four$<$ R, T $>$}, \hyperlink{classfilval_1_1Pair_a1dd5b3859d023821081659cc8a66bda4}{filval\+::\+Pair$<$ T1, T2 $>$}, \hyperlink{classfilval_1_1WrapperVector_a959d593dca6d6a7ef7ed2ff3c4f28632}{filval\+::\+Wrapper\+Vector$<$ T $>$}, \hyperlink{classfilval_1_1root_1_1LorentzVectorEnergy_acb8982a0909dbb00a5ff4c38047d5115}{filval\+::root\+::\+Lorentz\+Vector\+Energy}, \hyperlink{classfilval_1_1Filter_ac91ccc66b66c8ea8cdad27fd9b4b62e2}{filval\+::\+Filter}, \hyperlink{classfilval_1_1root_1_1LorentzVector_aed3e0cbb782c738e5704188e9fae8b17}{filval\+::root\+::\+Lorentz\+Vector}, and \hyperlink{classfilval_1_1root_1_1MassFilter_a7858ca9aab96796fdb071b9ed55c5745}{filval\+::root\+::\+Mass\+Filter}.
  75. The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
  76. \item
  77. /home/caleb/\+Sources/\+T\+T\+T\+T/filval/\hyperlink{value_8hpp}{value.\+hpp}\end{DoxyCompactItemize}