Changeset 14700
- Timestamp:
- 11/26/12 12:08:18 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataCalib.h
r14025 r14700 29 29 30 30 public: 31 DataCalib(const std::string &path, uint 32_t id, DimDescribedService &dim, DimDescribedService &runs, MessageImp &imp) : DataWriteFits2(path, id, imp), fDim(dim), fDimRuns(runs)31 DataCalib(const std::string &path, uint64_t night, uint32_t id, DimDescribedService &dim, DimDescribedService &runs, MessageImp &imp) : DataWriteFits2(path, night, id, imp), fDim(dim), fDimRuns(runs) 32 32 { 33 33 } -
trunk/FACT++/src/DataProcessorImp.cc
r12477 r14700 2 2 3 3 #include "FAD.h" 4 #include "tools.h" 4 5 5 6 #include "DimWriteStatistics.h" // weird dependency … … 15 16 //! @param extension a string containing the extension to be appened to the file name 16 17 // 17 string DataProcessorImp::FormFileName(const string &path, uint 32_t runid, const string &extension)18 string DataProcessorImp::FormFileName(const string &path, uint64_t night, uint32_t runid, const string &extension) 18 19 { 19 20 ostringstream name; … … 26 27 } 27 28 28 const Time time; 29 30 const Time night = time - boost::posix_time::hours(12); 31 32 name << night.GetAsStr("%Y/%m/%d/"); 29 name << Tools::Form("%04d/%02d/%02d/", night/10000, (night/100)%100, night%100); 33 30 34 31 try … … 42 39 } 43 40 44 name << time.NightAsInt()<< '_' << setfill('0') << setw(3) << runid << '.' << extension;41 name << night << '_' << setfill('0') << setw(3) << runid << '.' << extension; 45 42 return name.str(); 46 43 } -
trunk/FACT++/src/DataProcessorImp.h
r14168 r14700 20 20 { 21 21 std::string fPath; 22 uint64_t fNight; 22 23 uint32_t fRunId; 23 24 … … 32 33 33 34 public: 34 DataProcessorImp(const std::string &path, uint 32_t id, MessageImp &imp) : fPath(path), fRunId(id), fMsg(imp) { }35 DataProcessorImp(const std::string &path, uint64_t night, uint32_t id, MessageImp &imp) : fPath(path), fNight(night), fRunId(id), fMsg(imp) { } 35 36 virtual ~DataProcessorImp() { } 36 37 … … 44 45 uint32_t GetRunId() const { return fRunId; } 45 46 46 static std::string FormFileName(const std::string &path, uint 32_t runid, const std::string &extension);47 static std::string FormFileName(const std::string &path, uint64_t night, uint32_t runid, const std::string &extension); 47 48 std::string FormFileName(const std::string &extension) 48 49 { 49 return FormFileName(fPath, f RunId, extension);50 return FormFileName(fPath, fNight, fRunId, extension); 50 51 } 51 52 }; … … 58 59 59 60 public: 60 DataDump(const std::string &path, uint 32_t id, MessageImp &imp) : DataProcessorImp(path, id, imp) { }61 DataDump(const std::string &path, uint64_t night, uint32_t id, MessageImp &imp) : DataProcessorImp(path, night, id, imp) { } 61 62 62 63 bool Open(const RUN_HEAD* h, const FAD::RunDescription &d); … … 68 69 { 69 70 public: 70 DataDebug(const std::string &path, uint 32_t id, MessageImp &imp) : DataDump(path, id, imp) { }71 DataDebug(const std::string &path, uint64_t night, uint32_t id, MessageImp &imp) : DataDump(path, night, id, imp) { } 71 72 72 73 bool WriteEvt(EVENT *e); -
trunk/FACT++/src/DataWriteFits.h
r12785 r14700 28 28 29 29 public: 30 DataWriteFits(const std::string path, uint 32_t runid, MessageImp &imp) :31 DataProcessorImp(path, runid, imp), fConv(0), fFile(imp)30 DataWriteFits(const std::string path, uint64_t night, uint32_t runid, MessageImp &imp) : 31 DataProcessorImp(path, night, runid, imp), fConv(0), fFile(imp) 32 32 { 33 33 } -
trunk/FACT++/src/DataWriteFits2.h
r14023 r14700 22 22 23 23 public: 24 DataWriteFits2(const std::string path, uint 32_t runid, MessageImp &imp) :25 DataProcessorImp(path, runid, imp)24 DataWriteFits2(const std::string path, uint64_t night, uint32_t runid, MessageImp &imp) : 25 DataProcessorImp(path, night, runid, imp) 26 26 { 27 27 } -
trunk/FACT++/src/DataWriteRaw.h
r12477 r14700 68 68 69 69 public: 70 DataWriteRaw(const std::string &path, uint 32_t id, MessageImp &imp) : DataProcessorImp(path, id, imp), fPosTail(0) { }70 DataWriteRaw(const std::string &path, uint64_t night, uint32_t id, MessageImp &imp) : DataProcessorImp(path, night, id, imp), fPosTail(0) { } 71 71 ~DataWriteRaw() { if (fOut.is_open()) Close(); } 72 72
Note:
See TracChangeset
for help on using the changeset viewer.