Selector to fill a set of histograms. 
 
#define ProofSimple_cxx
 
#include <TFormula.h>
 
ProofSimple::ProofSimple()
{
   
 
   fHist = nullptr;
   fRandom = nullptr;
   fFile = nullptr;
}
 
ProofSimple::~ProofSimple()
{
   
 
   if (fFile) {
   }
}
 
void ProofSimple::Begin(
TTree * )
 
{
   
   
   
 
 
   
   if (fInput->FindObject("ProofSimple_NHist")) {
   }
      Abort("fNhist must be > 0! Hint: proof->SetParameter(\"ProofSimple_NHist\","
            " (Long_t) <nhist>)", kAbortProcess);
      return;
   }
 
   if (fInput->FindObject("ProofSimple_NHist3")) {
   }
 
   
   TNamed *nm = 
dynamic_cast<TNamed *
>(fInput->FindObject(
"ProofSimple_Ntuple"));
 
   if (nm) {
 
      
      
      
      
      
      
      
      
 
 
      if (
ontp.Contains(
"|plot") || 
ontp == 
"plot") {
 
         ontp.ReplaceAll(
"|plot", 
"");
 
      }
   }
}
 
void ProofSimple::SlaveBegin(
TTree * )
 
{
   
   
   
 
 
   
   if (fInput->FindObject("ProofSimple_NHist")) {
   }
      Abort("fNhist must be > 0! Hint: proof->SetParameter(\"ProofSimple_NHist\","
            " (Long_t) <nhist>)", kAbortProcess);
      return;
   }
 
   
      fHist[i] = 
new TH1F(
hn.Data(), 
hn.Data(), 100, -3., 3.);
      fHist[i]->SetFillColor(
kRed);
      fOutput->Add(fHist[i]);
   }
 
   
   if (fInput->FindObject("ProofSimple_NHist3")) {
   }
      
                              100, -3., 3., 100, -3., 3., 100, -3., 3.);
      }
   }
 
   
   if (fInput->FindObject("ProofSimple_TestLabelMerging")) {
      fHLab = 
new TH1F(
"hlab", 
"Test merging of histograms with automatic labels", 10, 0., 10.);
 
   }
 
   
   TNamed *nm = 
dynamic_cast<TNamed *
>(fInput->FindObject(
"ProofSimple_Ntuple"));
 
   if (nm) {
 
      
      
      
      
      
      
      
      
 
 
      if (
ontp.Contains(
"|plot") || 
ontp == 
"plot") {
 
         ontp.ReplaceAll(
"|plot", 
"");
 
      }
      if (
ontp.BeginsWith(
"merge")) {
 
            }
         }
         }
         
      } 
else if (
ontp.BeginsWith(
"dataset")) {
      } 
else if (!
ontp.IsNull()) {
         Warning(
"SlaveBegin", 
"ntuple options unknown: ignored (%s)", 
ontp.Data());
 
      }
 
      
         
         if (fFile && fFile->IsZombie()) 
SafeDelete(fFile);
 
 
         
         if (!fFile) {
            Info(
"SlaveBegin", 
"could not create '%s': instance is invalid!", 
fProofFile->GetName());
 
            return;
         }
      }
 
      
      fNtp = 
new TNtuple(
"ntuple",
"Demo ntuple",
"px:py:pz:random:i");
 
      
      if (fFile) {
         fNtp->SetDirectory(fFile);
 
      } else {
      }
   }
 
   
}
 
{
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 
      if (fRandom && fHist[i]) {
      }
   }
      }
   }
      fRandom->RndmArray(10, 
rr);
      for (
Int_t i=0; i < 10; i++) {
 
      }
      }
   }
 
}
 
{
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 
 
   
   if (fRandom) {
      fRandom->Rannor(px,py);
   } else {
      Abort("no way to get random numbers! Stop processing", kAbortProcess);
      return;
   }
 
   return;
}
 
 
void ProofSimple::SlaveTerminate()
{
   
   
   
 
   
   if (fFile) {
         Error(
"SlaveTerminate", 
"'ntuple' is undefined!");
 
         return;
      }
      if (
fNtp->GetEntries() > 0) {
 
         fFile->cd();
      } else {
      }
      fNtp->SetDirectory(
nullptr);
 
      fFile->Close();
      
      if (cleanup) {
         TUrl uf(*(fFile->GetEndpointUrl()));
 
      }
   }
}
 
