Public Member Functions | Protected Attributes | List of all members
ana::SpectrumSinkBase< T > Class Template Referenceabstract

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/CAFAna/Core/SpectrumSink.h"

Inheritance diagram for ana::SpectrumSinkBase< T >:
ana::IRecordSink ana::IExposureSink

Public Member Functions

 SpectrumSinkBase (T *s)
 
 ~SpectrumSinkBase ()
 
void HandlePOT (double pot) override
 
void HandleLivetime (double t) override
 
int NSinks () const override
 
virtual void HandleRecord (caf::SRProxy *sr, double wei)=0
 

Protected Attributes

TfSpect
 May be null if Spectrum deregisters itself. More...
 

Detailed Description

template<class T>
class ana::SpectrumSinkBase< T >

Definition at line 16 of file SpectrumSink.h.

Constructor & Destructor Documentation

template<class T>
ana::SpectrumSinkBase< T >::SpectrumSinkBase ( T s)
inline

Definition at line 19 of file SpectrumSink.h.

19 : fSpect(s) {fSpect->AddLoader(&fSpect);}
const XML_Char * s
Definition: expat.h:262
T * fSpect
May be null if Spectrum deregisters itself.
Definition: SpectrumSink.h:28
template<class T>
ana::SpectrumSinkBase< T >::~SpectrumSinkBase ( )
inline

Definition at line 20 of file SpectrumSink.h.

20 {if(fSpect) fSpect->RemoveLoader(&fSpect);}
T * fSpect
May be null if Spectrum deregisters itself.
Definition: SpectrumSink.h:28

Member Function Documentation

template<class T >
void ana::SpectrumSinkBase< T >::HandleLivetime ( double  t)
overridevirtual

Implements ana::IExposureSink.

Definition at line 32 of file SpectrumSink.cxx.

References confusionMatrixTree::t.

Referenced by ana::SpectrumSinkBase< Spectrum >::~SpectrumSinkBase().

33  {
34  if(fSpect) fSpect->fLivetime += t;
35  }
T * fSpect
May be null if Spectrum deregisters itself.
Definition: SpectrumSink.h:28
template<class T >
void ana::SpectrumSinkBase< T >::HandlePOT ( double  pot)
overridevirtual

Implements ana::IExposureSink.

Definition at line 26 of file SpectrumSink.cxx.

References pot.

Referenced by ana::SpectrumSinkBase< Spectrum >::~SpectrumSinkBase().

27  {
28  if(fSpect) fSpect->fPOT += pot;
29  }
#define pot
T * fSpect
May be null if Spectrum deregisters itself.
Definition: SpectrumSink.h:28
virtual void ana::IRecordSink::HandleRecord ( caf::SRProxy sr,
double  wei 
)
pure virtualinherited
template<class T>
int ana::SpectrumSinkBase< T >::NSinks ( ) const
inlineoverridevirtual

Implements ana::IRecordSink.

Definition at line 25 of file SpectrumSink.h.

25 {return 1;}

Member Data Documentation

template<class T>
T* ana::SpectrumSinkBase< T >::fSpect
protected

May be null if Spectrum deregisters itself.

Definition at line 28 of file SpectrumSink.h.

Referenced by ana::SpectrumSinkBase< Spectrum >::SpectrumSinkBase(), and ana::SpectrumSinkBase< Spectrum >::~SpectrumSinkBase().


The documentation for this class was generated from the following files: