Changeset 17032
- Timestamp:
- 08/20/13 13:47:35 (11 years ago)
- Location:
- trunk/Mars/fact/analysis
- Files:
-
- 3 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 } -
trunk/Mars/fact/analysis/merpp.C
r15232 r17032 1 #include "MLogManip.h" 2 1 3 void merpp(TString &froot, const char *id, const char *faux) 2 4 { … … 6 8 if (file.IsZombie()) 7 9 { 8 gLog << "merpp: Invalid file '" << froot << "'" << endl;10 gLog << err << "merpp: Invalid file '" << froot << "'" << endl; 9 11 return; 10 12 } … … 14 16 if (!tree) 15 17 { 16 gLog << "merpp: Tree 'RunHeaders' not found... skipped." << endl;18 gLog << err << "merpp: Tree 'RunHeaders' not found... skipped." << endl; 17 19 return; 18 20 } … … 20 22 if (tree->GetEntries()!=1) 21 23 { 22 gLog << "merpp: Number of RunHeaders do not match 1... skipped." << endl;24 gLog << err << "merpp: Number of RunHeaders do not match 1... skipped." << endl; 23 25 return; 24 26 } … … 29 31 if (file.Get(id)) 30 32 { 31 gLog << "WARNING - Tree '" << id << "' already existing... skipped." << endl;33 gLog << warn << "WARNING - Tree '" << id << "' already existing... skipped." << endl; 32 34 return; 33 35 } … … 43 45 TString time = Form("MTime%s", id); 44 46 47 gLog << all; 45 48 gLog << " --- Fits file: " << ffits << endl; 46 49 gLog << " --- Root file: " << froot << endl; … … 78 81 if (!seq.IsValid()) 79 82 { 80 gLog << "ERROR - Sequence invalid!" << endl;83 gLog << err << "ERROR - Sequence invalid!" << endl; 81 84 return 1; 82 85 } … … 85 88 86 89 gLog.Separator("Merpp"); 90 gLog << all; 87 91 gLog << "Merge slow control data of sequence "; 88 92 gLog << seq.GetFileName() << endl; … … 93 97 if (seq.GetRuns(iter, MSequence::kFactImg, path)<=0) 94 98 { 95 gLog << "ERROR - Sequence valid but without files." << endl;99 gLog << err << "ERROR - Sequence valid but without files." << endl; 96 100 return 2; 97 101 } -
trunk/Mars/fact/analysis/star.C
r15231 r17032 1 #include "MLogManip.h" 2 1 3 int star(const char *seqfile="sequences/20111205_013.seq", Double_t lvl1=7.8, Double_t lvl2=3.9, const char *inpath = "output", const char *outpath = "output") 2 4 { … … 9 11 if (!seq.IsValid()) 10 12 { 11 gLog << "ERROR - Sequence invalid!" << endl;13 gLog << err << "ERROR - Sequence invalid!" << endl; 12 14 return 1; 13 15 } … … 16 18 17 19 gLog.Separator("Star"); 18 gLog << "Calculate image parameters of sequence ";20 gLog << all << "Calculate image parameters of sequence "; 19 21 gLog << seq.GetFileName() << endl; 20 22 gLog << endl; … … 32 34 if (seq.GetRuns(iter, MSequence::kFactCal, inpath)<=0) 33 35 { 34 gLog << "ERROR - Sequence valid but without files." << endl;36 gLog << err << "ERROR - Sequence valid but without files." << endl; 35 37 return 2; 36 38 }
Note:
See TracChangeset
for help on using the changeset viewer.