Changeset 1666 for trunk/MagicSoft
- Timestamp:
- 11/22/02 09:23:54 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1665 r1666 1 1 -*-*- END -*-*- 2 3 2002/11/22: Thomas Bretz 4 5 * macros/threshold.C: 6 - Simplified the new writing routine 7 8 * mbase/MLog.h: 9 - added a Getter-function for the debug level 10 11 * mbase/MTaskList.cc: 12 - added another debugging output 13 14 * mfilter/MF.[h,cc]: 15 - made the automatically created chain names unique 16 17 * mfilter/MFDataChain.cc: 18 - corrected the GetRule stuff ({} were missing) 19 20 * mhist/MH3.cc: 21 - added MBinning as class type to FindObject 22 - added BinningHist (without the X) as binning name for a 1D histogram 23 24 2 25 3 26 2002/11/22: Abelardo Moralejo … … 6 29 - Added 2nd argument to write an output file containing the 7 30 energy spectrum histogram. 31 32 8 33 9 34 2002/11/21: Thomas Bretz -
trunk/MagicSoft/Mars/macros/threshold.C
r1665 r1666 24 24 25 25 26 void threshold( char* filename="data/camera.root", char*outname="")26 void threshold(TString filename="data/camera.root", TString outname="") 27 27 { 28 28 // … … 106 106 107 107 // Write histogram to a file in case an output filename has been supplied: 108 if (strlen(outname) > 0) 109 { 110 TFile* f = new TFile(outname,"recreate"); 111 if (f) 112 { 113 TH1F* hc = ((MHMcEnergy*)parlist.FindObject("MHMcEnergy"))->GetHistByName("MHMcEnergy"); 114 hc->Write(); 115 f.Close(); 116 } 117 } 108 if (outname.IsNull()) 109 return; 110 111 TFile f(outname, "recreate"); 112 if (!f) 113 return; 114 115 parlist.FindObject("MHMcEnergy")->Write(); 118 116 } -
trunk/MagicSoft/Mars/mbase/MLog.h
r1524 r1666 65 65 66 66 void SetDebugLevel(int i) { fDebugLevel = i; } 67 int GetDebugLevel() const { return fDebugLevel; } 67 68 void SetOutputLevel(int i) { fOutputLevel = i; } 68 69 void SetOutputDevice(int i) { fDevice = i; } -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1661 r1666 141 141 // 142 142 if (!task) 143 { 144 *fLog << err << "ERROR - task argument=NULL." << endl; 143 145 return kFALSE; 146 } 144 147 145 148 // -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
r1664 r1666 540 540 fin.read(cheadertitle, iHEADERTITLELENGTH); 541 541 542 Float_t fpreprocversion, structversion, dummy; 542 Float_t fpreprocversion, structversion; 543 Int_t dummyi; 543 544 544 545 sscanf(cheadertitle, cTITLE_TEMPLATE, 545 546 &fpreprocversion, &structversion, 546 &dummy , &dummy, &dummy, &dummy);547 &dummyi, &dummyi, &dummyi, &dummyi); 547 548 548 549 if (fpreprocversion < 0.6) -
trunk/MagicSoft/Mars/mfilter/MF.cc
r1661 r1666 155 155 } 156 156 157 MFilter *MF::ParseRule(TString &txt, MFilter *filter0 ) const157 MFilter *MF::ParseRule(TString &txt, MFilter *filter0, Int_t level) const 158 158 { 159 159 TString text; … … 243 243 MFilter *newfilter; 244 244 if (isrule) 245 { 245 246 newfilter = new MFDataChain(text.Data(), c, num); 247 newfilter->SetName(Form("Chain%02d%c%f", level, c, num)); 248 } 246 249 else 250 { 247 251 newfilter = new MFDataMember(text.Data(), c, num); 248 249 newfilter->SetName(Form("%s%c%f", text.Data(), c, num));252 newfilter->SetName(Form("%s%c%f", text.Data(), c, num)); 253 } 250 254 251 255 return newfilter; … … 367 371 368 372 default: 369 newfilter = ParseRule(txt, filter0 );373 newfilter = ParseRule(txt, filter0, level++); 370 374 if (!newfilter) 371 375 { -
trunk/MagicSoft/Mars/mfilter/MF.h
r1661 r1666 25 25 Int_t IsAlNum(TString txt) const; 26 26 27 MFilter *ParseRule(TString &txt, MFilter *filter0 ) const;27 MFilter *ParseRule(TString &txt, MFilter *filter0, Int_t level) const; 28 28 MFilter *ParseString(TString txt, Int_t level); 29 29 -
trunk/MagicSoft/Mars/mfilter/MFDataChain.cc
r1661 r1666 64 64 fTitle = title ? title : "Filter using any data member of a class"; 65 65 66 AddToBranchList(member);66 //AddToBranchList(member); 67 67 68 68 fFilterType = (type=='<' ? kELowerThan : kEGreaterThan); … … 111 111 TString MFDataChain::GetRule() const 112 112 { 113 TString ret = fData.GetRule(); 113 TString ret = "{"; 114 ret += fData.GetRule(); 115 ret += "}"; 114 116 ret += fFilterType==kELowerThan?"<":">"; 115 117 -
trunk/MagicSoft/Mars/mhist/MH3.cc
r1599 r1666 223 223 { 224 224 case 3: 225 binsz = (MBinning*)plist->FindObject(bname+"Z" );225 binsz = (MBinning*)plist->FindObject(bname+"Z", "MBinning"); 226 226 if (!binsz) 227 227 { … … 235 235 return kFALSE; 236 236 case 2: 237 binsy = (MBinning*)plist->FindObject(bname+"Y" );237 binsy = (MBinning*)plist->FindObject(bname+"Y", "MBinning"); 238 238 if (!binsy) 239 239 { … … 247 247 return kFALSE; 248 248 case 1: 249 binsx = (MBinning*)plist->FindObject(bname+"X" );249 binsx = (MBinning*)plist->FindObject(bname+"X", "MBinning"); 250 250 if (!binsx) 251 251 { 252 *fLog << err << dbginf << "MBinning '" << bname << "X' not found... aborting." << endl; 253 return kFALSE; 252 if (fDimension==1) 253 binsx = (MBinning*)plist->FindObject(bname, "MBinning"); 254 255 if (!binsx) 256 { 257 *fLog << err << dbginf << "Neither MBinning '" << bname << "X' nor '" << bname << "' found... aborting." << endl; 258 return kFALSE; 259 } 254 260 } 255 261 if (binsx->IsLogarithmic())
Note:
See TracChangeset
for help on using the changeset viewer.