Changeset 9388 for trunk/MagicSoft
- Timestamp:
- 03/05/09 16:20:53 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9387 r9388 22 22 * mreport/MReportCamera.cc: 23 23 - fixed a problem if the HVFIL section is empty 24 25 * merpp.cc: 26 - added --dev-null option to Usage output 27 28 * mjobs/MJMerpp.[h,cc]: 29 - fixed operation in --dev-null mode 24 30 25 31 -
trunk/MagicSoft/Mars/merpp.cc
r9207 r9388 110 110 gLog << " --only=Name Read only reports described by MReportName. See the" << endl; 111 111 gLog << " mreport-directory for available classes." << endl; 112 gLog << " --dev-null Suppress output of files (for test purpose)" << endl; 112 113 gLog << endl; 113 114 gLog << " --version, -V Show startup message with version number" << endl; -
trunk/MagicSoft/Mars/mjobs/MJMerpp.cc
r9141 r9388 67 67 } 68 68 69 MFilter *MJMerpp::SetupCurrents(MReportFileReadCC &read, MWriteRootFile &write) const69 void MJMerpp::SetupCurrents(MReportFileReadCC &read, MWriteRootFile *write) const 70 70 { 71 71 read.SetHasNoHeader(); 72 72 read.AddToList("MReportCurrents"); 73 73 74 write.AddContainer("MTimeCurrents", "Currents"); 75 write.AddContainer("MCameraDC", "Currents"); 76 write.AddContainer("MReportCurrents", "Currents"); 77 78 return 0; 79 } 80 81 MFilter *MJMerpp::SetupReports(MReportFileReadCC &read, MWriteRootFile &write) const 74 if (!write) 75 return; 76 77 write->AddContainer("MTimeCurrents", "Currents"); 78 write->AddContainer("MCameraDC", "Currents"); 79 write->AddContainer("MReportCurrents", "Currents"); 80 } 81 82 MFilter *MJMerpp::SetupReports(MReportFileReadCC &read, MWriteRootFile *write) const 82 83 { 83 84 read.SetTelescope(fTelescope); … … 95 96 // AddTree(read, "DAQ", fOnly); 96 97 98 if (fReportRun!=(UInt_t)-1) 99 read.AddToList("MReportRun"); 100 101 if (!write) 102 return 0; 103 97 104 const Bool_t required = fOnly.IsNull(); 98 write .AddContainer("MReportCamera", "Camera", required);99 write .AddContainer("MTimeCamera", "Camera", required);100 write .AddContainer("MCameraAUX", "Camera", required);101 write .AddContainer("MCameraCalibration", "Camera", required);102 write .AddContainer("MCameraCooling", "Camera", required);103 write .AddContainer("MCameraActiveLoad", "Camera", required);104 write .AddContainer("MCameraHV", "Camera", required);105 write .AddContainer("MCameraDC", "Camera", required);106 write .AddContainer("MCameraLV", "Camera", required);107 write .AddContainer("MCameraLids", "Camera", required);108 write .AddContainer("MReportTrigger", "Trigger", required);109 write .AddContainer("MTimeTrigger", "Trigger", required);110 write .AddContainer("MTriggerBit", "Trigger", required);111 write .AddContainer("MTriggerIPR", "Trigger", required);112 write .AddContainer("MTriggerCell", "Trigger", required);113 write .AddContainer("MTriggerPrescFact", "Trigger", required);114 write .AddContainer("MTriggerLiveTime", "Trigger", required);115 write .AddContainer("MReportDrive", "Drive", required);116 write .AddContainer("MTimeDrive", "Drive", required);117 write .AddContainer("MCameraTH", "Rec", required);118 write .AddContainer("MCameraTD", "Rec", required);119 write .AddContainer("MCameraRecTemp", "Rec", required);120 write .AddContainer("MReportRec", "Rec", required);121 write .AddContainer("MTimeRec", "Rec", required);122 write .AddContainer("MReportCC", "CC", required);123 write .AddContainer("MTimeCC", "CC", required);124 write .AddContainer("MReportStarguider", "Starguider", required);125 write .AddContainer("MTimeStarguider", "Starguider", required);126 write .AddContainer("MReportPyrometer", "Pyrometer", required);127 write .AddContainer("MTimePyrometer", "Pyrometer", required);128 // write .AddContainer("MReportDAQ", "DAQ");129 // write .AddContainer("MTimeDAQ", "DAQ");105 write->AddContainer("MReportCamera", "Camera", required); 106 write->AddContainer("MTimeCamera", "Camera", required); 107 write->AddContainer("MCameraAUX", "Camera", required); 108 write->AddContainer("MCameraCalibration", "Camera", required); 109 write->AddContainer("MCameraCooling", "Camera", required); 110 write->AddContainer("MCameraActiveLoad", "Camera", required); 111 write->AddContainer("MCameraHV", "Camera", required); 112 write->AddContainer("MCameraDC", "Camera", required); 113 write->AddContainer("MCameraLV", "Camera", required); 114 write->AddContainer("MCameraLids", "Camera", required); 115 write->AddContainer("MReportTrigger", "Trigger", required); 116 write->AddContainer("MTimeTrigger", "Trigger", required); 117 write->AddContainer("MTriggerBit", "Trigger", required); 118 write->AddContainer("MTriggerIPR", "Trigger", required); 119 write->AddContainer("MTriggerCell", "Trigger", required); 120 write->AddContainer("MTriggerPrescFact", "Trigger", required); 121 write->AddContainer("MTriggerLiveTime", "Trigger", required); 122 write->AddContainer("MReportDrive", "Drive", required); 123 write->AddContainer("MTimeDrive", "Drive", required); 124 write->AddContainer("MCameraTH", "Rec", required); 125 write->AddContainer("MCameraTD", "Rec", required); 126 write->AddContainer("MCameraRecTemp", "Rec", required); 127 write->AddContainer("MReportRec", "Rec", required); 128 write->AddContainer("MTimeRec", "Rec", required); 129 write->AddContainer("MReportCC", "CC", required); 130 write->AddContainer("MTimeCC", "CC", required); 131 write->AddContainer("MReportStarguider", "Starguider", required); 132 write->AddContainer("MTimeStarguider", "Starguider", required); 133 write->AddContainer("MReportPyrometer", "Pyrometer", required); 134 write->AddContainer("MTimePyrometer", "Pyrometer", required); 135 // write->AddContainer("MReportDAQ", "DAQ"); 136 // write->AddContainer("MTimeDAQ", "DAQ"); 130 137 131 138 if (fReportRun==(UInt_t)-1) … … 138 145 f1.Data(), f2.Data()); 139 146 140 read.AddToList("MReportRun");141 142 147 MFilter *filter = new MFDataPhrase(f.Data()); 143 write .SetFilter(filter);148 write->SetFilter(filter); 144 149 return filter; 145 150 } 146 151 147 void MJMerpp::SetupRaw(MRawFileRead &read, MWriteRootFile &write) const152 void MJMerpp::SetupRaw(MRawFileRead &read, MWriteRootFile *write) const 148 153 { 149 154 read.SetInterleave(fInterleave); 150 155 read.SetForceMode(fForceProcessing); 151 156 152 write.AddContainer("MRawRunHeader", "RunHeaders"); 153 write.AddContainer("MTime", "Events"); 154 write.AddContainer("MRawEvtHeader", "Events"); 155 write.AddContainer("MRawEvtData", "Events"); 156 write.AddContainer("MRawEvtData2", "Events"); 157 write.AddContainer("MRawCrateArray", "Events"); 157 if (!write) 158 return; 159 160 write->AddContainer("MRawRunHeader", "RunHeaders"); 161 write->AddContainer("MTime", "Events"); 162 write->AddContainer("MRawEvtHeader", "Events"); 163 write->AddContainer("MRawEvtData", "Events"); 164 write->AddContainer("MRawEvtData2", "Events"); 165 write->AddContainer("MRawCrateArray", "Events"); 158 166 } 159 167 … … 205 213 } 206 214 215 if (HasNullOut()) 216 return kTRUE; 217 207 218 const Bool_t fileexist = !gSystem->AccessPathName(fPathOut, kFileExists); 208 219 const Bool_t writeperm = !gSystem->AccessPathName(fPathOut, kWritePermission); … … 233 244 *fLog << inf; 234 245 fLog->Separator(GetDescriptor()); 235 *fLog << "In: " << fPathIn << endl;; 236 *fLog << (fUpdate?"Upd":"Out") << ": " << fPathOut << endl;; 246 *fLog << "In: " << fPathIn << endl; 247 if (!HasNullOut()) 248 *fLog << (fUpdate?"Upd":"Out") << ": " << fPathOut << endl;; 237 249 *fLog << endl; 238 250 … … 276 288 MTask *read = 0; 277 289 MFilter *filter = 0; 278 MWriteRootFile *write = new MWriteRootFile(fPathOut, option, "Magic root-file", fCompression);290 MWriteRootFile *write = HasNullOut() ? 0 : new MWriteRootFile(fPathOut, option, "Magic root-file", fCompression); 279 291 280 292 if (isreport || isdc) … … 285 297 286 298 if (isdc) 287 filter = SetupCurrents(*r, *write);299 SetupCurrents(*r, write); 288 300 else 289 filter = SetupReports(*r, *write);301 filter = SetupReports(*r, write); 290 302 291 303 read = r; … … 294 306 { 295 307 MRawFileRead *r = new MRawFileRead(fPathIn); 296 SetupRaw(*r, *write);308 SetupRaw(*r, write); 297 309 read = r; 298 310 } … … 302 314 tasks.AddToList(filter); 303 315 304 if ( !HasNullOut())316 if (write) 305 317 tasks.AddToList(write); 306 318 -
trunk/MagicSoft/Mars/mjobs/MJMerpp.h
r9020 r9388 42 42 void AddTree(MReportFileReadCC &read, const TString &rep, const TString &only) const; 43 43 44 MFilter *SetupCurrents(MReportFileReadCC &read, MWriteRootFile &write) const; 45 MFilter *SetupReports(MReportFileReadCC &read, MWriteRootFile &write) const; 46 47 void SetupRaw(MRawFileRead &read, MWriteRootFile &write) const; 44 void SetupCurrents(MReportFileReadCC &read, MWriteRootFile *write) const; 45 MFilter *SetupReports(MReportFileReadCC &read, MWriteRootFile *write) const; 46 void SetupRaw(MRawFileRead &read, MWriteRootFile *write) const; 48 47 49 48 Bool_t GetTimeFromFile();
Note:
See TracChangeset
for help on using the changeset viewer.