\hypertarget{classfv_1_1DerivedValue}{}\section{fv\+:\+:Derived\+Value$<$ T $>$ Class Template Reference}
\label{classfv_1_1DerivedValue}\index{fv\+::\+Derived\+Value$<$ T $>$@{fv\+::\+Derived\+Value$<$ T $>$}}


A generic, derived, value.  




{\ttfamily \#include $<$value.\+hpp$>$}



Inheritance diagram for fv\+:\+:Derived\+Value$<$ T $>$\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classfv_1_1DerivedValue__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for fv\+:\+:Derived\+Value$<$ T $>$\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=243pt]{classfv_1_1DerivedValue__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classfv_1_1DerivedValue_a00219a17112600afdc060d67d6f95b21}{}\label{classfv_1_1DerivedValue_a00219a17112600afdc060d67d6f95b21} 
{\bfseries Derived\+Value} (const std\+::string \&\hyperlink{classfv_1_1GenValue_a610f89ee441eaad4c9e78f74d6bde93b}{name}, const std\+::string \&alias=\char`\"{}\char`\"{})
\item 
\hypertarget{classfv_1_1DerivedValue_a39970158aa8f6eb062a28037df6e2128}{}\label{classfv_1_1DerivedValue_a39970158aa8f6eb062a28037df6e2128} 
T \& \hyperlink{classfv_1_1DerivedValue_a39970158aa8f6eb062a28037df6e2128}{get\+\_\+value} ()
\begin{DoxyCompactList}\small\item\em Calculate, if necessary, and return the value held by this object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classfv_1_1DerivedValue_ae59e80a98eb74b95d8961bfe12ee5ec2}{update\+\_\+value} ()=0
\begin{DoxyCompactList}\small\item\em Updates the internal value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classfv_1_1DerivedValue_aeb7ff5d17ad44b2040fc9930bbcc2c7a}{}\label{classfv_1_1DerivedValue_aeb7ff5d17ad44b2040fc9930bbcc2c7a} 
T {\bfseries value}
\item 
\hypertarget{classfv_1_1DerivedValue_aafa55adbb38dc7fe210ea15e920515dc}{}\label{classfv_1_1DerivedValue_aafa55adbb38dc7fe210ea15e920515dc} 
bool {\bfseries value\+\_\+valid}
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classfv_1_1DerivedValue_a5c296d4f3171797f31a3fab002dececa}{\+\_\+reset} ()
\begin{DoxyCompactList}\small\item\em Mark the internal value as invalid. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$\newline
class fv\+::\+Derived\+Value$<$ T $>$}

A generic, derived, value. 

A \hyperlink{classfv_1_1DerivedValue}{Derived\+Value} is generally defined as some function of other \hyperlink{classfv_1_1Value}{Value} objects. For example, a \hyperlink{classfv_1_1Pair}{Pair} is a function of two other \hyperlink{classfv_1_1Value}{Value} objects that makes a pair of them. Note that these other \hyperlink{classfv_1_1Value}{Value} objects are free to be either Observed\+Values or other Derived\+Values.

It is desireable from a performance standpoint that each \hyperlink{classfv_1_1DerivedValue}{Derived\+Value} be calculated no more than once per observation. Therefore, when a get\+\_\+value is called on a \hyperlink{classfv_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. 

\subsection{Member Function Documentation}
\hypertarget{classfv_1_1DerivedValue_a5c296d4f3171797f31a3fab002dececa}{}\label{classfv_1_1DerivedValue_a5c296d4f3171797f31a3fab002dececa} 
\index{fv\+::\+Derived\+Value@{fv\+::\+Derived\+Value}!\+\_\+reset@{\+\_\+reset}}
\index{\+\_\+reset@{\+\_\+reset}!fv\+::\+Derived\+Value@{fv\+::\+Derived\+Value}}
\subsubsection{\texorpdfstring{\+\_\+reset()}{\_reset()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{classfv_1_1DerivedValue}{fv\+::\+Derived\+Value}$<$ T $>$\+::\+\_\+reset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}



Mark the internal value as invalid. 

This is needed for \hyperlink{classfv_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{classfv_1_1GenValue}{Gen\+Value} objects when reset is called. 

Implements \hyperlink{classfv_1_1GenValue_a26160e53542b728f9e0c11495dce3c20}{fv\+::\+Gen\+Value}.

\hypertarget{classfv_1_1DerivedValue_ae59e80a98eb74b95d8961bfe12ee5ec2}{}\label{classfv_1_1DerivedValue_ae59e80a98eb74b95d8961bfe12ee5ec2} 
\index{fv\+::\+Derived\+Value@{fv\+::\+Derived\+Value}!update\+\_\+value@{update\+\_\+value}}
\index{update\+\_\+value@{update\+\_\+value}!fv\+::\+Derived\+Value@{fv\+::\+Derived\+Value}}
\subsubsection{\texorpdfstring{update\+\_\+value()}{update\_value()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
virtual void \hyperlink{classfv_1_1DerivedValue}{fv\+::\+Derived\+Value}$<$ T $>$\+::update\+\_\+value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [pure virtual]}}



Updates the internal value. 

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{classfv_1_1Value}{Value} objects, doing some calculation on them, and storing the result in value. 

Implemented in \hyperlink{classfv_1_1ConstantValue_a6581e7fb69c082c07c9714138063b320}{fv\+::\+Constant\+Value$<$ T $>$}, \hyperlink{classfv_1_1PointerValue_a81e39d040919be39c37f845a27343f3e}{fv\+::\+Pointer\+Value$<$ T $>$}, \hyperlink{classfv_1_1BoundValue_a51ba914f1eac694af4264d62785282a1}{fv\+::\+Bound\+Value$<$ T $>$}, \hyperlink{classfv_1_1ReduceIndex_a462bffebe2a93c940aca526566d48e37}{fv\+::\+Reduce\+Index$<$ T $>$}, \hyperlink{classfv_1_1Reduce_ab0809c4ab1884b84a7f88e005ade76a5}{fv\+::\+Reduce$<$ T $>$}, \hyperlink{classfv_1_1Count_afff1c16a8747a82db1cc1c8248c56a08}{fv\+::\+Count$<$ T $>$}, \hyperlink{classfv_1_1ZipMapFour_a812747fdc043c776951ceb93a1085915}{fv\+::\+Zip\+Map\+Four$<$ R, T $>$}, \hyperlink{classfv_1_1Pair_ab3225f03f49240fc1547a5005f57b864}{fv\+::\+Pair$<$ T1, T2 $>$}, \hyperlink{classfv_1_1WrapperVector_a2ee99bc4425642d209df7b48ee2ada95}{fv\+::\+Wrapper\+Vector$<$ T $>$}, \hyperlink{classfv_1_1Filter_ab3ed620127ccb32f75bc5e78bc8a60b3}{fv\+::\+Filter}, \hyperlink{classfv_1_1root_1_1LorentzVectorEnergy_aa69384d1af673c327daae869d5977981}{fv\+::root\+::\+Lorentz\+Vector\+Energy}, \hyperlink{classfv_1_1root_1_1LorentzVector_aeb17320a2024bd189dad4117cf1f54fb}{fv\+::root\+::\+Lorentz\+Vector}, and \hyperlink{classfv_1_1root_1_1MassFilter_a1a8b086086e1220bc352523184d3f1c2}{fv\+::root\+::\+Mass\+Filter}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/caleb/\+Sources/\+T\+T\+T\+T/filval/\hyperlink{value_8hpp}{value.\+hpp}\end{DoxyCompactItemize}
