Changeset 17032 for trunk/Mars/fact/analysis/callisto.C
- Timestamp:
- 08/20/13 13:47:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/fact/analysis/callisto.C
r15509 r17032 1 #include "MLogManip.h" 2 1 3 int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output", bool use_delays=true) 2 4 { … … 65 67 if (map && gSystem->AccessPathName(map, kFileExists)) 66 68 { 67 gLog << "ERROR - Cannot access mapping file '" << map << "'" << endl;69 gLog << err << "ERROR - Cannot access mapping file '" << map << "'" << endl; 68 70 return 1; 69 71 } … … 73 75 if (!seq.IsValid()) 74 76 { 75 gLog << "ERROR - Sequence '" << seqfile << "' invalid!" << endl;77 gLog << err << "ERROR - Sequence '" << seqfile << "' invalid!" << endl; 76 78 return 2; 77 79 } … … 80 82 81 83 gLog.Separator("Callisto"); 82 gLog << "Calibrate data of sequence '" << seq.GetFileName() << "'" << endl;84 gLog << all << "Calibrate data of sequence '" << seq.GetFileName() << "'" << endl; 83 85 gLog << endl; 84 86 … … 93 95 if (!drs.IsValid()) 94 96 { 95 gLog << "ERROR - DRS sequence invalid!" << endl;97 gLog << err << "ERROR - DRS sequence invalid!" << endl; 96 98 return 3; 97 99 } 98 100 99 gLog << "DRS sequence file: " << drsname.str() << '\n' << endl;101 gLog << all << "DRS sequence file: " << drsname.str() << '\n' << endl; 100 102 101 103 TString drsfile = seq.GetFileName(0, MSequence::kRawDrs); 102 104 if (drsfile.IsNull()) 103 105 { 104 cout<< "No DRS file available in sequence." << endl;106 gLog << err << "No DRS file available in sequence." << endl; 105 107 return 4; 106 108 } … … 111 113 TString calfile = seq.GetFileName(0, MSequence::kFitsCal); 112 114 115 gLog << all; 113 116 gLog << "DRS calib 300: " << drsfile << '\n'; 114 117 gLog << "DRS calib 1024: " << drs1024 << "\n\n"; … … 122 125 return 6; 123 126 127 gLog << all; 124 128 gLog << "Time calibration : " << timfile << '\n'; 125 129 gLog << "Pedestal file: " << pedfile << '\n'; … … 131 135 if (seq.GetRuns(iter, MSequence::kFitsDat)<=0) 132 136 { 133 gLog << "ERROR - Sequence valid but without files." << endl;137 gLog << err << "ERROR - Sequence valid but without files." << endl; 134 138 return 7; 135 139 } … … 143 147 if (arrt.Read()<=0) 144 148 { 145 cout<< "ERROR - Reading LP template from " << lp_template << endl;149 gLog << err << "ERROR - Reading LP template from " << lp_template << endl; 146 150 return 100; 147 151 } … … 150 154 if (!lpref) 151 155 { 152 cout<< "ERROR - LP Template not found in " << lp_template << endl;156 gLog << err << "ERROR - LP Template not found in " << lp_template << endl; 153 157 return 101; 154 158 } … … 158 162 if (!gain) 159 163 { 160 cout<< "ERROR - Gain not found in " << lp_template << endl;164 gLog << err << "ERROR - Gain not found in " << lp_template << endl; 161 165 return 101; 162 166 } … … 166 170 if (arrp.Read()<=0) 167 171 { 168 cout<< "ERROR - Reading Pulse template from " << pulse_template << endl;172 gLog << err << "ERROR - Reading Pulse template from " << pulse_template << endl; 169 173 return 102; 170 174 } … … 173 177 if (!hpulse) 174 178 { 175 cout<< "ERROR - Pulse Template not found in " << pulse_template << endl;179 gLog << err << "ERROR - Pulse Template not found in " << pulse_template << endl; 176 180 return 103; 177 181 }
Note:
See TracChangeset
for help on using the changeset viewer.