10#define ProofEventProc_cxx
26void ProofEventProc::Begin(
TTree *)
33 Info(
"Begin",
"starting a simple exercise with process option: %s",
option.Data());
37void ProofEventProc::SlaveBegin(
TTree * )
49 if ((nm =
dynamic_cast<TNamed *
>(fInput->FindObject(
"ProofEventProc_Read")))) {
57 Info(
"SlaveBegin",
"'%s' reading", (
fFullRead ?
"full" :
"optimized"));
59 fPtHist =
new TH1F(
"pt_dist",
"p_{T} Distribution",100,0,5);
60 fPtHist->SetDirectory(0);
61 fPtHist->GetXaxis()->SetTitle(
"p_{T}");
62 fPtHist->GetYaxis()->SetTitle(
"dN/p_{T}dp_{T}");
64 fOutput->Add(fPtHist);
66 fPzHist =
new TH1F(
"pz_dist",
"p_{Z} Distribution",100,0,5.);
68 fPzHist->GetXaxis()->SetTitle(
"p_{Z}");
69 fPzHist->GetYaxis()->SetTitle(
"dN/dp_{Z}");
73 fPxPyHist =
new TH2F(
"px_py",
"p_{X} vs p_{Y} Distribution",100,-5.,5.,100,-5.,5.);
83 pi =
dynamic_cast<TParameter<Int_t> *
>(fInput->FindObject(
"ProofEventProc_TestAbort"));
86 Info(
"SlaveBegin",
"unsupported value for the abort test: %d not in [-1,1] - ignore",
fTestAbort);
93 Abort(
"Test abortion during init", kAbortProcess);
124 Abort(
"Testing file abortion", kAbortFile);
130 fChain->GetTree()->GetEntry(
entry);
132 b_event_fNtrack->GetEntry(
entry);
138 for (
Int_t j=0;
j<fTracks->GetEntries();
j++){
154void ProofEventProc::SlaveTerminate()
164 Warning(
"SlaveTerminate",
"no proc elements list found!");
171 while ((o =
nxpe())) { fOutput->Add(o); };
175void ProofEventProc::Terminate()
184 if (
gROOT->IsBatch())
return;
196 TH1F *
hi =
dynamic_cast<TH1F*
>(fOutput->FindObject(
"pz_dist"));
202 }
else {
Warning(
"Terminate",
"no pz dist found"); }
207 TH1F *
hf =
dynamic_cast<TH1F*
>(fOutput->FindObject(
"pt_dist"));
209 hf->SetFillColor(30);
213 }
else {
Warning(
"Terminate",
"no pt dist found"); }
216 TH2F *
h2f =
dynamic_cast<TH2F*
>(fOutput->FindObject(
"px_py"));
220 h2f->DrawCopy(
"SURF1 ");
223 h2f->DrawCopy(
"CONT2COL");
225 Warning(
"Terminate",
"no px py found");
234void ProofEventProc::CheckRanges()
240 if (!fOutput || (fOutput && fOutput->GetSize() <= 0))
return;
247 if (!fInput || (fInput && fInput->GetSize() <= 0)) {
248 nout->SetTitle(
"No input list");
251 TNamed *
ffst =
dynamic_cast<TNamed *
>(fInput->FindObject(
"Range_First_File"));
253 nout->SetTitle(
"No first file");
256 TNamed *
flst =
dynamic_cast<TNamed *
>(fInput->FindObject(
"Range_Last_File"));
258 nout->SetTitle(
"No last file");
264 nout->SetTitle(
"No number of files");
272 nout->SetTitle(
"No first entry information in first file name");
276 sfst.Remove(0,
ifst +
sizeof(
"?fst=") - 1);
277 if (!
sfst.IsDigit()) {
278 nout->SetTitle(
"Badly formatted first entry information in first file name");
284 nout->SetTitle(
"ProcFileElements for first file not found in the output list");
298 nout->SetTitle(
"No last entry information in last file name");
302 slst.Remove(0,
ilst +
sizeof(
"?lst=") - 1);
303 if (!
slst.IsDigit()) {
304 nout->SetTitle(
"Badly formatted last entry information in last file name");
310 nout->SetTitle(
"ProcFileElements for last file not found in the output list");
314 nout->SetTitle(
"Last entry differs");
322 while ((o =
nxo())) {
326 nout->SetTitle(
"Number of processed files differs");
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 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.