Auxilliary selector used to test PROOF functionality.
#define ProofTests_cxx
ProofTests::ProofTests()
{
fTestType = 0;
fStat = 0;
}
ProofTests::~ProofTests()
{
}
void ProofTests::ParseInput()
{
TNamed *ntype =
dynamic_cast<TNamed*
>(fInput->FindObject(
"ProofTests_Type"));
if (ntype) {
if (!strcmp(ntype->
GetTitle(),
"InputData")) {
fTestType = 0;
}
else if (!strcmp(ntype->
GetTitle(),
"PackTest1")) {
fTestType = 1;
}
else if (!strcmp(ntype->
GetTitle(),
"PackTest2")) {
fTestType = 2;
} else {
}
}
Info(
"ParseInput",
"test type: %d (from '%s')", fTestType, ntype ? ntype->
GetTitle() :
"undef");
}
{
}
void ProofTests::SlaveBegin(
TTree * )
{
ParseInput();
fStat =
new TH1I(
"TestStat",
"Test results", 20, .5, 20.5);
fOutput->Add(fStat);
fStat->Fill(1.);
if (fTestType == 0) {
TList *h1list =
dynamic_cast<TList*
>(fInput->FindObject(
"h1list"));
if (h1list) {
if (h1) {
if (h1avg && h1rms) {
fStat->Fill(2.);
}
}
} else {
Warning(
"SlaveBegin",
"%d: info 'h1avg' or 'h1rms' not found!", fTestType);
}
} else {
Warning(
"SlaveBegin",
"%d: input histo 'h1data' not found!", fTestType);
}
} else {
Warning(
"SlaveBegin",
"%d: input list 'h1list' not found!", fTestType);
}
TList *h2list =
dynamic_cast<TList*
>(fInput->FindObject(
"h2list"));
if (h2list) {
if (h2) {
if (h2avg && h2rms) {
fStat->Fill(3.);
}
}
} else {
Warning(
"SlaveBegin",
"%d: info 'h2avg' or 'h2rms' not found!", fTestType);
}
} else {
Warning(
"SlaveBegin",
"%d: input histo 'h2data' not found!", fTestType);
}
} else {
Warning(
"SlaveBegin",
"%d: input list 'h2list' not found!", fTestType);
}
TNamed *iob =
dynamic_cast<TNamed*
>(fInput->FindObject(
"InputObject"));
if (iob) {
fStat->Fill(4.);
} else {
Warning(
"SlaveBegin",
"%d: input histo 'InputObject' not found!", fTestType);
}
} else if (fTestType == 1) {
TNamed *nm =
dynamic_cast<TNamed*
>(fInput->FindObject(
"testenv"));
if (nm) {
fStat->Fill(2.);
} else {
Warning(
"SlaveBegin",
"%d: lookup for '%s' failed!", fTestType, nm->
GetTitle());
}
} else {
Warning(
"SlaveBegin",
"%d: TNamed with the test env info not found!", fTestType);
}
} else if (fTestType == 2) {
TNamed *nm =
dynamic_cast<TNamed*
>(fInput->FindObject(
"testenv"));
if (nm) {
while (nms.Tokenize(nam, from, ",")) {
if (xx > 1.) fStat->Fill(xx);
} else {
Warning(
"SlaveBegin",
"RC-env '%s' not found!", nam.Data());
}
}
} else {
Warning(
"SlaveBegin",
"%d: TNamed with the test env info not found!", fTestType);
}
}
}
{
}
void ProofTests::SlaveTerminate()
{
}
void ProofTests::Terminate()
{
}
- Author
- Gerardo Ganis (gerar.nosp@m.do.g.nosp@m.anis@.nosp@m.cern.nosp@m..ch)
Definition in file ProofTests.C.