![]() |
![]() |
00001 #include "EventFilter/Utilities/interface/TriggerReportDef.h" 00002 00003 namespace evf{ 00004 TriggerReportStatic::TriggerReportStatic() : trigPathsInMenu(0), endPathsInMenu(0){} 00005 void funcs::reset(TriggerReportStatic *trs){ 00006 trs->lumiSection = 0; 00007 trs->prescaleIndex = 0; 00008 trs->nbExpected=0; 00009 trs->nbReporting=0; 00010 //copy the event summary 00011 trs->eventSummary.totalEvents = 0; 00012 trs->eventSummary.totalEventsPassed = 0; 00013 trs->eventSummary.totalEventsFailed = 0; 00014 00015 for(size_t i = 0; i < max_paths; i++) 00016 { 00017 // reset individual path summaries 00018 trs->trigPathSummaries[i].timesRun = 0; 00019 trs->trigPathSummaries[i].timesPassed = 0; 00020 trs->trigPathSummaries[i].timesPassedPs = 0; 00021 trs->trigPathSummaries[i].timesPassedL1 = 0; 00022 trs->trigPathSummaries[i].timesFailed = 0; 00023 trs->trigPathSummaries[i].timesExcept = 0; 00024 } 00025 for(size_t i = 0; i < max_endpaths; i++) 00026 { 00027 trs->endPathSummaries[i].timesRun = 0; 00028 trs->endPathSummaries[i].timesPassed = 0; 00029 trs->endPathSummaries[i].timesPassedPs = 0; 00030 trs->endPathSummaries[i].timesPassedL1 = 0; 00031 trs->endPathSummaries[i].timesFailed = 0; 00032 trs->endPathSummaries[i].timesExcept = 0; 00033 } 00034 // trigPathsInMenu = 0; 00035 // endPathsInMenu = 0; 00036 } 00037 void funcs::addToReport(TriggerReportStatic *trs, TriggerReportStatic *trp, unsigned int lumisection){ 00038 if(trs->trigPathsInMenu==0) trs->trigPathsInMenu = trp->trigPathsInMenu; 00039 if(trs->endPathsInMenu==0) trs->endPathsInMenu = trp->endPathsInMenu; 00040 // set LS and PS 00041 trs->lumiSection = lumisection; 00042 if(trp->eventSummary.totalEvents!=0) //do not update PS if no events seen 00043 trs->prescaleIndex = trp->prescaleIndex; 00044 // expected and reporting are incremented at each update by the corresponding contrib 00045 trs->nbExpected += trp->nbExpected; 00046 trs->nbReporting += trp->nbReporting; 00047 //add to the event summary 00048 trs->eventSummary.totalEvents += trp->eventSummary.totalEvents; 00049 trs->eventSummary.totalEventsPassed += trp->eventSummary.totalEventsPassed; 00050 trs->eventSummary.totalEventsFailed += trp->eventSummary.totalEventsFailed; 00051 //traverse the trigger report and sum relevant parts, check otherwise 00052 // loop on paths 00053 for(int i = 0; i < trp->trigPathsInMenu; i++) 00054 { 00055 00056 // fill individual path summaries 00057 trs->trigPathSummaries[i].timesRun += trp->trigPathSummaries[i].timesRun; 00058 trs->trigPathSummaries[i].timesPassed += trp->trigPathSummaries[i].timesPassed; 00059 trs->trigPathSummaries[i].timesPassedPs += trp->trigPathSummaries[i].timesPassedPs; 00060 trs->trigPathSummaries[i].timesPassedL1 += trp->trigPathSummaries[i].timesPassedL1; 00061 trs->trigPathSummaries[i].timesFailed += trp->trigPathSummaries[i].timesFailed; 00062 trs->trigPathSummaries[i].timesExcept += trp->trigPathSummaries[i].timesExcept; 00063 } 00064 for(int i = 0; i < trp->endPathsInMenu; i++) 00065 { 00066 trs->endPathSummaries[i].timesRun += trp->endPathSummaries[i].timesRun; 00067 trs->endPathSummaries[i].timesPassed += trp->endPathSummaries[i].timesPassed; 00068 trs->endPathSummaries[i].timesPassedPs += trp->endPathSummaries[i].timesPassedPs; 00069 trs->endPathSummaries[i].timesPassedL1 += trp->endPathSummaries[i].timesPassedL1; 00070 trs->endPathSummaries[i].timesFailed += trp->endPathSummaries[i].timesFailed; 00071 trs->endPathSummaries[i].timesExcept += trp->endPathSummaries[i].timesExcept; 00072 } 00073 } 00074 }