Functions
test_nueloaders.C File Reference
#include "CAFAna/Analysis/Prod3Loaders.h"
#include <iostream>

Go to the source code of this file.

Functions

void PrintLoaderPaths (Loaders &l)
 
void ReifyLoaders (Loaders &l)
 
void test_nueloaders (bool checkDefinition=true, std::string period="full", std::string ndperiod="full", bool fhc=true)
 

Function Documentation

void PrintLoaderPaths ( Loaders l)

Definition at line 11 of file test_nueloaders.C.

References om::cout, allTimeWatchdog::endl, ana::Loaders::GetLoaderPath(), ana::kBeam, ana::Loaders::kData, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and plot_timing_data::swap.

Referenced by ReifyLoaders(), and test_nueloaders().

12 {
14 
15  std::cout << "\n" << l.GetLoaderPath(caf::kNEARDET, Loaders::kData, kBeam, Loaders::kNonSwap);
16  std::cout << "\n" << l.GetLoaderPath(caf::kNEARDET, Loaders::kMC, kBeam, Loaders::kNonSwap);
17 
18  for(Loaders::SwappingConfig swap: {Loaders::kNonSwap, Loaders::kFluxSwap, Loaders::kTauSwap}){
20  }
21 
23 }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Color_t kMC
std::string GetLoaderPath(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap) const
Definition: Loaders.cxx:89
OStream cout
Definition: OStream.cxx:6
void ReifyLoaders ( Loaders l)

Definition at line 25 of file test_nueloaders.C.

References om::cout, allTimeWatchdog::endl, ana::Loaders::GetLoader(), ana::kBeam, ana::Loaders::kData, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, PrintLoaderPaths(), and plot_timing_data::swap.

Referenced by test_nueloaders().

26 {
28 
29  l.GetLoader(caf::kNEARDET, Loaders::kData, kBeam, Loaders::kNonSwap);
30  l.GetLoader(caf::kNEARDET, Loaders::kMC, kBeam, Loaders::kNonSwap);
31 
32  for(Loaders::SwappingConfig swap: {Loaders::kNonSwap, Loaders::kFluxSwap, Loaders::kTauSwap}){
34  }
35 
37 }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Color_t kMC
SpectrumLoaderBase & GetLoader(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Retrieve a specific loader.
Definition: Loaders.cxx:129
OStream cout
Definition: OStream.cxx:6
void PrintLoaderPaths(Loaders &l)
void test_nueloaders ( bool  checkDefinition = true,
std::string  period = "full",
std::string  ndperiod = "full",
bool  fhc = true 
)

Definition at line 42 of file test_nueloaders.C.

References plot_validation_datamc::c, ana::kDecaf, ana::Loaders::kFHC, ana::kFullCAF, ana::kNueConcat, ana::kNumuConcat, ana::Loaders::kRHC, getGoodRuns4SAM::n, DCS_db_parser::period, PrintLoaderPaths(), ReifyLoaders(), and confusionMatrixTree::t.

43 {
45  if(t!=kDecaf) continue;
46 
48 
49  Prod3NomLoaders n(t, period, ndperiod, flx);
50 
51  Prod3AbsCalibLoaders acn(t, -1, period, ndperiod);
52  Prod3AbsCalibLoaders acp(t, +1, period, ndperiod);
53 
54  Prod3LightLevelLoaders lln(t, -1, period, ndperiod);
55  Prod3LightLevelLoaders llp(t, +1, period, ndperiod);
56 
57  Prod3CherenkovLoaders c(t, period, ndperiod);
58  Prod3CalibShapeLoaders s(t, period, ndperiod);
59 
60  //if the defintion/snapshot doesn't exist, aborts
61  if(checkDefinition){
62  ReifyLoaders(n);
63  if(!fhc) continue;
64  ReifyLoaders(acn);
65  ReifyLoaders(acp);
66  ReifyLoaders(lln);
67  ReifyLoaders(llp);
68  ReifyLoaders(c);
69  ReifyLoaders(s);
70  }
71  else{
72  //only print names
74  if(!fhc) continue;
75  PrintLoaderPaths(acn);
76  PrintLoaderPaths(acp);
77  PrintLoaderPaths(lln);
78  PrintLoaderPaths(llp);
81  }
82  }
83 }
void ReifyLoaders(Loaders &l)
For nominal spectra and reweighting systs (xsec/flux)
Definition: Prod3Loaders.h:40
const XML_Char * s
Definition: expat.h:262
void PrintLoaderPaths(Loaders &l)
ECAFType
Definition: Loaders.h:19