44 cout <<
"Creating FairDbTableProxyRegistry"
54 cout <<
"Database Global Exception Log contains "
60 if ( ! this->
GetConfig().Get(
"Shutdown",shutdown)
62 cout <<
" shutdown not requested" << endl;
66 cout <<
" shutting down..." << endl;
70 for ( std::map<std::string,FairDbTableProxy*>::iterator itr =
fTPmap.begin();
84 cout <<
"Destroying FairDbTableProxyRegistry" << endl;
86 cout <<
" shutdown complete." << endl;
95 std::map<std::string,FairDbTableProxy*>::const_iterator itr =
fTPmap.begin();
96 std::map<std::string,FairDbTableProxy*>::const_iterator itrEnd =
fTPmap.end();
108 if ( sqlFull.size() ) { sqlFull +=
" and "; }
150 if ( reg.
Get(
"Level2Cache",dir) ) {
155 gSystem->ExpandPathName(tmp);
156 if ( tmp.Contains(
"$" ) ) {
158 cout <<
"Directory name expansion failed, using "
159 << dir <<
" instead" << endl;
165 cout <<
"FairDbTableProxyRegistry: Setting L2 Cache to: " << dir << endl;
171 int connectionsPermanent = 0;
172 if ( reg.
Get(
"MakeConnectionsPermanent",connectionsPermanent) ) {
173 reg.
RemoveKey(
"MakeConnectionsPermanent");
175 if ( connectionsPermanent > 0 ) {
177 cout <<
"Making all database connections permanent" << endl;
182 cout <<
"Forcing all connections, including ASCII DB, to be temporary" << endl;
190 int OrderContextQuery = 0;
191 if ( reg.
Get(
"OrderContextQuery",OrderContextQuery) ) {
193 if ( OrderContextQuery ) {
195 cout <<
"Forcing ordering of all context queries" << endl;
201 const char* knownKeys[] = {
"Level2Cache",
204 int numKnownKeys =
sizeof(knownKeys)/
sizeof(
char*);
205 bool hasUnknownKeys =
false;
208 while (
const char* foundKey = keyItr() ) {
209 bool keyUnknown =
true;
210 for (
int keyNum = 0; keyNum < numKnownKeys; ++keyNum ) {
211 if ( ! strcmp(foundKey,knownKeys[keyNum]) ) { keyUnknown =
false; }
215 cout <<
"Illegal registry item: " << foundKey << endl;
216 hasUnknownKeys =
true;
220 if ( hasUnknownKeys ) {
221 cout <<
"Aborting due to illegal registry items." << endl;
228 (
const std::string& tableNameReq,
233 std::string tableName = tableNameReq;
234 std::string vldSuffix =
"Validity";
239 std::string proxyName = tableName;
241 proxyName.append(
"::");
242 proxyName.append(tableRow->ClassName());
279 for ( std::map<std::string,FairDbTableProxy*>::iterator itr =
fTPmap.begin();
292 std::map<std::string,FairDbTableProxy*>::iterator itr =
fTPmap.begin();
293 std::map<std::string,FairDbTableProxy*>::iterator itrEnd =
fTPmap.end();
294 for ( ; itr != itrEnd; ++itr) {
303 const char* strENV_DBI = gSystem->Getenv(
"ENV_DB");
304 if ( strENV_DBI == 0 || strlen(strENV_DBI) == 0 ) {
return; }
306 cout <<
"\nConfiguring from the environmental "
307 <<
"variable ENV_DB:-\n " << strENV_DBI << endl;
308 std::vector<std::string> configRequests;
311 for (
unsigned entry = 0; entry < configRequests.size(); ++entry ) {
312 this->
Set(configRequests[entry].c_str());
327 cout <<
"\n\nCache statistics:-\n\n"
329 <<
" Current Maximum Total Total\n"
331 <<
" Size Size Adopted Reused" << endl;
335 for ( std::map<std::string,FairDbTableProxy*>::const_iterator itr =
fTPmap.begin();
339 std::string
name = (*itr).first;
340 if ( name.size() < 40 ) { name.append(40-name.size(),
' '); }
346 cout <<
"\n" << endl;