Changeset 705 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 03/27/01 15:52:41 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc
r698 r705 14 14 #include "MParList.h" 15 15 #include "MCerPhotEvt.h" 16 #include "M CT1Pedestals.h"16 #include "MPedestalCam.h" 17 17 18 18 ClassImp(MCT1ReadAscii) … … 57 57 // look for the pedestal class in the plist 58 58 // 59 fPedest = (M CT1Pedestals*)pList->FindCreateObj("MCT1Pedestals");59 fPedest = (MPedestalCam*)pList->FindCreateObj("MPedestalCam"); 60 60 if (!fPedest) 61 61 return kFALSE; 62 62 63 fPedest->InitSize(127); 64 63 65 return kTRUE; 66 } 67 68 void MCT1ReadAscii::ReadPedestals() 69 { 70 *fLog << "MCT1Pedestals::AsciiRead: Reading Pedestals..." << endl; 71 72 // 73 // skip the next 4 values 74 // 75 Float_t val; 76 77 *fIn >> val; 78 *fIn >> val; 79 *fIn >> val; 80 *fIn >> val; 81 82 // 83 // read in the next 127 numbers as the pedestals 84 // 85 for (Int_t i = 0; i<127; i++) 86 { 87 *fIn >> val; 88 89 if (val > 0.0) 90 (*fPedest)[i].SetSigma(val); 91 } 92 } 93 94 void MCT1ReadAscii::ReadData() 95 { 96 // 97 // clear the list of cerphot-events 98 // 99 fNphot->Clear(); 100 101 // 102 // five unsused numbers 103 // 104 Int_t val; 105 106 *fIn >> val; // ener 107 *fIn >> val; // zenang 108 *fIn >> val; // sec1 109 *fIn >> val; // sec2 110 111 // 112 // read in the number of cerenkov photons and add the 'new' pixel 113 // too the list with it's id, number of photons and error 114 // 115 for (Int_t i = 0; i<127; i++ ) 116 { 117 Float_t nphot; 118 119 *fIn >> nphot; 120 121 if (nphot > 0.0) 122 fNphot->AddPixel(i, nphot, (*fPedest)[i].GetSigma()); 123 } 124 64 125 } 65 126 … … 74 135 75 136 // 76 // read in a dummy number (event number)137 // read in the event nr 77 138 // 78 Int_t dummyI;79 *fIn >> dummyI;139 Int_t evtnr; 140 *fIn >> evtnr; 80 141 81 142 // … … 89 150 // read in pedestals 90 151 // 91 if (dummyI < 0) 92 fPedest->AsciiRead(*fIn); 152 // FIXME! Set InputStreamID 93 153 94 // 95 // five unsused numbers 96 // 97 *fIn >> dummyI; // ener 98 *fIn >> dummyI; // zenang 99 *fIn >> dummyI; // sec1 100 *fIn >> dummyI; // sec2 154 if (evtnr < 0) 155 { 156 ReadPedestals(); 157 return kCONTINUE; 158 } 101 159 102 // 103 // clear the list of cerphot-events 104 // 105 fNphot->Clear(); 106 107 // 108 // read in the number of cerenkov photons and add the 'new' pixel 109 // too the list with it's id, number of photons and error 110 // 111 for (Int_t i = 0; i<127; i++ ) 112 { 113 Float_t nphot; 114 115 *fIn >> nphot; 116 117 if (nphot > 0.0) 118 fNphot->AddPixel(i, nphot, (*fPedest)[i]); 119 } 160 ReadData(); 120 161 121 162 return kTRUE; -
trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.h
r698 r705 7 7 8 8 class MCerPhotEvt; 9 class M CT1Pedestals;9 class MPedestalCam; 10 10 11 11 class MCT1ReadAscii : public MTask 12 12 { 13 13 private: 14 TString fFileName; //! the file name of the string 15 ifstream *fIn; //! the inputfile 16 MCerPhotEvt *fNphot; //! the data container for all data. 17 MCT1Pedestals *fPedest; //! ct1 pedestals 14 TString fFileName; //! the file name of the string 15 ifstream *fIn; //! the inputfile 16 MCerPhotEvt *fNphot; //! the data container for all data. 17 MPedestalCam *fPedest; //! ct1 pedestals 18 19 void ReadPedestals(); 20 void ReadData(); 18 21 19 22 public: -
trunk/MagicSoft/Mars/manalysis/Makefile
r698 r705 28 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 29 29 30 SRCFILES = MCT1Pedestals.cc \ 31 MCT1ReadAscii.cc \ 30 SRCFILES = MCT1ReadAscii.cc \ 32 31 MPedestalCam.cc \ 33 32 MPedestalPix.cc \
Note:
See TracChangeset
for help on using the changeset viewer.