10 #define ProofTests_cxx
22 ProofTests::ProofTests()
31 ProofTests::~ProofTests()
38 void ProofTests::ParseInput()
44 TNamed *ntype =
dynamic_cast<TNamed*
>(fInput->FindObject(
"ProofTests_Type"));
46 if (!strcmp(ntype->GetTitle(),
"InputData")) {
48 }
else if (!strcmp(ntype->GetTitle(),
"PackTest1")) {
50 }
else if (!strcmp(ntype->GetTitle(),
"PackTest2")) {
53 Warning(
"ParseInput",
"unknown type: '%s'", ntype->GetTitle());
56 Info(
"ParseInput",
"test type: %d (from '%s')", fTestType, ntype ? ntype->GetTitle() :
"undef");
60 void ProofTests::Begin(TTree * )
68 void ProofTests::SlaveBegin(TTree * )
74 TString option = GetOption();
80 fStat =
new TH1I(
"TestStat",
"Test results", 20, .5, 20.5);
90 TList *h1list =
dynamic_cast<TList*
>(fInput->FindObject(
"h1list"));
93 TH1F *h1 =
dynamic_cast<TH1F*
>(h1list->FindObject(
"h1data"));
95 TParameter<Double_t> *h1avg =
dynamic_cast<TParameter<Double_t>*
>(h1list->FindObject(
"h1avg"));
96 TParameter<Double_t> *h1rms =
dynamic_cast<TParameter<Double_t>*
>(h1list->FindObject(
"h1rms"));
98 if (TMath::Abs(h1avg->GetVal() - h1->GetMean()) < 0.0001) {
99 if (TMath::Abs(h1rms->GetVal() - h1->GetRMS()) < 0.0001) {
104 Warning(
"SlaveBegin",
"%d: info 'h1avg' or 'h1rms' not found!", fTestType);
107 Warning(
"SlaveBegin",
"%d: input histo 'h1data' not found!", fTestType);
110 Warning(
"SlaveBegin",
"%d: input list 'h1list' not found!", fTestType);
113 TList *h2list =
dynamic_cast<TList*
>(fInput->FindObject(
"h2list"));
116 TH1F *h2 =
dynamic_cast<TH1F*
>(h2list->FindObject(
"h2data"));
118 TParameter<Double_t> *h2avg =
dynamic_cast<TParameter<Double_t>*
>(h2list->FindObject(
"h2avg"));
119 TParameter<Double_t> *h2rms =
dynamic_cast<TParameter<Double_t>*
>(h2list->FindObject(
"h2rms"));
120 if (h2avg && h2rms) {
121 if (TMath::Abs(h2avg->GetVal() - h2->GetMean()) < 0.0001) {
122 if (TMath::Abs(h2rms->GetVal() - h2->GetRMS()) < 0.0001) {
127 Warning(
"SlaveBegin",
"%d: info 'h2avg' or 'h2rms' not found!", fTestType);
130 Warning(
"SlaveBegin",
"%d: input histo 'h2data' not found!", fTestType);
133 Warning(
"SlaveBegin",
"%d: input list 'h2list' not found!", fTestType);
136 TNamed *iob =
dynamic_cast<TNamed*
>(fInput->FindObject(
"InputObject"));
140 Warning(
"SlaveBegin",
"%d: input histo 'InputObject' not found!", fTestType);
142 }
else if (fTestType == 1) {
145 TNamed *nm =
dynamic_cast<TNamed*
>(fInput->FindObject(
"testenv"));
147 if (gEnv->Lookup(nm->GetTitle())) {
150 Warning(
"SlaveBegin",
"%d: lookup for '%s' failed!", fTestType, nm->GetTitle());
154 Warning(
"SlaveBegin",
"%d: TNamed with the test env info not found!", fTestType);
156 }
else if (fTestType == 2) {
159 TNamed *nm =
dynamic_cast<TNamed*
>(fInput->FindObject(
"testenv"));
161 TString nms(nm->GetTitle()), nam;
163 while (nms.Tokenize(nam, from,
",")) {
164 if (gEnv->Lookup(nam)) {
165 Double_t xx = gEnv->GetValue(nam, -1.);
166 if (xx > 1.) fStat->Fill(xx);
168 Warning(
"SlaveBegin",
"RC-env '%s' not found!", nam.Data());
172 Warning(
"SlaveBegin",
"%d: TNamed with the test env info not found!", fTestType);
178 Bool_t ProofTests::Process(Long64_t)
202 void ProofTests::SlaveTerminate()
211 void ProofTests::Terminate()