16 namespace caf{
class StandardRecord;}
25 class ReweightableSpectrum;
91 virtual void Go() = 0;
157 template<
class T,
class U>
struct IDMap
162 typedef typename std::vector<std::pair<T, U>>::iterator
it_t;
166 template<
class V>
void Erase(
const V& v);
229 virtual void Go()
override;
257 const Var& wei)
override {}
264 const Var& wei)
override {}
std::vector< ReweightableSpectrum * > rwSpects
const SpillVar kSpillUnweighted([](const caf::SRSpillProxy *){return 1;})
virtual ~SpectrumLoaderBase()
friend class SpectrumLoaderMockData
void AddReweightableSpectrum(ReweightableSpectrum &spect, const Var &var, const Cut &cut, const SystShifts &shift, const Var &wei) override
Helper class for SpectrumLoaderBase.
bool fGone
Has Go() been called? Can't add more histograms after that.
Simple record of shifts applied to systematic parameters.
_VarOrMultiVar(_VarOrMultiVar &&v)
Spectrum with the value of a second variable, allowing for reweighting
process_name opflashCryoW ana
_VarOrMultiVar< caf::SRSliceProxy > VarOrMultiVar
friend class NDOscillatableSpectrum
virtual void Go() override
Load all the registered spectra.
void AddSpectrum(Spectrum &spect, const Var &var, const SpillCut &spillcut, const Cut &cut, const SystShifts &shift, const Var &wei=kUnweighted) override
void AddSpectrum(Spectrum &spect, const SpillVar &var, const SpillCut &cut, const SpillVar &wei=kSpillUnweighted) override
U & operator[](const T &key)
Representation of a spectrum in any variable, with associated POT.
void AddSpectrum(Spectrum &spect, const SpillMultiVar &var, const SpillCut &cut, const SpillVar &wei=kSpillUnweighted) override
_VarOrMultiVar(const _MultiVar< T > &v)
std::vector< std::pair< T, U > > fElems
virtual void Go()=0
Load all the registered spectra.
std::vector< Spectrum * > spects
double fPOTFromHist
Accumulated by calls to GetNextFile.
virtual void AddReweightableSpectrum(ReweightableSpectrum &spect, const Var &var, const Cut &cut, const SystShifts &shift, const Var &wei)
For use by the constructors of ReweightableSpectrum subclasses.
const _Var< T > & GetVar() const
IDMap< SpillCut, IDMap< SpillVar, IDMap< SpillVarOrMultiVar, SpectList > > > fSpillHistDefs
[spillcut][spillwei][spillvar]
void AddReweightableSpectrum(ReweightableSpectrum &spect, const Var &var, const SpillCut &spillcut, const Cut &cut, const SystShifts &shift, const Var &wei) override
IDMap< SpillCut, IDMap< SystShifts, IDMap< Cut, IDMap< Var, IDMap< VarOrMultiVar, SpectList > > > > > fHistDefs
All the spectra that need to be filled.
void GetSpectra(std::vector< Spectrum * > &ss)
DataSource
Is this data-file representing beam spills or cosmic spills?
void GetReweightableSpectra(std::vector< ReweightableSpectrum * > &ss)
virtual void RemoveReweightableSpectrum(ReweightableSpectrum *)
SpectrumLoaderBase(DataSource src=kBeam)
Component of other constructors.
void RemoveLoader(SpectrumLoaderBase *l)
virtual void AddSpectrum(Spectrum &spect, const Var &var, const SpillCut &spillcut, const Cut &cut, const SystShifts &shift, const Var &wei=kUnweighted)
For use by the Spectrum constructor.
SpectrumLoaderBase & operator=(SpectrumLoaderBase &&)=default
Base class for the various types of spectrum loader.
const _MultiVar< T > * fMultiVar
Interface class for accessing ROOT files in sequence.
std::unique_ptr< IFileSource > fFileSource
_VarOrMultiVar< caf::SRSpillProxy > SpillVarOrMultiVar
_VarOrMultiVar(const _Var< T > &v)
const Var kUnweighted([](const caf::SRSliceProxy *){return 1;})
The simplest possible Var, always 1. Used as a default weight.
void GetSpectra(std::vector< Spectrum * > &ss)
then echo File list $list not found else cat $list while read file do echo $file sed s
IFileSource * WildcardOrSAMQuery(const std::string &str) const
Figure out if str is a wildcard or SAM query and return a source.
virtual void RemoveSpectrum(Spectrum *)
Dummy loader that doesn't load any files.
void AddSpectrum(Spectrum &spect, const MultiVar &var, const SpillCut &spillcut, const Cut &cut, const SystShifts &shift, const Var &wei=kUnweighted) override
void RemoveLoader(SpectrumLoaderBase *l)
Helper class for SpectrumLoaderBase.
int NFiles() const
Forwards to fFileSource.
Template for Cut and SpillCut.
Most useful for combining weights.
Spectrum with true energy information, allowing it to be oscillated
virtual bool Gone() const
Indicate whether or not Go has been called.
_VarOrMultiVar(const _VarOrMultiVar &v)
void GetReweightableSpectra(std::vector< ReweightableSpectrum * > &ss)
std::vector< std::pair< T, U > >::iterator it_t
static NullLoader kNullLoader
Dummy loader that doesn't load any files.
const _MultiVar< T > & GetMultiVar() const