Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-03 04:09:55

0001 #ifndef DTTimeEvolutionHisto_H
0002 #define DTTimeEvolutionHisto_H
0003 
0004 /** \class DTTimeEvolutionHisto
0005  *  No description available.
0006  *
0007  *  \author G. Cerminara - INFN Torino
0008  */
0009 
0010 #include <string>
0011 #include <map>
0012 
0013 #include "DQMServices/Core/interface/DQMStore.h"
0014 
0015 class DTTimeEvolutionHisto {
0016 public:
0017   typedef dqm::legacy::DQMStore DQMStore;
0018   typedef dqm::legacy::MonitorElement MonitorElement;
0019   /// Constructor
0020   /// Parameters are: <br>
0021   ///    - pointer to DQMStore <br>
0022   ///    - name of the MonitorElement <br>
0023   ///    - title of the MonitorElement <br>
0024   ///    - # of bins <br>
0025   ///    - # of LumiSections per bin <br>
0026   ///    - mode: <br>
0027   ///         0 -> rate (over event) <br>
0028   ///              need to fill using accumulateValueTimeSlot and updateTimeSlot methods <br>
0029   ///         1 -> # of entries <br>
0030   ///         2 -> # of events <br>
0031   ///         3 -> mean over LSs <br>
0032   DTTimeEvolutionHisto(DQMStore::IBooker& ibooker,
0033                        const std::string& name,
0034                        const std::string& title,
0035                        int nbins,
0036                        int lsPrescale,
0037                        bool sliding,
0038                        int mode = 0);
0039 
0040   DTTimeEvolutionHisto(DQMStore::IBooker& ibooker,
0041                        const std::string& name,
0042                        const std::string& title,
0043                        int nbins,
0044                        int firstLS,
0045                        int lsPrescale,
0046                        bool sliding,
0047                        int mode = 0);
0048 
0049   //FR changed the previous 2 argument constructor to the following one
0050   DTTimeEvolutionHisto(MonitorElement*);
0051 
0052   /// Destructor
0053   virtual ~DTTimeEvolutionHisto();
0054 
0055   // Operations
0056 
0057   void setTimeSlotValue(float value, int timeSlot);
0058 
0059   void accumulateValueTimeSlot(float value);
0060 
0061   void updateTimeSlot(int ls, int nEventsInLS);
0062 
0063   void normalizeTo(const MonitorElement* histForNorm);
0064 
0065 protected:
0066 private:
0067   float valueLastTimeSlot;
0068   std::map<int, int> nEventsInLastTimeSlot;
0069   std::map<int, int> nLumiTrInLastTimeSlot;
0070   int theFirstLS;
0071   int theLSPrescale;
0072   bool doSlide;
0073   int nBookedBins;
0074   int theMode;
0075   MonitorElement* histo;
0076   int binLabelCounter;
0077 };
0078 #endif
0079 
0080 /* Local Variables: */
0081 /* show-trailing-whitespace: t */
0082 /* truncate-lines: t */
0083 /* End: */