Changeset 9531 for trunk/MagicSoft/Mars/mtrigger
- Timestamp:
- 12/21/09 10:06:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtrigger/MTriggerPatternDecode.cc
r9490 r9531 29 29 // Decodes the trigger pattern from MRawEvtData into MTriggerPattern. 30 30 // 31 // For files before file version 5 the trigger pattern is set to 00000000.32 // This can be changed using the information about the file-type.31 // For files before file version 5 the trigger pattern is set according 32 // to the file type 33 33 // 34 34 // For more details see: MTriggerPattern … … 70 70 Int_t MTriggerPatternDecode::PreProcess(MParList *pList) 71 71 { 72 fRunHeader = (MRawRunHeader*)pList->Find CreateObj("MRawRunHeader");72 fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 73 73 if (!fRunHeader) 74 74 { … … 77 77 } 78 78 79 fEvtHeader = (MRawEvtHeader 79 fEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader"); 80 80 if (!fEvtHeader) 81 81 { … … 86 86 fPattern = (MTriggerPattern*)pList->FindCreateObj("MTriggerPattern"); 87 87 if (!fPattern) 88 {89 *fLog << err << "MRawEvtHeader not found... abort." << endl;90 88 return kFALSE; 91 }92 89 93 90 return kTRUE; … … 96 93 // -------------------------------------------------------------------------- 97 94 // 98 // For files before file version 5 the trigger pattern is set to 00000000.99 // This can be changed using the information about the file-type.100 95 // 101 96 Int_t MTriggerPatternDecode::Process() 102 97 { 103 // No setting necessary because MTriggerPattern::reset() has104 // been called just before105 98 if (fRunHeader->GetFormatVersion()<5) 99 { 100 switch (fRunHeader->GetRunType()&0xff) 101 { 102 case MRawRunHeader::kRTData: 103 fPattern->fPrescaled = MTriggerPattern::kTriggerLvl1; 104 fPattern->fUnprescaled = MTriggerPattern::kTriggerLvl1; 105 return kTRUE; 106 107 case MRawRunHeader::kRTPedestal: 108 fPattern->fPrescaled = MTriggerPattern::kPedestal; 109 fPattern->fUnprescaled = MTriggerPattern::kPedestal; 110 return kTRUE; 111 112 case MRawRunHeader::kRTCalibration: 113 fPattern->fPrescaled = MTriggerPattern::kCalibration; 114 fPattern->fUnprescaled = MTriggerPattern::kCalibration; 115 return kTRUE; 116 } 106 117 return kTRUE; 118 } 107 119 108 120 const UInt_t pattern = ~fEvtHeader->GetTriggerID();
Note:
See TracChangeset
for help on using the changeset viewer.