Changeset 3328 for trunk/MagicSoft/Mars/merpp.cc
- Timestamp:
- 02/26/04 13:31:07 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/merpp.cc
r3137 r3328 6 6 7 7 #include "MRawFileRead.h" 8 #include "MSqlInsertRun.h" 8 9 #include "MRawFileWrite.h" 9 10 … … 60 61 gLog << all << endl; 61 62 gLog << "Sorry the usage is:" << endl; 62 gLog << " merpp [-h] [-?] [-a 0] [-vn] [-cn] [-u1]" << endl;63 gLog << " merpp [-h] [-?] [-a] [-vn] [-cn] [-u]" << endl; 63 64 gLog << " inputfile[.rep,[.raw],[.txt]] [outputfile[.root]]" << endl << endl; 64 65 gLog << " inputfile.raw: Magic DAQ binary file." << endl; … … 70 71 gLog << " -u, --update: Update file" << endl; 71 72 gLog << " -a, --no-colors: Do not use Ansii color codes" << endl; 73 gLog << " --sql=mysql://user:password@url Insert run into database <raw data only>" << endl; 72 74 gLog << " --start=yyyy-mm-dd/hh:mm:ss.mmm: Start event time for merpping report files" << endl; 73 75 gLog << " --stop=yyyy-mm-dd/hh:mm:ss.mmm: Stop event time for merpping report files" << endl; 74 gLog << " --run=#: Only merppdata corresponding to this run number" << endl;76 gLog << " --run=#: Only data corresponding to this run number" << endl; 75 77 gLog << " -?, -h, --help: This help" << endl << endl; 76 78 gLog << " REMARK: At the moment you can process a .raw _or_ a .rep file, only!" << endl << endl; 77 79 } 78 80 79 // FIXME: Move to MTime (maybe 'InterpreteCmdline' 81 // FIXME: Move to MTime (maybe 'InterpreteCmdline') 80 82 MTime AnalyseTime(TString str) 81 83 { … … 118 120 kTimeStop.SetName("MTimeStop"); 119 121 120 const Int_t kRunNumber = arg.HasOption("--run=") ? arg.GetIntAndRemove("--run=") : -1; 122 const Int_t kRunNumber = arg.HasOption("--run=") ? arg.GetIntAndRemove("--run=") : -1; 123 const TString kSqlDataBase(arg.GetStringAndRemove("--sql=")); 121 124 122 125 if (kTimeStart) … … 142 145 const Bool_t isreport = kNamein.EndsWith(".rep"); 143 146 const Bool_t isdc = kNamein.EndsWith(".txt"); 144 145 if (!kNamein.EndsWith(".raw") && !isreport && !isdc) 147 const Bool_t israw = !isreport && !israw; 148 149 if (!kNamein.EndsWith(".raw") && israw) 146 150 kNamein += ".raw"; 147 151 … … 151 155 if (!kNameout.EndsWith(".root")) 152 156 kNameout += ".root"; 157 158 if (!kSqlDataBase.IsNull() && !israw) 159 gLog << warn << "WARNING - Option '--sql=' only valid for raw-files... ignored." << endl; 153 160 154 161 // … … 292 299 if (filter) 293 300 tasks.AddToList(filter); 301 if (israw && !kSqlDataBase.IsNull()) 302 { 303 MSqlInsertRun *ins = new MSqlInsertRun(kSqlDataBase); 304 ins->SetUpdate(); 305 tasks.AddToList(ins); 306 } 294 307 tasks.AddToList(write); 295 308 … … 319 332 return 0; 320 333 } 321 322
Note:
See TracChangeset
for help on using the changeset viewer.