26 #include "FairDbResPtr.tpl"
29 #include "FairDbWriter.tpl"
44 fLogTableName(tableName),
48 fLogSeqNoMin(logSeqNoMin),
49 fLogSeqNoMax(logSeqNoMax),
50 fLogNumSeqNo(logNumSeqNo),
52 fUserName(
"unknown user"),
53 fProcessName(gProgName),
54 fHostName(gSystem->HostName()),
67 const char* userName = gSystem->Getenv(
"USER");
68 if ( ! userName ) { userName = gSystem->Getenv(
"USERNAME"); }
69 if ( ! userName ) { userName = gSystem->Getenv(
"LOGNAME"); }
93 <<
" Task: " << logEntry.
GetTask()
99 <<
"\n Reason for update:-\n " << logEntry.
GetReason() << endl;
128 const string& reason,
140 && ( task == 0 || task ==
fLogTask )
145 if ( reason !=
"" ) { this->
SetReason(reason); }
174 ifstream reasonFile(fileName.c_str());
175 if ( ! reasonFile.is_open() ) {
176 cout <<
"Cannot read \"Reason File\" " << fileName << endl;
179 while ( ! reasonFile.eof() ) {
181 if ( line.substr(0,11) ==
"FIXUP-FILE:"
182 || line.substr(0,10) ==
"BROADCAST:" ) {
198 TUrl url(urlStr.c_str());
225 if ( logSeqNo > 0 ) {
236 cout <<
"Cannot write LogEntry - no reason and/or no SEQNOs defined "
242 cout <<
"Cannot write LogEntry - attempting to switch from database"
243 <<
fDbNo <<
" to " << dbNo << endl;
257 cout <<
"Cannot get sequence number for table DBILOGENTRY" << endl;