ldas-tools-diskcacheAPI
2.7.2
|
#include <sys/time.h>
#include <time.h>
#include <iostream>
#include <iomanip>
#include <list>
#include "diskcache.hh"
#include "diskcachecmd.hh"
#include "ldastoolsal/MemChecker.hh"
#include "ldastoolsal/ConditionalVariable.hh"
#include "ldastoolsal/fstream.hh"
#include "ldastoolsal/ldasexception.hh"
#include "ldastoolsal/Task.hh"
#include "genericAPI/Logging.hh"
#include "diskcacheAPI/Cache/ExcludedDirectoriesSingleton.hh"
#include "diskcacheAPI/Streams/ASCII.hh"
#include "diskcacheAPI/Streams/Binary.hh"
#include "diskcacheAPI/Streams/FStream.hh"
#include "diskcacheAPI/Cache/Directory.hh"
#include "diskcacheAPI/Cache/QueryAnswer.hh"
#include "diskcacheAPI/Cache/QueryParams.hh"
#include "diskcacheAPI/Cache/RegistrySingleton.hh"
#include "diskcacheAPI/Cache/SDGTx.hh"
#include "AtomicFile.hh"
#include "Daemons.hh"
#include "DirectoryManagerSingleton.hh"
#include "MountPointScanner.hh"
Classes | |
class | anonymous_namespace{diskcachecmd.cc}::Timer |
Debug utility to track down execution time. More... | |
Namespaces | |
anonymous_namespace{diskcachecmd.cc} | |
Typedefs | |
typedef diskCache::MountPointScanner::mount_point_container_type | anonymous_namespace{diskcachecmd.cc}::mount_point_container_type |
Functions | |
void | anonymous_namespace{diskcachecmd.cc}::is_first_scan_complete (const char *const File, int Line) |
std::string | anonymous_namespace{diskcachecmd.cc}::ms_format (const LDASTools::AL::GPSTime &DT) |
void | getHashNumbers (diskCache::Cache::QueryAnswer &Answer, const char *Ifo, const char *Type) |
Get sets of counts for each directory. More... | |
void | getIntervalsList (diskCache::Cache::QueryAnswer &Answer, const char *ifo_type_str, const INT_4U query_start, const INT_4U query_stop, const std::string &Extension) |
Get TCL formatted lists of intervals for data matching the specified and Type within the bounds of the query. More... | |
void | writeDirCache (const char *filename, diskCache::Streams::Interface::version_type Version) |
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) |
param: const char* filename - Name of the file to write frame hash to. More... | |
void | writeDirCacheFiles (const char *bfilename, const char *afilename) |
Write content of global frame data hash to ascii file. More... | |
void | CacheRead (const char *filename) |
param: const char* filename - Name of the file to read frame hash from. More... | |
string | excludedDirList (const ExcludedDirectoriesSingleton::directory_container_type &DirectoryList) |
usage: set dir_list [ excludedDirList dirs_to_exclude ] More... | |
void | deleteDirCache () |
return: Nothing. More... | |
void | ScanConcurrency (INT_4U Concurrency) |
This routine does a single pass of the listed mount points. More... | |
void | ScanMountPointList (MountPointScanner::ScanResults &Answer) |
This routine does a single pass of the listed mount points. 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 | ScanMountPointListContinuously () |
Scan the list of mount points in the background. More... | |
void | ScanMountPointListContinuouslyStop () |
Bring the scanner to a close. More... | |
void CacheRead | ( | const char * | filename | ) |
param: const char* filename - Name of the file to read frame hash from.
return: Nothing.
void deleteDirCache | ( | ) |
return: Nothing.
void DumpCacheDaemonStart | ( | ) |
Create an image of the cache file on the storage media.
void DumpCacheDaemonStop | ( | ) |
stop the currently running Dump Cache Daemon
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 (as they return: string - Sorted Tcl list of all removed subdirectories, followed
void getHashNumbers | ( | diskCache::Cache::QueryAnswer & | Answer, |
const char * | Ifo, | ||
const char * | Type | ||
) |
Get sets of counts for each directory.
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 }
[out] | Answer | Resulting hash numbers based on query parameters. |
[in] | Ifo | An ifo to look up. Default is "all". |
[in] | Type | A type to look up. Default is "all". |
void getIntervalsList | ( | diskCache::Cache::QueryAnswer & | Answer, |
const char * | ifo_type_str, | ||
const INT_4U | query_start, | ||
const INT_4U | query_stop, | ||
const std::string & | Extension | ||
) |
Get TCL formatted lists of intervals for data matching the specified and Type within the bounds of the query.
[out] | Answer | Matching intervals based on query parameters. |
[in] | ifo_type_str | A space delimited list of IFO-Type strings |
[in] | query_start | Query start time. |
[in] | query_stop | Query stop time. |
[in] | Extension | Filename extension |
void ScanConcurrency | ( | INT_4U | Concurrency | ) |
This routine does a single pass of the listed mount points.
The number of mount point directories to scan concurrently.
void ScanMountPointList | ( | MountPointScanner::ScanResults & | Answer | ) |
This routine does a single pass of the listed 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).
void ScanMountPointListContinuously | ( | ) |
Scan the list of mount points in the background.
Continuously scan the list of mount points.
void ScanMountPointListContinuouslyStop | ( | ) |
Bring the scanner to a close.
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.
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.
void writeDirCacheFiles | ( | const char * | bfilename, |
const char * | afilename | ||
) |
Write content of global frame data hash to ascii file.
return: Nothing.
[in] | bfilename | Name of the file to write the binary frame hash to. Default is NULL (C++ will use default file name). |
[in] | afilename | Name of the file to write the ascii frame hash to. Default is NULL (C++ will use default file name). |