1 #include "KVRunListCreator.h"
4 #include <KVSystemDirectory.h>
5 #include <KVAvailableRunsFile.h>
6 #include <KVSystemFile.h>
23 if (fmt !=
"") SetFileFormat(fmt);
24 else SetFileFormat(
gEnv->
GetValue(
"DataSet.RunFileName.raw",
"run_%04d.dat%*"));
28 TFile f(
"runinfos.root",
"recreate");
29 GetRunInfos().Write();
53 infos->
SetName(
Form(
"run%010d", run_num.value().first));
54 infos->
SetValue(
"Run", run_num.value().first);
66 if (
fReader->GetRunInfos().HasStringParameter(
"FileCreationTime")) {
67 when.SetGanacqNarvalDate(
fReader->GetRunInfos().GetStringValue(
"FileCreationTime"));
70 while (
fReader->GetNextEvent()) ++events;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void when
char * Form(const char *fmt,...)
Bool_t ExtractDateFromFileName(const Char_t *name, KVDatime &date)
std::optional< run_index_t > IsRunFileName(const Char_t *filename)
Extension of TDatime to handle various useful date formats.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
void SetValue(const Char_t *name, value_type value)
void SetValue64bit(const Char_t *name, ULong64_t)
void ls(Option_t *opt="") const override
static KVRawDataReader * OpenFile(const TString &type, const TString &filename)
Set up a list of runs from a directory containing data files.
TString fDataType
type of data (KVRawDataReader plugin name)
KVUniqueNameList fRunInfos
const Char_t * GetFileFormat()
Int_t ScanDirectory()
Return number of runs found.
const Char_t * GetRunDir()
std::unique_ptr< KVRawDataReader > fReader
Extension of ROOT TSystemDirectory class, handling browsing directories on disk.
TList * GetListOfFiles() const override
Extended ROOT TSystemFile with added info on file size etc.
const Char_t * GetDate() const
void Add(TObject *obj) override
virtual const char * GetValue(const char *name, const char *dflt) const
const char * GetName() const override
const char * GetTitle() const override
virtual void SetName(const char *name)
unsigned long long ULong64_t