Changeset 6500
- Timestamp:
- 02/15/05 18:44:43 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6496 r6500 40 40 41 41 42 42 43 2005/02/15 Thomas Bretz 43 44 … … 69 70 parameters 70 71 - added a flag to keep single core pixels 72 73 * manalysis/MMatrixLoop.[h,cc], mfileio/MReadReports.[h,cc], 74 mfileio/MReadRflFile.[h,cc], mfileio/MReadTree.[h,cc], 75 mraw/MRawFileRead.[h,cc], mraw/MRawSocketRead.h: 76 - renamed GetFileName to GetFullFileName 77 78 * mbase/MInputStreamID.h: 79 - added new member function HasStreamId 80 81 * mbase/MParContainer.[h,cc]: 82 - added a static list to keep track of all created 83 TMathodCall objects 84 85 * mbase/MTask.cc: 86 - enhanced PrintStatistics 87 88 * mfileio/MRead.[h,cc]: 89 - new abstract function GetFullFileName 90 - added implementatio of GetFileName based on GetFullFileName 91 92 * mfileio/MWriteRootFile.[h,cc]: 93 - moved open of a new file to new common member function 94 OpenFile 95 - allow to use an already existing file also when using rules 96 - added a new option which can be used to copy an existing 97 tree (without any change) from the old file into the new file. 98 (in principal you can also do this for some of its branches only) 99 This is done by AddCopySource 100 101 * mjobs/MJCalibrateSignal.cc: 102 - in case of MonteCarlo files write an independant tree 103 'MonteCarlo' for 'MMcEvtBasic' 104 105 * mjobs/MJStar.cc: 106 - copy tree 'MonteCarlo' from old into new files 71 107 72 108 -
trunk/MagicSoft/Mars/NEWS
r6252 r6500 78 78 (MFSupercuts) && (MHillas.fSize>100) 79 79 80 - fixed a lot of stuff to allow all programs to process MonteCarlo 81 camera files. 82 80 83 81 84 -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r6253 r6500 80 80 using namespace std; 81 81 82 TObjArray MParContainer::fgListMethodCall; 83 82 84 MParContainer::MParContainer(const char *name, const char *title) : 83 85 fName(name), fTitle(title), fLog(&gLog), fDisplay(NULL), fReadyToSave(kFALSE) 84 86 { 87 fgListMethodCall.SetOwner(); 85 88 } 86 89 … … 88 91 fName(name), fTitle(title), fLog(&gLog), fDisplay(NULL), fReadyToSave(kFALSE) 89 92 { 93 fgListMethodCall.SetOwner(); 90 94 } 91 95 … … 630 634 } 631 635 632 *fLog << warn<< "No standard access for '" << part1 << "' in ";636 *fLog << inf << "No standard access for '" << part1 << "' in "; 633 637 *fLog << GetDescriptor() << " or one of its base classes." << endl; 634 638 635 639 TMethodCall *call = NULL; 636 640 637 *fLog << warn <<"Trying to find MethodCall '" << ClassName();638 *fLog << "::Get" << part1 << "' instead <LEAKS MEMORY>" << endl;641 *fLog << "Trying to find MethodCall '" << ClassName(); 642 *fLog << "::Get" << part1 << "' instead..." << flush; 639 643 call = new TMethodCall(IsA(), (TString)"Get"+part1, ""); 640 644 if (call->GetMethod()) 645 { 646 fgListMethodCall.Add(call); 647 *fLog << "found." << endl; 641 648 return call; 649 } 650 *fLog << endl; 642 651 643 652 delete call; 644 653 645 *fLog << warn <<"Trying to find MethodCall '" << ClassName();646 *fLog << "::" << part1 << "' instead <LEAKS MEMORY>" << endl;654 *fLog << "Trying to find MethodCall '" << ClassName(); 655 *fLog << "::" << part1 << "' instead..." << flush; 647 656 call = new TMethodCall(IsA(), part1, ""); 648 657 if (call->GetMethod()) 658 { 659 fgListMethodCall.Add(call); 660 *fLog << "found." << endl; 649 661 return call; 662 } 663 *fLog << endl; 650 664 651 665 delete call; -
trunk/MagicSoft/Mars/mbase/MParContainer.h
r5994 r6500 34 34 class MParContainer : public TObject 35 35 { 36 private: 37 static TObjArray fgListMethodCall; //! 38 36 39 protected: 37 40 TString fName; // parameter container identifier (name) -
trunk/MagicSoft/Mars/mbase/MTask.cc
r5875 r6500 428 428 else 429 429 *fLog << " "; 430 431 if (HasStreamId()) 432 *fLog << GetStreamId() << ":"; 430 433 *fLog << GetDescriptor() << "\t"; 431 434 *fLog << dec << GetNumExecutions(); -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r6499 r6500 116 116 { 117 117 file = new TFile(name, option, title, comp); 118 if (!file->IsOpen()) 119 { 120 delete file; 121 return NULL; 122 } 123 118 124 file->SetOption(option); // IMPORTANT! 119 125 ResetBit(kIsNotOwner); … … 873 879 // TTree::CloneTree() 874 880 // 875 void MWriteRootFile::CopyTree(TTree &t) 881 void MWriteRootFile::CopyTree(TTree &t) const 876 882 { 877 883 *fLog << "Copy of tree " << t.GetName() << " in progress..." << flush; -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
r6499 r6500 96 96 Bool_t ChangeFile(const char *fname); 97 97 TFile *OpenFile(const char *name, Option_t *option, const char *title, Int_t comp); 98 void CopyTree(TTree &t) ;98 void CopyTree(TTree &t) const; 99 99 Bool_t MakeCopies(const char *oldname) const; 100 100 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6466 r6500 357 357 MRawFileRead rawread(NULL); 358 358 359 MRead *read = 0; 359 360 switch (GetDataFlag()) 360 361 { 361 case kIsUseRawData: 362 rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns); 363 break; 364 case kIsUseMC: 365 readmc.AddFiles(fSequence.IsValid() ? iter : *fRuns); 366 break; 367 case kIsUseRootData: 368 readreal.AddFiles(fSequence.IsValid() ? iter : *fRuns); 369 break; 370 } 362 case kIsUseRawData: read = &rawread; break; 363 case kIsUseMC: read = &readmc; break; 364 case kIsUseRootData: read = &readreal; break; 365 } 366 read->AddFiles(fSequence.IsValid() ? iter : *fRuns); 367 368 const TString fname(Form("%s{s/_D_/_Y_}{s/.raw$/.root}", fPathOut.Data())); 369 370 // Write the special MC tree 371 MWriteRootFile writemc(2, fname, fOverwrite?"RECREATE":"NEW"); 372 writemc.SetName("WriteMC"); 373 writemc.AddContainer("MMcEvtBasic", "MonteCarlo"); 374 375 // Skips empty MC events (Not necessary, but faster!) 376 MContinue contmc("MRawEvtData.GetNumPixels<0.5", "ContEmptyMC"); 371 377 372 378 MPointingPosInterpolate pextr; … … 563 569 564 570 // The second rule is for the case reading raw-files! 565 MWriteRootFile write(2, Form("%s{s/_D_/_Y_}{s/.raw$/.root}", fPathOut.Data()), fOverwrite?"RECREATE":"NEW");571 MWriteRootFile write(2, fname, fOverwrite?"RECREATE":"NEW"); 566 572 // Run Header 567 573 write.AddContainer("MRawRunHeader", "RunHeaders"); … … 682 688 683 689 // Now setup main tasklist 684 switch (GetDataFlag()) 685 { 686 case kIsUseRawData: 687 tlist.AddToList(&rawread); 688 break; 689 case kIsUseMC: 690 tlist.AddToList(&readmc); 691 break; 692 case kIsUseRootData: 693 tlist.AddToList(&readreal); 694 break; 695 } 696 //tlist.AddToList(IsUseRawData() ? (MTask*)&rawread : (MTask*)&readreal); 690 tlist.AddToList(read); 691 if (IsUseMC()) 692 tlist.AddToList(&writemc); 693 tlist.AddToList(&contmc); 694 697 695 if (IsUseRootData()) 698 696 tlist2.AddToList(&pextr); -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r6459 r6500 273 273 write.AddContainer("MMcConfigRunHeader", "RunHeaders"); 274 274 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders"); 275 write.AddCopySource("MonteCarlo"); 275 276 } 276 277 else -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r6459 r6500 259 259 // Return file name of current file. 260 260 // 261 TString MRawFileRead::GetF ileName() const261 TString MRawFileRead::GetFullFileName() const 262 262 { 263 263 const TObject *file = fFileNames->At(fNumFile-1); -
trunk/MagicSoft/Mars/mraw/MRawFileRead.h
r6456 r6500 38 38 void SetInterleave(UInt_t i) { fInterleave = i; } 39 39 40 TString GetF ileName() const;40 TString GetFullFileName() const; 41 41 42 42 Int_t AddFile(const char *fname, Int_t entries=-1); -
trunk/MagicSoft/Mars/mraw/MRawSocketRead.h
r4701 r6500 31 31 void SetPort(int port) { fPort = port; } 32 32 33 TString GetF ileName() const { return "<socket>"; }33 TString GetFullFileName() const { return "<socket>"; } 34 34 35 35 ClassDef(MRawSocketRead, 0) //Task to read DAQ binary data from tcp/ip socket
Note:
See TracChangeset
for help on using the changeset viewer.