ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/grimes/L1Menu/src/MenuRatePlots.cpp
(Generate patch)

Comparing UserCode/grimes/L1Menu/src/MenuRatePlots.cpp (file contents):
Revision 1.5 by grimes, Tue Jun 4 10:21:10 2013 UTC vs.
Revision 1.9 by grimes, Fri Jun 28 14:30:08 2013 UTC

# Line 4 | Line 4
4   #include "l1menu/ITrigger.h"
5   #include "l1menu/TriggerMenu.h"
6   #include "l1menu/TriggerRatePlot.h"
7 < #include "l1menu/tools.h"
7 > #include "l1menu/tools/tools.h"
8   #include "l1menu/ReducedMenuSample.h"
9 < #include "l1menu/IReducedEvent.h"
9 > #include "l1menu/ReducedEvent.h"
10   #include <TH1F.h>
11  
12   l1menu::MenuRatePlots::MenuRatePlots( const l1menu::TriggerMenu& triggerMenu, TDirectory* pDirectory )
13   {
14 +        // Before making any histograms make sure errors are done properly
15 +        TH1::SetDefaultSumw2();
16  
17          // Loop over each of the triggers in the menu, book a histogram for it and then create
18          // a l1menu::TriggerRate plot for it.
# Line 18 | Line 20 | l1menu::MenuRatePlots::MenuRatePlots( co
20          {
21                  std::unique_ptr<l1menu::ITrigger> pTrigger=triggerMenu.getTriggerCopy(triggerNumber);
22                  // Figure out the parameter names of all the possible thresholds.
23 <                const std::vector<std::string> thresholdNames= l1menu::getThresholdNames(*pTrigger);
23 >                const std::vector<std::string> thresholdNames=l1menu::tools::getThresholdNames(*pTrigger);
24  
25                  // When a threshold is tested, I want all the other thresholds to be zero. I'll run through
26                  // and zero all of them now.
# Line 40 | Line 42 | l1menu::MenuRatePlots::MenuRatePlots( co
42                                  numberOfBins=triggerTable.getSuggestedNumberOfBins( pTrigger->name(), *iThresholdName );
43                                  lowerEdge=triggerTable.getSuggestedLowerEdge( pTrigger->name(), *iThresholdName );
44                                  upperEdge=triggerTable.getSuggestedUpperEdge( pTrigger->name(), *iThresholdName );
43                                upperEdge*=5; // I'm getting incomplete ReducedSamples, I think because there is the odd overflow event.
45                          }
46                          catch( std::exception& error) { /* Do nothing. If no binning suggestions have been set for this trigger use the defaults I set above. */ }
47  
# Line 52 | Line 53 | l1menu::MenuRatePlots::MenuRatePlots( co
53          } // end of loop over the triggers in the menu
54   }
55  
56 < void l1menu::MenuRatePlots::addEvent( const l1menu::IEvent& event )
56 > void l1menu::MenuRatePlots::addEvent( const l1menu::L1TriggerDPGEvent& event )
57   {
58          // Loop over each of the TriggerRatePlots and add the event to each of them.
59          for( auto& ratePlot : triggerPlots_ )
# Line 70 | Line 71 | void l1menu::MenuRatePlots::initiateForR
71          }
72   }
73  
74 < void l1menu::MenuRatePlots::addEvent( const l1menu::IReducedEvent& event )
74 > void l1menu::MenuRatePlots::addEvent( const l1menu::ReducedEvent& event )
75   {
76          // Loop over each of the TriggerRatePlots and add the event to each of them.
77          for( auto& ratePlot : triggerPlots_ )
# Line 79 | Line 80 | void l1menu::MenuRatePlots::addEvent( co
80          }
81   }
82  
83 + void l1menu::MenuRatePlots::addSample( const l1menu::ISample& sample )
84 + {
85 +        // Loop over each of the TriggerRatePlots and add the sample to each of them.
86 +        for( auto& ratePlot : triggerPlots_ )
87 +        {
88 +                ratePlot.addSample( sample );
89 +        }
90 + }
91 +
92   void l1menu::MenuRatePlots::setDirectory( TDirectory* pDirectory )
93   {
94          // Loop over each of the TriggerRatePlots and individually set the directory.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines