Changeset 654
- Timestamp:
- 03/01/01 15:56:58 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r653 r654 2 2 3 3 2000/03/01: Thomas Bretz 4 5 * Makefile: added headers to dependencies 6 7 * Makefile.rules: added headers to dependencies 8 9 * merpp.cc: changed from pointers to objects, added compression level 10 11 * readraw.cc: removed unnecessary includes 12 13 * mbase/MArray*.*: changed all Int_t to UInt_t 14 15 * mbase/MLogManip.h: changed name of __DINF__ to dbginf 16 17 * mraw/MRawCrateData.[h,cc]: changed ifstream to istream 18 * mraw/MRawEvtHeader.[h,cc]: dito 19 * mraw/MRawRunHeader.[h,cc]: dito 20 21 * mraw/MRawEvtData.cc: changed the reading, which speeds up merpp by 22 a factor of 10 23 24 * mraw/MRawEvtData.h: added flag to InitArrays and DeletePixels 25 (not yet used) 26 27 * mraw/MRawFileRead.h: removed pParList from parameter list 4 28 5 29 * manalysis/AnalysisLinkDef.h -
trunk/MagicSoft/Mars/Makefile
r604 r654 54 54 55 55 # Use $(CXX) -v ... for a more verbose output 56 $(PROGRAMS): $(LIBRARIES) $(OBJS) MCint.o $(PROGRAMS:=.o)56 $(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o) 57 57 @echo " Linking $@ ..." 58 58 $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@ 59 59 60 $(SOLIB): $(LIBRARIES) $(OBJS) MCint.o60 $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o 61 61 @echo " Linking $(SOLIB) ..." 62 62 $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@ -
trunk/MagicSoft/Mars/Makefile.rules
r574 r654 4 4 -f Makefile.depend 2> kk.kk ; cat kk.kk 5 5 6 $(LIB): $(OBJS) $( CINT)Cint.o6 $(LIB): $(OBJS) $(HEADERS) $(CINT)Cint.o 7 7 @echo " - Building Library lib$(LIB) ... " 8 8 $(AR) $(LIB) *.o -
trunk/MagicSoft/Mars/manalysis/Makefile
r601 r654 32 32 33 33 SRCFILES = MCerPhotEvt.cc \ 34 MReadCT1Ascii.cc 34 MCerPhotPix.cc \ 35 MCT1Pedestals.cc \ 36 MCT1ReadAscii.cc 35 37 36 38 SRCS = $(SRCFILES) -
trunk/MagicSoft/Mars/mbase/MArray.h
r458 r654 21 21 { 22 22 protected: 23 Int_t fN; // Number of array elements23 UInt_t fN; // Number of array elements 24 24 25 25 public: 26 26 MArray() { fN = 0; } 27 MArray( Int_t n){ fN = n; }27 MArray(UInt_t n) { fN = n; } 28 28 MArray(const MArray &a) { fN = a.fN; } 29 29 virtual ~MArray() { fN = 0; } … … 31 31 MArray &operator=(const MArray &rhs) { fN = rhs.fN; return *this; } 32 32 33 Int_tGetSize() const { return fN; }34 virtual void Set( Int_t n) = 0;33 UInt_t GetSize() const { return fN; } 34 virtual void Set(UInt_t n) = 0; 35 35 36 36 ClassDef(MArray, 1) //Abstract array base class for TObject derived Arrays -
trunk/MagicSoft/Mars/mbase/MArrayB.h
r458 r654 26 26 MArrayB() 27 27 { 28 fN = 0;28 fN = 0; 29 29 fArray = NULL; 30 30 } 31 31 32 MArrayB( Int_t n)32 MArrayB(UInt_t n) 33 33 { 34 fN = 0;34 fN = 0; 35 35 fArray = NULL; 36 if (n > 0) 37 36 37 Set(n); 38 38 } 39 39 40 MArrayB( Int_t n, Byte_t *array)40 MArrayB(UInt_t n, Byte_t *array) 41 41 { 42 42 // Create TArrayC object and initialize it with values of array. 43 fN = 0;43 fN = 0; 44 44 fArray = NULL; 45 45 46 Set(n, array); 46 47 } … … 53 54 } 54 55 55 Int_t GetSize() const56 UInt_t GetSize() const 56 57 { 57 58 return fN; … … 73 74 } 74 75 75 void Adopt( Int_t n, Byte_t *array)76 void Adopt(UInt_t n, Byte_t *array) 76 77 { 77 78 // Adopt array arr into TArrayC, i.e. don't copy arr but use it directly … … 84 85 } 85 86 86 void AddAt(Byte_t c, Int_t i)87 void AddAt(Byte_t c, UInt_t i) 87 88 { 88 89 // Add char c at position i. Check for out of bounds. … … 90 91 } 91 92 92 void AddAt(Byte_t *array, Int_t i,Int_t n)93 void AddAt(Byte_t *array, UInt_t i, UInt_t n) 93 94 { 94 95 // Add char c at position i. Check for out of bounds. … … 96 97 } 97 98 98 Byte_t At( Int_t i)99 Byte_t At(UInt_t i) 99 100 { 100 101 return fArray[i]; … … 111 112 } 112 113 113 void Set( Int_t n)114 void Set(UInt_t n) 114 115 { 115 116 // Set size of this array to n chars. … … 117 118 // then the old array is deleted. 118 119 119 if (n < 0 || n==fN)120 if (n==fN) 120 121 return; 121 122 122 123 Byte_t *temp = fArray; 123 if (n != 0) 124 if (n == 0) 125 fArray = 0; 126 else 124 127 { 125 128 fArray = new Byte_t[n]; … … 132 135 } 133 136 } 134 else135 {136 fArray = 0;137 }138 137 139 138 if (fN) … … 143 142 } 144 143 145 void Set( Int_t n, Byte_t *array)144 void Set(UInt_t n, Byte_t *array) 146 145 { 147 146 // Set size of this array to n chars and set the contents. 148 if ( n < 0 || array == 0)147 if (!array) 149 148 return; 150 149 … … 154 153 fArray = 0; 155 154 } 155 156 156 fN = n; 157 157 … … 165 165 } 166 166 167 Byte_t &operator[]( Int_t i)167 Byte_t &operator[](UInt_t i) 168 168 { 169 169 return fArray[i]; -
trunk/MagicSoft/Mars/mbase/MArrayS.h
r458 r654 25 25 MArrayS() 26 26 { 27 fN = 0;27 fN = 0; 28 28 fArray = NULL; 29 29 } 30 30 31 MArrayS( Int_t n)31 MArrayS(UInt_t n) 32 32 { 33 fN = 0;33 fN = 0; 34 34 fArray = NULL; 35 if (n > 0) 36 Set(n); 35 Set(n); 37 36 } 38 37 39 MArrayS( Int_t n, UShort_t *array)38 MArrayS(UInt_t n, UShort_t *array) 40 39 { 41 40 // Create TArrayC object and initialize it with values of array. 42 fN = 0;41 fN = 0; 43 42 fArray = NULL; 44 43 Set(n, array); … … 52 51 } 53 52 54 Int_t GetSize() const53 UInt_t GetSize() const 55 54 { 56 55 return fN; … … 72 71 } 73 72 74 void Adopt( Int_t n, UShort_t *array)73 void Adopt(UInt_t n, UShort_t *array) 75 74 { 76 75 // Adopt array arr into TArrayC, i.e. don't copy arr but use it directly … … 83 82 } 84 83 85 void AddAt(UShort_t c, Int_t i)84 void AddAt(UShort_t c, UInt_t i) 86 85 { 87 86 // Add char c at position i. Check for out of bounds. … … 89 88 } 90 89 91 UShort_t At( Int_t i)90 UShort_t At(UInt_t i) 92 91 { 93 92 return fArray[i]; … … 104 103 } 105 104 106 void Set( Int_t n)105 void Set(UInt_t n) 107 106 { 108 107 // Set size of this array to n chars. … … 110 109 // then the old array is deleted. 111 110 112 if (n < 0 || n==fN)111 if (n==fN) 113 112 return; 114 113 115 114 UShort_t *temp = fArray; 116 if (n != 0) 115 if (n == 0) 116 fArray = NULL; 117 else 117 118 { 118 119 fArray = new UShort_t[n]; … … 125 126 } 126 127 } 127 else128 {129 fArray = NULL;130 }131 128 132 129 if (fN) … … 136 133 } 137 134 138 void Set( Int_t n, UShort_t *array)135 void Set(UInt_t n, UShort_t *array) 139 136 { 140 137 // Set size of this array to n chars and set the contents. 141 if ( n < 0 || array == 0)138 if (!array) 142 139 return; 143 140 … … 158 155 } 159 156 160 UShort_t &operator[]( Int_t i)157 UShort_t &operator[](UInt_t i) 161 158 { 162 159 return fArray[i]; -
trunk/MagicSoft/Mars/mbase/MLogManip.h
r604 r654 53 53 // 54 54 #ifndef __CINT__ 55 #define __DINF____FILE__ << " " << __LINE__ << ": "55 #define dbginf __FILE__ << " " << __LINE__ << ": " 56 56 #endif 57 57 // … … 63 63 // 64 64 #ifndef __CINT__ 65 #define DEBUG(lvl) flush << debug(lvl) << __DINF__65 #define DEBUG(lvl) flush << debug(lvl) << dbginf 66 66 #endif 67 67 -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r609 r654 43 43 { 44 44 // 45 // open file 45 // open file and check if file is really open 46 46 // 47 47 fFile = new TFile(fFileName, "READ"); … … 54 54 } 55 55 56 // 57 // try to get the tree and check if it was found 58 // 56 59 fTree = (TTree*)fFile->Get(fTreeName); 57 58 60 if (!fTree) 59 61 { … … 63 65 } 64 66 67 // 68 // get number of events in this tree 69 // 65 70 fNumEntries = (UInt_t)fTree->GetEntries(); 71 72 // 73 // set pointer to first event 74 // 66 75 fNumEntry = 0; 67 76 77 // 78 // output logging information 79 // 68 80 *fLog << "File: '" << fFileName << "' Tree: '" << fTreeName; 69 81 *fLog << "' with " << fNumEntries << " Entries opened." << endl; -
trunk/MagicSoft/Mars/merpp.cc
r609 r654 43 43 // check for the right usage of the program 44 44 // 45 if (argc !=3)45 if (argc<3 || argc>4) 46 46 { 47 47 gLog << "Sorry the usage is:" << endl; 48 gLog << " merpp inputfile outputfile " << endl << endl;48 gLog << " merpp inputfile outputfile [compression level]" << endl << endl; 49 49 return -1; 50 50 } 51 52 // 53 // This is to make argv[i] more readable insidethe code 54 // 55 const char *kNamein = argv[1]; 56 const char *kNameout = argv[2]; 57 const int kComprlvl = argc==4 ? atoi(argv[3]) : 9; 51 58 52 59 // … … 58 65 // check whether the given files are OK. 59 66 // 60 if (gSystem->AccessPathName( argv[1], kFileExists))67 if (gSystem->AccessPathName(kNamein, kFileExists)) 61 68 { 62 gLog << "Sorry, the file '" << argv[1]<< "' doesn't exist." << endl;69 gLog << "Sorry, the file '" << kNamein << "' doesn't exist." << endl; 63 70 return -1; 64 71 } 65 72 66 if (!gSystem->AccessPathName( argv[2], kFileExists))67 gLog << "Warning: The file '" << argv[2]<< "' exists." << endl;73 if (!gSystem->AccessPathName(kNameout, kFileExists)) 74 gLog << "Warning: The file '" << kNameout << "' exists." << endl; 68 75 else 69 if (!gSystem->AccessPathName( argv[2], kWritePermission))76 if (!gSystem->AccessPathName(kNameout, kWritePermission)) 70 77 { 71 gLog << "Sorry, you don't have write permission for '" << argv[2]<< "'." << endl;78 gLog << "Sorry, you don't have write permission for '" << kNameout << "'." << endl; 72 79 return -1; 73 80 } … … 77 84 // and an (empty) list of tasks which should be executed 78 85 // 79 MParList *plist = new MParList;86 MParList plist; 80 87 81 MTaskList *tasks = new MTaskList;82 plist ->AddToList(tasks);88 MTaskList tasks; 89 plist.AddToList(&tasks); 83 90 84 MRawRunHeader *runheader = new MRawRunHeader;85 plist ->AddToList(runheader);91 MRawRunHeader runheader; 92 plist.AddToList(&runheader); 86 93 87 MRawEvtHeader *evtheader = new MRawEvtHeader;88 plist ->AddToList(evtheader);94 MRawEvtHeader evtheader; 95 plist.AddToList(&evtheader); 89 96 90 MRawEvtData *evtdata = new MRawEvtData;91 plist ->AddToList(evtdata);97 MRawEvtData evtdata; 98 plist.AddToList(&evtdata); 92 99 93 MRawCrateArray *cratearray = new MRawCrateArray;94 plist ->AddToList(cratearray);100 MRawCrateArray cratearray; 101 plist.AddToList(&cratearray); 95 102 96 MTime *evttime = new MTime("MRawEvtTime");97 plist ->AddToList(evttime);103 MTime evttime("MRawEvtTime"); 104 plist.AddToList(&evttime); 98 105 99 106 // … … 102 109 // be created by MRawFileRead::PreProcess 103 110 // 104 MRawFileRead *reader = new MRawFileRead(argv[1]);105 MRawFileWrite *writer = new MRawFileWrite(argv[2], "RECREATE");106 tasks ->AddToList(reader);107 tasks ->AddToList(writer);111 MRawFileRead reader(kNamein); 112 MRawFileWrite writer(kNameout, "RECREATE", "Title", kComprlvl); 113 tasks.AddToList(&reader); 114 tasks.AddToList(&writer); 108 115 109 116 // … … 114 121 MEvtLoop magic; 115 122 116 magic.SetParList( plist);123 magic.SetParList(&plist); 117 124 118 125 // -
trunk/MagicSoft/Mars/mgui/GuiLinkDef.h
r597 r654 13 13 14 14 #pragma link C++ class MHexagon; 15 #pragma link C++ class M PixGeom;16 #pragma link C++ class M CamGeom;15 #pragma link C++ class MGeomPix; 16 #pragma link C++ class MGeomCam; 17 17 #pragma link C++ class MCamNeighbor; 18 18 19 19 #pragma link C++ class MCamDisplay; 20 20 21 //#pragma link C++ class MDumpEvtHeader;22 23 21 #endif -
trunk/MagicSoft/Mars/mgui/Makefile
r602 r654 58 58 MGPrototyp.cc \ 59 59 MHexagon.cc \ 60 MCamGeom.cc \ 60 MGeomCam.cc \ 61 MGeomPix.cc \ 61 62 MCamNeighbor.cc \ 62 63 MCamDisplay.cc -
trunk/MagicSoft/Mars/mraw/MRawCrateData.cc
r454 r654 12 12 } 13 13 14 void MRawCrateData::ReadEvt(i fstream& fin)14 void MRawCrateData::ReadEvt(istream& fin) 15 15 { 16 16 // -
trunk/MagicSoft/Mars/mraw/MRawCrateData.h
r454 r654 42 42 void Print(Option_t *t=NULL); 43 43 44 void ReadEvt(i fstream& fin);44 void ReadEvt(istream& fin); 45 45 46 46 ClassDef(MRawCrateData, 1) //Container to store the Raw CRATE DATA -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r609 r654 216 216 } 217 217 218 void MRawEvtData::DeletePixels( )218 void MRawEvtData::DeletePixels(Bool_t flag) 219 219 { 220 220 // … … 222 222 // 223 223 DeleteArrays(); 224 InitArrays( );224 InitArrays(flag); 225 225 } 226 226 … … 233 233 } 234 234 235 void MRawEvtData::InitArrays() 236 { 237 fHiGainPixId = new MArrayS(0); //UShort_t[0]; 238 fLoGainPixId = new MArrayS(0); //new UShort_t[0]; 239 fHiGainFadcSamples = new MArrayB(0); //new Byte_t[0]; 240 fLoGainFadcSamples = new MArrayB(0); //new Byte_t[0]; 235 void MRawEvtData::InitArrays(Bool_t flag) 236 { 237 // const int npix = !flag ? 0 : fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate(); 238 239 fHiGainPixId = new MArrayS(0);//npix); 240 fLoGainPixId = new MArrayS(0);//npix); 241 fHiGainFadcSamples = new MArrayB(0);//npix*fRunHeader->GetNumSamplesHiGain()); 242 fLoGainFadcSamples = new MArrayB(0);//npix*fRunHeader->GetNumSamplesLoGain()); 241 243 } 242 244 … … 248 250 // Add to lo gains if lflag = 1 249 251 // 250 251 252 MArrayS *arrpix = lflag ? fLoGainPixId : fHiGainPixId; 252 253 MArrayB *arrsam = lflag ? fLoGainFadcSamples : fHiGainFadcSamples; … … 286 287 } 287 288 288 /* 289 void MRawEvtData::AddPixelLo(UShort_t nOfPixel, TArrayC *data, int nr, int pos) 290 { 291 // 292 // add the number of the new pixel to the array as last entry 293 // 294 fLoGainPixId->AddAt(nOfPixel, nr); 295 296 // 297 // add the new slices as last entries to array 298 // 299 fLoGainFadcSamples->AddAt((Byte_t*)data->GetArray(), pos, data->GetSize()); 300 } 301 302 void MRawEvtData::AddPixelHi(UShort_t nOfPixel, TArrayC *data, int nr, int pos) 303 { 304 // check whether we got the right number of new samples 305 // if there are no samples already stored: this is the new number of samples 306 // 307 const Byte_t ns = data->GetSize(); 308 309 // 310 // add the number of the new pixel to the array as last entry 311 // 312 fHiGainPixId->AddAt(nOfPixel, nr); 313 314 // 315 // add the new slices as last entries to array 316 // 317 fHiGainFadcSamples->AddAt((Byte_t*)data->GetArray(), arrsam->GetSize()-ns, ns); 318 } 319 */ 320 void MRawEvtData::ReadEvt(ifstream &fin) 289 void MRawEvtData::ReadEvt(istream &fin) 321 290 { 322 291 // … … 327 296 const UShort_t nhi = fRunHeader->GetNumSamplesHiGain(); 328 297 329 TArrayC lo(nlo);330 TArrayC hi(nhi);331 332 298 const UShort_t npic = fRunHeader->GetNumPixInCrate(); 299 300 // 301 // Enhance array by the size which we'll read now 302 // 303 Byte_t lo[nlo]; 304 Byte_t hi[nhi]; 305 306 const int npixhi = fHiGainPixId->GetSize(); 307 const int npixlo = fLoGainPixId->GetSize(); 308 309 fHiGainPixId->Set(npixhi+npic); 310 fLoGainPixId->Set(npixlo+npic); 311 312 const int nsamhi = fHiGainFadcSamples->GetSize(); 313 const int nsamlo = fLoGainFadcSamples->GetSize(); 314 315 fHiGainFadcSamples->Set(nsamhi+nhi*npic); 316 fLoGainFadcSamples->Set(nsamlo+nlo*npic); 333 317 334 318 for (int i=0; i<npic; i++) … … 339 323 const UShort_t npix = fRunHeader->GetPixAssignment(i); 340 324 341 fin.read((Byte_t*)hi.GetArray(), nhi); 342 AddPixel(npix, &hi, kFALSE); 325 // 326 // This is to fill the data of one pixel to the MRawEvtHeader Class. 327 // The parameters are the pixelnumber and the FADC_SLICES values of ADCs 328 // Add to lo gains if lflag = 1 329 // 330 fin.read(hi, nhi); 331 fHiGainPixId->AddAt(npix, npixhi+i); 332 fHiGainFadcSamples->AddAt(hi, nsamhi+i*nhi, nhi); 343 333 344 334 // FIXME: Not implemented in the raw files yet 345 335 //if (IsLoGainOn(i, j)) 346 336 //{ 347 fin.read((Byte_t*)lo.GetArray(), nlo); 348 AddPixel(npix, &lo, kTRUE); 337 fin.read(lo, nlo); 338 fLoGainPixId->AddAt(npix, npixlo+i); 339 fLoGainFadcSamples->AddAt(lo, nsamlo+i*nlo, nlo); 349 340 //} 350 341 } -
trunk/MagicSoft/Mars/mraw/MRawEvtData.h
r454 r654 27 27 MArrayB *fLoGainFadcSamples; // list of lo gain samples of all pixels (ordering: see fLoGainPixId) 28 28 29 void InitArrays( );29 void InitArrays(Bool_t flag=kFALSE); 30 30 void DeleteArrays(); 31 31 … … 47 47 void Draw (Option_t * = NULL); 48 48 49 void DeletePixels( );49 void DeletePixels(Bool_t flag=kFALSE); 50 50 void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE); 51 51 … … 54 54 Byte_t GetNumPixels() const; 55 55 56 void ReadEvt(i fstream &fin);56 void ReadEvt(istream &fin); 57 57 58 58 ClassDef(MRawEvtData, 1) //Container to store the raw Event Data -
trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
r609 r654 169 169 *fLog << "Number of Lo Gains On: " << fNumLoGainOn << endl; 170 170 171 for ( int i=0; i<fPixLoGainOn->GetSize(); i++)171 for (unsigned int i=0; i<fPixLoGainOn->GetSize(); i++) 172 172 { 173 173 for (int j=0; j<8; j++) … … 194 194 } 195 195 196 int MRawEvtHeader::ReadEvt(i fstream &fin)196 int MRawEvtHeader::ReadEvt(istream &fin) 197 197 { 198 198 // … … 220 220 221 221 fNumLoGainOn = 0; 222 for ( int i=0; i<fPixLoGainOn->GetSize(); i++)222 for (unsigned int i=0; i<fPixLoGainOn->GetSize(); i++) 223 223 for (int j=0; j<8; j++) 224 224 if ((*fPixLoGainOn)[i] & (1<<j)) -
trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h
r454 r654 46 46 UShort_t GetTrigType() const { return fTrigType; } 47 47 48 int ReadEvt(i fstream& fin);48 int ReadEvt(istream& fin); 49 49 50 50 ClassDef(MRawEvtHeader, 1) // Parameter Conatiner for raw EVENT HEADER -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r609 r654 24 24 ClassImp(MRawFileRead) 25 25 26 /* 27 ----------- please don't delete ------------ 28 #define kBUFSZ 1024 29 30 class bifstream : public istream, public streambuf 31 { 32 private: 33 char fBuffer[kBUFSZ]; //! 34 FILE *fd; 35 36 int sync() 37 { 38 memset(fBuffer, 0, kBUFSZ); 39 return 0; 40 } 41 int underflow() 42 { 43 int sz=fread(fBuffer, 1, kBUFSZ, fd); 44 setg(fBuffer, fBuffer, fBuffer+kBUFSZ); 45 46 return sz==kBUFSZ ? *(unsigned char*)fBuffer : EOF;//EOF; 47 } 48 public: 49 bifstream(const char *name) : istream(this) 50 { 51 fd = fopen(name, "rb"); 52 setbuf(fBuffer, kBUFSZ); 53 } 54 }; 55 */ 56 26 57 MRawFileRead::MRawFileRead(const char *fname, const char *name, const char *title) 27 58 { … … 38 69 } 39 70 40 Bool_t MRawFileRead::PreProcess (MParList *pList) 71 MRawFileRead::~MRawFileRead() 72 { 73 delete fIn; 74 } 75 76 Bool_t MRawFileRead::PreProcess(MParList *pList) 41 77 { 42 78 // 43 79 // remember the pointer to the parameter list fur further usage 44 80 // 45 pParList = pList;46 81 47 82 // … … 103 138 return kTRUE; 104 139 } 105 140 106 141 Bool_t MRawFileRead::Process() 107 142 { … … 112 147 if (!fRawEvtHeader->ReadEvt(*fIn)) 113 148 return kFALSE; 114 //fRawEvtHeader->Print();115 149 116 150 // … … 135 169 { 136 170 fRawCrateArray->GetEntry(i)->ReadEvt(*fIn); 137 //fRawCrateArray->GetEntry(i)->Print();138 171 139 172 fRawEvtData->ReadEvt(*fIn); 140 173 } 141 //fRawEvtData->Print();142 174 143 175 return kTRUE; 144 145 176 } 146 177 -
trunk/MagicSoft/Mars/mraw/MRawFileRead.h
r454 r654 18 18 { 19 19 private: 20 MParList *pParList; 20 MRawRunHeader *fRawRunHeader; // run header information container to fill from file 21 MRawEvtHeader *fRawEvtHeader; // event header information container to fill from file 22 MRawEvtData *fRawEvtData; // raw evt header infomation container to fill from file 23 MRawCrateArray *fRawCrateArray; // crate information array container to fill from file 24 MTime *fRawEvtTime; // raw evt time information container to fill from file 21 25 22 MRawRunHeader *fRawRunHeader; 23 MRawEvtHeader *fRawEvtHeader; 24 MRawEvtData *fRawEvtData; 25 MRawCrateArray *fRawCrateArray; 26 MTime *fRawEvtTime; 27 28 ifstream *fIn; //! 26 ifstream *fIn; //! buffered input stream (file to read from) 29 27 30 28 public: 31 29 MRawFileRead(const char *filename, const char *name=NULL, const char *title=NULL); 30 ~MRawFileRead(); 32 31 33 32 Bool_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r609 r654 33 33 } 34 34 35 void MRawRunHeader::ReadEvt(i fstream& fin)35 void MRawRunHeader::ReadEvt(istream& fin) 36 36 { 37 37 // … … 87 87 // print run header information on screen 88 88 // 89 *fLog << endl; 89 90 *fLog << "MagicNumber: 0x" << hex << fMagicNumber << " - " << (fMagicNumber==0xc0c0?"OK":"Wrong!") << endl; 90 91 *fLog << "Version: " << dec << "Format=" << fFormatVersion << " "; -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r454 r654 11 11 #endif 12 12 13 class TBuffer; 13 14 class ifstream; 14 15 class MArrayS; … … 77 78 void Print(Option_t *t=NULL); 78 79 79 void ReadEvt(i fstream& fin);80 void ReadEvt(istream& fin); 80 81 81 82 ClassDef(MRawRunHeader, 1) // storage container for general info -
trunk/MagicSoft/Mars/readraw.cc
r609 r654 1 //#include <iostream.h>2 3 1 #include <TSystem.h> 4 2 … … 21 19 #include "MMcEvt.hxx" 22 20 #include "MMcTrig.hxx" 23 24 #include "MGMarsMain.h"25 21 26 22 /////////////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.