1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
#ifndef DTTimeEvolutionHisto_H
#define DTTimeEvolutionHisto_H
/** \class DTTimeEvolutionHisto
* No description available.
*
* \author G. Cerminara - INFN Torino
*/
#include <string>
#include <map>
#include "DQMServices/Core/interface/DQMStore.h"
class DTTimeEvolutionHisto {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
/// Constructor
/// Parameters are: <br>
/// - pointer to DQMStore <br>
/// - name of the MonitorElement <br>
/// - title of the MonitorElement <br>
/// - # of bins <br>
/// - # of LumiSections per bin <br>
/// - mode: <br>
/// 0 -> rate (over event) <br>
/// need to fill using accumulateValueTimeSlot and updateTimeSlot methods <br>
/// 1 -> # of entries <br>
/// 2 -> # of events <br>
/// 3 -> mean over LSs <br>
DTTimeEvolutionHisto(DQMStore::IBooker& ibooker,
const std::string& name,
const std::string& title,
int nbins,
int lsPrescale,
bool sliding,
int mode = 0);
DTTimeEvolutionHisto(DQMStore::IBooker& ibooker,
const std::string& name,
const std::string& title,
int nbins,
int firstLS,
int lsPrescale,
bool sliding,
int mode = 0);
//FR changed the previous 2 argument constructor to the following one
DTTimeEvolutionHisto(MonitorElement*);
/// Destructor
virtual ~DTTimeEvolutionHisto();
// Operations
void setTimeSlotValue(float value, int timeSlot);
void accumulateValueTimeSlot(float value);
void updateTimeSlot(int ls, int nEventsInLS);
void normalizeTo(const MonitorElement* histForNorm);
protected:
private:
float valueLastTimeSlot;
std::map<int, int> nEventsInLastTimeSlot;
std::map<int, int> nLumiTrInLastTimeSlot;
int theFirstLS;
int theLSPrescale;
bool doSlide;
int nBookedBins;
int theMode;
MonitorElement* histo;
int binLabelCounter;
};
#endif
/* Local Variables: */
/* show-trailing-whitespace: t */
/* truncate-lines: t */
/* End: */
|