Changeset 1337
- Timestamp:
- 06/03/02 10:10:21 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 13 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1335 r1337 1 1 -*-*- END -*-*- 2 2002/06/03: Thomas Bretz 3 4 * mhist/MHCompProb.[h,cc]: 5 - added 6 7 * mhist/MHHadroness.[h,cc]: 8 - added 9 10 * mhist/HistLinkDef.h, mhist/Makefile: 11 - added MHCompProb 12 - added MHHadroness 13 14 * mhist/MFillH.cc: 15 - added a info-output 16 17 * mhist/MH3.cc: 18 - excluded temporary profiles from directory 19 20 * mhist/MHMatrix.[h,cc]: 21 - added code to calculate multi-dimensional distances 22 - added comments 23 24 * mbase/MAGIC.h: 25 - changed kGAMMA to 1 26 27 * mbase/MParList.[h,cc]: 28 - added Replace-function 29 30 * mbase/MReadMarsFile.[h,cc]: 31 - added correct seeking for the run headers 32 33 * mbase/MReadTree.[h,cc]: 34 - added GetFileIndex() 35 36 * mbase/MTaskList.cc: 37 - changed fTasksProcess.Delete() to fTasksProcess.Clear() 38 39 * mbase/MWriteAsciiFile.[h,cc]: 40 - added some code for future usage (in comments) 41 42 * mbase/MLogo.[h,cc]: 43 - added (not in use) 44 45 * mfilter/MFParticleId.[h,cc]: 46 - added 47 48 * mfilter/Makefile, mfilter/FilterLinkDef.h: 49 - added MFParticleId 50 51 * manalysis/MHadroness.[h,cc]: 52 - added 53 54 * manalysis/MCompProbCalc.[h,cc]: 55 - added 56 57 * manalysis/MMultiDimDistCalc.[h,cc]: 58 - added 59 60 * manalysis/AnalysisLinkDef.h, manalysis/Makefile: 61 - added MHadroness 62 - added MCompProbCalc 63 - added MMultiDimDistCalc 64 65 * manalysis/Makefile: 66 - added ../mdata 67 - added ../mhist 68 69 * macros/star.C: 70 - added 71 72 * macros/comprob.C: 73 - added 74 75 * macros/multidimdist.C: 76 - added 77 78 * macros/dohtml.C: 79 - added star.C 80 - added comprob.C 81 - added multidimdist.C 82 83 84 2 85 2002/05/29: Thomas Bretz 3 86 -
trunk/MagicSoft/Mars/macros/dohtml.C
r1116 r1337 41 41 42 42 html.SetSourceDir("macros"); 43 html.Convert("merpp.C", "MARS - Merging and Preprocessing"); 44 html.Convert("readraw.C", "MARS - How To Read A Raw"); 45 html.Convert("rootlogon.C", "MARS - rootlogon.C"); 46 html.Convert("readCT1.C", "MARS - Read and display CT1 Events"); 47 html.Convert("readMagic.C", "MARS - Read and display Magic Events"); 48 html.Convert("CT1Hillas.C", "MARS - Calculate CT1 Hillas"); 49 html.Convert("MagicHillas.C", "MARS - Calculate Magic Hillas"); 50 html.Convert("collarea.C", "MARS - Calculate Collection Area from a MC root file"); 51 html.Convert("threshold.C", "MARS - Calculate Energy Threshold from a MC root file"); 52 html.Convert("trigrate.C", "MARS - Calculate Trigger Rate from a MC root file"); 43 html.Convert("merpp.C", "MARS - Merging and Preprocessing"); 44 html.Convert("readraw.C", "MARS - How To Read A Raw"); 45 html.Convert("rootlogon.C", "MARS - rootlogon.C"); 46 html.Convert("readCT1.C", "MARS - Read and display CT1 Events"); 47 html.Convert("readMagic.C", "MARS - Read and display Magic Events"); 48 html.Convert("CT1Hillas.C", "MARS - Calculate CT1 Hillas"); 49 html.Convert("MagicHillas.C", "MARS - Calculate Magic Hillas"); 50 html.Convert("collarea.C", "MARS - Calculate Collection Area from a MC root file"); 51 html.Convert("threshold.C", "MARS - Calculate Energy Threshold from a MC root file"); 52 html.Convert("trigrate.C", "MARS - Calculate Trigger Rate from a MC root file"); 53 html.Convert("star.C", "MARS - (St)andard (A)nalysis and (R)econstruction"); 54 html.Convert("comprob.C", "MARS - Calculation of composite probabilities for G/H-Seperation"); 55 html.Convert("multidimdist.C", "MARS - Calculation of multidimensional distances for G/H-Seperation"); 53 56 } -
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r1210 r1337 21 21 #pragma link C++ class MMcPedestalNSBAdd+; 22 22 23 #pragma link C++ class MHadroness+; 24 25 #pragma link C++ class MCompProbCalc+; 26 #pragma link C++ class MMultiDimDistCalc+; 27 23 28 #pragma link C++ class MSrcPosCam+; 24 29 #pragma link C++ class MHillas+; -
trunk/MagicSoft/Mars/manalysis/Makefile
r1211 r1337 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase -I../mgui -I../mmc -I../mraw 24 INCLUDES = -I. -I../mbase -I../mgui -I../mmc -I../mraw -I../mdata -I../mhist 25 25 26 26 #------------------------------------------------------------------------------ … … 37 37 MEnergyEstimate.cc \ 38 38 MSrcPosCam.cc \ 39 MHadroness.cc \ 40 MCompProbCalc.cc \ 41 MMultiDimDistCalc.cc \ 39 42 MHillas.cc \ 40 43 MHillasSrc.cc \ -
trunk/MagicSoft/Mars/mbase/MAGIC.h
r1278 r1337 22 22 // ParticleId for Monte Carlo simulation 23 23 // 24 const Int_t kGAMMA = 0;24 const Int_t kGAMMA = 1; 25 25 const Int_t kPROTON = 14; 26 26 const Int_t kHELIUM = 402; -
trunk/MagicSoft/Mars/mbase/MParList.cc
r1320 r1337 215 215 // -------------------------------------------------------------------------- 216 216 // 217 // Find an object with the same name in the list and replace it with 218 // the new one. If the kIsOwner flag is set and the object was not 219 // created automatically, the object is deleted. 220 // 221 Bool_t MParList::Replace(MParContainer *cont) 222 { 223 // 224 // check if the object (you want to add) exists 225 // 226 if (!cont) 227 return kFALSE; 228 229 TObject *obj = FindObject(cont->GetName()); 230 if (!obj) 231 { 232 *fLog << warn << "No object with the same name '"; 233 *fLog << cont->GetName() << "' in list... ignored." << endl; 234 return kFALSE; 235 } 236 237 fContainer->Remove(obj); 238 239 if (TestBit(kIsOwner) && !fAutodelete->FindObject(obj)) 240 delete obj; 241 242 *fLog << inf << "MParContainer '" << obj->GetName() << "' found and replaced..." << endl; 243 244 return AddToList(cont); 245 } 246 247 // -------------------------------------------------------------------------- 248 // 217 249 // Find an object in the list. 218 250 // 'name' is the name of the object you are searching for. -
trunk/MagicSoft/Mars/mbase/MParList.h
r1186 r1337 42 42 void AddToList(TObjArray *list); 43 43 44 Bool_t Replace(MParContainer *obj); 45 44 46 void SetLogStream(MLog *log); 45 47 -
trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc
r1332 r1337 108 108 Bool_t MReadMarsFile::Notify() 109 109 { 110 Int_t runtype = -1; 111 /* 112 const MRawRunHeader *runheader = (MRawRunHeader*)fParList->FindObject("MRawRunHeader"); 113 if (runheader) 114 runtype = runheader->GetRunType(); 115 */ 110 116 // 111 117 // Try to read the new run headers. If reading the new run header 112 118 // was successfull call the ReInits 113 119 // 120 const Int_t idx = GetFileIndex(); 121 fRun->SetEventNum(idx<0?0:idx); // Assumption: One Entry per File! 114 122 if (fRun->Process()) 115 123 { 116 *fLog << inf << "MReadMarsFile: Switching to '" << GetFileName() << "' "; 117 *fLog << "(before event #" << GetEventNum()-1 << ")" << endl; 118 124 *fLog << inf << "MReadMarsFile: Switching to #" << GetFileIndex(); 125 *fLog << " '" << GetFileName() << "' (before event #"; 126 *fLog << GetEventNum()-1 << ")" << endl; 127 /* 128 if (runheader) 129 if (runtype != runheader->GetRunType()) 130 *fLog << warn << "Warning - You are mixing files with different run types!" << endl; 131 */ 119 132 if (fTaskList->ReInit()) 120 133 return kTRUE; … … 137 150 Bool_t MReadMarsFile::PreProcess(MParList *pList) 138 151 { 152 fParList = pList; 139 153 fTaskList = (MTaskList*)pList->FindObject("MTaskList"); 140 154 141 155 if (!fRun->PreProcess(pList)) 156 { 157 *fLog << err << "Error - PreProcessing MReadMarsFile::fRun... aborting." << endl; 142 158 return kFALSE; 159 } 143 160 161 const Int_t idx = GetFileIndex(); 162 fRun->SetEventNum(idx<0?0:idx); // Assumption: One Entry per File! 144 163 if (!fRun->Process()) 164 { 165 *fLog << err << "Error - Processing MReadMarsFile::fRun... aborting." << endl; 145 166 return kFALSE; 146 147 fRun->SetEventNum(0); 167 } 148 168 149 169 return MReadTree::PreProcess(pList); -
trunk/MagicSoft/Mars/mbase/MReadMarsFile.h
r1114 r1337 6 6 #endif 7 7 8 class MParList; 8 9 class MTaskList; 9 10 … … 12 13 private: 13 14 MReadTree *fRun; 15 MParList *fParList; //! Parlist for reinitialization 14 16 MTaskList *fTaskList; //! Tasklist for reinitialization 15 17 -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r1333 r1337 55 55 #include <TFile.h> // TFile::GetName 56 56 #include <TChain.h> 57 #include <TSystem.h> // gSystem->ExpandPath 57 58 #include <TGProgressBar.h> 58 59 #include <TChainElement.h> … … 746 747 // -------------------------------------------------------------------------- 747 748 // 749 // Return the number of the file in the chain, -1 in case of an error 750 // 751 Int_t MReadTree::GetFileIndex() const 752 { 753 return fChain->GetTreeNumber(); 754 /* 755 const TString filename = fChain->GetFile()->GetName(); 756 757 int i=0; 758 TObject *file = NULL; 759 760 TIter Next(fChain->GetListOfFiles()); 761 while ((file=Next())) 762 { 763 if (filename==gSystem->ExpandPathName(file->GetTitle())) 764 return i; 765 i++; 766 } 767 return -1; 768 */ 769 } 770 771 // -------------------------------------------------------------------------- 772 // 748 773 // This schedules a TObject which Notify(9 function is called in case 749 774 // of MReadTree (TChain) switches from one file in the chain to another … … 759 784 *fLog << all << GetDescriptor() << dec << endl; 760 785 *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl; 761 *fLog << " Files :" << endl;786 *fLog << " Files [Tree]:" << endl; 762 787 763 788 int i = 0; … … 765 790 TObject *obj = NULL; 766 791 while ((obj=Next())) 767 *fLog << " " << i++ << ") " << obj->Get Name()<< endl;768 769 *fLog << " Entries: " << fNumEntries << endl;770 *fLog << " Next Entry : " << fNumEntry << endl;771 } 792 *fLog << " " << i++ << ") " << obj->GetTitle() << " [" << obj->GetName() << "]" << endl; 793 794 *fLog << " Total Number of Entries: " << fNumEntries << endl; 795 *fLog << " Next Entry to read: " << fNumEntry << endl; 796 } -
trunk/MagicSoft/Mars/mbase/MReadTree.h
r1203 r1337 59 59 60 60 TString GetFileName() const; 61 Int_t GetFileIndex() const; 61 62 62 63 virtual void AddNotify(TObject *obj); -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1332 r1337 303 303 fParList = pList; 304 304 305 fTasksProcess. Delete();305 fTasksProcess.Clear(); 306 306 307 307 // … … 317 317 while ((task=(MTask*)Next())) 318 318 { 319 *fLog << all << task->GetName() << "... " << flush; 320 319 321 if (CheckClassForProcess(task->IsA())) 320 322 fTasksProcess.Add(task); … … 457 459 while ( (task=(MTask*)Next()) ) 458 460 { 461 *fLog << all << task->GetName() << "... " << flush; 462 459 463 if (!task->CallPostProcess()) 460 464 return kFALSE; 461 462 *fLog << all << task->GetName() << "... " << flush;463 465 } 464 466 -
trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
r1331 r1337 263 263 } 264 264 265 /* 266 Bool_t MWriteAsciiFile::PreProcess(MParList *plist) 267 { 268 MDataChain *chain=NULL; 269 270 TIter Next(&fList); 271 while (((MDataChain*)chain=Next())) 272 if (!chain->PreProcess(plist)) 273 return kFALSE; 274 275 return MWriteFile::PreProcess(plist); 276 } 277 278 void MWriteAsciiFile::Add(const char *rule) 279 { 280 MDataChain *chain = new MDataChain(rule); 281 fList.Add(chain); 282 } 283 */ -
trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.h
r1236 r1337 29 29 30 30 TString fNameFile; 31 31 /* 32 TList fList; 33 */ 32 34 virtual void CheckAndWrite() const; 33 35 virtual Bool_t IsFileOpen() const; … … 47 49 void AddContainer(MParContainer *cont, const char *member="", Double_t scale=1); 48 50 51 /* 52 Bool_t PreProcess(MParList *plist); 53 void Add(const char *rule); 54 */ 55 49 56 ClassDef(MWriteAsciiFile, 0) // Class to write one container to an ascii file 50 57 }; -
trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h
r1283 r1337 8 8 #pragma link C++ class MFAlpha+; 9 9 #pragma link C++ class MFTriggerLvl1+; 10 #pragma link C++ class MFParticleId+; 10 11 #pragma link C++ class MFDataMember+; 11 12 -
trunk/MagicSoft/Mars/mfilter/Makefile
r1333 r1337 34 34 MF.cc \ 35 35 MFDataMember.cc \ 36 MF DataChain.cc \36 MFParticleId.cc \ 37 37 MFAlpha.cc 38 # MFDataChain.cc \ 38 39 39 40 SRCS = $(SRCFILES)
Note:
See TracChangeset
for help on using the changeset viewer.