4#include "KVSimDirAnalyser.h"
5#include "KVDataAnalysisTask.h"
8#include <KVClassFactory.h>
19 :
KVDataAnalyser(), fListOfSimFiles(
nullptr), fListOfAuxFiles(
nullptr), fAnalysisChain(
nullptr), fSimDir(
nullptr), fCopyFilesToWorkDir(false)
60 Long64_t update_interval = (nevents > 10 ? nevents / 10 : 1);
65 options.
Form(
"SimFileName=%s,SimTitle=%s,OutputDir=%s,EventsReadInterval=%lld,BranchName=%s,CombinedOutputFile=%s,SimulationInfos=%s",
72 options +=
Form(
",Run=%d", first_file->
GetRun());
82 if (auxfiles !=
"") auxfiles +=
"|";
85 options +=
",AuxFiles=";
87 options +=
",AuxDir=";
90 options +=
",AuxTreeName=";
92 options +=
",AuxBranchName=";
103 Info(
"SubmitTask",
"Beginning TChain::Process...");
112 if (read_all_events) {
195 if (simdir ==
"")
return ok;
201 if (filetype ==
"")
return ok;
204 if (simfiles ==
"")
return ok;
211 while (!simfiles.
End()) {
220 if (auxfiles ==
"")
return (ok =
kTRUE);
227 while (!auxfiles.
End()) {
261 Info(
"BuildChain",
"Copied file in %g seconds", timer.
RealTime());
304 kTRUE,
"SimulatedEventAnalysisTemplate");
307 kTRUE,
"ROOT6SimulatedEventAnalysisTemplate");
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
char * Form(const char *fmt,...)
void AssignAndDelete(TString &target, char *tobedeleted)
R__EXTERN TSystem * gSystem
Factory class for generating skeleton files for new classes.
void GenerateCode()
Generate header and implementation file for currently-defined class.
void AddImplIncludeFile(const Char_t *filename)
Manager class which sets up and runs data analysis tasks.
const KVString & GetUserClassOptions() const
const Char_t * GetACliCMode()
virtual TString ExpandAutoBatchName(const Char_t *format) const
virtual void WriteBatchEnvFile(const TString &, Bool_t sav=kTRUE)
virtual Bool_t CheckIfUserClassIsValid(const KVString &alternative_base_class="")
const Char_t * GetUserClass()
KVDataAnalysisTask * GetAnalysisTask() const
const KVString & GetUserClassImp() const
TList * fWorkDirInit
list of files in working directory before task runs
EProofMode GetProofMode() const
void ScanWorkingDirectory(TList **)
Long64_t GetNbEventToRead(void) const
virtual Bool_t ReadBatchEnvFile(const TString &)
TEnv * GetBatchInfoFile() const
virtual TObject * FindObject(const char *name) const
Class piloting analyses of simulated data.
void DeleteSimFilesListIfOurs()
TList * fListOfAuxFiles
[optional] list of original simulated data to be used during filtered data analysis
TString ExpandAutoBatchName(const Char_t *format) const override
Replace any special symbols in auto-format jobname with current values.
Bool_t NeedToChooseWhatToAnalyse() const override
KVSimDir * fSimDir
used for batch analysis
Bool_t IsCopyFilesToWorkDir() const
TList * fListOfSimFiles
list of files/trees to analyse
TChain * fAnalysisChain
TChain for analysis.
Bool_t ReadBatchEnvFile(const TString &) override
void GetInfosForJobNameFromFiles()
KVString GetRootDirectoryOfDataToAnalyse() const override
Returns path to data to be analysed.
void SetCopyFilesToWorkDir(Bool_t on=kTRUE)
void DeleteAuxFilesListIfOurs()
TString fFilterDataSet
name of dataset to be used for filtering the simulation
TString fFilterSystem
name of system to be used for filtering the simulation
TString fModel
name of model used for simulation
void SubmitTask() override
Set up and run the analysis.
static void Make(const Char_t *kvsname="MySimulatedAnalysis")
Generate a new simulated analysis selector class.
void WriteBatchEnvFile(const TString &, Bool_t sav=kTRUE) override
Handle directory containing simulated and/or filtered simulated data ,.
virtual const Char_t * GetDirectory() const
virtual const KVList * GetFiltDataList() const
virtual void AnalyseDirectory()
virtual const KVList * GetSimDataList() const
Handle file containing simulated and/or filtered simulated data ,.
const Char_t * GetTreeName() const
KVSimDir * GetSimDir() const
const Char_t * GetSystem() const
const Char_t * GetDataSet() const
const Char_t * GetBranchName() const
Bool_t IsFiltered() const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual Int_t Add(const char *name, Long64_t nentries=TTree::kMaxEntries)
Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override
virtual void SetProof(Bool_t on=kTRUE, Bool_t refresh=kFALSE, Bool_t gettreeheader=kFALSE)
Long64_t GetEntries() const override
void SetName(const char *name)
const char * GetName() const override
virtual Int_t GetEntries() const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
virtual void SaveLevel(EEnvLevel level)
void Add(TObject *obj) override
TObject * First() const override
const char * GetName() const override
const char * GetTitle() const override
virtual const char * GetName() const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
void Form(const char *fmt,...)
TString & ReplaceAll(const char *s1, const char *s2)
virtual char * ConcatFileName(const char *dir, const char *name)
virtual const char * BaseName(const char *pathname)