Struct ProcessingContext¶
Defined in File qc_extractor.h
Struct Documentation¶
-
struct ProcessingContext¶
Complete context for thread-safe file processing operations.
The ProcessingContext encapsulates all resources, parameters, and state needed for safe multi-threaded processing of Gaussian log files. It provides shared access to resource managers and maintains processing parameters consistent across all worker threads.
Pattern¶
Immutable after construction to prevent race conditions
Shared resource managers for coordinated resource usage
Integration with job scheduler resource limits
Parameter validation and safe defaults
Management¶
The context owns shared resource managers that coordinate access to:
System memory through MemoryMonitor
File handles through FileHandleManager
Error collection through ThreadSafeErrorCollector
Note
All resource managers are thread-safe and can be accessed simultaneously from multiple processing threads
Public Functions
-
inline ProcessingContext(double temp, double pressure, int C, bool use_temp, bool use_pressure, unsigned int thread_count = 1, const std::string &ext = ".log", size_t max_file_mb = DEFAULT_MAX_FILE_SIZE_MB, const JobResources &job_res = JobResources{})¶
Constructor with parameter validation and resource setup.
Creates a complete processing context with:
Optimally configured resource managers
Validated processing parameters
Integration with job scheduler limits
Thread-safe resource sharing setup
Note
Memory limits are automatically calculated based on thread count and available system resources
- Parameters:
temp – Base temperature for thermodynamic calculations (K)
C – Concentration for phase corrections (mM)
use_temp – Whether to use temperatures from input files
thread_count – Number of processing threads to use
ext – File extension to process (default: “.log”)
max_file_mb – Maximum individual file size in MB (default: 100)
job_res – Job scheduler resource information
Public Members
-
std::shared_ptr<MemoryMonitor> memory_monitor¶
Shared memory usage monitor.
-
std::shared_ptr<FileHandleManager> file_manager¶
Shared file handle manager.
-
std::shared_ptr<ThreadSafeErrorCollector> error_collector¶
Shared error collector.
-
double base_temp¶
Base temperature for calculations (K)
-
double base_pressure¶
Base pressure for calculations (atm)
-
int concentration¶
Concentration for phase corrections (mM)
-
bool use_input_temp¶
Whether to use temperature from input files.
-
bool use_input_pressure¶
Whether to use pressure from user input.
-
bool use_input_concentration = false¶
Whether to use concentration from user input.
-
std::string extension¶
File extension to process.
-
unsigned int requested_threads¶
Number of requested processing threads.
-
size_t max_file_size_mb¶
Maximum individual file size in MB.
-
JobResources job_resources¶
Job scheduler resource information.
-
std::string low_vib_method = "grimme"¶
Low-frequency vibrational treatment method.
-
double ravib = 100.0¶
Crossover frequency for low-vib treatment (cm-1)