Public Member Functions | Protected Attributes | List of all members
ana::SpectrumSink Class Reference

#include "/cvmfs/"

Inheritance diagram for ana::SpectrumSink:
ana::SpectrumSinkBase< Spectrum > ana::IRecordSink ana::IExposureSink

Public Member Functions

 SpectrumSink (const Var &v, Spectrum *s)
void HandleRecord (caf::SRProxy *sr, double wei) override
void HandlePOT (double pot) override
void HandleLivetime (double t) override
int NSinks () const override

Protected Attributes

Var fVar
 May be null if Spectrum deregisters itself. More...

Detailed Description

Definition at line 32 of file SpectrumSink.h.

Constructor & Destructor Documentation

ana::SpectrumSink::SpectrumSink ( const Var v,
Spectrum s 

Definition at line 35 of file SpectrumSink.h.

References ana::IRecordSink::HandleRecord(), and sr.

37  {
38  }
const XML_Char * s
Definition: expat.h:262

Member Function Documentation

void ana::SpectrumSinkBase< Spectrum >::HandleLivetime ( double  t)

Implements ana::IExposureSink.

void ana::SpectrumSinkBase< Spectrum >::HandlePOT ( double  pot)

Implements ana::IExposureSink.

void ana::SpectrumSink::HandleRecord ( caf::SRProxy sr,
double  wei 

Implements ana::IRecordSink.

Definition at line 38 of file SpectrumSink.cxx.

References ana::CheckVal(), ana::Spectrum::Fill(), ana::SpectrumSinkBase< Spectrum >::fSpect, fVar, and febshutoff_auto::val.

39  {
40  if(!fSpect) return;
41  const double val = fVar(sr);
42  if(CheckVal(val, "a Var")) fSpect->Fill(val, wei);
43  }
void Fill(double x, double w=1)
Definition: Spectrum.cxx:321
Spectrum * fSpect
May be null if Spectrum deregisters itself.
Definition: SpectrumSink.h:28
bool CheckVal(double val, const char *detail)
int ana::SpectrumSinkBase< Spectrum >::NSinks ( ) const

Implements ana::IRecordSink.

Definition at line 25 of file SpectrumSink.h.

25 {return 1;}

Member Data Documentation

Spectrum * ana::SpectrumSinkBase< Spectrum >::fSpect

May be null if Spectrum deregisters itself.

Definition at line 28 of file SpectrumSink.h.

Referenced by HandleRecord(), ana::MultiVarSpectrumSink::HandleRecord(), and ana::ReweightableSpectrumSink::HandleRecord().

Var ana::SpectrumSink::fVar

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