Changeset 11295
- Timestamp:
- 07/08/11 15:42:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11286 r11295 32 32 uint32_t fRunId; 33 33 34 protected: 35 string fFileName; 36 34 37 public: 35 38 DataFileImp(uint32_t id) : fRunId(id) { } … … 39 42 virtual bool Write(EVENT *) = 0; 40 43 virtual bool Close(RUN_TAIL * = 0) = 0; 44 45 const string &GetFileName() const { return fFileName; } 41 46 42 47 uint32_t GetRunId() const { return fRunId; } … … 93 98 bool OpenFile(RUN_HEAD* h) 94 99 { 100 fFileName = "/dev/null"; 95 101 cout << "OPEN_FILE #" << GetRunId() << " (" << this << ")" << endl; 96 102 cout << " Ver= " << h->Version << endl; … … 221 227 const string name = FormFileName(h->RunType, "bin"); 222 228 229 fFileName = name; 230 223 231 errno = 0; 224 232 fOut.open(name.c_str(), ios_base::out); … … 396 404 //Form filename, based on runid and run-type 397 405 const string fileName = FormFileName(h->RunType, "fits"); 406 407 fFileName = fileName; 398 408 399 409 //create the FITS object … … 775 785 EventBuilderWrapper(MessageImp &imp) : fMsg(imp), 776 786 fFileFormat(kNone), fMaxRun(0), fLastOpened(0), fLastClosed(0), 777 fDimRuns ("FAD_CONTROL/RUNS", "I:5 ", ""),787 fDimRuns ("FAD_CONTROL/RUNS", "I:5;C", ""), 778 788 fDimEvents ("FAD_CONTROL/EVENTS", "I:4", ""), 779 789 fDimEventData ("FAD_CONTROL/EVENT_DATA", "S:1;I:1;S:1;I:2;S:1;S", ""), … … 784 794 fDimTemperature ("FAD_CONTROL/TEMPERATURE", "F:82", ""), 785 795 fDimRefClock ("FAD_CONTROL/REFERENCE_CLOCK", "I:42", ""), 786 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:3;I:5;I:1;X:3 ", ""),796 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:3;I:5;I:1;X:3;C:676", ""), 787 797 fDimStatistics2 ("FAD_CONTROL/STATISTICS2", "I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40", ""), 788 798 fDebugStream(false), fDebugRead(false) … … 989 999 // -------------- Mapped event builder callbacks ------------------ 990 1000 991 void UpdateRuns( )1001 void UpdateRuns(const string &fname="") 992 1002 { 993 1003 uint32_t values[5] = … … 1014 1024 fMaxRun = values[2]; 1015 1025 1016 fDimRuns.Update(values); 1026 vector<char> data(sizeof(values)+fname.size()+1); 1027 memcpy(data.data(), values, sizeof(values)); 1028 strcpy(data.data()+sizeof(values), fname.c_str()); 1029 1030 fDimRuns.Update(data); 1017 1031 } 1018 1032 … … 1044 1058 1045 1059 fLastOpened = runid; 1046 UpdateRuns( );1060 UpdateRuns(file->GetFileName()); 1047 1061 1048 1062 fNumEvts[kEventId] = 0;
Note:
See TracChangeset
for help on using the changeset viewer.