Selector used for auxiliary actions in the PROOF tutorials.
#define ProofAux_cxx
ProofAux::ProofAux()
{
fAction = -1;
fNEvents= -1;
fDir = "";
}
ProofAux::~ProofAux()
{
}
{
if (
act ==
"GenerateTreesSameFile") {
}
else if (
act.BeginsWith(
"GenerateTrees")) {
if (!
act.IsNull()) fDir =
act;
}
} else {
Warning(
"GetAction",
"unknown action: '%s'",
ntype->GetTitle());
}
}
}
void ProofAux::Begin(
TTree * )
{
}
void ProofAux::SlaveBegin(
TTree * )
{
fAction = GetAction(fInput);
if (
a) fNEvents =
a->GetVal();
if (fAction < 2) {
}
}
{
if (fAction < 0) {
Error(
"Process",
"action not specified!");
}
if (fInput && (
elemPair =
dynamic_cast<TPair *
>(fInput->FindObject(
"PROOF_CurrentElement")))) {
} else {
Error(
"Process",
"entry %lld: no file specified!",
entry);
}
}
if (fAction == 0) {
Error(
"Process",
"problems generating tree (%lld, %s, %lld)",
}
if (
xf.Contains(
"tree")) {
xf.ReplaceAll(
"tree",
"friend");
} else {
if (
xf.EndsWith(
".root")) {
xf.ReplaceAll(
".root",
"_friend.root");
} else {
}
}
Error(
"Process",
"problems generating friend tree for %s (%s)",
}
} else if (fAction == 1) {
Error(
"Process",
"problems generating tree (%lld, %s, %lld)",
}
Error(
"Process",
"problems generating friend tree for %s (%s)",
}
} else if (fAction == 2) {
Error(
"Process",
"problems generating tree (%lld, %s, %lld)",
}
} else {
Warning(
"Process",
"do not know how to process action %d - do nothing", fAction);
}
}
void ProofAux::SlaveTerminate()
{
}
void ProofAux::Terminate()
{
}
{
Error(
"GenerateTree",
"file name undefined!");
}
if (!
strcmp(
uu.GetProtocol(),
"file") && !
fn.BeginsWith(
"/")) {
Error(
"GenerateTree",
"data directory undefined!");
}
Error(
"GenerateTree",
"problems creating directory %s to store the file", dir.
Data());
}
}
}
if (!
f ||
f->IsZombie()) {
Error(
"GenerateTree",
"problems opening file %s",
fn.Data());
}
if (!fDir.IsNull()) {
if (
f->mkdir(fDir.Data())) {
Info(
"GenerateTree",
"sub-directory '%s' successfully created", fDir.Data());
} else {
Error(
"GenerateTree",
"creating sub-directory '%s'", fDir.Data());
}
}
TTree *T =
new TTree(
"Tmain",
"Main tree for tutorial friends");
T->Branch("Run",&Run,"Run/I");
T->Branch(
"Event",&
Event,
"Event/L");
T->Branch("z",&z,"z/F");
if (i > 0 && i%1000 == 0) Run++;
T->Fill();
}
T->Print();
T->Write();
T->SetDirectory(0);
delete T;
Info(
"GenerateTree",
"file '%s' successfully created",
fn.Data());
if (!
strcmp(
uu.GetProtocol(),
"file")) {
} else {
}
}
}
Int_t ProofAux::GenerateFriend(
const char *
fnt,
const char *
fnf)
{
Error(
"GenerateFriend",
"file name for the main tree undefined!");
}
Error(
"GenerateFriend",
"input file does not exist or cannot be read: %s",
fin.Data());
}
Error(
"GenerateFriend",
"problems creating directory %s to store the file", dir.
Data());
}
}
} else {
}
if (!
fi ||
fi->IsZombie()) {
Error(
"GenerateFriend",
"problems opening input file %s",
fin.Data());
}
Error(
"GenerateFriend",
"problems getting tree 'Tmain' from file %s",
fin.Data());
}
Tin->SetBranchAddress(
"x", &
x);
Tin->SetBranchAddress(
"y", &
y);
Tin->SetBranchAddress(
"z", &z);
if (!
fo ||
fo->IsZombie()) {
Error(
"GenerateFriend",
"problems opening file %s",
fout.Data());
}
} else {
}
}
}
Info(
"GenerateFriend",
"friend file '%s' successfully created",
fout.Data());
if (!
strcmp(
uu.GetProtocol(),
"file")) {
} else {
}
}
}
Selector used for auxiliary actions in the PROOF tutorials.
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.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
R__EXTERN TProofServ * gProofServ
R__EXTERN TSystem * gSystem
A TTree is a list of TBranches.
Manages an element of a TDSet.
Describe directory structure in memory.
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.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
Collectable string class.
Class used by TMap to store (key,value) pairs.
const char * GetOrdinal() const
const char * GetDataDir() const
This is the base class for the ROOT Random number generators.
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.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * HostName()
Return the system's host name.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
A TTree represents a columnar dataset.
This class represents a WWW compatible URL.
const char * GetProtocol() const
Double_t Sqrt(Double_t x)
Returns the square root of x.