#define ProofEventProc_cxx
void ProofEventProc::Begin(
TTree *)
{
Info(
"Begin",
"starting a simple exercise with process option: %s",
option.Data());
}
void ProofEventProc::SlaveBegin(
TTree * )
{
if (fInput) {
if ((nm =
dynamic_cast<TNamed *
>(fInput->FindObject(
"ProofEventProc_Read")))) {
}
}
if (!nm) {
}
Info(
"SlaveBegin",
"'%s' reading", (
fFullRead ?
"full" :
"optimized"));
fPtHist =
new TH1F(
"pt_dist",
"p_{T} Distribution",100,0,5);
fPtHist->SetDirectory(0);
fPtHist->GetXaxis()->SetTitle("p_{T}");
fPtHist->GetYaxis()->SetTitle("dN/p_{T}dp_{T}");
fOutput->Add(fPtHist);
fPzHist =
new TH1F(
"pz_dist",
"p_{Z} Distribution",100,0,5.);
fPzHist->GetXaxis()->SetTitle(
"p_{Z}");
fPzHist->GetYaxis()->SetTitle(
"dN/dp_{Z}");
fPxPyHist =
new TH2F(
"px_py",
"p_{X} vs p_{Y} Distribution",100,-5.,5.,100,-5.,5.);
if (fInput)
pi =
dynamic_cast<TParameter<Int_t> *
>(fInput->FindObject(
"ProofEventProc_TestAbort"));
Info(
"SlaveBegin",
"unsupported value for the abort test: %d not in [-1,1] - ignore",
fTestAbort);
}
Abort("Test abortion during init", kAbortProcess);
}
{
Abort("Testing file abortion", kAbortFile);
}
}
fChain->GetTree()->GetEntry(
entry);
} else {
b_event_fNtrack->GetEntry(
entry);
}
if (fNtrack > 0) {
if (fTracks) {
for (
Int_t j=0;
j<fTracks->GetEntries();
j++){
}
}
fTracks->Clear("C");
}
}
}
void ProofEventProc::SlaveTerminate()
{
Warning(
"SlaveTerminate",
"no proc elements list found!");
return;
}
while ((o =
nxpe())) { fOutput->Add(o); };
}
void ProofEventProc::Terminate()
{
CheckRanges();
if (
gROOT->IsBatch())
return;
TH1F *
hi =
dynamic_cast<TH1F*
>(fOutput->FindObject(
"pz_dist"));
}
else {
Warning(
"Terminate",
"no pz dist found"); }
TH1F *
hf =
dynamic_cast<TH1F*
>(fOutput->FindObject(
"pt_dist"));
}
else {
Warning(
"Terminate",
"no pt dist found"); }
TH2F *
h2f =
dynamic_cast<TH2F*
>(fOutput->FindObject(
"px_py"));
h2f->DrawCopy(
"CONT2COL");
} else {
Warning(
"Terminate",
"no px py found");
}
}
void ProofEventProc::CheckRanges()
{
if (!fOutput || (fOutput && fOutput->GetSize() <= 0)) return;
if (!fInput || (fInput && fInput->GetSize() <= 0)) {
nout->SetTitle(
"No input list");
return;
}
nout->SetTitle(
"No first file");
return;
}
nout->SetTitle(
"No last file");
return;
}
nout->SetTitle(
"No number of files");
return;
}
nout->SetTitle(
"No first entry information in first file name");
return;
}
sfst.Remove(0,
ifst +
sizeof(
"?fst=") - 1);
nout->SetTitle(
"Badly formatted first entry information in first file name");
return;
}
nout->SetTitle(
"ProcFileElements for first file not found in the output list");
return;
}
return;
}
nout->SetTitle(
"No last entry information in last file name");
return;
}
slst.Remove(0,
ilst +
sizeof(
"?lst=") - 1);
nout->SetTitle(
"Badly formatted last entry information in last file name");
return;
}
nout->SetTitle(
"ProcFileElements for last file not found in the output list");
return;
}
nout->SetTitle(
"Last entry differs");
return;
}
}
nout->SetTitle(
"Number of processed files differs");
return;
}
}
Empty file to test TProof::Load in runProof.C and StressProof.cxx in conjunction with ProcFileElement...
Selector to process trees containing Event structures.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TRandom * gRandom
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void Update() override
Update canvas pad buffers.
1-D histogram with a float per channel (see TH1 documentation)
2-D histogram with a float per channel (see TH1 documentation)
The TNamed class is the base class for all named ROOT classes.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
The most important graphics class in the ROOT system.
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
TVirtualPad * GetPad(Int_t subpadnumber) const override
Get a pointer to subpadnumber of this pad.
Double_t Rndm() override
Machine independent random number generator.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
A TTree represents a columnar dataset.