MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
Loading...
Searching...
No Matches

Discovering input files and naming the artefacts derived from them. More...

#include <FileSet.hpp>

Static Public Member Functions

static TString CompassBinPath (const FileSpec &s)
 Path to a CoMPASS binary subfile.
static std::vector< TString > DiscoverRunSuffixes (Int_t run)
 Subfile suffixes present on disk for a CoMPASS run.
static TString SolBinPath (const FileSpec &s)
 Path to a SOLARIS .sol subfile.
static std::vector< TString > DiscoverSolRunSuffixes (Int_t run)
 Subfile suffixes present on disk for a SOLARIS run.
static std::vector< TString > DiscoverProcessedRunSuffixes (Int_t run)
 Subfile suffixes for which processed output already exists.
static std::vector< FileSpecBuildFileSpecs ()
 Every raw input subfile for the configured runs.
static std::vector< FileSpecBuildProcessedFileSpecs ()
 Every subfile that already has processed output.
static std::vector< FileSpecBuildRawOrProcessedFileSpecs ()
 The union of raw and processed subfiles, without duplicates.
static TString RawRootName (const FileSpec &s)
 Filename of the raw converted ROOT file for a subfile.
static TString ShiftFriendName (const FileSpec &s)
 Filename of the timing-shift friend tree for a subfile.
static TString EventsName (const FileSpec &s)
 Filename of the built-events ROOT file for a subfile.
static TString FileLabel (const FileSpec &s)
 Human-readable label identifying a subfile.
static FileSpec ResolveFileSpec (const TString &file_label)
 Recover the FileSpec behind a label from FileLabel().
static std::map< Int_t, TChain * > GroupEventsByRun (std::vector< Int_t > &run_order)
 Chain every run's events files, grouped by run.
static Long64_t SampleStride (Long64_t n_total, Long64_t max_points)
 Stride that visits at most max_points of n_total entries.

Detailed Description

Discovering input files and naming the artefacts derived from them.

All-static. Every name here is derived rather than stored, so a stage can reconstruct the path to any other stage's output from a FileSpec alone.

Definition at line 51 of file FileSet.hpp.

Member Function Documentation

◆ BuildFileSpecs()

std::vector< FileSpec > FileSet::BuildFileSpecs ( )
static

Every raw input subfile for the configured runs.

Returns
One FileSpec per subfile, over the runs selected by RUNS and N_CHUNKS in the dataset configuration.

Definition at line 255 of file FileSet.cpp.

Referenced by BuildRawOrProcessedFileSpecs(), and ResolveFileSpec().

◆ BuildProcessedFileSpecs()

std::vector< FileSpec > FileSet::BuildProcessedFileSpecs ( )
static

Every subfile that already has processed output.

Definition at line 259 of file FileSet.cpp.

Referenced by BuildRawOrProcessedFileSpecs(), GroupEventsByRun(), and CalibrateBeam::Run().

◆ BuildRawOrProcessedFileSpecs()

std::vector< FileSpec > FileSet::BuildRawOrProcessedFileSpecs ( )
static

The union of raw and processed subfiles, without duplicates.

Lets a stage run over everything available whether or not a given subfile has been preprocessed yet.

Returns
Raw specs first, then any processed spec not already among them.

Definition at line 263 of file FileSet.cpp.

◆ CompassBinPath()

TString FileSet::CompassBinPath ( const FileSpec & s)
static

Path to a CoMPASS binary subfile.

Parameters
sRun and subfile.

Definition at line 6 of file FileSet.cpp.

Referenced by EnsureRunHeaderFused(), and RunFusedPipelineForFile().

◆ DiscoverProcessedRunSuffixes()

std::vector< TString > FileSet::DiscoverProcessedRunSuffixes ( Int_t run)
static

Subfile suffixes for which processed output already exists.

Parameters
runRun number.

Definition at line 205 of file FileSet.cpp.

◆ DiscoverRunSuffixes()

std::vector< TString > FileSet::DiscoverRunSuffixes ( Int_t run)
static

Subfile suffixes present on disk for a CoMPASS run.

Parameters
runRun number.
Returns
The suffixes found, empty if the run has no files.

Definition at line 111 of file FileSet.cpp.

◆ DiscoverSolRunSuffixes()

std::vector< TString > FileSet::DiscoverSolRunSuffixes ( Int_t run)
static

Subfile suffixes present on disk for a SOLARIS run.

Parameters
runRun number.

Definition at line 117 of file FileSet.cpp.

Referenced by EnsureRunHeaderFused().

◆ EventsName()

◆ FileLabel()

TString FileSet::FileLabel ( const FileSpec & s)
static

Human-readable label identifying a subfile.

run<N><suffix>, prefixed with the active file tag when the dataset sets one. Used in plot names, log lines, and as the key ResolveFileSpec() reverses.

Definition at line 296 of file FileSet.cpp.

Referenced by CalibrateBeam::CalibrateBeamOneSubfile(), ResolveFileSpec(), and RunFusedPipelineForFile().

◆ GroupEventsByRun()

std::map< Int_t, TChain * > FileSet::GroupEventsByRun ( std::vector< Int_t > & run_order)
static

Chain every run's events files, grouped by run.

Parameters
[out]run_orderRun numbers in the order they should be processed.
Returns
One TChain per run, keyed by run number. The caller owns every chain and must delete them.

Definition at line 304 of file FileSet.cpp.

Referenced by StripSumScatter::Run().

◆ RawRootName()

TString FileSet::RawRootName ( const FileSpec & s)
static

Filename of the raw converted ROOT file for a subfile.

Definition at line 281 of file FileSet.cpp.

◆ ResolveFileSpec()

FileSpec FileSet::ResolveFileSpec ( const TString & file_label)
static

Recover the FileSpec behind a label from FileLabel().

Parameters
file_labelLabel to resolve.
Returns
The matching spec, or one with run == -1 and an empty suffix if no configured subfile produces that label. Check run before use.

Definition at line 332 of file FileSet.cpp.

Referenced by CalibrateBeam::Run().

◆ SampleStride()

Long64_t FileSet::SampleStride ( Long64_t n_total,
Long64_t max_points )
static

Stride that visits at most max_points of n_total entries.

For scatter plots, where drawing every entry costs time and renders as a solid block anyway.

Parameters
n_totalEntries available.
max_pointsCap on entries to visit; 0 or less means no cap.
Returns
The stride, never below 1.

Definition at line 323 of file FileSet.cpp.

◆ ShiftFriendName()

TString FileSet::ShiftFriendName ( const FileSpec & s)
static

Filename of the timing-shift friend tree for a subfile.

Definition at line 285 of file FileSet.cpp.

◆ SolBinPath()

TString FileSet::SolBinPath ( const FileSpec & s)
static

Path to a SOLARIS .sol subfile.

Parameters
sRun and subfile.

Definition at line 11 of file FileSet.cpp.

Referenced by EnsureRunHeaderFused(), RunFusedPipelineForFile(), and SplitWorker().


The documentation for this class was generated from the following files: