Changeset 7438 for trunk/MagicSoft
- Timestamp:
- 12/01/05 16:43:46 (19 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/tpoint/plot.C
r7147 r7438 77 77 ifstream fin(fname); 78 78 79 cout << "Reading from "<< fname << "..." << flush;79 cout << "Reading " << setw(23) << fname << "..." << flush; 80 80 81 81 while (1) … … 109 109 } 110 110 111 cout << "done (" << g[0].GetN() << ")" << endl; 111 cout << "done (" << setw(3) << (Int_t)h->GetEntries() << "/"; 112 cout << setw(3) << g[0].GetN() << ") " << flush; 112 113 113 114 return g[0].GetN(); … … 121 122 }; 122 123 123 const Int_t counts = 1 3-4;124 const Int_t counts = 17-4; 124 125 Description_t desc[counts] = 125 126 { … … 137 138 {"0503", "TPoints Residuals 3/2005" , "tpoint/tpoint0503.txt"}, 138 139 {"0504", "TPoints Residuals 4/2005" , "tpoint/tpoint0504.txt"}, 139 {"05051", "TPoints Residuals 5/200 4-1" , "tpoint/tpoint0505-1.txt"},140 {"05051", "TPoints Residuals 5/2005-1" , "tpoint/tpoint0505-1.txt"}, 140 141 // Mirror alignment has been fixed 141 {"05052", "TPoints Residuals 5/200 4-2" , "tpoint/tpoint0505-2.txt"},142 {"05052", "TPoints Residuals 5/2005-2" , "tpoint/tpoint0505-2.txt"}, 142 143 // Fixes to pointing model due to fixing a screw 143 {"0506", "TPoints Residuals 6/2004" , "tpoint/tpoint0506.txt"} 144 {"0506", "TPoints Residuals 6/2005" , "tpoint/tpoint0506.txt"}, 145 146 {"0508", "TPoints Residuals 8/2005" , "tpoint/tpoint0508.txt"}, 147 {"0509", "TPoints Residuals 9/2005" , "tpoint/tpoint0509.txt"}, 148 // Quick-and-dirty mirror alignment 149 {"0510", "TPoints Residuals 10/2005" , "tpoint/tpoint0510.txt"}, 150 // New mirror alignment after Tenerife meeting 151 {"0511", "TPoints Residuals 11/2005" , "tpoint/tpoint0511.txt"} 144 152 }; 145 153 … … 161 169 cout << setw(2) << i << ": " << flush; 162 170 n[i] = fill(desc[i].fFile, g, &hx[i]); 171 cout << " Mean: " << setw(5) << setprecision(2) << hx[i].GetMean() << " deg" << hx[i].GetRMS()<<endl; 163 172 } 164 173 -
trunk/MagicSoft/Cosy/tpoint/tpoint0511.txt
r7430 r7438 413 413 # Capella 0.08 41 -52 414 414 -51.7696 48.90804 90.75324 40.04845 5.278056 45.99806 -0.005096606 -0.02454738 53698.227554 197.9 2.627 415 416 # --- 25.11.2005 --- 05:24:26.665 417 -112.7778 47.83293 29.71322 39.00944 5.919444 7.406944 0.03266414 0.0009378095 53699.225309 204 2.6 418 -143.7334 61.8596 358.7161 52.9985 7.655 5.225 0.007570955 0.01169973 53699.235536 204.6 2.769 419 168.2918 51.8943 310.7723 42.92117 9.459722 -8.658611 0.02000216 0.02253327 53699.24525 209.6 3.605 420 -52.39955 41.5637 90.11908 32.74121 5.278056 45.99806 0.02508735 0.002372406 53699.25409 199.4 2.982 -
trunk/MagicSoft/Mars/Changelog
r7437 r7438 18 18 19 19 -*-*- END OF LINE -*-*- 20 2005/11/30 Thomas Bretz 21 22 * showplot.cc: 23 - fixed some warnings 20 2005/12/01 Thomas Bretz 21 22 * readdaq.cc: 23 - allow different file names 24 25 * mbase/MLog.[h,cc]: 26 - replaced preprocessor directive by const data member 27 28 * mbase/MDirIter.cc: 29 - removed special treatment of ?-character 30 31 * mbase/Makefile, mbase/BaseLinkDef.h: 32 - added new class 33 34 * mimage/MHillas.cc: 35 - changed atan2-output in Print to same convention as used 36 in MGeomCam 37 38 * mjobs/MJCalibrateSignal.cc: 39 - modified replacement rule for output file names 40 41 * mbase/MStatusDisplay.cc: 42 - fixed initial size 43 - automatically call SetFrameBorderMode for each new canvas 44 45 * mjobs/MSequence.cc: 46 - updated rule used to build file names 24 47 25 48 * mgui/MCamEvent.[h,cc]: 26 49 - implemented new member function GetCameraRMS 27 50 - implemented new member function GetCameraStat 51 52 * mraw/MRawFileRead.[h,cc]: 53 - implemented new I/O scheme 54 55 56 57 2005/11/30 Thomas Bretz 58 59 * showplot.cc: 60 - fixed some warnings 28 61 29 62 * mmc/MMcFadcHeader.[hxx,cxx]: … … 35 68 * mmc/Makefile: 36 69 - added mgui 37 38 * mbase/MStatusDisplay.cc:39 - fixed initial size40 - automatically call SetFrameBorderMode for each new canvas41 70 42 71 * datacenter/macros/plotdb.C: -
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r6915 r7438 15 15 #pragma link C++ class MLogPlugin+; 16 16 #pragma link C++ class MLogHtml+; 17 18 // I/O 19 #pragma link C++ class MZlib+; 17 20 18 21 // Basic Network Tools -
trunk/MagicSoft/Mars/mbase/MDirIter.cc
r6466 r7438 223 223 n.ReplaceAll("+", "\\+"); 224 224 n.ReplaceAll("*", "[^\\/:]*"); 225 n.ReplaceAll("?", ".");226 225 n.Append("$"); 227 226 -
trunk/MagicSoft/Mars/mbase/MLog.cc
r7151 r7438 173 173 // which is used for the output (i) 174 174 // 175 MLog::MLog(int i) : ostream(this), fPPtr(fBase), fEPtr(fBase+ bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(i), fIsNull(kFALSE), fOut(NULL), fOutAllocated(kFALSE), fGui(NULL), fNumLines(0)175 MLog::MLog(int i) : ostream(this), fPPtr(fBase), fEPtr(fBase+fgBufferSize), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(i), fIsNull(kFALSE), fOut(NULL), fOutAllocated(kFALSE), fGui(NULL), fNumLines(0) 176 176 { 177 177 Init(); … … 183 183 // ofstream as the default output device 184 184 // 185 MLog::MLog(ofstream &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+ bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fIsNull(kFALSE), fOut(&out), fOutAllocated(kFALSE), fGui(NULL), fNumLines(0)185 MLog::MLog(ofstream &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+fgBufferSize), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fIsNull(kFALSE), fOut(&out), fOutAllocated(kFALSE), fGui(NULL), fNumLines(0) 186 186 { 187 187 Init(); … … 193 193 // TGTextView as the default output device 194 194 // 195 MLog::MLog(TGTextView &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+ bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eGui), fOut(NULL), fOutAllocated(kFALSE), fGui(&out), fNumLines(0)195 MLog::MLog(TGTextView &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+fgBufferSize), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eGui), fOut(NULL), fOutAllocated(kFALSE), fGui(&out), fNumLines(0) 196 196 { 197 197 Init(); … … 204 204 // or not. 205 205 // 206 MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+ bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fIsNull(kFALSE), fGui(NULL), fNumLines(0)206 MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+fgBufferSize), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fIsNull(kFALSE), fGui(NULL), fNumLines(0) 207 207 { 208 208 Init(); -
trunk/MagicSoft/Mars/mbase/MLog.h
r7001 r7438 13 13 #include <iostream> // base classes for MLog 14 14 15 #define bsz 160 // two standard lines16 15 17 16 class MArgs; … … 54 53 static const char *const kDark; 55 54 55 static const int fgBufferSize = 160; // two standard lines 56 56 57 char fBuffer; //! 57 char fBase[ bsz+1]; //! Buffer to store the data in58 char fBase[fgBufferSize+1]; //! Buffer to store the data in 58 59 char *fPPtr; //! Pointer to present position in buffer 59 60 const char *fEPtr; //! Pointer to end of buffer -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r7434 r7438 722 722 // set the smallest and biggest size of the Main frame 723 723 // and move it to its appearance position 724 SetWMSizeHints(57 1, 480, 2048, 1536, 1, 1);725 MoveResize(rand()%100+57 1, rand()%100+480, 570, 480);724 SetWMSizeHints(572, 480, 2048, 1536, 1, 1); 725 MoveResize(rand()%100+572, rand()%100+480, 572, 480); 726 726 727 727 // … … 998 998 999 999 c.SetFillColor(16/*165*//*17*//*203*/); 1000 c.SetFrameBorderMode(0); 1000 1001 c.SetBorderMode(0); 1001 1002 … … 1589 1590 1590 1591 case kSize640: 1591 Resize(57 1, 480);1592 Resize(572, 480); 1592 1593 return kTRUE; 1593 1594 case kSize768: -
trunk/MagicSoft/Mars/mbase/Makefile
r6915 r7438 59 59 MClone.cc \ 60 60 MContinue.cc \ 61 MPrint.cc 61 MPrint.cc \ 62 MZlib.cc 62 63 63 64 ############################################################ -
trunk/MagicSoft/Mars/mgui/MCamEvent.cc
r7349 r7438 62 62 Double_t MCamEvent::GetCameraMean(const MGeomCam &cam, Int_t type) const 63 63 { 64 return GetCameraStat(cam, type)[0]; 65 /* 64 66 Int_t num = 0; 65 67 Double_t mean = 0; … … 74 76 } 75 77 return num == 0 ? 0 : mean/num; 78 */ 76 79 } 80 81 // -------------------------------------------------------------------------- 82 // 83 // Return the rms of all corresponding GetPixelContent 84 // 85 Double_t MCamEvent::GetCameraRMS(const MGeomCam &cam, Int_t type) const 86 { 87 return GetCameraStat(cam, type)[1]; 88 /* 89 Int_t num = 0; 90 Double_t sum = 0; 91 Double_t sq = 0; 92 93 for (unsigned int i=0; i<cam.GetNumPixels(); i++) 94 { 95 Double_t val; 96 if (!GetPixelContent(val, i, cam, type)) 97 continue; 98 99 sum += val; 100 sq += val; 101 num ++; 102 } 103 104 if (num==0) 105 return 0; 106 107 sum /= num; 108 sq /= num; 109 110 return TMath::Sqrt(sq-sum*sum); 111 */ 112 } 113 114 // -------------------------------------------------------------------------- 115 // 116 // Return the rms of all corresponding GetPixelContent 117 // 118 TArrayD MCamEvent::GetCameraStat(const MGeomCam &cam, Int_t type) const 119 { 120 Int_t num = 0; 121 Double_t sum = 0; 122 Double_t sq = 0; 123 124 for (unsigned int i=0; i<cam.GetNumPixels(); i++) 125 { 126 Double_t val; 127 if (!GetPixelContent(val, i, cam, type)) 128 continue; 129 130 sum += val; 131 sq += val; 132 num ++; 133 } 134 135 if (num==0) 136 return 0; 137 138 sum /= num; 139 sq /= num; 140 141 TArrayD stat(2); 142 stat[0] = sum; 143 stat[1] = TMath::Sqrt(sq-sum*sum); 144 return stat; 145 } -
trunk/MagicSoft/Mars/mgui/MCamEvent.h
r7349 r7438 2 2 #define MARS_MCamEvent 3 3 4 #ifndef ROOT_T ROOT5 #include <T ROOT.h>4 #ifndef ROOT_TArrayD 5 #include <TArrayD.h> 6 6 #endif 7 7 … … 18 18 19 19 virtual Double_t GetCameraMean(const MGeomCam &cam, Int_t type=0) const; 20 virtual Double_t GetCameraRMS(const MGeomCam &cam, Int_t type=0) const; 21 virtual TArrayD GetCameraStat(const MGeomCam &cam, Int_t type=0) const; 20 22 21 23 ClassDef(MCamEvent, 0) // A camera event -
trunk/MagicSoft/Mars/mimage/MHillas.cc
r7224 r7438 159 159 void MHillas::Print(Option_t *) const 160 160 { 161 Double_t atg = atan2(fMeanY, fMeanX)*kRad2Deg; 162 163 if (atg<0) 164 atg += 180; 161 const Double_t atg = atan2(fMeanX, fMeanY)*kRad2Deg; 165 162 166 163 *fLog << all; … … 182 179 void MHillas::Print(const MGeomCam &geom) const 183 180 { 184 Double_t atg = atan2(fMeanY, fMeanX)*kRad2Deg; 185 186 if (atg<0) 187 atg += 180; 181 const Double_t atg = atan2(fMeanX, fMeanY)*kRad2Deg; 188 182 189 183 *fLog << all; -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r7208 r7438 403 403 read->AddFiles(iter); 404 404 405 const TString fname(Form("%s{s/_D_/_Y_}{s/ .raw$/.root}", fPathOut.Data()));405 const TString fname(Form("%s{s/_D_/_Y_}{s/\\.raw$/\\.root}{s/\\.raw\\.gz$/.root}", fPathOut.Data())); 406 406 407 407 -
trunk/MagicSoft/Mars/mjobs/MSequence.cc
r7380 r7438 279 279 case kRawCal: 280 280 case kRawAll: 281 n += ".raw ";281 n += ".raw.?g?z?"; 282 282 break; 283 283 default: -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r6503 r7438 44 44 45 45 #include <errno.h> 46 #include <fstream>47 46 48 47 #include <TSystem.h> … … 51 50 #include "MLogManip.h" 52 51 52 #include "MZlib.h" 53 53 #include "MTime.h" 54 54 #include "MParList.h" … … 127 127 Byte_t MRawFileRead::IsFileValid(const char *name) 128 128 { 129 ifstreamfin(name);129 MZlib fin(name); 130 130 if (!fin) 131 131 return 0; … … 188 188 189 189 const char *expname = gSystem->ExpandPathName(name); 190 fIn = new ifstream(expname);190 fIn = new MZlib(expname); 191 191 192 192 const Bool_t noexist = !(*fIn); … … 194 194 { 195 195 *fLog << err << "Cannot open file " << expname << ": "; 196 *fLog << strerror(errno) << endl;196 *fLog << (errno==0?strerror(errno):"Insufficient memory for decompression") << endl; 197 197 } 198 198 else -
trunk/MagicSoft/Mars/mraw/MRawFileRead.h
r6500 r7438 7 7 8 8 class TList; 9 class MZlib; 9 10 class MTaskList; 10 11 … … 12 13 { 13 14 private: 14 TList 15 UInt_t 16 UInt_t 17 UInt_t 15 TList *fFileNames; // list of file names 16 UInt_t fNumFile; //! number of next file 17 UInt_t fNumEvents; //! input stream (file to read from) 18 UInt_t fNumTotalEvents; //! total number of events in all files 18 19 19 ifstream*fIn; //! input stream (file to read from)20 MZlib *fIn; //! input stream (file to read from) 20 21 21 MParList 22 MParList *fParList; //! tasklist to call ReInit from 22 23 23 UInt_t 24 UInt_t fInterleave; 24 25 25 26 Int_t OpenNextFile(Bool_t print=kTRUE); -
trunk/MagicSoft/Mars/readdaq.cc
r7432 r7438 92 92 TString kNamein = arg.GetArgumentStr(0); 93 93 94 if (!kNamein.EndsWith(".raw") )94 if (!kNamein.EndsWith(".raw") && !kNamein.EndsWith(".raw.gz")) 95 95 kNamein += ".raw"; 96 96
Note:
See TracChangeset
for help on using the changeset viewer.