Changeset 4899 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/09/04 17:19:26 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 11 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r4881 r4899 39 39 #include "MCalibColorSet.h" 40 40 41 #include "TRegexp.h" 42 41 43 #include "MLog.h" 42 44 #include "MLogManip.h" … … 49 51 ClassImp(MCalibColorSet); 50 52 53 51 54 using namespace std; 52 55 53 56 const Int_t MCalibColorSet::gkIFAEBoxInaugurationRun = 20113; 57 const Int_t MCalibColorSet::gkMCRunLimit = 1000; 54 58 // -------------------------------------------------------------------------- 55 59 // … … 126 130 k1LedGreen = BIT(14), 127 131 k2LedGreen = BIT(1 ), 128 k3LedGreen = k1LedGreen &k2LedGreen,132 k3LedGreen = k1LedGreen | k2LedGreen, 129 133 k5LedGreen = BIT(0 ), 134 k6LedGreen = k5LedGreen | k1LedGreen, 135 k7LedGreen = k5LedGreen | k2LedGreen, 136 k8LedGreen = k5LedGreen | k3LedGreen, 130 137 k1LedUV = BIT(3 ), 131 138 k2LedUV = BIT(4 ), 132 k3LedUV = k1LedUV &k2LedUV,139 k3LedUV = k1LedUV | k2LedUV, 133 140 k5LedUV1 = BIT(11), 134 141 k5LedUV2 = BIT(12), 135 k10LedUV = k5LedUV1 & k5LedUV2, 136 k11LedUV = k10LedUV & k1LedUV, 137 k12LedUV = k10LedUV & k2LedUV, 138 k13LedUV = k10LedUV & k1LedUV, 142 k6LedUV = k5LedUV1 | k1LedUV, 143 k7LedUV = k5LedUV1 | k2LedUV, 144 k8LedUV = k5LedUV1 | k3LedUV, 145 k10LedUV = k5LedUV1 | k5LedUV2, 146 k11LedUV = k10LedUV | k1LedUV, 147 k12LedUV = k10LedUV | k2LedUV, 148 k13LedUV = k10LedUV | k1LedUV, 139 149 k01LedBlue = BIT(8 ), 140 150 k1LedBlue = BIT(10), 141 151 k2LedBlue = BIT(7 ), 142 k3LedBlue = k1LedBlue &k2LedBlue,152 k3LedBlue = k1LedBlue | k2LedBlue, 143 153 k5LedBlue1 = BIT(13), 144 154 k5LedBlue2 = BIT(2 ), 145 155 k5LedBlue3 = BIT(5 ), 146 156 k5LedBlue4 = BIT(6 ), 147 k10LedBlue = k5LedBlue1 & k5LedBlue2, 148 k15LedBlue = k10LedBlue & k5LedBlue3, 149 k20LedBlue = k15LedBlue & k5LedBlue4, 150 k21LedBlue = k20LedBlue & k1LedBlue, 151 k22LedBlue = k20LedBlue & k2LedBlue, 152 k23LedBlue = k22LedBlue & k1LedBlue, 157 k6LedBlue = k5LedBlue1 | k1LedBlue, 158 k7LedBlue = k5LedBlue1 | k2LedBlue, 159 k8LedBlue = k5LedBlue1 | k3LedBlue, 160 k10LedBlue = k5LedBlue1 | k5LedBlue2, 161 k15LedBlue = k10LedBlue | k5LedBlue3, 162 k20LedBlue = k15LedBlue | k5LedBlue4, 163 k21LedBlue = k20LedBlue | k1LedBlue, 164 k22LedBlue = k20LedBlue | k2LedBlue, 165 k23LedBlue = k22LedBlue | k1LedBlue, 153 166 kCT1Pulser = BIT(16) 154 167 }; 155 168 156 169 const Int_t num = header->GetRunNumber(); 170 171 if (num<gkMCRunLimit) 172 { 173 *fLog << inf << "Assumed MC run ... using GREEN pulser." << endl; 174 fPattern |= k1LedGreen; 175 fIsValid = kTRUE; 176 return kTRUE; 177 } 157 178 158 179 if (num<gkIFAEBoxInaugurationRun) … … 204 225 else 205 226 { 227 206 228 const TString proj = header->GetProjectName(); 207 229 208 230 // Possible green combinations 209 if (proj.Contains("0.1ledgree",TString::kIgnoreCase)) 231 TRegexp gre0("[0.1][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 232 if (proj.Contains(gre0)) 210 233 { fPattern |= k01LedGreen; color = kGREEN; } 211 if (proj.Contains("1ledgree",TString::kIgnoreCase)) 234 TRegexp gre1("[1][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 235 if (proj.Contains(gre1)) 212 236 { fPattern |= k1LedGreen; color = kGREEN; } 213 if (proj.Contains("2ledgree",TString::kIgnoreCase)) 237 TRegexp gre2("[2][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 238 if (proj.Contains(gre2)) 214 239 { fPattern |= k2LedGreen; color = kGREEN; } 215 if (proj.Contains("3ledgree",TString::kIgnoreCase)) 240 TRegexp gre3("[3][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 241 if (proj.Contains(gre3)) 216 242 { fPattern |= k3LedGreen; color = kGREEN; } 217 if (proj.Contains("5ledgree",TString::kIgnoreCase)) 243 TRegexp gre5("[5][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 244 if (proj.Contains(gre5)) 218 245 { fPattern |= k5LedGreen; color = kGREEN; } 246 TRegexp gre6("[6][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 247 if (proj.Contains(gre6)) 248 { fPattern |= k6LedGreen; color = kGREEN; } 249 TRegexp gre7("[7][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 250 if (proj.Contains(gre7)) 251 { fPattern |= k7LedGreen; color = kGREEN; } 252 TRegexp gre8("[8][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]"); 253 if (proj.Contains(gre8)) 254 { fPattern |= k8LedGreen; color = kGREEN; } 219 255 220 256 // Possible green combinations 221 if (proj.Contains("0.1ledblue",TString::kIgnoreCase)) 257 TRegexp blu0("[0.1][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 258 if (proj.Contains(blu0)) 222 259 { fPattern |= k01LedBlue; color = kBLUE; } 223 if (proj.Contains("1ledblue",TString::kIgnoreCase)) 260 TRegexp blu1("[1][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 261 if (proj.Contains(blu1)) 224 262 { fPattern |= k1LedBlue; color = kBLUE; } 225 if (proj.Contains("2ledblue",TString::kIgnoreCase)) 263 TRegexp blu2("[2][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 264 if (proj.Contains(blu2)) 226 265 { fPattern |= k2LedBlue; color = kBLUE; } 227 if (proj.Contains("3ledblue",TString::kIgnoreCase)) 266 TRegexp blu3("[3][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 267 if (proj.Contains(blu3)) 228 268 { fPattern |= k3LedBlue; color = kBLUE; } 229 if (proj.Contains("5ledblue",TString::kIgnoreCase)) 269 TRegexp blu5("[5][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 270 if (proj.Contains(blu5)) 230 271 { fPattern |= k5LedBlue1; color = kBLUE; } 231 if (proj.Contains("10ledblue",TString::kIgnoreCase)) 272 TRegexp blu6("[6][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 273 if (proj.Contains(blu6)) 274 { fPattern |= k6LedBlue; color = kBLUE; } 275 TRegexp blu7("[7][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 276 if (proj.Contains(blu7)) 277 { fPattern |= k7LedBlue; color = kBLUE; } 278 TRegexp blu8("[8][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 279 if (proj.Contains(blu8)) 280 { fPattern |= k8LedBlue; color = kBLUE; } 281 TRegexp blu10("[10][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 282 if (proj.Contains(blu10)) 232 283 { fPattern |= k10LedBlue; color = kBLUE; } 233 if (proj.Contains("15ledblue",TString::kIgnoreCase)) 284 TRegexp blu15("[15][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 285 if (proj.Contains(blu15)) 234 286 { fPattern |= k15LedBlue; color = kBLUE; } 235 if (proj.Contains("20ledblue",TString::kIgnoreCase)) 287 TRegexp blu20("[20][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 288 if (proj.Contains(blu20)) 236 289 { fPattern |= k20LedBlue; color = kBLUE; } 237 if (proj.Contains("21ledblue",TString::kIgnoreCase)) 290 TRegexp blu21("[21][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 291 if (proj.Contains(blu21)) 238 292 { fPattern |= k21LedBlue; color = kBLUE; } 239 if (proj.Contains("22ledblue",TString::kIgnoreCase)) 293 TRegexp blu22("[22][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 294 if (proj.Contains(blu22)) 240 295 { fPattern |= k22LedBlue; color = kBLUE; } 241 if (proj.Contains("23ledblue",TString::kIgnoreCase)) 296 TRegexp blu23("[23][lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]"); 297 if (proj.Contains(blu23)) 242 298 { fPattern |= k23LedBlue; color = kBLUE; } 243 299 244 300 // Possible UV combinations 245 if (proj.Contains("1leduv",TString::kIgnoreCase)) 301 TRegexp uv1("[1][lL]?[eE]?[dD]?[sS]?[U][vV]"); 302 if (proj.Contains(uv1)) 246 303 { fPattern |= k1LedUV; color = kUV; } 247 if (proj.Contains("2leduv",TString::kIgnoreCase)) 304 TRegexp uv2("[2][lL]?[eE]?[dD]?[sS]?[U][vV]"); 305 if (proj.Contains(uv2)) 248 306 { fPattern |= k2LedUV; color = kUV; } 249 if (proj.Contains("3leduv",TString::kIgnoreCase)) 307 TRegexp uv3("[3][lL]?[eE]?[dD]?[sS]?[U][vV]"); 308 if (proj.Contains(uv3)) 250 309 { fPattern |= k3LedUV; color = kUV; } 251 if (proj.Contains("5leduv",TString::kIgnoreCase)) 310 TRegexp uv5("[5][lL]?[eE]?[dD]?[sS]?[U][vV]"); 311 if (proj.Contains(uv5)) 252 312 { fPattern |= k5LedUV1; color = kUV; } 253 if (proj.Contains("10leduv",TString::kIgnoreCase)) 313 TRegexp uv6("[6][lL]?[eE]?[dD]?[sS]?[U][vV]"); 314 if (proj.Contains(uv6)) 315 { fPattern |= k6LedUV; color = kUV; } 316 TRegexp uv7("[7][lL]?[eE]?[dD]?[sS]?[U][vV]"); 317 if (proj.Contains(uv7)) 318 { fPattern |= k7LedUV; color = kUV; } 319 TRegexp uv8("[8][lL]?[eE]?[dD]?[sS]?[U][vV]"); 320 if (proj.Contains(uv8)) 321 { fPattern |= k8LedUV; color = kUV; } 322 TRegexp uv10("[10][lL]?[eE]?[dD]?[sS]?[U][vV]"); 323 if (proj.Contains(uv10)) 254 324 { fPattern |= k10LedUV; color = kUV; } 255 if (proj.Contains("11leduv",TString::kIgnoreCase)) 325 TRegexp uv11("[11][lL]?[eE]?[dD]?[sS]?[U][vV]"); 326 if (proj.Contains(uv11)) 256 327 { fPattern |= k11LedUV; color = kUV; } 257 if (proj.Contains("12leduv",TString::kIgnoreCase)) 328 TRegexp uv12("[12][lL]?[eE]?[dD]?[sS]?[U][vV]"); 329 if (proj.Contains(uv12)) 258 330 { fPattern |= k12LedUV; color = kUV; } 259 if (proj.Contains("13leduv",TString::kIgnoreCase)) 331 TRegexp uv13("[13][lL]?[eE]?[dD]?[sS]?[U][vV]"); 332 if (proj.Contains(uv13)) 260 333 { fPattern |= k13LedUV; color = kUV; } 261 334 -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h
r4861 r4899 12 12 { 13 13 private: 14 static const Int_t gkIFAEBoxInaugurationRun; //! Run number of first IFAE box calibration15 14 16 MRawEvtHeader *fHeader; 15 static const Int_t gkIFAEBoxInaugurationRun; //! Run number of first IFAE box calibration (set to: 20113) 16 static const Int_t gkMCRunLimit; //! Maximum MC run number (now set to: 1000) 17 17 18 UInt_t fPattern; 19 Bool_t fIsValid; 18 MRawEvtHeader *fHeader; //! Event header with the pulse pattern information 19 20 UInt_t fPattern; // Current pulse pattern 21 Bool_t fIsValid; // Have to set the pulse pattern? 22 23 Bool_t ReInit(MParList *pList); 24 Int_t PreProcess(MParList *pList); 25 Int_t Process(); 26 27 public: 20 28 21 Bool_t ReInit(MParList *pList); 22 Int_t PreProcess(MParList *pList); 23 Int_t Process(); 24 25 public: 26 MCalibColorSet(const char *name=NULL, const char *title=NULL); 27 28 void Clear(const Option_t *o=""); 29 30 ClassDef(MCalibColorSet, 0) // Task to workaround missing colors 29 MCalibColorSet(const char *name=NULL, const char *title=NULL); 30 31 void Clear(const Option_t *o=""); 32 33 ClassDef(MCalibColorSet, 0) // Task to workaround missing colors 31 34 }; 32 35
Note:
See TracChangeset
for help on using the changeset viewer.