Changeset 3795 for trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc
- Timestamp:
- 04/22/04 15:45:20 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc
r2446 r3795 43 43 #include "MLogManip.h" 44 44 45 #include "MMcEvt.hxx"45 //#include "MMcEvt.hxx" 46 46 #include "MMcTrig.hxx" 47 #include "MRawRunHeader.h" 47 48 #include "MMcRunHeader.hxx" 48 49 … … 61 62 { 62 63 fName = name ? name : "MMcTriggerLvl2Calc"; 63 fTitle = title ? title : "Task to Fill the MMcTriggerLvl2 object"; 64 fTitle = title ? title : "Task to Fill the MMcTriggerLvl2 object"; 65 } 66 67 // -------------------------------------------------------------------------- 68 // 69 // Check for the run type. Return kTRUE if it is a MC run or if there 70 // is no MC run header (old camera files) kFALSE in case of a different 71 // run type 72 // 73 Bool_t MMcTriggerLvl2Calc::CheckRunType(MParList *pList) const 74 { 75 const MRawRunHeader *run = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 76 if (!run) 77 { 78 *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl; 79 return kTRUE; 80 } 64 81 65 } 66 67 68 // -------------------------------------------------------------------------- 69 // 70 // PreProcess 71 // 72 // 73 Int_t MMcTriggerLvl2Calc::PreProcess (MParList *pList) 74 { 75 // connect the raw data with this task 76 82 return run->IsMonteCarloRun(); 83 } 84 85 // -------------------------------------------------------------------------- 86 // 87 // Check for the runtype. 88 // Search for . 89 // 90 Bool_t MMcTriggerLvl2Calc::ReInit(MParList *pList) 91 { 92 // 93 // If it is no MC file skip this function... 94 // 95 if (!CheckRunType(pList)) 96 { 97 *fLog << inf << "This is no MC file... skipping." << endl; 98 return kTRUE; 99 } 100 101 // 102 // Check all necessary containers 103 // 77 104 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 78 if (!fMcEvt)79 {80 *fLog << err << dbginf << "MMcEvt not found... exit." << endl;81 return kFALSE;82 }105 if (!fMcEvt) 106 { 107 *fLog << err << dbginf << "MMcEvt not found... exit." << endl; 108 return kFALSE; 109 } 83 110 84 111 fMcTrig = (MMcTrig*)pList->FindObject("MMcTrig"); … … 102 129 return kFALSE; 103 130 } 104 fMMcTriggerLvl2 = (MMcTriggerLvl2*)pList->FindObject("MMcTriggerLvl2"); 131 132 return kTRUE; 133 } 134 135 136 // -------------------------------------------------------------------------- 137 // 138 // PreProcess 139 // Check the exxistence of the MMcTriggerLvl2 containers and the correct 140 // setting of the fCompactNN that defines a compact pixel 141 // 142 Int_t MMcTriggerLvl2Calc::PreProcess (MParList *pList) 143 { 144 145 // fMMcTriggerLvl2 = (MMcTriggerLvl2*)pList->FindObject("MMcTriggerLvl2"); 146 fMMcTriggerLvl2 = (MMcTriggerLvl2*)pList->FindCreateObj("MMcTriggerLvl2"); 105 147 if (!fMMcTriggerLvl2) 106 148 { … … 138 180 Int_t MMcTriggerLvl2Calc::Process() 139 181 { 140 fMMcTriggerLvl2->GetEnergy(fMcEvt);182 // fMMcTriggerLvl2->GetEnergy(fMcEvt); 141 183 142 184 fMMcTriggerLvl2->SetLv1(fMcTrig);
Note:
See TracChangeset
for help on using the changeset viewer.