3 #include <TParameter.h>
37 Warning(
"CorrExtractor",
"Object %s not found in file", name.Data());
42 o = p->FindObject(name);
44 Warning(
"CorrExtractor",
"Object %s not found in %s",
45 name.Data(), p->GetName());
49 if (!o->IsA()->InheritsFrom(TCollection::Class())) {
50 Warning(
"CorrExtractor",
"%s in %s is not a collection, but a %s",
51 name.Data(), (p ? p->GetName() :
"file"), o->ClassName());
65 if (path.IsNull())
return 0;
68 TObjString* token = 0;
70 while ((token = static_cast<TObjString*>(next()))) {
71 const TString& t = token->String();
72 if (t.IsNull())
continue;
94 Warning(
"CorrExtractor",
"Object %s not found in file",
102 Warning(
"CorrExtractor",
"Path %s invalid", path.Data());
105 return p->FindObject(name);
123 fFile = TFile::Open(fileName,
"READ");
125 Error(
"CorrExtractor",
"Failed to open \"%s\"", fileName.Data());
134 "forwardQAResults"));
136 Error(
"CorrExtractor",
"Couldn't get event inspector list from %s",
142 TObject* oSys = c->FindObject(
"sys");
143 TObject* oSNN = c->FindObject(
"sNN");
144 TObject* oFld = c->FindObject(
"field");
145 TObject* oRun = c->FindObject(
"runNo");
146 TObject* oSat = c->FindObject(
"satellite");
147 if (oSys &&
fSys <= 0)
fSys = oSys->GetUniqueID();
148 if (oSNN &&
fSNN <= 0)
fSNN = oSNN->GetUniqueID();
149 if (oFld &&
fField >= 999)
fField = oFld->GetUniqueID();
153 if (fSys <= 0 || fSys > 3 || fSNN <= 0 || fField >= 999 ||
fRunNo <= 0 ){
154 Error(
"CorrExtractor",
"Failed to get settings\n"
177 return Extract(cls->GetName(), parent);
191 Warning(
"Extract",
"No file opened");
196 Warning(
"Extract",
"Object %s not found in collection %s",
197 objName.Data(), parent.Data());
200 if (o->TestBit(1<<15) && !o->TestBit(1<<16)) {
201 Warning(
"Extract",
"Object %s is not good", objName.Data());
202 TFile* bad = TFile::Open(
"bad.root",
"RECREATE");
203 (
new TNamed(
"bad",
"BadCorrection"))->Write();
Base class for correction managers.
virtual Bool_t Store(TObject *o, ULong_t runNo, UShort_t sys, UShort_t sNN, Short_t field, Bool_t mc, Bool_t sat, const char *file, const char *meth="NEAR") const