- Timestamp:
- 10/12/04 12:12:52 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5233 r5236 26 26 - implemented option kNoStorage for neither reading nor writing 27 27 the F0-files to disk. 28 29 * mjobs/MJCalibration.[h,cc] 30 - implemented option SetTimeAndCharge() in order to use the 31 extractor deriving from MExtractTimeAndCharge, like e.g. the 32 digital filter. 28 33 29 34 -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5161 r5236 200 200 // 201 201 MJCalibration::MJCalibration(const char *name, const char *title) 202 : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL), 202 : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL), 203 203 fColor(MCalibrationCam::kNONE), fDisplayType(kDataCheckDisplay), 204 204 fGeometry("MGeomCamMagic") … … 1637 1637 1638 1638 MTaskEnv taskenv2("ExtractTime"); 1639 taskenv2.SetDefault(fTimeExtractor ? fTimeExtractor : ×pline); 1640 1641 if (IsRelTimes()) 1642 tlist.AddToList(&taskenv2); 1643 1639 if (!IsTimeAndCharge()) 1640 { 1641 taskenv2.SetDefault(fTimeExtractor ? fTimeExtractor : ×pline); 1642 1643 if (IsRelTimes()) 1644 tlist.AddToList(&taskenv2); 1645 } 1646 1644 1647 // 1645 1648 // FIXME: This is not yet implemented in the classes!!! … … 1839 1842 Bool_t MJCalibration::WriteEventloop(MEvtLoop &evtloop) const 1840 1843 { 1841 if (fPathOut.IsNull()) 1842 return kTRUE; 1843 1844 const TString oname(GetOutputFile()); 1845 1846 *fLog << inf << "Writing to file: " << oname << endl; 1847 1848 TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9); 1849 if (!file.IsOpen()) 1850 { 1851 *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl; 1844 1845 if (IsNoStorage()) 1846 return kTRUE; 1847 1848 if (fPathOut.IsNull()) 1849 return kTRUE; 1850 1851 const TString oname(GetOutputFile()); 1852 1853 *fLog << inf << "Writing to file: " << oname << endl; 1854 1855 TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9); 1856 if (!file.IsOpen()) 1857 { 1858 *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl; 1859 return kFALSE; 1860 } 1861 1862 if (evtloop.Write(fName)<=0) 1863 { 1864 *fLog << err << "Unable to write MEvtloop to " << oname << endl; 1852 1865 return kFALSE; 1853 1866 } 1854 1855 if (evtloop.Write(fName)<=0) 1856 { 1857 *fLog << err << "Unable to write MEvtloop to " << oname << endl; 1858 return kFALSE; 1859 } 1860 1861 return kTRUE; 1867 1868 return kTRUE; 1862 1869 } 1863 1870 1864 1871 Bool_t MJCalibration::WriteTasks(MTask *t1, MTask *t2) const 1865 1872 { 1866 if (fPathOut.IsNull()) 1867 return kTRUE; 1868 1869 const TString oname(GetOutputFile()); 1870 1871 *fLog << inf << "Writing to file: " << oname << endl; 1872 1873 TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9); 1874 if (!file.IsOpen()) 1875 { 1876 *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl; 1877 return kFALSE; 1878 } 1879 1880 if (t1 && t1->Write()<=0) 1881 { 1882 *fLog << err << "Unable to write " << t1->GetName() << " to " << oname << endl; 1883 return kFALSE; 1884 } 1885 if (t2 && t2->Write()<=0) 1886 { 1887 *fLog << err << "Unable to write " << t2->GetName() << " to " << oname << endl; 1888 return kFALSE; 1889 } 1890 1873 1874 if (IsNoStorage()) 1891 1875 return kTRUE; 1876 1877 if (fPathOut.IsNull()) 1878 return kTRUE; 1879 1880 const TString oname(GetOutputFile()); 1881 1882 *fLog << inf << "Writing to file: " << oname << endl; 1883 1884 TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCalibration", 9); 1885 if (!file.IsOpen()) 1886 { 1887 *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl; 1888 return kFALSE; 1889 } 1890 1891 if (t1 && t1->Write()<=0) 1892 { 1893 *fLog << err << "Unable to write " << t1->GetName() << " to " << oname << endl; 1894 return kFALSE; 1895 } 1896 1897 if (t2 && t2->Write()<=0) 1898 { 1899 *fLog << err << "Unable to write " << t2->GetName() << " to " << oname << endl; 1900 return kFALSE; 1901 } 1902 1903 return kTRUE; 1892 1904 } 1893 1905 -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r5135 r5236 121 121 kNoStorage, 122 122 kHistsStorage 123 }; 123 }; // Possible flags for the storage of results 124 124 125 125 Byte_t fStorage; // Bit-field for chosen storage type 126 126 127 enum { kRelTimes, kDataCheck, kDebug, kIntensity }; // Possible flags127 enum { kRelTimes, kDataCheck, kDebug, kIntensity, kTimeAndCharge }; // Possible flags 128 128 129 129 Byte_t fFlags; // Bit-field for the flags … … 134 134 Bool_t IsUsePINDiode () const { return TESTBIT(fDevices,kUsePINDiode); } 135 135 136 Bool_t IsRelTimes () const { return TESTBIT(fFlags,kRelTimes); } 137 Bool_t IsDataCheck () const { return TESTBIT(fFlags,kDataCheck); } 138 Bool_t IsDebug () const { return TESTBIT(fFlags,kDebug); } 139 Bool_t IsIntensity () const { return TESTBIT(fFlags,kIntensity); } 136 Bool_t IsRelTimes () const { return TESTBIT(fFlags,kRelTimes); } 137 Bool_t IsDataCheck () const { return TESTBIT(fFlags,kDataCheck); } 138 Bool_t IsDebug () const { return TESTBIT(fFlags,kDebug); } 139 Bool_t IsIntensity () const { return TESTBIT(fFlags,kIntensity); } 140 Bool_t IsTimeAndCharge() const { return TESTBIT(fFlags,kTimeAndCharge); } 140 141 141 142 Bool_t IsNoStorage () const { return TESTBIT(fStorage,kNoStorage); } … … 195 196 void SetDebug ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kDebug) : CLRBIT(fFlags,kDebug); } 196 197 void SetIntensity ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kIntensity) : CLRBIT(fFlags,kIntensity); } 198 void SetTimeAndCharge ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kTimeAndCharge) : CLRBIT(fFlags,kTimeAndCharge); } 197 199 198 200 // Devices
Note:
See TracChangeset
for help on using the changeset viewer.