- Timestamp:
- 07/23/08 11:11:13 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9036 r9038 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2008/07/23 Thomas Bretz 22 23 * showplot.cc: 24 - allow to read more than one file 25 26 * datacenter/macros/stage.C: 27 - chnaged the return type to int 28 29 * mbase/MStatusArray.cc: 30 - added a check for the key in read to supress the root error 31 on the console 32 33 * mbase/MStatusDisplay.[h,cc]: 34 - stop update timer in destructor 35 - added new member function GetNumTabs 36 - we don't need to switch to batchmore when painting canvases 37 anymore 38 - removed an obsolete cout 39 40 * mjobs/MJCalibrateSignal.cc: 41 - changed again the wrong names of the tasklists 42 43 20 44 21 45 2008/07/22 Thomas Bretz … … 98 122 - small change to log-level 99 123 124 * mbase/MTaskList.cc: 125 - in case of an unknown return value stop event loop 126 127 * mfileio/MRead.cc: 128 - use gSystem->BaseName to get file name 100 129 101 130 -
trunk/MagicSoft/Mars/NEWS
r9036 r9038 26 26 * MReadTree can now read also files not written by MARS and store 27 27 the data encapsulated in emulated MParContainers 28 29 ;showplot 30 31 * showplot can now read more than one file at once. This is especially 32 inetersting if reading files containing pure canvases 28 33 29 34 ;merpp -
trunk/MagicSoft/Mars/datacenter/macros/stage.C
r9021 r9038 29 29 } 30 30 31 voidstage(Int_t sequno, Int_t tel, TString path="")31 int stage(Int_t sequno, Int_t tel, TString path="") 32 32 { 33 33 const MSequenceSQL s("sql.rc", sequno, tel); … … 40 40 } 41 41 42 voidstage(const char *seq, TString path="")42 int stage(const char *seq, TString path="") 43 43 { 44 44 const MSequence s(seq); -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r8965 r9038 780 780 MStatusDisplay::~MStatusDisplay() 781 781 { 782 fTimer.Stop(); 783 782 784 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,01) 783 785 fTab = NULL; // See HandleEvent … … 959 961 c->cd(); 960 962 return kTRUE; 963 } 964 965 // -------------------------------------------------------------------------- 966 // 967 // Return the number of user added tabs (not that in batch mode this 968 // exclude tabs without a canvas) 969 // 970 Int_t MStatusDisplay::GetNumTabs() const 971 { 972 return gROOT->IsBatch() ? fBatch->GetEntries() : fTab->GetNumberOfTabs()-1; 961 973 } 962 974 … … 2249 2261 2250 2262 2251 cout << "Display done." << endl;2252 2253 2263 if (n==0) 2254 2264 return list.GetEntries(); … … 2683 2693 // deletion 2684 2694 // 2685 const Bool_t store = c->IsBatch(); 2686 2687 c->SetBatch(kTRUE); 2695 //const Bool_t store = c->IsBatch(); 2696 //c->SetBatch(kTRUE); 2688 2697 c->Paint(); 2689 c->SetBatch(store);2698 //c->SetBatch(store); 2690 2699 2691 2700 // 2692 2701 // Use the canvas as coordinate system for the overlaying text 2693 2702 // 2694 gPad = c;2695 //n->cd();2696 2697 2703 const Double_t height = 0.015; 2698 2704 -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.h
r8988 r9038 196 196 TObject *FindObject(const TObject *) const { return 0; } 197 197 198 Int_t GetNumTabs() const; 199 198 200 void PrintContent(Option_t *o="") const; 199 201 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r9027 r9038 759 759 // Build tasklist 760 760 761 MTaskList tlist2(" PedEvents");761 MTaskList tlist2("AllEvents"); 762 762 763 763 tlist2.AddToList(&caldec); … … 771 771 // Pedestal extraction 772 772 773 MTaskList tlist3(" CalEvents");773 MTaskList tlist3("PedEvents"); 774 774 tlist3.SetFilter(&fped); // Deny events with cal-trigger 775 775 … … 786 786 // Calibration 787 787 788 MTaskList tlist4 ;788 MTaskList tlist4("CalEvents"); 789 789 tlist4.SetFilter(&fcalib); // process only events with cal-trigger 790 790 -
trunk/MagicSoft/Mars/showplot.cc
r8962 r9038 19 19 gLog << endl; 20 20 gLog << "showplot --- Mars V" << MARSVER << " compiled on <" << __DATE__ << "> using ROOT v" << ROOT_RELEASE << endl; 21 gLog << endl;21 //gLog << endl; 22 22 } 23 23 … … 28 28 gLog << all << endl; 29 29 gLog << "Sorry the usage is:" << endl; 30 gLog << " showplot [options] {filename}|{filetype number}" << endl << endl; 30 gLog << " showplot [options]" << endl; 31 gLog << " showplot [options] file1 file2 file3 ..." << endl; 32 gLog << " showplot [options] filetype number" << endl << endl; 31 33 gLog << " Arguments:" << endl; 32 gLog << " fil ename Input file containing an MStatusArray" << endl;34 gLog << " fil1 file2 ... Input files containing an MStatusArray of TCanvases" << endl; 33 35 gLog << " filetype number Open file of filetype calib, signal, star, etc." << endl; 34 36 gLog << " of sequence or dataset number" << endl << endl; … … 100 102 // Something special for datacenter access 101 103 // 102 if (args.GetNumArguments() !=2)104 if (args.GetNumArguments()==1) 103 105 return kInput; 104 106 107 if (args.GetNumArguments()!=2 || !args.GetArgumentStr(1).IsDigit()) 108 return ""; 109 105 110 // 106 111 // Something special for datacenter access 107 112 // 108 const Int_t num = args.GetArgument Str(1).Atoi();113 const Int_t num = args.GetArgumentInt(1); 109 114 110 115 TString file = "/magic/data/"; … … 191 196 192 197 // 193 // check arguments before processing them in InflatePath 194 // 195 if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2) 196 { 197 gLog << warn << "WARNING - Wrong number of arguments..." << endl; 198 Usage(); 199 return 2; 200 } 201 if (arg.GetNumArguments()==2 && !arg.GetArgumentStr(1).IsDigit()) 202 { 203 gLog << warn << "WARNING - First argument must not be a number..." << endl; 204 Usage(); 205 return 2; 206 } 198 // Get file name(s) 199 // 200 const TString kInput = InflatePath(arg); 201 const TString kTitle = kInput.IsNull() ? kInput + "..." : kInput; 207 202 208 203 // 209 204 // Process filenames 210 205 // 211 const TString kInput = InflatePath(arg);212 213 206 const TString kNamePrint = arg.GetStringAndRemove("--print=", kInput); 214 207 const TString kPrintCmd = arg.GetStringAndRemove("--print-cmd=", kInput); … … 255 248 256 249 // From now on each 'Exit' means: Terminate the application 257 d->SetTitle(k Input);258 d->SetWindowName(k Input);250 d->SetTitle(kTitle); 251 d->SetWindowName(kTitle); 259 252 260 253 if (kCanvasHeight>0) … … 263 256 d->SetCanvasWidth(kCanvasWidth); 264 257 265 const Int_t rc = d->Open(kInput); 258 if (!kInput.IsNull()) 259 d->Open(kInput); 260 else 261 { 262 for (int i=0; i<arg.GetNumArguments(); i++) 263 d->Open(arg.GetArgumentStr(i)); 264 } 266 265 267 266 if (kPrint) … … 294 293 d->SaveAsC(kTab, kNameC); 295 294 296 if (kBatch || kQuit || !rc) 295 if (arg.GetNumArguments()>0) 296 { 297 if (d->GetNumTabs()) 298 gLog << all << d->GetNumTabs() << " tab(s) displayed." << endl; 299 else 300 gLog << err << "Display empty... closing." << endl; 301 } 302 gLog << endl; 303 304 if (kBatch || kQuit || (arg.GetNumArguments()>0 && d->GetNumTabs()==0)) 297 305 { 298 306 delete d;
Note:
See TracChangeset
for help on using the changeset viewer.