void ProofSimple::Terminate()
{
   
   
   
 
   
   
   
   }
   c1 = 
new TCanvas(
"c1",
"Proof ProofSimple canvas",200,10,700,700);
 
 
         
         break;
      }
   }
 
   
      Warning(
"Terminate", 
"histograms not found");
 
   } else {
      
   }
 
   
      
            }
         } else
            Warning(
"Terminate", 
"no entries in the hlab histogram!");
 
      }
   }
 
   
 
      
 
 
         
         if (fFile) {
         } else {
         }
         if (!fFile) return;
 
      } else {
         Error(
"Terminate", 
"TProofOutputFile not found");
 
         return;
      }
   }
   
}
 
{
   
 
   
   
   
   
   
   
   pad1->GetFrame()->SetFillColor(15);
 
   ntp->Draw(
"3*px+2",
"px**2+py**2>1");
 
   ntp->Draw(
"2*px+2",
"pz>2",
"same");
 
   ntp->Draw(
"1.3*px+2",
"(px^2+py^2>4) && py>0",
"same");
 
 
   
   
   ntp->Draw(
"pz:py:px",
"(pz<10 && pz>6)+(pz<4 && pz>3)");
 
   ntp->Draw(
"pz:py:px",
"pz<6 && pz>4",
"same");
 
   ntp->Draw(
"pz:py:px",
"pz<4 && pz>3",
"same");
 
   l2->AddText(
"You can interactively rotate this view in 2 ways:");
 
   l2->AddText(
"  - With the RotateCube in clicking in this pad");
 
   l2->AddText(
"  - Selecting View with x3d in the View menu");
 
 
   
}
 
{
   
 
      if (
strcmp(
fc->ClassName(), 
"TFileCollection")) 
continue;
 
      if (!fHist) {
         for (
Int_t i = 0; i < 
fNhist; i++) { fHist[i] = 
nullptr; }
 
      } else {
      }
      
                  if (!fHist[i]) {
                     fHist[i] = (
TH1F *) 
h->Clone();
                     fHist[i]->SetDirectory(nullptr);
                  } else {
                  }
               } else {
                  Error(
"GetHistosFromFC", 
"histo '%s' not found in file '%s'",
 
                        hn.Data(), 
fi->GetCurrentUrl()->GetUrl());
 
               }
            }
         } else {
            Error(
"GetHistosFromFC", 
"file '%s' could not be open", 
fi->GetCurrentUrl()->GetUrl());
 
         }
      }
   }
 
      if (fHist[i]) {
         fHist[i]->DrawCopy();
      }
   }
   Info(
"GetHistosFromFC", 
"histograms read from %d files in TFileCollection '%s'",
 
                           fc->GetList()->GetSize(), 
fc->GetName());
 
   
   return 0;
}
Selector to fill a set of histograms.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
winID h TVirtualViewer3D TVirtualGLPainter p
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
R__EXTERN TSystem * gSystem
Describe directory structure in memory.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Class describing a generic file including meta information.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
1-D histogram with a float per channel (see TH1 documentation)
3-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.
A simple TTree restricted to a list of float variables only.
The most important graphics class in the ROOT system.
A Pave (see TPave) with text, lines or/and boxes inside.
Class to steer the merging of files produced on the workers.
TObject * GetOutput(const char *name)
Get specified object that has been produced during the processing (see Process()).
Random number generator class based on M.
A sorted doubly linked list.
Int_t Atoi() const
Return integer value of string.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual int Unlink(const char *name)
Unlink, i.e.
A TTree represents a columnar dataset.
This class represents a WWW compatible URL.
const char * GetFile() const
Double_t Sqrt(Double_t x)
Returns the square root of x.