- Timestamp:
- 11/22/03 21:14:14 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2551 r2557 4 4 5 5 -*-*- END OF LINE -*-*- 6 2003/11/22: Thomas Bretz 7 8 * mreport/MReportCamera.cc: 9 - implemented real reading 10 - changed some loops to poinbter arithmetics 11 12 * mreport/Makefile: 13 - added mcamera 14 15 * merpp.cc: 16 - implemented preliminary support for report-files 17 18 * star.cc: 19 - small changes to handling of update-mode 20 21 * mbase/MParList.cc: 22 - fixed a wrong output 23 24 * mbase/MTask.cc: 25 - fixed AddToBranchList(TString&) 26 27 * mbase/MTime.[h,cc]: 28 - setfill only once 29 - fixed ()-operator 30 - removed nonsens GetTime() 31 32 * mcamera/MCameraAUX.h, mcamera/MCameraCalibration.h, 33 mcamera/MCameraCooling.h, mcamera/MCameraHV.h, 34 mcamera/MCameraLV.h, mcamera/MCameraLid.h, 35 mcamera/MCameraLids.h, mcamera/MCameraPowerSupply.h: 36 - set version in ClassDef to 1 37 38 * mcamera/MCameraCooling.h: 39 - added Getter-functions 40 41 * mcamera/MCameraLV.h: 42 - changed fHumidity to Byte_t 43 44 * mcamera/MCameraLid.h: 45 - derived from MParContainer instead of TObject 46 47 * mfileio/FileIOLinkDef.h, mfileio/Makefile: 48 - added MReadReports 49 50 * mfileio/MReadReports.[h.cc]: 51 - added 52 53 * mfileio/MReadTree.h: 54 - added MReadReports as friend class to allow access to fChain 55 56 * mfileio/MWriteRootFile.cc: 57 - fixed output (didn't have the correct debug flags) 58 59 * mhist/HistLinkDef.h, mhist/Makefile: 60 - added MHVsTime 61 62 * mhist/MHVsTime.[h,cc]; 63 - added 64 65 * mhist/MFillH.cc: 66 - add eveything I know to BranchList 67 68 * mraw/MRawFileWrite.[h,cc]: 69 - changed name of MTime from MRawEvtTime to MTime 70 - changed Tree names to: 71 + Events 72 + Pedestals 73 + Calibration 74 75 * mreport/MReportTrigger.[h,cc]: 76 - fixed accoring to a discussion with Riccardo 77 - changed version number in ClassDef to 1 78 79 * mreport/Makefile: 80 - added mcamera 81 82 * macros/rootlogon.C: 83 - added colors 84 - changed the search path for libmars.so a bit 85 86 * mdata/MDataList.[h,cc]: 87 - added support for '%' 88 89 * mhist/MHCamera.[h,cc]: 90 - removed DrawPixelIndices and DrawSectorIndices 91 - replaced by new Draw-options: 'sectorindex' and 'pixelindex' 92 - put together in PaintIndices 93 94 * mmain/MEventDisplay.cc: 95 - added Sectors to tabs 96 - code for adding tab was in class twice (removed in 97 ReadinFirstEvent, uses AddGeometryTabs instead) 98 99 * mreport/MReport.[h,cc]: 100 - prpared to read new DC-REPORT files 101 102 * mreport/MReportDrive.[h,cc]: 103 - removed debug 'D' 104 - added Getter-functions 105 106 6 107 7 108 2003/11/21: Thomas Bretz … … 36 137 * mmain/MEventDisplay.cc: 37 138 - made 'Mini-Canvas' working in all Tabs by catching kCM_TAB 139 140 * mhist/MFillH.[h,cc], mhist/MH.[h,cc]: 141 - implemented ReInit 142 143 * mbase/MParList.cc: 144 - implemented more sanity check whether a class can be created 145 146 * Makefile: 147 - added mcamera 148 - added mreport 149 - added status 150 - added OBJS and MCint.o to the shared object 151 152 * macros/readCT1.C: 153 - do not add non-existing geomcam to parlist 154 - add geomapl to tasklist 155 156 * mcamera/MCameraCalibration.h, mcamera/MCameraCooling.h, 157 mcamera/MCameraHV.h, mcamera/MCameraLV.h, 158 mcamera/MCameraLid.h, mcamera/MCameraLids.h, 159 mcamera/MCameraPowerSupply.h, mreport/MReportCamera.h: 160 - changed according to discussion with Pepe 161 162 * mtools/Makefile, mtools/ToolsLinkDef.h: 163 - added MAstro 164 165 * mtools/MAstro.[h,cc]: 166 - added 167 168 * macros/readMagic.C, macros/readCT1.C: 169 - changed to display relative signal (which is compared to the 170 cleaning levels) and the cleaning levels 38 171 39 172 -
trunk/MagicSoft/Mars/Makefile
r2505 r2557 21 21 22 22 #PROGRAMS = readraw merpp mars test mona status 23 PROGRAMS = readraw merpp star mars23 PROGRAMS = readraw merpp star status mars 24 24 SOLIB = libmars.so 25 25 CINT = M … … 49 49 mmc \ 50 50 mraw \ 51 mcamera \ 52 mreport \ 51 53 mgui \ 52 54 mranforest \ … … 86 88 $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o 87 89 @echo " Linking $(SOLIB) ..." 88 $(CXX) $(DYNLIB) $(CXXFLAGS) $( SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@90 $(CXX) $(DYNLIB) $(CXXFLAGS) $(OBJS) MCint.o $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@ 89 91 90 92 $(PROGRAMS): $(SOLIB) $(PROGRAMS:=.o) -
trunk/MagicSoft/Mars/NEWS
r2530 r2557 9 9 (Directory: mreport, Base-Class: MReport, Reader: MReportFileRead, ...) 10 10 11 - enhanced merpp (the executable) to support .raw and .rep files. 12 11 13 - added classes for light calibration (MCalibration* and 12 14 MHCalibration*) by Markus Gaug. Further work has to be and will 13 15 be done soon. 16 17 - Added a preliminary 'synchronizer' (MReadReports) which will 18 replace MReadMarsFile as soon as it is finished. 19 20 - Added a generalized histogram (similar to MH3) called MVsTime 21 which allows to plot variables (or rules - MDataChain - of 22 variables) vs time. For an example have a look at tempvstime.C. 23 24 - Changed the name of the event trees: 25 + Events --> Events 26 + PedEvents --> Pedestals 27 + CalEvents --> Calibration 28 29 - changed name of MTime in the event trees from MRawEvtTime to MTime 14 30 15 31 -
trunk/MagicSoft/Mars/macros/rootlogon.C
r2491 r2557 42 42 } 43 43 44 voidload(TString &dir)44 bool load(TString &dir) 45 45 { 46 46 if (isloaded()) 47 47 return; 48 48 49 cout << " Loading 'libmars.so'..." << flush;49 cout << "\033[33m\033[1m" << "Loading '" << dir << "libmars.so'... " << "\033[31m" << flush; 50 50 51 if (gSystem->Load(dir.IsNull() ? "libmars.so" : dir+"libmars.so")!=0) 52 cout << "error." << endl; 51 if (dir.IsNull()) 52 dir = "./"; 53 54 if (gSystem->Load(dir+"libmars.so")!=0) 55 { 56 cout << "\033[33m\033[1m" << "error." << endl; 57 cout << "\033[0m" << endl; 58 return false; 59 } 53 60 else 54 61 { 55 62 MParContainer::Class()->IgnoreTObjectStreamer(); 56 63 MArray::Class()->IgnoreTObjectStreamer(); 57 cout << "done." << endl; 64 cout << "\033[33m\033[1m" << "done." << endl; 65 cout << "\033[0m" << endl; 66 return true; 58 67 } 59 60 cout << endl;61 68 } 62 69 /* … … 79 86 80 87 TString dir = gSystem->Getenv("MARSSYS"); 81 82 88 if (!dir.IsNull()) 83 89 { 84 cout << " Mars found in " << dir << " (MARSSYS)" << endl << endl;90 cout << "\033[34m\033[1m" << "Searching Mars in " << dir << " (MARSSYS)" << "\033[0m" << endl << endl; 85 91 86 92 if (!dir.EndsWith("/")) … … 88 94 } 89 95 90 load(dir); 96 if (!load(dir)) 97 return; 91 98 92 99 gInterpreter->AddIncludePath(dir+"macros"); … … 119 126 } 120 127 121 cout << "Welcome to the Mars Root environment." << endl; 122 128 cout << "\033[32m" << "Welcome to the Mars Root environment." << "\033[0m" << endl; 123 129 cout << endl; 124 130 } -
trunk/MagicSoft/Mars/mdata/MDataList.cc
r2206 r2557 76 76 fSign = kEPlus; 77 77 return; 78 case '%': 79 fSign = kEModul; 80 return; 78 81 default: 79 82 fSign = kENone; … … 148 151 } 149 152 break; 153 154 case kEModul: 155 while ((member=(MData*)Next())) 156 { 157 Double_t d = member->GetValue(); 158 if (d==0) 159 { 160 *fLog << warn << "Warning: Modulo division by zero (" << member->GetName() << ")" << endl; 161 return 0; 162 } 163 val = fmod(val, d); 164 } 165 break; 150 166 } 151 167 return val; … … 315 331 str += "/"; 316 332 break; 333 334 case kEModul: 335 str += "%"; 336 break; 317 337 } 318 338 -
trunk/MagicSoft/Mars/mdata/MDataList.h
r1574 r2557 23 23 TOrdCollection fMembers; // Container for the filters 24 24 25 typedef enum { kENone, kEPlus, kEMinus, kEMult, kEDiv } SignType_t;25 typedef enum { kENone, kEPlus, kEMinus, kEMult, kEDiv, kEModul } SignType_t; 26 26 SignType_t fSign; 27 27 -
trunk/MagicSoft/Mars/merpp.cc
r2531 r2557 7 7 #include "MRawFileRead.h" 8 8 #include "MRawFileWrite.h" 9 10 #include "MReportFileRead.h" 11 #include "MWriteRootFile.h" 9 12 10 13 #include "MLog.h" … … 55 58 gLog << all << endl; 56 59 gLog << "Sorry the usage is:" << endl; 57 gLog << " merpp [-h] [-?] [-a0] [-vn] [-cn] inputfile[.raw] [outputfile[.root]]" << endl << endl; 58 gLog << " input file: Magic DAQ binary file." << endl; 59 gLog << " ouput file: Merpped root file." << endl; 60 gLog << " merpp [-h] [-?] [-a0] [-vn] [-cn] [-u1]" << endl; 61 gLog << " inputfile[.rep,[.raw]] [outputfile[.root]]" << endl << endl; 62 gLog << " inputfile.raw: Magic DAQ binary file." << endl; 63 gLog << " inputfile.rep: Magic Central Control report file." << endl; 64 gLog << " ouputfile.root: Merpped root file." << endl; 60 65 gLog << " -a0: Do not use Ansii codes." << endl; 66 gLog << " -u1: Update file." << endl; 61 67 gLog << " -cn: Compression level n=1..9 [default=2]" << endl; 62 68 gLog << " -vn: Verbosity level n [default=2]" << endl; 63 69 gLog << " -?/-h: This help" << endl << endl; 70 gLog << " REMARK: At the moment you can process a .raw _or_ a .rep file, only!" << endl << endl; 64 71 } 65 72 … … 82 89 gLog.SetNoColors(); 83 90 84 const int kComprlvl = arg.HasOption("-c") ? arg.GetIntAndRemove("-c") : 1; 91 const Int_t kComprlvl = arg.HasOption("-c") ? arg.GetIntAndRemove("-c") : 1; 92 Bool_t kUpdate = arg.HasOption("-u") && arg.GetIntAndRemove("-u")==1; 85 93 86 94 gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2); … … 101 109 TString kNameout = arg.GetArgumentStr(1); 102 110 103 if (!kNamein.EndsWith(".raw")) 111 const Bool_t isreport = kNamein.EndsWith(".rep"); 112 113 if (!kNamein.EndsWith(".raw") && !isreport) 104 114 kNamein += ".raw"; 105 115 … … 124 134 } 125 135 126 if (!gSystem->AccessPathName(kNameout, kFileExists)) 127 gLog << warn << "Warning: A file '" << kNameout << "' exists." << endl; 128 else 129 if (!gSystem->AccessPathName(kNameout, kWritePermission)) 130 { 131 gLog << err << "Sorry, you don't have write permission for '" << kNameout << "'." << endl; 132 return -1; 133 } 136 const Bool_t fileexist = !gSystem->AccessPathName(kNameout, kFileExists); 137 const Bool_t writeperm = !gSystem->AccessPathName(kNameout, kWritePermission); 138 139 if (fileexist && !writeperm) 140 { 141 gLog << err << "Sorry, you don't have write permission for '" << kNameout << "'." << endl; 142 return -1; 143 } 144 145 if (fileexist && !kUpdate) 146 { 147 gLog << err << "Sorry, file '" << kNameout << "' already existing." << endl; 148 return -1; 149 } 150 151 if (!fileexist && kUpdate) 152 { 153 gLog << warn << "File '" << kNameout << "' doesn't yet exist." << endl; 154 kUpdate=kFALSE; 155 } 134 156 135 157 MArray::Class()->IgnoreTObjectStreamer(); … … 143 165 144 166 MTaskList tasks; 167 tasks.SetOwner(); 145 168 plist.AddToList(&tasks); 146 169 … … 160 183 plist.AddToList(&cratearray); 161 184 162 MTime evttime ("MRawEvtTime");185 MTime evttime; 163 186 plist.AddToList(&evttime); 164 187 … … 168 191 // be created by MRawFileRead::PreProcess 169 192 // 170 MRawFileRead reader(kNamein); 171 MRawFileWrite writer(kNameout, "RECREATE", "Magic root-file", kComprlvl); 172 tasks.AddToList(&reader); 173 tasks.AddToList(&writer); 193 MTask *read = 0; 194 MTask *write = 0; 195 196 const TString option(kUpdate ? "UPDATE" : "RECREATE"); 197 if (isreport) 198 { 199 MReportFileRead *r = new MReportFileRead(kNamein); 200 r->AddToList("MReportDAQ"); 201 r->AddToList("MReportDrive"); 202 r->AddToList("MReportCamera"); 203 r->AddToList("MReportTrigger"); 204 read = r; 205 206 MWriteRootFile *w = new MWriteRootFile(kNameout, option, "Magic root-file", kComprlvl); 207 /* 208 w->AddContainer("MReportDAQ", "DAQ"); 209 w->AddContainer("MTimeDAQ", "DAQ"); 210 w->AddContainer("MReportDrive", "Drive"); 211 w->AddContainer("MTimeDrive", "Drive"); 212 */ 213 w->AddContainer("MReportCamera", "Camera"); 214 w->AddContainer("MTimeCamera", "Camera"); 215 w->AddContainer("MCameraAUX", "Camera"); 216 w->AddContainer("MCameraCalibration", "Camera"); 217 w->AddContainer("MCameraCooling", "Camera"); 218 w->AddContainer("MCameraHV", "Camera"); 219 w->AddContainer("MCameraLV", "Camera"); 220 w->AddContainer("MCameraLids", "Camera"); 221 w->AddContainer("MReportTrigger", "Trigger"); 222 w->AddContainer("MTimeTrigger", "Trigger"); 223 w->AddContainer("MReportDrive", "Drive"); 224 w->AddContainer("MTimeDrive", "Drive"); 225 write = w; 226 } 227 else 228 { 229 read = new MRawFileRead(kNamein); 230 write = new MRawFileWrite(kNameout, option, "Magic root-file", kComprlvl); 231 } 232 tasks.AddToList(read); 233 tasks.AddToList(write); 174 234 175 235 // -
trunk/MagicSoft/Mars/mhist/MFillH.cc
r2556 r2557 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 18 ! Author(s): Thomas Bretz, 07/2001 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 220 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! 22 22 ! … … 155 155 156 156 AddToBranchList(Form("%s.*", (const char*)ExtractName(hist))); 157 AddToBranchList(Form("%s.*", (const char*)ExtractName(par))); 157 if (par) 158 AddToBranchList(Form("%s.*", (const char*)ExtractName(par))); 158 159 159 160 if (title) … … 224 225 225 226 AddToBranchList(fH->GetDataMember()); 226 AddToBranchList(Form("%s.*", (const char*)ExtractName(par))); 227 if (par) 228 AddToBranchList(Form("%s.*", (const char*)ExtractName(par))); 227 229 228 230 if (title) -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2550 r2557 568 568 Update(gPad->GetLogy(), isbox, iscol); 569 569 PaintAxisTitle(); 570 571 if (opt.Contains("pixelindex")) 572 PaintIndices(kFALSE); 573 if (opt.Contains("sectorindex")) 574 PaintIndices(kTRUE); 570 575 } 571 576 … … 627 632 } 628 633 629 void MHCamera:: DrawPixelIndices()634 void MHCamera::PaintIndices(Bool_t sector) 630 635 { 631 636 if (fNcells<=1) 632 637 return; 633 634 // FIXME: Is this correct?635 for (int i=0; i<kItemsLegend; i++)636 fColors[i] = 16;637 638 if (!gPad)639 Draw();640 638 641 639 TText txt; … … 645 643 for (Int_t i=0; i<fNcells-2; i++) 646 644 { 645 const MGeomPix &h = (*fGeomCam)[i]; 646 647 647 TString num; 648 num += i; 649 650 const MGeomPix &h = (*fGeomCam)[i]; 651 TText *nt = txt.DrawText(h.GetX(), h.GetY(), num); 652 nt->SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); 653 } 654 } 655 656 void MHCamera::DrawSectorIndices() 657 { 658 if (fNcells<=1) 659 return; 660 661 for (int i=0; i<kItemsLegend; i++) 662 fColors[i] = 16; 663 664 if (!gPad) 665 Draw(); 666 667 TText txt; 668 txt.SetTextFont(122); 669 txt.SetTextAlign(22); // centered/centered 670 671 for (Int_t i=0; i<fNcells-2; i++) 672 { 673 TString num; 674 num += (*fGeomCam)[i].GetSector(); 675 676 const MGeomPix &h = (*fGeomCam)[i]; 677 TText *nt = txt.DrawText(h.GetX(), h.GetY(), num); 678 nt->SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); 648 num += sector ? h.GetSector() : i; 649 650 txt.SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); 651 txt.PaintText(h.GetX(), h.GetY(), num); 679 652 } 680 653 } -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r2484 r2557 59 59 Int_t GetColor(Float_t val, Float_t min, Float_t max, Bool_t islog); 60 60 61 void PaintIndices(Bool_t sector); 61 62 void Update(Bool_t islog, Bool_t isbox, Bool_t iscol); 62 63 void UpdateLegend(Float_t min, Float_t max, Bool_t islog); … … 144 145 void FillRandom(TH1 *h, Int_t ntimes=5000) { TH1::FillRandom(h, ntimes); } 145 146 void FillRandom(); 146 147 void DrawPixelIndices();148 void DrawSectorIndices();149 147 150 148 void PrintInfo() const { Print(""); } // *MENU* -
trunk/MagicSoft/Mars/mhist/MHVsTime.cc
r2556 r2557 60 60 // 61 61 MHVsTime::MHVsTime(const char *rule) 62 : f Hist(NULL), fData(NULL), fScale(1)62 : fGraph(NULL), fData(NULL), fScale(1) 63 63 { 64 64 fName = gsDefName; … … 68 68 return; 69 69 70 f Hist= new TGraph;70 fGraph = new TGraph; 71 71 fData = new MDataChain(rule); 72 72 } … … 78 78 MHVsTime::~MHVsTime() 79 79 { 80 if (f Hist)81 delete f Hist;80 if (fGraph) 81 delete fGraph; 82 82 83 83 if (fData) … … 92 92 TString MHVsTime::GetDataMember() const 93 93 { 94 *fLog << dbg << fData->GetDataMember() << endl;95 94 return fData ? fData->GetDataMember() : (TString)""; 96 95 } … … 105 104 { 106 105 // reset histogram (necessary if the same eventloop is run more than once) 107 //f Hist->Reset();106 //fGraph->Reset(); 108 107 109 108 if (fData && !fData->PreProcess(plist)) 110 109 return kFALSE; 111 110 112 if (f Hist)111 if (fGraph) 113 112 { 114 delete f Hist;115 f Hist= new TGraph;113 delete fGraph; 114 fGraph = new TGraph; 116 115 } 117 116 … … 119 118 title += " vs Time"; 120 119 121 f Hist->SetNameTitle(fName, title);120 fGraph->SetNameTitle(fName, title); 122 121 123 122 return kTRUE; … … 130 129 void MHVsTime::SetName(const char *name) 131 130 { 132 f Hist->SetName(name);131 fGraph->SetName(name); 133 132 MParContainer::SetName(name); 134 133 } … … 140 139 void MHVsTime::SetTitle(const char *title) 141 140 { 142 f Hist->SetTitle(title);141 fGraph->SetTitle(title); 143 142 MParContainer::SetTitle(title); 144 143 } … … 160 159 const Double_t T = (*t);///3600; 161 160 162 f Hist->SetPoint(fHist->GetN(), T>12*3600?T-24*3600:T, v);161 fGraph->SetPoint(fGraph->GetN(), T>12*3600?T-24*3600:T, v); 163 162 164 163 return kTRUE; … … 182 181 void MHVsTime::Draw(Option_t *opt) 183 182 { 184 if (f Hist->GetN()==0)183 if (fGraph->GetN()==0) 185 184 return; 186 185 187 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(f Hist);186 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fGraph); 188 187 pad->SetBorderMode(0); 189 188 … … 192 191 TString str(opt); 193 192 194 f Hist->GetHistogram()->SetXTitle("Time");195 f Hist->GetHistogram()->SetYTitle(GetRule());196 f Hist->GetHistogram()->GetXaxis()->SetTimeFormat("%H:%M:%S");197 f Hist->GetHistogram()->GetXaxis()->SetTimeDisplay(1);198 f Hist->GetHistogram()->GetXaxis()->SetLabelSize(0.033);199 f Hist->Draw("AP");200 if (f Hist->TestBit(kIsLogy))193 fGraph->GetHistogram()->SetXTitle("Time"); 194 fGraph->GetHistogram()->SetYTitle(GetRule()); 195 fGraph->GetHistogram()->GetXaxis()->SetTimeFormat("%H:%M:%S"); 196 fGraph->GetHistogram()->GetXaxis()->SetTimeDisplay(1); 197 fGraph->GetHistogram()->GetXaxis()->SetLabelSize(0.033); 198 fGraph->Draw("AP"); 199 if (fGraph->TestBit(kIsLogy)) 201 200 pad->SetLogy(); 202 201 … … 229 228 Int_t MHVsTime::GetNbins() const 230 229 { 231 return f Hist->GetN();232 } 233 230 return fGraph->GetN(); 231 } 232 /* 234 233 TH1 *MHVsTime::GetHist() 235 234 { 236 return f Hist ? fHist->GetHistogram() : 0;235 return fGraph ? fGraph->GetHistogram() : 0; 237 236 } 238 237 239 238 const TH1 *MHVsTime::GetHist() const 240 239 { 241 return f Hist ? fHist->GetHistogram() : 0;240 return fGraph ? fGraph->GetHistogram() : 0; 242 241 } 243 242 … … 246 245 return GetHist(); 247 246 } 247 */ -
trunk/MagicSoft/Mars/mhist/MHVsTime.h
r2556 r2557 13 13 protected: 14 14 // Could be const but root < 3.02/06 doesn't like this... 15 TGraph *f Hist; // Histogram to fill15 TGraph *fGraph; // Histogram to fill 16 16 MDataChain *fData; // Object from which the data is filled 17 17 Double_t fScale; // Scale for axis (eg unit) … … 38 38 TString GetRule() const; 39 39 40 const TH1 *GetHist() const; 41 TH1 *GetHist(); 42 TH1 *GetHistByName(const TString name=""); 40 /* 41 // const TH1 *GetHist() const; 42 // TH1 *GetHist(); 43 // TH1 *GetHistByName(const TString name=""); 44 */ 45 const TGraph *GetGraph() const { return fGraph; } 46 TGraph *GetGraph() { return fGraph; } 47 43 48 44 49 void Draw(Option_t *opt=NULL); -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r2550 r2557 446 446 // Add Geometry tab 447 447 // 448 MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam"); 449 450 TCanvas &c=AddTab("Geometry"); 451 452 c.SetFillColor(16); 453 454 MHCamera *cam = new MHCamera(*geom); 455 cam->SetBit(TH1::kNoStats|MHCamera::kNoLegend); 456 cam->Draw(); 457 cam->DrawPixelIndices(); 458 fList->Add(cam); 459 460 c.Modified(); 461 c.Update(); 448 AddGeometryTabs(); 462 449 463 450 // … … 485 472 // Adds the geometry tab 486 473 // 487 void MEventDisplay::AddGeometryTab ()474 void MEventDisplay::AddGeometryTabs() 488 475 { 489 476 MGeomCam *geom = (MGeomCam*)fEvtLoop->GetParList()->FindObject("MGeomCam"); … … 491 478 return; 492 479 493 TCanvas &c =AddTab("Geometry");480 TCanvas &c1=AddTab("Geometry"); 494 481 495 482 MHCamera *cam = new MHCamera(*geom); 496 cam->SetBit(TH1::kNoStats); 497 cam->Draw(); 498 cam->DrawPixelIndices(); 483 cam->SetBit(TH1::kNoStats|MHCamera::kNoLegend|kCanDelete); 484 cam->Draw("pixelindex"); 499 485 fList->Add(cam); 500 486 501 c.Modified(); 502 c.Update(); 487 c1.Modified(); 488 c1.Update(); 489 490 TCanvas &c2=AddTab("Sectors"); 491 492 cam = new MHCamera(*geom); 493 cam->SetBit(TH1::kNoStats|MHCamera::kNoLegend|kCanDelete); 494 cam->Draw("sectorindex"); 495 fList->Add(cam); 496 497 c2.Modified(); 498 c2.Update(); 503 499 } 504 500 -
trunk/MagicSoft/Mars/mreport/MReport.cc
r2532 r2557 45 45 46 46 int n = sscanf(str.Data(), 47 fHasReportTime ? 47 48 " %d %*d %*d %*d %d %d %d %d " 48 "%*d %*d %*d %*d %*d %*d %*d %*d "49 " %n",49 "%*d %*d %*d %*d %*d %*d %*d %*d %n" : 50 " %d %*d %*d %*d %d %d %d %d ", 50 51 &state, &hor, &min, &sec, &ms, &len); 51 52 if (n!=5) -
trunk/MagicSoft/Mars/mreport/MReport.h
r2532 r2557 12 12 { 13 13 private: 14 const TString fIdentifier; //! 14 const TString fIdentifier; //! 15 const Bool_t fHasReportTime; //! 15 16 16 17 Byte_t fState; … … 21 22 22 23 public: 23 MReport(const char *id ) : fIdentifier(id), fState(0xff), fTime(0) { }24 MReport(const char *id, Bool_t time=kTRUE) : fIdentifier(id), fHasReportTime(time), fState(0xff), fTime(0) { } 24 25 25 26 virtual Bool_t SetupReading(MParList &plist); -
trunk/MagicSoft/Mars/mreport/MReportCamera.cc
r2555 r2557 106 106 return kFALSE; 107 107 108 for (int i=0; i<577; i++) 109 { 110 const Char_t hex[4] = { str[i*3], str[i*3+1], str[i*3+2], 0 }; 111 const Int_t n=sscanf(hex, "%3hx", &fHV->fHV[i]); 108 const char *pos = str.Data(); 109 const char *end = str.Data()+577*3; 110 111 Int_t i=0; 112 while (pos<end) 113 { 114 const Char_t hex[4] = { pos[0], pos[1], pos[2], 0 }; 115 pos += 3; 116 117 const Int_t n=sscanf(hex, "%3hx", &fHV->fHV[i++]); 112 118 if (n==1) 113 119 continue; … … 116 122 return kFALSE; 117 123 } 118 str.Remove(0, 577*3); // Remove DC currents 124 125 str.Remove(0, end-str.Data()); // Remove DC currents 119 126 str=str.Strip(TString::kLeading); 120 127 return kTRUE; -
trunk/MagicSoft/Mars/mreport/MReportDrive.cc
r2520 r2557 69 69 str = str.Strip(TString::kBoth); 70 70 71 *fLog << dbg << "D" << flush;72 73 71 return str.IsNull(); 74 72 } -
trunk/MagicSoft/Mars/mreport/MReportDrive.h
r2520 r2557 28 28 Bool_t InterpreteBody(TString &str); 29 29 30 ClassDef(MReportDrive, 0) // Base class for control reports 30 Double_t GetMjd() const { return fMjd; } 31 32 Double_t GetRa() const { return fRa; } 33 Double_t GetDec() const { return fDec; } 34 Double_t GetHa() const { return fHa; } 35 36 Double_t GetNominalZd() const { return fNominalZd; } 37 Double_t GetNominalAz() const { return fNominalAz; } 38 Double_t GetCurrentZd() const { return fCurrentZd; } 39 Double_t GetCurrentAz() const { return fCurrentAz; } 40 41 Double_t GetErrorZd() const { return fErrorZd; } 42 Double_t GetErrorAz() const { return fErrorAz; } 43 44 ClassDef(MReportDrive, 1) // Base class for control reports 31 45 }; 32 46 -
trunk/MagicSoft/Mars/star.cc
r2531 r2557 58 58 gLog << " -cn: Compression level n=1..9 [default=2]" << endl; 59 59 gLog << " -vn: Verbosity level n [default=2]" << endl; 60 gLog << " -u1: Update File (instead o rRecreate)" << endl;60 gLog << " -u1: Update File (instead of Recreate)" << endl; 61 61 gLog << " -tn: Telescope Serial Number n [default=0]" << endl << endl; 62 62 gLog << " -> Further setup is not possible at the moment, please use" << endl; … … 123 123 if (!gSystem->AccessPathName(kNameout, kFileExists)) 124 124 { 125 if (!kUpdate) 126 gLog << warn << "Warning: A file '" << kNameout << "' exists." << endl; 127 } 128 else 125 if (kUpdate) 126 gLog << warn << "Warning: File doesn't '" << kNameout << "' exist... recreating." << endl; 127 } 128 129 if (kUpdate || gSystem->AccessPathName(kNameout, kFileExists)) 129 130 if (!gSystem->AccessPathName(kNameout, kWritePermission)) 130 131 { … … 140 141 // The tasklist is identified in the eventloop by its name 141 142 // 142 MParList 143 MParList plist; 143 144 144 145 MTaskList tlist;
Note:
See TracChangeset
for help on using the changeset viewer.