ldas-tools-diskcacheAPI  2.7.1
Namespaces | Functions
diskcachecmd.hh File Reference
#include <string>
#include <iostream>
#include "ldastoolsal/types.hh"
#include "diskcacheAPI/Cache/ExcludedDirectoriesSingleton.hh"
#include "diskcacheAPI/Cache/QueryAnswer.hh"
#include "diskcacheAPI/Cache/SDGTx.hh"
#include "Streams/StreamsInterface.hh"
#include "DumpCacheDaemon.hh"
#include "MountPointManagerSingleton.hh"
#include "MountPointScanner.hh"
Include dependency graph for diskcachecmd.hh:
This graph shows which files directly or indirectly include this file:

Namespaces

 diskCache
 Maintains a list of commands that are supported.
 
 diskCache::Cache
 

Functions

std::string getDirEnt (const std::string dirpath)
 Deep scan of a directory. More...
 
void getHashNumbers (diskCache::Cache::QueryAnswer &Answer, const char *Ifo="all", const char *Type="all")
 Get sets of counts for each directory. More...
 
void writeDirCache (const char *filename="", diskCache::Streams::Interface::version_type Version=diskCache::Streams::Interface::VERSION_NONE)
 param: const char* filename - Name of the file to write frame hash to. More...
 
void writeDirCacheAscii (const char *filename="", diskCache::Streams::Interface::version_type Version=diskCache::Streams::Interface::VERSION_NONE)
 param: const char* filename - Name of the file to write frame hash to. More...
 
void writeDirCacheFiles (const char *bfilename="", const char *afilename="")
 return: Nothing. More...
 
void CacheRead (const char *filename="")
 param: const char* filename - Name of the file to read frame hash from. More...
 
std::string excludedDirList (const ExcludedDirectoriesSingleton::directory_container_type &dir_list)
 usage: set dir_list [ excludedDirList dirs_to_exclude ] More...
 
void deleteDirCache ()
 return: Nothing. More...
 
void DumpCacheDaemonStart ()
 Create an image of the cache file on the storage media. More...
 
void DumpCacheDaemonStop ()
 stop the currently running Dump Cache Daemon More...
 
void ScanConcurrency (INT_4U Concurrency)
 The number of mount point directories to scan concurrently. More...
 
void ScanMountPointList (diskCache::MountPointScanner::ScanResults &Answer)
 Scan the list of mount points. More...
 
void ScanMountPointListContinuously ()
 Continuously scan the list of mount points. More...
 
void ScanMountPointListContinuouslyStop ()
 Bring the scanner to a close. More...
 

Function Documentation

◆ CacheRead()

void CacheRead ( const char *  filename)

param: const char* filename - Name of the file to read frame hash from.

return: Nothing.

◆ deleteDirCache()

void deleteDirCache ( )

return: Nothing.

◆ DumpCacheDaemonStart()

void DumpCacheDaemonStart ( )

Create an image of the cache file on the storage media.

◆ DumpCacheDaemonStop()

void DumpCacheDaemonStop ( )

stop the currently running Dump Cache Daemon

◆ excludedDirList()

std::string excludedDirList ( const ExcludedDirectoriesSingleton::directory_container_type DirectoryList)

usage: set dir_list [ excludedDirList dirs_to_exclude ]

param: const CHAR* dir_list - A list of directories to exclude return: string - Sorted Tcl list of all removed subdirectories, followed

param: const CHAR* dir_list - A list of directories to exclude (as they return: string - Sorted Tcl list of all removed subdirectories, followed

◆ getDirEnt()

std::string getDirEnt ( const std::string  dirpath)

Deep scan of a directory.

This function gets recursive content of the passed to it directory. It should be called only for directories that appear in the MOUNT_PT list. The same function is used to introduce new MOUNT_PT directory or to rescan already existing directory in the global hash for new data.

Parameters
[in]dirpathA full path to the directory.
Returns
A list of all identified and scanned subdirectories that have frame data.

◆ getHashNumbers()

void getHashNumbers ( diskCache::Cache::QueryAnswer Answer,
const char *  Ifo,
const char *  Type 
)

Get sets of counts for each directory.

Parameters
[out]AnswerResulting hash numbers based on query parameters.
[in]IfoAn ifo to look up. Default is "all".
[in]TypeA type to look up. Default is "all".
Returns
A list for each mount point with name, number of directories and number of files under that mount point: {mountpoint_name number_of_dirs number_of files }

Get TCL formatted lists for each mount point with name or mount point, number of directories and number of files for data matching the specified ifo and type. Return lists are of the form: {mountpoint_name number_of_dirs number_of_files }

Parameters
[out]AnswerResulting hash numbers based on query parameters.
[in]IfoAn ifo to look up. Default is "all".
[in]TypeA type to look up. Default is "all".
Returns
A list for each mount point with name, number of directories and number of files under that mount point: {mountpoint_name number_of_dirs number_of files }
Todo:
Need to get getHashNumber queries working

◆ ScanConcurrency()

void ScanConcurrency ( INT_4U  Concurrency)

The number of mount point directories to scan concurrently.

The number of mount point directories to scan concurrently.

◆ ScanMountPointList()

void ScanMountPointList ( MountPointScanner::ScanResults Answer)

Scan the list of mount points.

Scan the list of mount points.

Obtain the list of mount points.

The output needs to be in the following format 7 mount points, 0 directories, 0 files, scanned in 3010 ms (00:00:03.0010).

Todo:
Complete the population of the status message

◆ ScanMountPointListContinuously()

void ScanMountPointListContinuously ( )

Continuously scan the list of mount points.

Continuously scan the list of mount points.

◆ ScanMountPointListContinuouslyStop()

void ScanMountPointListContinuouslyStop ( )

Bring the scanner to a close.

◆ writeDirCache()

void writeDirCache ( const char *  filename,
diskCache::Streams::Interface::version_type  Version 
)

param: const char* filename - Name of the file to write frame hash to.

return: Nothing.

◆ writeDirCacheAscii()

void writeDirCacheAscii ( const char *  filename,
diskCache::Streams::Interface::version_type  Version 
)

param: const char* filename - Name of the file to write frame hash to.

return: Nothing.

◆ writeDirCacheFiles()

void writeDirCacheFiles ( const char *  bfilename,
const char *  afilename 
)

return: Nothing.

param: const char* bfilename - Name of the file to write binary frame hash to. param: const char* afilename - Name of the file to write ascii frame hash to.

return: Nothing.

Parameters
[in]bfilenameName of the file to write the binary frame hash to. Default is NULL (C++ will use default file name).
[in]afilenameName of the file to write the ascii frame hash to. Default is NULL (C++ will use default file name).