Changeset 9041
- Timestamp:
- 07/25/08 15:17:20 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9039 r9041 19 19 -*-*- END OF LINE -*-*- 20 20 21 2008/07/25 Thomas Bretz 22 23 * mbase/MStatusDisplay.cc: 24 - expand path name for csv files 25 26 * mfileio/MReadFiles.cc: 27 - print a warning if no file was added 28 29 * mfileio/MReadTree.cc: 30 - updated warning if no file was added 31 32 * mfileio/MReadScanFile.[h,cc]: 33 - for safety add a postprocessing removing the contents 34 from the list 35 - also removing the contents from the list before filling 36 37 * mhbase/MH3.cc: 38 - fixed an output 39 40 * mtools/MTFillMatrix.[h,cc]: 41 - added a maximum number the eventloop is running over 42 43 44 21 45 2008/07/23 Thomas Bretz 22 46 … … 51 75 - added a second InsertUpdate 52 76 - added ExistRow 77 78 * datacenter/scripts/runcallisto: 79 - adapted to all other changes 80 - removed merpping of caco-files 53 81 54 82 -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r9039 r9041 2950 2950 return kFALSE; 2951 2951 2952 gSystem->ExpandPathName(name); 2953 2952 2954 ofstream fout(name); 2953 2955 if (!fout) -
trunk/MagicSoft/Mars/mfileio/MReadFiles.cc
r9032 r9041 260 260 *fLog << inf2 << num << " files added to list." << endl; 261 261 262 if (num==0) 263 *fLog << warn << "WARNING - No files found at " << txt << endl; 264 262 265 return num; 263 266 } -
trunk/MagicSoft/Mars/mfileio/MReadScanFile.cc
r9029 r9041 177 177 Bool_t MReadScanFile::AnalyzeHeader(MParList &plist) 178 178 { 179 fList.Clear("nodelete"); 180 179 181 fLength = -1; 180 182 if (!ReadDelimiter()) … … 191 193 } 192 194 */ 195 193 196 TObjArray *arr = line.Tokenize('*'); 194 197 … … 215 218 } 216 219 220 Int_t MReadScanFile::PostProcess() 221 { 222 fList.Clear("nodelete"); 223 return kTRUE; 224 } 225 217 226 UInt_t MReadScanFile::GetEntries() 218 227 { -
trunk/MagicSoft/Mars/mfileio/MReadScanFile.h
r9029 r9041 21 21 Bool_t ReadHeader(); 22 22 Int_t ReadEvent(); 23 Int_t PostProcess(); 23 24 24 25 public: -
trunk/MagicSoft/Mars/mfileio/MReadTree.cc
r9036 r9041 295 295 Bool_t MReadTree::Notify() 296 296 { 297 cout << "--notify1--" << endl; 298 297 299 // 298 300 // Do a consistency check for all branches … … 300 302 if (!CheckBranchSize()) 301 303 return kFALSE; 304 305 cout << "--notify2--" << endl; 302 306 303 307 *fLog << inf << GetDescriptor() << ": Next file #" << GetFileIndex(); … … 342 346 } 343 347 348 cout << "--done--" << endl; 349 344 350 return kTRUE; 345 351 } … … 390 396 } 391 397 else 392 *fLog << warn << "WARNING: '" << newname << "' not added to " << GetDescriptor()<< endl;398 *fLog << warn << GetDescriptor() << ": WARNING - No files found at " << newname << endl; 393 399 394 400 return numfiles; … … 994 1000 995 1001 if (fChain) 1002 { 1003 // cout << "LE: " << (int)fChain->GetLastError() << endl; 1004 996 1005 switch (fChain->GetLastError()) 997 1006 { 998 1007 case MChain::kFatalError: 999 1008 *fLog << err << GetDescriptor() << " - ERROR: Notify() failed." << endl; 1000 return k ERROR;1009 return kTRUE; 1001 1010 case MChain::kCannotAccessFile: 1002 1011 *fLog << err << GetDescriptor() << " - ERROR: TChain::LoadTree is unable to access requested file." << endl; … … 1010 1019 return kTRUE; 1011 1020 } 1021 } 1012 1022 1013 1023 return rc; … … 1180 1190 // -------------------------------------------------------------------------- 1181 1191 // 1182 // This schedules a TObject which Notify( 9function is called in case1192 // This schedules a TObject which Notify() function is called in case 1183 1193 // of MReadTree (TChain) switches from one file in the chain to another 1184 1194 // one. -
trunk/MagicSoft/Mars/mhbase/MH3.cc
r8936 r9041 580 580 if (!binsx) 581 581 { 582 *fLog << err << dbginf << "Neither '" << bx << "' nor '" << binsx <<fName << "' found... aborting." << endl;582 *fLog << err << dbginf << "Neither '" << bx << "' nor '" << fName << "' found... aborting." << endl; 583 583 return kFALSE; 584 584 } -
trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc
r8907 r9041 76 76 // fill.WriteMatrices("myfile.root"); 77 77 // 78 // 79 // Task List execution 80 // ---------------------------------------------- 81 // 82 // The tasklist is excuted in the follwowing order: 83 // - fReader set by SetReader 84 // - fPreTasks in the order as set with the SetPreTask functions 85 // - fPreCuts in the order as set with the SetPreCut functions 86 // - Selection the event selection 87 // - fPostTasks in the order as set with the SetPostTask functions 88 // - Fill Matrix 89 // - Write output 90 // 78 91 ///////////////////////////////////////////////////////////////////////////// 79 92 #include "MTFillMatrix.h" … … 163 176 MTFillMatrix::MTFillMatrix(const char *name, const char *title) 164 177 : fReference(0), fReader(0), fDestMatrix1(0), fDestMatrix2(0), 165 fNumDestEvents1(0), fNumDestEvents2(0), fWriteFile1(0), fWriteFile2(0) 178 fNumDestEvents1(0), fNumDestEvents2(0), fNumMaxEvents(0), 179 fWriteFile1(0), fWriteFile2(0) 166 180 { 167 181 Init(name, title); … … 180 194 MTFillMatrix::MTFillMatrix(const MH3 *ref, const char *name, const char *title) 181 195 : fReference(0), fReader(0), fDestMatrix1(0), fDestMatrix2(0), 182 fNumDestEvents1(0), fNumDestEvents2(0), fWriteFile1(0), fWriteFile2(0) 196 fNumDestEvents1(0), fNumDestEvents2(0), fNumMaxEvents(0), 197 fWriteFile1(0), fWriteFile2(0) 183 198 { 184 199 Init(name, title); … … 413 428 evtloop.SetLogStream(fLog); 414 429 415 const Bool_t rc = evtloop.Eventloop( );430 const Bool_t rc = evtloop.Eventloop(fNumMaxEvents); 416 431 417 432 if (selector) -
trunk/MagicSoft/Mars/mtools/MTFillMatrix.h
r8644 r9041 27 27 Int_t fNumDestEvents2; 28 28 29 Int_t fNumMaxEvents; 30 29 31 MTask *fWriteFile1; 30 32 MTask *fWriteFile2; … … 52 54 fDestMatrix1 = matrix; 53 55 if (num>0) 54 fNumDestEvents1 = num;56 SetNumDestEvents1(num); 55 57 } 56 58 void SetWriteFile1(MTask *write, UInt_t num=0) … … 58 60 fWriteFile1 = write; 59 61 if (num>0) 60 fNumDestEvents1 = num; 61 } 62 void SetNumDestEvents1(UInt_t num) 63 { 64 fNumDestEvents1 = num; 62 SetNumDestEvents1(num); 65 63 } 66 64 void SetDestMatrix2(MHMatrix *matrix, UInt_t num=0) … … 68 66 fDestMatrix2 = matrix; 69 67 if (num>0) 70 fNumDestEvents2 = num;68 SetNumDestEvents2(num); 71 69 } 72 70 void SetWriteFile2(MTask *write, UInt_t num=0) … … 74 72 fWriteFile2 = write; 75 73 if (num>0) 76 fNumDestEvents2 = num;74 SetNumDestEvents2(num); 77 75 } 78 void SetNumDestEvents2(UInt_t num) 79 { 80 fNumDestEvents2 = num; 81 } 76 void SetNumDestEvents1(UInt_t num) { fNumDestEvents1 = num; } 77 void SetNumDestEvents2(UInt_t num) { fNumDestEvents2 = num; } 78 void SetMaxEvents(UInt_t num) { fNumMaxEvents = num; } 82 79 83 80 void SetReader(MRead *task) { fReader = task; }
Note:
See TracChangeset
for help on using the changeset viewer.