00001 00002 // 00003 // IoDummyStreamItr 00004 // 00005 // Dummy data stream to allow job control cycling with no input data 00006 // stream. 00007 // 00008 // Author: S. Kasahara 11/05 00009 // 00011 00012 #include "IoModules/IoDummyStreamItr.h" 00013 #include "MessageService/MsgService.h" 00014 00015 CVSID("$Id: IoDummyStreamItr.cxx,v 1.2 2006/03/05 18:17:21 rhatcher Exp $"); 00016 00017 //...................................................................... 00018 IoDummyStreamItr::IoDummyStreamItr() : fIsValid(true) { 00019 //====================================================================== 00020 // Default constructor 00021 //====================================================================== 00022 00023 return; 00024 } 00025 00026 //...................................................................... 00027 00028 IoDummyStreamItr::~IoDummyStreamItr() { 00029 //====================================================================== 00030 // Destructor 00031 //====================================================================== 00032 00033 } 00034 00035 //...................................................................... 00036 00037 int IoDummyStreamItr::LoadRecords(MomNavigator* /* m */) { 00038 //====================================================================== 00039 // Returns number of records loaded. 00040 //====================================================================== 00041 int nrecord = 0; 00042 return nrecord; 00043 } 00044 00045 //...................................................................... 00046 00047 int IoDummyStreamItr::Increment(int n, MomNavigator* /* m */) { 00048 //====================================================================== 00049 // Advance n record sets. Returns number of record sets advanced. 00050 //====================================================================== 00051 return n; 00052 } 00053 00054 //...................................................................... 00055 00056 int IoDummyStreamItr::Decrement(int n, MomNavigator* /* m */) { 00057 //====================================================================== 00058 // Rewind n record sets. Returns number of record sets rewound. 00059 //====================================================================== 00060 return n; 00061 } 00062 00063 //...................................................................... 00064 00065 JobCResult IoDummyStreamItr::GoTo(const VldContext& vld,MomNavigator* /* m */){ 00066 //====================================================================== 00067 // Go directly to a record with a specified validity context. 00068 //====================================================================== 00069 00070 MSG("Io",Msg::kWarning) << "IoDummy GoTo " << vld 00071 << " not supported. Ignored!" << endl; 00072 00073 return JobCResult::kAOK; // success 00074 } 00075 00076 //...................................................................... 00077 00078 int IoDummyStreamItr::GoToEOF() { 00079 //====================================================================== 00080 // Advance to the end of all files 00081 //====================================================================== 00082 MSG("Io",Msg::kWarning) << 00083 "IoDummy GoToEOF not supported. Ignored!" << endl; 00084 00085 return 1; 00086 } 00087 00088 //...................................................................... 00089 00090 int IoDummyStreamItr::DefineStream(const char* /* streamname */, 00091 const char* /* treename */) 00092 { 00093 //====================================================================== 00094 // Define stream with name streamname to serve tree of name treename. 00095 //====================================================================== 00096 00097 MSG("Io",Msg::kWarning) << 00098 "IoDummy DefineStream not supported. Ignored!" << endl; 00099 00100 return 1; 00101 } 00102 00103 //...................................................................... 00104 00105 int IoDummyStreamItr::Streams(const char* /* streams */) { 00106 //====================================================================== 00107 // Modify open streams to match those specified in streams. streams 00108 // is a delimiter separated list of streamnames. Returns number of 00109 // streams open. 00110 //====================================================================== 00111 00112 // MSG("Io",Msg::kWarning) << 00113 // "IoDummy Streams " << streams << " not supported. Ignored!" << endl; 00114 00115 return 0; 00116 } 00117 00118 //...................................................................... 00119 00120 int IoDummyStreamItr::Select(const char* /* stream */, 00121 const char* /* selection */,bool /* isRequired */){ 00122 //====================================================================== 00123 // Set the selection cuts for named stream. Returns 0 if stream not 00124 // open, else 1. 00125 //====================================================================== 00126 00127 MSG("Io",Msg::kWarning) << 00128 "IoDummy Select not supported. Ignored!" << endl; 00129 00130 return 0; 00131 00132 } 00133 00134 //...................................................................... 00135 00136 int IoDummyStreamItr::SetSequenceMode(const char* /* stream */, 00137 Per::ESequenceMode /* sequenceMode */) { 00138 //====================================================================== 00139 // Set the sequence mode for named stream. Returns 0 if stream not 00140 // open, else 1. 00141 //====================================================================== 00142 00143 MSG("Io",Msg::kWarning) << 00144 "IoDummy Select not supported. Ignored!" << endl; 00145 00146 return 0; 00147 00148 } 00149 00150 //...................................................................... 00151 00152 int IoDummyStreamItr::SetWindow(const char* /* stream */, 00153 double /* lower */, double /* upper */) { 00154 //====================================================================== 00155 //Set the window for named stream. Returns 0 if stream not open, else 1 00156 //====================================================================== 00157 00158 MSG("Io",Msg::kWarning) << 00159 "IoDummy Select not supported. Ignored!" << endl; 00160 00161 return 0; 00162 00163 } 00164 00165 //...................................................................... 00166 00167 void IoDummyStreamItr::AddFile(const char* /* fullfilepathname */,int /* at */, 00168 const char* /* streamlist */) { 00169 //====================================================================== 00170 // Purpose: Add file fullfilepathname to index position at in filelist 00171 // associated with the stream(s) in streamlist. 00172 //====================================================================== 00173 00174 MSG("Io",Msg::kWarning) << 00175 "IoDummy AddFile not supported. Ignored!" << endl; 00176 00177 return; 00178 00179 } 00180 00181 //...................................................................... 00182 00183 const char* IoDummyStreamItr::GetCurrentFile(const char* /* streamname */) 00184 const { 00185 //====================================================================== 00186 // Purpose: Return current file of specified stream. 00187 //====================================================================== 00188 00189 MSG("Io",Msg::kWarning) << 00190 "IoDummy GetCurrentFile not supported. Ignored!" << endl; 00191 return ""; 00192 00193 } 00194 00195 //...................................................................... 00196 00197 JobCResult IoDummyStreamItr::GoToFile( int /* n */, 00198 const char* /* streamlist */ ) { 00199 //====================================================================== 00200 // Purpose: GoToFile at position n in filelist of specified streams. 00201 //====================================================================== 00202 00203 MSG("Io",Msg::kWarning) << 00204 "IoDummy GoToFile not supported. Ignored!" << endl; 00205 00206 return JobCResult::kAOK; 00207 00208 } 00209 00210 //...................................................................... 00211 00212 JobCResult IoDummyStreamItr::GoToFile(const char* /* filename */, 00213 const char* /* streamlist */) { 00214 //====================================================================== 00215 // Purpose: GoToFile filename in filelist of specified streams. 00216 //====================================================================== 00217 00218 MSG("Io",Msg::kWarning) << 00219 "IoDummy GoToFile not supported. Ignored!" << endl; 00220 00221 return JobCResult::kAOK; 00222 } 00223 00224 //...................................................................... 00225 00226 JobCResult IoDummyStreamItr::NextFile(int /* n */, 00227 const char* /* streamlist */) { 00228 //====================================================================== 00229 // Purpose: Advance forward n files in filelist of specified stream(s). 00230 //====================================================================== 00231 00232 MSG("Io",Msg::kWarning) << 00233 "IoDummy NextFile not supported. Ignored!" << endl; 00234 00235 return JobCResult::kAOK; 00236 00237 } 00238 00239 //...................................................................... 00240 00241 JobCResult IoDummyStreamItr::PrevFile(int /* n */, 00242 const char* /* streamlist */) { 00243 //====================================================================== 00244 // Purpose: Rewind backward n files in filelist of specified stream(s). 00245 //====================================================================== 00246 00247 MSG("Io",Msg::kWarning) << 00248 "IoDummy PrevFile not supported. Ignored!" << endl; 00249 00250 return JobCResult::kAOK; 00251 00252 } 00253 00254 //...................................................................... 00255 00256 void IoDummyStreamItr::RemoveFile(const char* /* filename */, 00257 const char* /* streamlist */){ 00258 //====================================================================== 00259 // Purpose: Remove file filename from filelist associated with the 00260 // stream(s) in streamlist. 00261 //====================================================================== 00262 00263 // No managed files to remove. 00264 return; 00265 00266 } 00267 00268 //...................................................................... 00269 00270 std::ostream& IoDummyStreamItr::ListFile(std::ostream& os, 00271 const char* /* streamlist */) const { 00272 //====================================================================== 00273 // Purpose: List files in file list of specified stream(s). 00274 // 00275 // Arguments: os ostream to direct print. 00276 // streamlist Delimiter separated list of streams (e.g. 00277 // "DaqSnarl,DaqMonitor") on which to apply action. 00278 // If streamlist = "*" (default) => apply to all streams. 00279 // 00280 // Return: ostream reference. 00281 // 00282 // Contact: S. Kasahara 00283 //====================================================================== 00284 00285 os << "IoDummyStreamItr::ListFile: No input files." << endl; 00286 00287 return os; 00288 } 00289
1.3.9.1