4 #include "KVDataPatchList.h"
5 #include "KVDataPatch.h"
16 void KVDataPatchList::FillPatchList()
22 Info(
"FillPatchList",
"No data patch plugins defined");
26 while (!plugins.
End()) {
42 void KVDataPatchList::init()
80 if(!GetDataSetEnv<bool>(dataset,
"DataAnalysis.ApplyDataPatches"))
84 "Initializing patches for |%s|%s|%04d|%s|%02d|",
85 dataset.
Data(), datatype.
Data(), runnumber, dataseries.
Data(), datareleasenumber);
86 fActiveEventPatches.
Clear();
87 fActiveParticlePatches.
Clear();
90 TIter nxtP(fPatchList);
93 if (patch->
IsRequired(dataset, datatype, runnumber, dataseries, datareleasenumber, streamerinfolist)) {
95 fActiveEventPatches.
Add(patch);
96 fEventPatches =
kTRUE;
99 fActiveParticlePatches.
Add(patch);
100 fParticlePatches =
kTRUE;
117 TIter nxt(&fActiveEventPatches);
121 if (fParticlePatches) {
123 TIter nxt(&fActiveParticlePatches);
125 for(
auto & rnuc : *
event)
141 if (!fEventPatches && !fParticlePatches) {
142 Info(
"Print",
"No currently active data patches");
146 Info(
"Print",
"Currently active event-level patches:");
147 fActiveEventPatches.
Print();
149 if (fParticlePatches) {
150 Info(
"Print",
"Currently active particle-level patches:");
151 fActiveParticlePatches.
Print();
winID h TVirtualViewer3D TVirtualGLPainter p
static const Char_t * GetListOfPlugins(const Char_t *base)
static const Char_t * GetPluginURI(const Char_t *base, const Char_t *plugin)
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
List of corrections to be applied to reconstructed calibrated data.
void InitializePatchList(TString dataset, TString datatype, Int_t runnumber, TString dataseries, Int_t datareleasenumber, const TList *streamerinfolist)
void Print(Option_t *="") const override
Print list of currently active patches.
void Apply(KVReconstructedEvent *)
Apply all currently active patches to event.
Correction to be applied to reconstructed calibrated data.
virtual void ApplyToParticle(KVReconstructedNucleus *)=0
virtual void ApplyToEvent(KVReconstructedEvent *)=0
virtual Bool_t IsParticlePatch()=0
virtual Bool_t IsRequired(TString dataset, TString datatype, Int_t runnumber, TString dataseries, Int_t datareleasenumber, const TList *streamerinfolist)=0
virtual Bool_t IsEventPatch()=0
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
void Clear(Option_t *option="") override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
Optimised list in which named objects can only be placed once.
void Add(TObject *obj) override
virtual void Print(Option_t *option, const char *wildcard, Int_t recurse=1) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
void Warning(UserClass p, const char *location, const char *va_(fmt),...)
void Info(UserClass p, const char *location, const char *va_(fmt),...)