Changeset 1080
- Timestamp:
- 11/15/01 11:07:21 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MArray.cc
r858 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MArrayB.cc
r858 r1080 1 1 /* ======================================================================== *\ 2 ! 3 ! * 4 ! * This file is part of MARS, the MAGIC Analysis and Reconstruction 5 ! * Software. It is distributed to you in the hope that it can be a useful 6 ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. 7 ! * It is distributed WITHOUT ANY WARRANTY. 8 ! * 9 ! * Permission to use, copy, modify and distribute this software and its 10 ! * documentation for any purpose is hereby granted without fee, 11 ! * provided that the above copyright notice appear in all copies and 12 ! * that both that copyright notice and this permission notice appear 13 ! * in supporting documentation. It is provided "as is" without express 14 ! * or implied warranty. 15 ! * 2 16 ! 3 17 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de) -
trunk/MagicSoft/Mars/mbase/MArrayS.cc
r858 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MClone.cc
r1003 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 07/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 07/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 92 92 Init(name, title); 93 93 94 fObject = obj; 94 fObject = obj; 95 fObjName = obj->GetName(); 95 96 } 96 97 … … 127 128 // If it couldn't get found stop Eventloop 128 129 // 129 *fLog << dbginf << fObjName << " not found... aborting." << endl;130 *fLog << err << dbginf << fObjName << " not found... aborting." << endl; 130 131 return kFALSE; 131 132 } -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r1048 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 114 114 if (!fParList) 115 115 { 116 *fLog << dbginf << "Parlist not initialized." << endl;116 *fLog << err << dbginf << "Parlist not initialized." << endl; 117 117 return kFALSE; 118 118 } … … 125 125 if (!fTaskList) 126 126 { 127 *fLog << dbginf << "Cannot find tasklist '" << tlist << "' in parameter list." << endl;127 *fLog << err << dbginf << "Cannot find tasklist '" << tlist << "' in parameter list." << endl; 128 128 return kFALSE; 129 129 } … … 139 139 if (!fTaskList->PreProcess(fParList)) 140 140 { 141 *fLog << "Error detected while PreProcessing" << endl;141 *fLog << err << "Error detected while PreProcessing" << endl; 142 142 return kFALSE; 143 143 } … … 159 159 // each event 160 160 // 161 *fLog << "Eventloop running (";161 *fLog << all <<"Eventloop running ("; 162 162 163 163 if (maxcnt<0) … … 201 201 fProgress->SetPosition(maxcnt - dummy); 202 202 gSystem->ProcessEvents(); 203 204 // gClient->ProcessEventsFor(fProgress); 205 // 206 // root 3.02: 207 // * gui/: inc/TGClient.h, src/TGClient.cxx: 208 // new method ProcessEventsFor(TGWindow *w). Use this method to instead 209 // of TSystem::ProcessEvents() in case you want to allow on events for 210 // the specified TGWindow to be processed (like when this is a progress 211 // meter dialog). 203 212 } 204 213 else … … 210 219 clock.Stop(); 211 220 212 *fLog << "Ready!" << endl << endl;221 *fLog << all << "Ready!" << endl << endl; 213 222 214 223 clock.Print(); -
trunk/MagicSoft/Mars/mbase/MFilter.cc
r961 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 07/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 07/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MFilterList.cc
r986 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 07/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 07/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 147 147 if (fFilters.FindObject(filter)) 148 148 { 149 *fLog << dbginf << "Filter already existing." << endl;149 *fLog << warn << dbginf << "Filter already existing... skipped." << endl; 150 150 return kTRUE; 151 151 } … … 153 153 if (fFilters.FindObject(name)) 154 154 { 155 *fLog << dbginf << "'" << name << "' exists in List already." << endl;156 return kTRUE; 157 } 158 159 *fLog << "Adding " << name << " to " << GetName() << "... " << flush;155 *fLog << warn << dbginf << "'" << name << "' exists in List already... skipped." << endl; 156 return kTRUE; 157 } 158 159 *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush; 160 160 161 161 fFilters.Add(filter); … … 237 237 const Bool_t verbose = str.Contains("V", TString::kIgnoreCase); 238 238 239 *fLog << "(";239 *fLog << all << "("; 240 240 241 241 TIter Next(&fFilters); -
trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 11/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 11/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MGList.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 11/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 11/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MGTask.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 11/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 11/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 36 36 37 37 #include "MLog.h" 38 #include "MLogManip.h" 39 38 40 #include "MGGroupFrame.h" 39 41 … … 104 106 { 105 107 fLog->setf(ios::showbase); 106 *fLog << "Task " << GetDescriptor() << " received gui msg " << hex;108 *fLog << all << "Task " << GetDescriptor() << " received gui msg " << hex; 107 109 *fLog << msg << " " << submsg << " " << param1 << " " << param2 << endl; 108 110 return kTRUE; … … 144 146 if (fFrame) 145 147 { 146 *fLog << GetDescriptor() << ":Gui already created... skipped." << endl;148 *fLog << warn << GetDescriptor() << " Gui already created... skipped." << endl; 147 149 return; 148 150 } … … 162 164 if (method->GetClass() == MGTask::Class()) 163 165 { 164 *fLog << "Sorry, " << GetDescriptor();166 *fLog << warn << "Sorry, " << GetDescriptor(); 165 167 *fLog << " doesn't override CreateGuiElements." << endl; 166 168 return; -
trunk/MagicSoft/Mars/mbase/MGTask.h
r1076 r1080 43 43 virtual Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2); 44 44 45 void CreateGui(TGCompositeFrame *f, TGLayoutHints *layout );45 void CreateGui(TGCompositeFrame *f, TGLayoutHints *layout=NULL); 46 46 47 47 ClassDef(MGTask, 0) //Abstract base class for a task -
trunk/MagicSoft/Mars/mbase/MInputStreamID.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MLog.cc
r998 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 188 188 int MLog::overflow(int i) // i=EOF means not a real overflow 189 189 { 190 if (fOutputLevel >= fDebugLevel) 190 // 191 // no output if 192 // 193 if (fOutputLevel > fDebugLevel) 191 194 return 0; 192 195 -
trunk/MagicSoft/Mars/mbase/MLogManip.cc
r749 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MLogManip.h
r1020 r1080 54 54 #ifndef __CINT__ 55 55 #define dbginf __FILE__ << " l." << dec << __LINE__ << ": " 56 #define all debug(0) 57 #define err debug(1) 58 #define warn debug(2) 59 #define inf debug(3) 56 60 #endif 57 61 // -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 42 42 43 43 #include "MLog.h" 44 #include "MLogManip.h" 44 45 45 46 ClassImp(MParContainer); … … 137 138 { 138 139 TROOT::IndentLevel(); 139 *fLog << "OBJ: " << GetDescriptor() << ": " << GetTitle() << ", "140 140 *fLog << all << GetDescriptor() << " " << GetTitle() << ": kCanDelete="; 141 *fLog << Int_t(TestBit(kCanDelete)) << endl; 141 142 } 142 143 … … 147 148 void MParContainer::Print(Option_t *) const 148 149 { 149 *fLog << "OBJ: " << GetDescriptor() << ":" << GetTitle() << endl;150 *fLog << all << GetDescriptor() << " " << GetTitle() << endl; 150 151 } 151 152 … … 196 197 } 197 198 199 // -------------------------------------------------------------------------- 200 // 201 // If you want to use Ascii-Input/-Output (eg. MWriteAsciiFile) of a 202 // container, overload this function. 203 // 198 204 void MParContainer::AsciiRead(ifstream &fin) 199 205 { 200 *fLog << "To use the the ascii input of " << GetName();206 *fLog << warn << "To use the the ascii input of " << GetName(); 201 207 *fLog << " you have to overload " << ClassName() << "::AsciiRead." << endl; 202 208 } 203 209 210 // -------------------------------------------------------------------------- 211 // 212 // If you want to use Ascii-Input/-Output (eg. MWriteAsciiFile) of a 213 // container, overload this function. 214 // 204 215 void MParContainer::AsciiWrite(ofstream &fout) const 205 216 { 206 *fLog << "To use the the ascii output of " << GetName();217 *fLog << warn << "To use the the ascii output of " << GetName(); 207 218 *fLog << " you have to overload " << ClassName() << "::AsciiWrite." << endl; 208 219 } -
trunk/MagicSoft/Mars/mbase/MParList.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 160 160 if (objt || objn==cont) 161 161 { 162 *fLog << dbginf << "Warning: Container '" << cont->GetName() << ", 0x" << (void*)cont;162 *fLog << warn << dbginf << "Warning: Container '" << cont->GetName() << ", 0x" << (void*)cont; 163 163 *fLog << "' already existing in '" << GetName() << "'... ignoring." << endl; 164 164 return kTRUE; … … 168 168 // Otherwise add it to the list, but print a warning message 169 169 // 170 *fLog << dbginf << "Warning: Container with the same name '" << cont->GetName();170 *fLog << warn << dbginf << "Warning: Container with the same name '" << cont->GetName(); 171 171 *fLog << "' already existing in '" << GetName() << "'." << endl; 172 172 *fLog << "You may not be able to get a pointer to container task by name." << endl; … … 186 186 } 187 187 188 *fLog << "Adding " << name << " to " << GetName() << "... " << flush;188 *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush; 189 189 190 190 fContainer->Add(cont); … … 328 328 // if object is not existing in the list try to create one 329 329 // 330 *fLog << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl;330 *fLog << inf << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl; 331 331 332 332 // … … 340 340 // if class is not existing in the root environment 341 341 // 342 *fLog << dbginf << "Class '" << cname << "' not existing in dictionary." << endl;342 *fLog << err << dbginf << "Class '" << cname << "' not existing in dictionary." << endl; 343 343 return NULL; 344 344 } … … 378 378 void MParList::Print(Option_t *t) const 379 379 { 380 *fLog << dbginf << "ParList: " << GetName() << " <" << GetTitle() << ">" << endl; 380 *fLog << all << GetDescriptor() << endl; 381 *fLog << setfill('-') << setw(strlen(GetDescriptor())+2) << "" << endl; 382 MParContainer *obj = NULL; 383 TIter Next(fContainer); 384 while ((obj=(MParContainer*)Next())) 385 *fLog << " " << obj->GetDescriptor() << endl; 381 386 *fLog << endl; 382 387 } … … 416 421 if (first>0 && last<first) 417 422 { 418 *fLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;423 *fLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl; 419 424 return list; 420 425 } … … 462 467 if (first>0 && last<first) 463 468 { 464 *fLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;469 *fLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl; 465 470 return list; 466 471 } … … 513 518 if (first>0 && last<first) 514 519 { 515 gLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;520 gLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl; 516 521 return list; 517 522 } -
trunk/MagicSoft/Mars/mbase/MPrint.cc
r1003 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 10/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 10/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 91 91 SetOption(option); 92 92 93 fObject = obj; 93 fObject = obj; 94 fObjName = obj->GetName(); 94 95 } 95 96 … … 117 118 // If it couldn't get found stop Eventloop 118 119 // 119 *fLog << dbginf << fObjName << " not found... aborting." << endl;120 *fLog << err << dbginf << fObjName << " not found... aborting." << endl; 120 121 return kFALSE; 121 122 } -
trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc
r1036 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 37 37 38 38 #include "MLog.h" 39 #include "MLogManip.h" 39 40 40 41 ClassImp(MReadMarsFile); … … 101 102 return kTRUE; 102 103 103 *fLog << "MReadMarsFile: Switching to next file '" << GetFileName() << "' ";104 *fLog << inf << "MReadMarsFile: Switching to next file '" << GetFileName() << "' "; 104 105 *fLog << "(before Event #" << GetEventNum()-1 << ")" << endl; 105 106 fRun->Process(); -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r1051 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 63 63 64 64 #include "MTime.h" 65 #include "MFilter.h" 65 66 #include "MParList.h" 66 67 #include "MTaskList.h" … … 86 87 fTitle = title ? title : "Task to loop over all events in one single tree"; 87 88 88 fVetoList = new T OrdCollection;89 fVetoList = new TList; 89 90 fVetoList->SetOwner(); 90 91 91 fNotify = new T OrdCollection;92 fNotify = new TList; 92 93 93 94 // … … 96 97 fChain = new TChain(tname); 97 98 fChain->SetNotify(this); 99 100 // root 3.02: 101 // In TChain::Addfile remove the limitation that the file name must contain 102 // the string ".root". ".root" is necessary only in case one wants to specify 103 // a Tree in a subdirectory of a Root file with eg, the format: 98 104 99 105 if (fname) … … 183 189 return; 184 190 185 *fLog << "Branch choosing method enabled (only enabled branches are read)." << endl;191 *fLog << inf << "Branch choosing method enabled (only enabled branches are read)." << endl; 186 192 fChain->SetBranchStatus("*", kFALSE); 187 193 fBranchChoosing = kTRUE; … … 223 229 // 224 230 fChain->SetBranchStatus(name, status); 225 *fLog << (status ? "Enabled" : "Disabled");231 *fLog << inf << (status ? "Enabled" : "Disabled"); 226 232 *fLog << " subbranch '" << name << "'." << endl; 227 233 } … … 231 237 // Set the status of all branches in the list to status. 232 238 // 233 void MReadTree::SetBranchStatus(const T OrdCollection*list, Bool_t status)239 void MReadTree::SetBranchStatus(const TList *list, Bool_t status) 234 240 { 235 241 // … … 247 253 // This is the implementation of the Auto Enabling Scheme. 248 254 // For more information see MTask::AddBranchToList. 249 // This function loops over all tasks in the tasklist and enables 250 // all branches which are requested by the tasks. 251 // 252 // To enable 'unknown' branches which are not in the Branchlist of 255 // This function loops over all tasks and its filters in the tasklist 256 // and enables all branches which are requested by the tasks and its 257 // filters. 258 // 259 // To enable 'unknown' branches which are not in the branchlist of 253 260 // the tasks you can call EnableBranch 254 261 // … … 267 274 if (!tlist) 268 275 { 269 *fLog << "Cannot use auto enabeling scheme for branches. 'MTaskList' not found." << endl;276 *fLog << warn << "Cannot use auto enabeling scheme for branches. 'MTaskList' not found." << endl; 270 277 return; 271 278 } 272 279 273 280 // 274 // Loop over all tasks i n the task list.281 // Loop over all tasks iand its filters n the task list. 275 282 // 276 283 MTask *task; 277 284 TIter NextTask(tlist->GetList()); 278 285 while ((task=(MTask*)NextTask())) 286 { 279 287 SetBranchStatus(task->GetListOfBranches(), kTRUE); 288 const MFilter *filter = task->GetFilter(); 289 290 if (filter) 291 SetBranchStatus(filter->GetListOfBranches(), kTRUE); 292 293 } 280 294 } 281 295 … … 317 331 if (!fNumEntries) 318 332 { 319 *fLog << dbginf << "No entries found in file(s)." << endl;333 *fLog << warn << dbginf << "No entries found in file(s)." << endl; 320 334 return kFALSE; 321 335 } … … 324 338 // output logging information 325 339 // 326 *fLog << fNumEntries << " entries found in file(s)." << endl;340 *fLog << inf << fNumEntries << " entries found in file(s)." << endl; 327 341 328 342 // … … 354 368 if (fVetoList->FindObject(oname)) 355 369 { 356 *fLog << "Master branch " << bname << " has veto... skipped." << endl;370 *fLog << inf << "Master branch " << bname << " has veto... skipped." << endl; 357 371 DisableSubBranches(branch); 358 372 continue; … … 377 391 // we cannot proceed reading this branch 378 392 // 379 *fLog << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;393 *fLog << warn << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl; 380 394 DisableSubBranches(branch); 381 395 continue; … … 387 401 // 388 402 fChain->SetBranchAddress(bname, pcont); 389 *fLog << "Master branch address " << bname << " setup for reading." << endl;403 *fLog << inf << "Master branch address " << bname << " setup for reading." << endl; 390 404 391 405 //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl; … … 395 409 } 396 410 397 *fLog << "MReadTree setup " << num << " master branches addresses." << endl;411 *fLog << inf << "MReadTree setup " << num << " master branches addresses." << endl; 398 412 399 413 // … … 410 424 411 425 return kTRUE; 426 } 427 428 // -------------------------------------------------------------------------- 429 // 430 // Set the ready to save flag of all containers which branchaddresses are 431 // set for. This is necessary to copy data. 432 // 433 void MReadTree::SetReadyToSave(Bool_t flag) 434 { 435 TIter Next(fChain->GetStatus()); 436 437 TChainElement *element = NULL; 438 while ((element=(TChainElement*)Next())) 439 { 440 // 441 // Check whether the branch is enabled 442 // 443 if (!element->GetStatus()) 444 continue; 445 446 // 447 // Get the pointer to the pointer of the corresponding container 448 // 449 MParContainer **pcont = (MParContainer**)element->GetBaddress(); 450 451 // 452 // Check whether the pointer is not NULL 453 // 454 if (!pcont || !*pcont) 455 continue; 456 457 // 458 // Set the ready to save status of the container. 459 // 460 (*pcont)->SetReadyToSave(flag); 461 } 462 463 // 464 // Set the ready to save status of this task (used?), too 465 // 466 MTask::SetReadyToSave(flag); 412 467 } 413 468 … … 421 476 Bool_t MReadTree::Process() 422 477 { 478 SetReadyToSave(); 423 479 return fChain->GetEntry(fNumEntry++) != 0; 424 480 } … … 430 486 Bool_t MReadTree::GetEvent() 431 487 { 488 SetReadyToSave(); 432 489 return fChain->GetEntry(fNumEntry) != 0; 433 490 } … … 442 499 if (fNumEntry-dec >= fNumEntries) 443 500 { 444 *fLog << "MReadTree::DecEventNum: WARNING - Event " << fNumEntry << "-";501 *fLog << warn << "MReadTree::DecEventNum: WARNING - Event " << fNumEntry << "-"; 445 502 *fLog << dec << "=" << (Int_t)fNumEntry-dec << " out of Range." << endl; 446 503 return kFALSE; … … 460 517 if (fNumEntry+inc >= fNumEntries) 461 518 { 462 *fLog << "MReadTree::IncEventNum: WARNING - Event " << fNumEntry << "+";519 *fLog << warn << "MReadTree::IncEventNum: WARNING - Event " << fNumEntry << "+"; 463 520 *fLog << inc << "=" << (Int_t)fNumEntry+inc << " out of Range." << endl; 464 521 return kFALSE; … … 480 537 if (nr >= fNumEntries) 481 538 { 482 *fLog << "MReadTree::SetEventNum: WARNING - " << nr << " out of Range." << endl;539 *fLog << warn << "MReadTree::SetEventNum: WARNING - " << nr << " out of Range." << endl; 483 540 return kFALSE; 484 541 } … … 522 579 fNotify->Add(obj); 523 580 } 581 582 void MReadTree::Print(Option_t *o) const 583 { 584 *fLog << all << GetDescriptor() << dec << endl; 585 *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl; 586 *fLog << " Files:" << endl; 587 588 int i = 0; 589 TIter Next(fChain->GetListOfFiles()); 590 TObject *obj = NULL; 591 while ((obj=Next())) 592 *fLog << " " << i++ << ") " << obj->GetName() << endl; 593 594 *fLog << " Entries: " << fNumEntries << endl; 595 *fLog << " Next Entry: " << fNumEntry << endl; 596 } -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 43 43 // from the list. // 44 44 // // 45 // Warning: // 46 // Be carefull if you are writing your tasklist // 47 // (eg. MWriteRootFile("file.root", "MTaskList")) to a file. You may // 48 // not be able to initialize a new working tasklist from a file if // 49 // a) Two Paramerer containers with the same names are existing in the // 50 // MParList. // 51 // b) You used a container somewhere which is not part of MParList. // 52 // (eg. You specified a pointer to a MH container in MFillH which is // 53 // not added to the parameter list. // 54 // // 45 55 ///////////////////////////////////////////////////////////////////////////// 46 56 … … 68 78 fTitle = title ? title : "A list for tasks to be executed"; 69 79 70 fTasks = new T OrdCollection;80 fTasks = new TList; //OrdCollection; 71 81 } 72 82 … … 151 161 if (objt || objn==task) 152 162 { 153 *fLog << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task;163 *fLog << warn << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task; 154 164 *fLog << "' already existing in '" << GetName() << "'... ignoring." << endl; 155 165 return kTRUE; … … 159 169 // Otherwise add it to the list, but print a warning message 160 170 // 161 *fLog << dbginf << "Warning: Task '" << task->GetName();171 *fLog << warn << dbginf << "Warning: Task '" << task->GetName(); 162 172 *fLog << "' already existing in '" << GetName() << "'." << endl; 163 173 *fLog << "You may not be able to get a pointer to this task by name." << endl; … … 168 178 if (!fTasks->FindObject(where)) 169 179 { 170 *fLog << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl;180 *fLog << err << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl; 171 181 return kFALSE; 172 182 } 173 183 } 174 184 175 *fLog << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;185 *fLog << inf << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush; 176 186 177 187 task->SetStreamId(type); … … 208 218 Bool_t MTaskList::PreProcess(MParList *pList) 209 219 { 210 *fLog << "Preprocessing... " << flush;220 *fLog << all << "Preprocessing... " << flush; 211 221 212 222 fParList = pList; … … 224 234 while ((task=(MTask*)Next())) 225 235 { 226 *fLog << task->GetName() << "... " << flush;236 *fLog << all << task->GetName() << "... " << flush; 227 237 228 238 if (!task->CallPreProcess(fParList)) … … 297 307 298 308 default: 299 *fLog << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl;309 *fLog << warn << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl; 300 310 } 301 311 } … … 310 320 Bool_t MTaskList::PostProcess() 311 321 { 312 *fLog << "Postprocessing... " << flush;322 *fLog << all << "Postprocessing... " << flush; 313 323 314 324 // … … 338 348 return kFALSE; 339 349 340 *fLog << task->GetName() << "... " << flush;341 } 342 343 *fLog << endl;350 *fLog << all << task->GetName() << "... " << flush; 351 } 352 353 *fLog << all << endl; 344 354 345 355 return kTRUE; … … 357 367 if (lvl==0) 358 368 { 359 *fLog << endl;369 *fLog << all << endl; 360 370 *fLog << "Execution Statistics: " << endl; 361 371 *fLog << "---------------------" << endl; … … 379 389 void MTaskList::Print(Option_t *t) const 380 390 { 381 *fLog << GetDescriptor() << " <" << GetTitle() << ">" << endl; 391 *fLog << all << endl; 392 *fLog << GetDescriptor() << endl; 393 *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl; 382 394 383 395 fTasks->Print(); -
trunk/MagicSoft/Mars/mbase/MTime.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
r1050 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 06/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 06/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 142 142 return kTRUE; 143 143 144 *fLog << dbginf << "Cannot find parameter container '" << fContainer << "'." << endl;144 *fLog << err << dbginf << "Cannot find parameter container '" << fContainer << "'." << endl; 145 145 return kFALSE; 146 146 } -
trunk/MagicSoft/Mars/mbase/MWriteFile.cc
r858 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 06/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 06/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 62 62 if (!IsFileOpen()) 63 63 { 64 *fLog << dbginf << "Cannot open file '" << GetFileName() << "'" << endl;64 *fLog << err << dbginf << "Cannot open file '" << GetFileName() << "'" << endl; 65 65 return kFALSE; 66 66 } 67 67 68 *fLog << "File '" << GetFileName() << "' open for writing." << endl;68 *fLog << inf << "File '" << GetFileName() << "' open for writing." << endl; 69 69 70 70 // -
trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
r1076 r1080 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 06/2001 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 06/2001 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 31 31 // To understand how it works, see base class MWriteFile // 32 32 // // 33 // Warning: Checkout the Warning in MTaskList. // 34 // // 33 35 ///////////////////////////////////////////////////////////////////////////// 34 36 … … 116 118 void MWriteRootFile::Print(Option_t *) const 117 119 { 118 cout << "File: " << GetFileName() << dec<< endl;119 cout << "--------------------------------------------------" << endl;120 cout << all << " File: " << GetFileName() << endl; 121 cout << setfill('-') << setw(strlen(GetFileName())+8) << "" << endl; 120 122 121 123 TTree *t;
Note:
See TracChangeset
for help on using the changeset viewer.