Changeset 1082 for trunk/MagicSoft/Mars/mraw
- Timestamp:
- 11/15/01 12:06:46 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mraw
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc
r1031 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 -
trunk/MagicSoft/Mars/mraw/MRawCrateData.cc
r987 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 39 39 40 40 #include "MLog.h" 41 #include "MLogManip.h" 41 42 42 43 ClassImp(MRawCrateData); … … 64 65 void MRawCrateData::Print(Option_t *t) const 65 66 { 66 gLog << "Crate Number " << fDAQCrateNumber << ": "; 67 gLog << "FADCEventNr=" << fFADCEvtNumber << " "; 68 gLog << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl; 67 *fLog << all; 68 *fLog << "Crate Number " << fDAQCrateNumber << ": "; 69 *fLog << "FADCEventNr=" << fFADCEvtNumber << " "; 70 *fLog << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl; 69 71 } -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r1076 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 49 49 50 50 #include "MRawEvtData.h" 51 52 #include <iomanip.h>53 51 54 52 #include <fstream.h> … … 155 153 fLog->unsetf(ios::showbase); 156 154 157 *fLog << dec ;155 *fLog << dec << all; 158 156 *fLog << "HiGain: " << nHiPix << " Pixels with " << (Int_t)nHiSamp << " Samples" << endl; 159 157 *fLog << "LoGain: " << nLoPix << " Pixels with " << (Int_t)nLoSamp << " Samples";; … … 213 211 if (GetNumPixels()==0) 214 212 { 215 *fLog << "Sorry, no pixel to draw!" << endl;213 *fLog << warn << "Sorry, no pixel to draw!" << endl; 216 214 return; 217 215 } … … 229 227 num= GetNumPixels(); 230 228 231 *fLog << "Drawing Graph: Pixel #" << num << " of " << (int)GetNumPixels() << endl;229 *fLog << inf << "Drawing Graph: Pixel #" << num << " of " << (int)GetNumPixels() << endl; 232 230 233 231 const Int_t n = GetNumHiGainSamples(); … … 288 286 } 289 287 290 *fLog << dbginf << "Warning - You must specify either 'GRAPH' or 'HIST'" << endl;288 *fLog << warn << dbginf << "Warning - You must specify either 'GRAPH' or 'HIST'" << endl; 291 289 } 292 290 … … 375 373 if (nSamp && ns!=nSamp) 376 374 { 377 *fLog << "RawEvtData::AddPixel: Error, number of samples in ";375 *fLog << err << "RawEvtData::AddPixel: Error, number of samples in "; 378 376 *fLog << "TArrayC doesn't match actual number" << endl; 379 377 return; -
trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
r1004 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 99 99 100 100 #include "MLog.h" 101 #include "MLogManip.h" 102 101 103 #include "MTime.h" 102 104 #include "MArrayB.h" … … 117 119 // set all member to zero, init the pointer to ClonesArray, 118 120 // 119 120 121 fPixLoGainOn = new MArrayB; 121 122 … … 180 181 void MRawEvtHeader::Print(Option_t *o) const 181 182 { 183 *fLog << all; 182 184 *fLog << "DAQEvtNr: " << dec << fDAQEvtNumber << " ("; 183 185 *fLog << "Trigger: "; … … 214 216 215 217 *fLog << endl; 216 217 218 *fLog << endl; 218 219 219 } 220 220 -
trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
r1052 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 143 143 void MRawEvtPixelIter::Draw(Option_t *t) 144 144 { 145 char *txt = new char[6+strlen(t)]; 146 sprintf(txt, "%s%d", t, *fHiGainId); 147 fData->Draw(txt); 148 delete txt; 145 fData->Draw(Form("%s%d", t, *fHiGainId)); 149 146 } 150 147 -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r1037 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 44 44 45 45 #include "MLog.h" 46 #include "MLogManip.h" 47 46 48 #include "MTime.h" 47 49 #include "MParList.h" … … 92 94 // 93 95 MRawFileRead::MRawFileRead(const char *fname, const char *name, const char *title) 94 : fFileName(fname) 96 : fFileName(fname), fIn(NULL) 95 97 { 96 98 fName = name ? name : "MRawFileRead"; 97 99 fTitle = title ? title : "Read task to read DAQ binary files"; 98 100 99 // 100 // open the input stream 101 // 102 fFileName = fname; 103 fIn = new ifstream(fname); 101 fIn = new ifstream; 104 102 } 105 103 … … 132 130 { 133 131 // 132 // open the input stream 134 133 // first of all check if opening the file in the constructor was 135 134 // successfull 136 135 // 136 fIn->open(fFileName); 137 137 if (!(*fIn)) 138 138 { 139 *fLog << "Error: Cannot open file '" << fFileName << "'" << endl;139 *fLog << err << "Error: Cannot open file '" << fFileName << "'" << endl; 140 140 return kFALSE; 141 141 } … … 231 231 // -------------------------------------------------------------------------- 232 232 // 233 // C hecks whether the number of read events differs from the number the234 // file should containe (MRawRunHeader). Prints a warning if it doesn't235 // match.233 // Close the file. Check whether the number of read events differs from 234 // the number the file should containe (MRawRunHeader). Prints a warning 235 // if it doesn't match. 236 236 // 237 237 Bool_t MRawFileRead::PostProcess() 238 238 { 239 // 240 // Sanity check for the number of events 241 // 239 242 if (fRawRunHeader->GetNumEvents() == GetNumExecutions()-1) 240 243 return kTRUE; 241 244 242 *fLog << "WARNING- number of read events (" << GetNumExecutions()-1;245 *fLog << warn << "Warning - number of read events (" << GetNumExecutions()-1; 243 246 *fLog << ") doesn't match number in run header ("; 244 247 *fLog << fRawRunHeader->GetNumEvents() << ")." << endl; -
trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc
r1031 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 130 130 if (!fRawEvtHeader) 131 131 { 132 *fLog << dbginf << "MRawEvtHeader not found... aborting." << endl;132 *fLog << err << dbginf << "MRawEvtHeader not found... aborting." << endl; 133 133 return kFALSE; 134 134 } … … 137 137 if (!fRawEvtData) 138 138 { 139 *fLog << dbginf << "MRawEvtData not found... aborting." << endl;139 *fLog << err << dbginf << "MRawEvtData not found... aborting." << endl; 140 140 return kFALSE; 141 141 } … … 144 144 if (!fRawCrateArray) 145 145 { 146 *fLog << dbginf << "MRawCrateArray not found... aborting." << endl;146 *fLog << err << dbginf << "MRawCrateArray not found... aborting." << endl; 147 147 return kFALSE; 148 148 } … … 151 151 if (!fRawEvtTime) 152 152 { 153 *fLog << dbginf << "MRawEvtTime not found... aborting." << endl;153 *fLog << err << dbginf << "MRawEvtTime not found... aborting." << endl; 154 154 return kFALSE; 155 155 } … … 158 158 if (!fRawRunHeader) 159 159 { 160 *fLog << dbginf << "MRawRunHeader not found... aborting." << endl;160 *fLog << err << dbginf << "MRawRunHeader not found... aborting." << endl; 161 161 return kFALSE; 162 162 } … … 254 254 } 255 255 256 *fLog << dbginf << "Got wrong number for the trigger type: " << type;257 *fLog << " - skipping" << endl;256 *fLog << warn << dbginf << "Got wrong number for the trigger type: " << type; 257 *fLog << " - skipped" << endl; 258 258 259 259 return kCONTINUE; -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r1004 r1082 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 37 37 38 38 #include "MLog.h" 39 #include "MLogManip.h" 40 39 41 #include "MArrayS.h" 40 42 … … 79 81 if (fMagicNumber != kMagicNumber) 80 82 { 81 *fLog << "Error: Wrong Magic Number: Not a Magic File!" << endl;83 *fLog << err << "Error: Wrong Magic Number: Not a Magic File!" << endl; 82 84 return; 83 85 } … … 122 124 void MRawRunHeader::Print(Option_t *t) const 123 125 { 124 *fLog << endl;126 *fLog << all << endl; 125 127 *fLog << "MagicNumber: 0x" << hex << fMagicNumber << " - " << (fMagicNumber==kMagicNumber?"OK":"Wrong!") << endl; 126 128 *fLog << "Version: " << dec << "Format=" << fFormatVersion << " ";
Note:
See TracChangeset
for help on using the changeset viewer.