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 (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) {
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) {
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()
{
}
Auxilliary selector used to test PROOF functionality.
void Info(const char *location, const char *msgfmt,...)
void Warning(const char *location, const char *msgfmt,...)
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual TEnvRec * Lookup(const char *n) const
Loop over all resource records and return the one with name.
virtual void Print(Option_t *option="") const
Print all resources or the global, user or local resources separately.
1-D histogram with a float per channel (see TH1 documentation)}
1-D histogram with an int per channel (see TH1 documentation)}
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
Double_t GetRMS(Int_t axis=1) const
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
Named parameter, streamable and storable.
const AParamType & GetVal() const
const char * Data() const
A TTree object has a header with a name and a title.
static constexpr double nm