Changeset 852 for trunk/MagicSoft/Mars/mraw
- Timestamp:
- 06/20/01 10:41:23 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/mraw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc
r763 r852 53 53 // Default constructor. It opens the output file (root-file) 54 54 // 55 MRawFileWrite::MRawFileWrite(const char *fname, Option_t *opt, 56 const char *ftitle, Int_t comp, 55 MRawFileWrite::MRawFileWrite(const char *fname, 56 const Option_t *opt, 57 const char *ftitle, 58 const Int_t comp, 57 59 const char *name, const char *title) 58 60 { … … 60 62 *fTitle = title ? title : "Write task to write DAQ root files"; 61 63 62 // FIXME: move file open to preproc!63 64 64 // 65 65 // Open a rootfile 66 66 // 67 67 fOut = new TFile(fname, opt, ftitle, comp); 68 69 // 70 // test whether file is now open or not 71 // 72 if (!fOut->IsOpen())73 {74 *fLog << "MRawFileWrite::MRawFileWrite: ERROR: Cannot open file '";75 *fLog << fname << "'" << endl;76 77 } 68 } 69 70 MRawFileWrite::~MRawFileWrite() 71 { 72 // 73 // delete instance, this laso does a fOut->Close() 74 // 75 delete fOut; 76 } 77 78 78 79 79 // -------------------------------------------------------------------------- … … 94 94 { 95 95 // 96 // test whether file is now open or not 97 // 98 if (!fOut->IsOpen()) 99 { 100 *fLog << dbginf << "Cannot open file '" << fOut->GetName() << "'" << endl; 101 return kFALSE; 102 } 103 104 // 96 105 // remember the pointer to the parameter list fur further usage 97 106 // … … 105 114 if (!fRawEvtHeader) 106 115 { 107 *fLog << "MRawFileWrite::PreProcess - ERROR:MRawEvtHeader not found... aborting." << endl;116 *fLog << dbginf << "MRawEvtHeader not found... aborting." << endl; 108 117 return kFALSE; 109 118 } … … 112 121 if (!fRawEvtData) 113 122 { 114 *fLog << "MRawFileWrite::PreProcess - ERROR:MRawEvtData not found... aborting." << endl;123 *fLog << dbginf << "MRawEvtData not found... aborting." << endl; 115 124 return kFALSE; 116 125 } … … 119 128 if (!fRawCrateArray) 120 129 { 121 *fLog << "MRawFileWrite::PreProcess - ERROR:MRawCrateArray not found... aborting." << endl;130 *fLog << dbginf << "MRawCrateArray not found... aborting." << endl; 122 131 return kFALSE; 123 132 } … … 126 135 if (!fRawEvtTime) 127 136 { 128 *fLog << "MRawFileWrite::PreProcess - WARNING:MRawEvtTime not found... aborting." << endl;137 *fLog << dbginf << "MRawEvtTime not found... aborting." << endl; 129 138 return kFALSE; 130 139 } … … 133 142 if (!fRawRunHeader) 134 143 { 135 *fLog << "MRawFileWrite::PreProcess - ERROR:MRawRunHeader not found... aborting." << endl;144 *fLog << dbginf << "MRawRunHeader not found... aborting." << endl; 136 145 return kFALSE; 137 146 } … … 222 231 fOut->Write(); 223 232 224 //225 // close root file226 //227 fOut->Close();228 229 //230 // delete instance231 //232 delete fOut;233 234 233 return kTRUE; 235 234 } -
trunk/MagicSoft/Mars/mraw/MRawFileWrite.h
r698 r852 35 35 public: 36 36 MRawFileWrite(const char *fname, 37 Option_t *opt="UPDATE",37 const Option_t *opt="UPDATE", 38 38 const char *ftitle="Unnamed", 39 Int_t comp=9,39 const Int_t comp=9, 40 40 const char *name=NULL, const char *title=NULL); 41 ~MRawFileWrite(); 41 42 42 43 Bool_t PreProcess(MParList *pList);
Note:
See TracChangeset
for help on using the changeset viewer.