Changeset 2632 for trunk/MagicSoft
- Timestamp:
- 12/10/03 11:56:33 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2630 r2632 8 8 * manalysis/MPedPhotPix.[h,cc], manalysis/MPedPhotCam.[h,cc]: 9 9 - added 10 11 * merpp.cc: 12 - added support for dc report files 13 14 * mcamera/CameraLinkDef.h, mcamera/Makefile: 15 - added MCameraDC 16 17 * mhist/MHVsTime.cc: 18 - fixed a missing initialisation 19 20 * mraw/MRawFileRead.cc: 21 - fixed wrong MRawEvtTime name 22 23 * mreport/MReport.cc: 24 - fixed reading of dc files 25 26 * mreport/MReportCurrents.[h,cc]: 27 - do not store currents here. store it in MCameraDC 28 29 * mreport/MReportFileRead.[h,cc]: 30 - replaced non working ReadLine by ReadToDelim (reason unknown!) 31 - added SetHasNoHeader and kHasNoHeader 10 32 11 33 -
trunk/MagicSoft/Mars/macros/readcurrents.C
r2222 r2632 50 50 51 51 MGeomCamMagic geomcam; 52 MC urrentscur;52 MCameraDC cur; 53 53 MTaskList tlist; 54 54 … … 57 57 plist.AddToList(&tlist); 58 58 59 MReadCurrents read(fname); 60 /* 61 read.AddFile("../currents/dcs_arcturus2.dat"); 62 read.AddFile("../currents/dcs_arcturus3.dat"); 63 read.AddFile("../currents/dcs_arcturus4.dat"); 64 read.AddFile("../currents/dcs_arcturus5.dat"); 65 read.AddFile("../currents/dcs_arcturus6.dat"); 66 read.AddFile("../currents/dcs_arcturus7.dat"); 67 read.AddFile("../currents/dcs_arcturus8.dat"); 68 read.AddFile("../currents/dcs_arcturus9.dat"); 69 read.AddFile("../currents/dcs_arcturus10.dat"); 70 */ 59 MReportFileRead read(fname); 60 read.SetHasNoHeader(); 61 read.AddToList("MReportCurrents"); 62 71 63 tlist.AddToList(&read); 72 64 … … 91 83 // Remove the comments if you want to go through the file 92 84 // event-by-event: 93 //if (!HandleInput())94 //break;85 if (!HandleInput()) 86 break; 95 87 } 96 88 -
trunk/MagicSoft/Mars/mcamera/CameraLinkDef.h
r2550 r2632 11 11 #pragma link C++ class MCameraHV+; 12 12 #pragma link C++ class MCameraLV+; 13 #pragma link C++ class MCameraDC+; 13 14 #pragma link C++ class MCameraCalibration+; 14 15 #pragma link C++ class MCameraPowerSupply+; -
trunk/MagicSoft/Mars/mcamera/Makefile
r2535 r2632 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase 24 INCLUDES = -I. -I../mbase -I../mgui 25 # mgui - MCameraDC <MCamEvent> 25 26 26 27 #------------------------------------------------------------------------------ … … 33 34 MCameraHV.cc \ 34 35 MCameraLV.cc \ 36 MCameraDC.cc \ 35 37 MCameraLid.cc \ 36 38 MCameraLids.cc \ -
trunk/MagicSoft/Mars/merpp.cc
r2557 r2632 59 59 gLog << "Sorry the usage is:" << endl; 60 60 gLog << " merpp [-h] [-?] [-a0] [-vn] [-cn] [-u1]" << endl; 61 gLog << " inputfile[.rep,[.raw] ] [outputfile[.root]]" << endl << endl;61 gLog << " inputfile[.rep,[.raw],[.txt]] [outputfile[.root]]" << endl << endl; 62 62 gLog << " inputfile.raw: Magic DAQ binary file." << endl; 63 63 gLog << " inputfile.rep: Magic Central Control report file." << endl; 64 gLog << " inputfile.txt: Magic DC currents file." << endl; 64 65 gLog << " ouputfile.root: Merpped root file." << endl; 65 66 gLog << " -a0: Do not use Ansii codes." << endl; … … 110 111 111 112 const Bool_t isreport = kNamein.EndsWith(".rep"); 112 113 if (!kNamein.EndsWith(".raw") && !isreport) 113 const Bool_t isdc = kNamein.EndsWith(".txt"); 114 115 if (!kNamein.EndsWith(".raw") && !isreport && !isdc) 114 116 kNamein += ".raw"; 115 117 … … 195 197 196 198 const TString option(kUpdate ? "UPDATE" : "RECREATE"); 197 if (isreport )199 if (isreport || isdc) 198 200 { 199 201 MReportFileRead *r = new MReportFileRead(kNamein); 200 r->AddToList("MReportDAQ"); 201 r->AddToList("MReportDrive"); 202 r->AddToList("MReportCamera"); 203 r->AddToList("MReportTrigger"); 202 if (isdc) 203 { 204 r->SetHasNoHeader(); 205 r->AddToList("MReportCurrents"); 206 } 207 else 208 { 209 r->AddToList("MReportDAQ"); 210 r->AddToList("MReportDrive"); 211 r->AddToList("MReportCamera"); 212 r->AddToList("MReportTrigger"); 213 } 204 214 read = r; 205 215 … … 211 221 w->AddContainer("MTimeDrive", "Drive"); 212 222 */ 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"); 223 if (isdc) 224 { 225 w->AddContainer("MTimeCurrents", "DC"); 226 w->AddContainer("MCameraDC", "DC"); 227 w->AddContainer("MReportCurrents", "DC"); 228 } 229 else 230 { 231 w->AddContainer("MReportCamera", "Camera"); 232 w->AddContainer("MTimeCamera", "Camera"); 233 w->AddContainer("MCameraAUX", "Camera"); 234 w->AddContainer("MCameraCalibration", "Camera"); 235 w->AddContainer("MCameraCooling", "Camera"); 236 w->AddContainer("MCameraHV", "Camera"); 237 w->AddContainer("MCameraLV", "Camera"); 238 w->AddContainer("MCameraLids", "Camera"); 239 w->AddContainer("MReportTrigger", "Trigger"); 240 w->AddContainer("MTimeTrigger", "Trigger"); 241 w->AddContainer("MReportDrive", "Drive"); 242 w->AddContainer("MTimeDrive", "Drive"); 243 } 225 244 write = w; 226 245 } … … 252 271 return -1; 253 272 } 273 274 tasks.PrintStatistics(); 254 275 255 276 gLog << all << "Merpp finished successfull!" << endl; -
trunk/MagicSoft/Mars/mhist/MHVsTime.cc
r2612 r2632 61 61 // 62 62 MHVsTime::MHVsTime(const char *rule) 63 : fGraph(NULL), fData(NULL), fScale(1) 63 : fGraph(NULL), fData(NULL), fScale(1), fUseEventNumber(0) 64 64 { 65 65 fName = gsDefName; -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r2625 r2632 162 162 return kFALSE; 163 163 164 fRawEvtTime = (MTime*)pList->FindCreateObj("MTime" , "MRawEvtTime");164 fRawEvtTime = (MTime*)pList->FindCreateObj("MTime"); 165 165 if (!fRawEvtTime) 166 166 return kTRUE; … … 241 241 const Double_t mhz = 9.375; // [1e6 ticks/s] 242 242 const Double_t t = tm/mhz; // [us] 243 //cout << (ULong_t)t << endl;244 243 const UInt_t ns = (UInt_t)fmod(t*1e3, 1e6); 245 244 const UShort_t ms = (UShort_t)fmod(t/1e3, 1e3); … … 256 255 fRawRunHeader->GetDateDay(), 257 256 m/60, m%60, s, ms, ns); 258 259 //cout << tm << ": ";260 //fRawEvtTime->Print();261 257 } 262 258 -
trunk/MagicSoft/Mars/mreport/MReport.cc
r2604 r2632 60 60 int n = sscanf(str.Data(), 61 61 fHasReportTime ? 62 " %d %d %d %d %d %d %d %d " 63 "%*d %*d %*d %*d %*d %*d %*d %*d %n" : 64 " %d %*d %*d %*d %d %d %d %d ", 62 " %d %d %d %d %d %d %d %d %*d %*d %*d %*d %*d %*d %*d %*d %n" : 63 " %d %d %d %d %d %d %d %d %n", 65 64 &state, &yea, &mon, &day, &hor, &min, &sec, &ms, &len); 66 65 if (n!=8) 67 66 { 68 *fLog << err << "ERROR - Cannot interprete Body of " << fIdentifier << endl;67 *fLog << err << "ERROR - Cannot interprete Body of " << fIdentifier << " (n=" << n << ")" << endl; 69 68 return kFALSE; 70 69 } … … 81 80 82 81 str.Remove(0, len); 82 83 83 return kTRUE; 84 84 } -
trunk/MagicSoft/Mars/mreport/MReportCurrents.cc
r2597 r2632 36 36 #include "MLogManip.h" 37 37 38 #include "MAstro.h" 38 #include "MParList.h" 39 #include "MCameraDC.h" 39 40 40 41 ClassImp(MReportCurrents); … … 42 43 using namespace std; 43 44 44 MReportCurrents::MReportCurrents() : MReport("DC-REPORT" ), fCurrents(577)45 MReportCurrents::MReportCurrents() : MReport("DC-REPORT", kFALSE) 45 46 { 46 47 fName = "MReportCurrents"; 47 48 fTitle = "Class for DC-REPORT information"; 48 49 } 50 51 Bool_t MReportCurrents::SetupReading(MParList &plist) 52 { 53 fDC = (MCameraDC*)plist.FindCreateObj("MCameraDC"); 54 if (!fDC) 55 return kFALSE; 56 57 return MReport::SetupReading(plist); 58 } 59 49 60 50 61 // Currents-REPORT 02 2003 11 04 23 53 34 951 00 0000 00 00 23 53 32 466 … … 54 65 Int_t len; 55 66 Short_t err1, err2; 56 const Int_t n=sscanf(str.Data(), " %hd %hd %n", 57 &err1, &err2, &len); 67 const Int_t n=sscanf(str.Data(), " %hd %hd %n", &err1, &err2, &len); 58 68 if (n!=2) 59 69 { 60 *fLog << err << "ERROR - Reading information of 'LV' section." << endl;70 *fLog << err << "ERROR - Reading status information." << endl; 61 71 return kFALSE; 62 72 } … … 82 92 } 83 93 84 fCurrents[i++] = 0.001*c;94 (*fDC)[i++] = 0.001*c; 85 95 } 86 96 … … 88 98 str=str.Strip(TString::kLeading); 89 99 90 return kTRUE;100 return str.IsNull(); 91 101 } -
trunk/MagicSoft/Mars/mreport/MReportCurrents.h
r2597 r2632 6 6 #endif 7 7 8 #ifndef ROOT_TArrayF 9 #include <TArrayF.h> 10 #endif 8 class MCameraDC; 11 9 12 10 class MReportCurrents : public MReport … … 16 14 Byte_t fStatus2; 17 15 18 TArrayF fCurrents; 16 MCameraDC *fDC; //! 17 18 Bool_t SetupReading(MParList &plist); 19 Bool_t InterpreteBody(TString &str); 19 20 20 21 public: 21 22 MReportCurrents(); 22 23 23 Bool_t InterpreteBody(TString &str); 24 25 ClassDef(MReportCurrents, 0) // Class for DC-REPORT information 24 ClassDef(MReportCurrents, 1) // Class for DC-REPORT information 26 25 }; 27 26 -
trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
r2592 r2632 270 270 return kFALSE; 271 271 } 272 if (TestBit(kHasNoHeader)) 273 return kTRUE; 272 274 273 275 return CheckFileHeader(); … … 287 289 while (!GetReport(rep)) 288 290 { 289 str.ReadLine(*fIn); 291 // Don't know the reason, but ReadLine and ReadString don't work 292 // for the (at least: converted) DC files. 293 str.ReadToDelim(*fIn); 290 294 if (!*fIn) 291 295 { -
trunk/MagicSoft/Mars/mreport/MReportFileRead.h
r2592 r2632 27 27 THashTable *fList; 28 28 29 enum { kHasNoHeader = BIT(14) }; 30 29 31 Int_t PreProcess(MParList *pList); 30 32 Int_t Process(); … … 40 42 ~MReportFileRead(); 41 43 44 void SetHasNoHeader() { SetBit(kHasNoHeader); } 45 42 46 Bool_t AddToList(const char *name) const; 43 47 -
trunk/MagicSoft/Mars/mreport/Makefile
r2592 r2632 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase -I../mtools -I../mcamera 24 INCLUDES = -I. -I../mbase -I../mtools -I../mcamera -I../mgui 25 # mgui - MCameraDC <MCamEvent> 25 26 26 27 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.