CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DQMDaqInfo.cc
Go to the documentation of this file.
3 
5 {
6 }
7 
9 {
10 }
11 
13 
15 
16  if( 0 != iSetup.find( recordKey ) ) {
17 
19  iSetup.get<RunInfoRcd>().get(sumFED);
20 
21  //const RunInfo* summaryFED=sumFED.product();
22 
23  std::vector<int> FedsInIds= sumFED->m_fed_in;
24 
25  float FedCount[9]={0., 0., 0., 0., 0., 0., 0., 0., 0.};
26 
27  for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
28  int fedID=FedsInIds[fedItr];
29 
30  if(fedID>=PixelRange.first && fedID<=PixelRange.second) ++FedCount[Pixel];
31  if(fedID>=TrackerRange.first && fedID<=TrackerRange.second) ++FedCount[SiStrip];
32  if(fedID>=CSCRange.first && fedID<=CSCRange.second) ++FedCount[CSC];
33  if(fedID>=RPCRange.first && fedID<=RPCRange.second) ++FedCount[RPC];
34  if(fedID>=DTRange.first && fedID<=DTRange.second) ++FedCount[DT];
35  if(fedID>=HcalRange.first && fedID<=HcalRange.second) ++FedCount[Hcal];
36  if(fedID>=ECALBarrRange.first && fedID<=ECALBarrRange.second) ++FedCount[EcalBarrel];
37  if((fedID>=ECALEndcapRangeLow.first && fedID<=ECALEndcapRangeLow.second) ||
38  (fedID>=ECALEndcapRangeHigh.first && fedID<=ECALEndcapRangeHigh.second)) ++FedCount[EcalEndcap];
39  if(fedID>=L1TRange.first && fedID<=L1TRange.second) ++FedCount[L1T];
40 
41  }
42 
43  for(int detIndex=0; detIndex<9; ++detIndex) {
44  DaqFraction[detIndex]->Fill( FedCount[detIndex]/NumberOfFeds[detIndex]);
45  }
46 
47  }else{
48 
49  for(int detIndex=0; detIndex<9; ++detIndex) DaqFraction[detIndex]->Fill(-1);
50  return;
51  }
52 
53 
54 }
55 
56 
58 }
59 
60 
61 void
63 {
64  dbe_ = 0;
66 
67  std::string commonFolder = "/EventInfo/DAQContents";
68  std::string subsystFolder;
69  std::string curentFolder;
70 
71  subsystFolder="Pixel";
72  curentFolder= subsystFolder+commonFolder;
73  dbe_->setCurrentFolder(curentFolder.c_str());
74  DaqFraction[Pixel] = dbe_->bookFloat("PixelDaqFraction");
75 
76 
77  subsystFolder="SiStrip";
78  curentFolder=subsystFolder+commonFolder;
79  dbe_->setCurrentFolder(curentFolder.c_str());
80  DaqFraction[SiStrip] = dbe_->bookFloat("SiStripDaqFraction");
81 
82  subsystFolder="RPC";
83  curentFolder=subsystFolder+commonFolder;
84  dbe_->setCurrentFolder(curentFolder.c_str());
85  DaqFraction[RPC] = dbe_->bookFloat("RPCDaqFraction");
86 
87  subsystFolder="CSC";
88  curentFolder=subsystFolder+commonFolder;
89  dbe_->setCurrentFolder(curentFolder.c_str());
90  DaqFraction[CSC] = dbe_->bookFloat("CSCDaqFraction");
91 
92  subsystFolder="DT";
93  curentFolder=subsystFolder+commonFolder;
94  dbe_->setCurrentFolder(curentFolder.c_str());
95  DaqFraction[DT] = dbe_->bookFloat("DTDaqFraction");
96 
97  subsystFolder="Hcal";
98  curentFolder=subsystFolder+commonFolder;
99  dbe_->setCurrentFolder(curentFolder.c_str());
100  DaqFraction[Hcal] = dbe_->bookFloat("HcalDaqFraction");
101 
102  subsystFolder="EcalBarrel";
103  curentFolder=subsystFolder+commonFolder;
104  dbe_->setCurrentFolder(curentFolder.c_str());
105  DaqFraction[EcalBarrel] = dbe_->bookFloat("EcalBarrDaqFraction");
106 
107  subsystFolder="EcalEndcap";
108  curentFolder=subsystFolder+commonFolder;
109  dbe_->setCurrentFolder(curentFolder.c_str());
110  DaqFraction[EcalEndcap] = dbe_->bookFloat("EcalEndDaqFraction");
111 
112  subsystFolder="L1T";
113  curentFolder=subsystFolder+commonFolder;
114  dbe_->setCurrentFolder(curentFolder.c_str());
115  DaqFraction[L1T] = dbe_->bookFloat("L1TDaqFraction");
116 
117 
124  RPCRange.first = 790;
125  RPCRange.second = 792;
126  DTRange.first = 770;
127  DTRange.second = 774;
132  ECALBarrRange.first = 610;
133  ECALBarrRange.second = 645;
134  ECALEndcapRangeLow.first = 601;
135  ECALEndcapRangeLow.second = 609;
136  ECALEndcapRangeHigh.first = 646;
137  ECALEndcapRangeHigh.second = 654;
138 
139  NumberOfFeds[Pixel] = PixelRange.second-PixelRange.first +1;
140  NumberOfFeds[SiStrip] = TrackerRange.second-TrackerRange.first +1;
141  NumberOfFeds[CSC] = CSCRange.second-CSCRange.first +1;
142  NumberOfFeds[RPC] = RPCRange.second-RPCRange.first +1;
143  NumberOfFeds[DT] = DTRange.second-DTRange.first +1;
144  NumberOfFeds[Hcal] = HcalRange.second-HcalRange.first +1;
147  NumberOfFeds[L1T] = L1TRange.second-L1TRange.first +1;
148 
149 }
150 
151 
152 void
154 }
155 
156 
157 
158 void
160 {
161 
162 
163 }
164 
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:73
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:68
virtual void endJob()
Definition: DQMDaqInfo.cc:153
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:78
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:65
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:67
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:943
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:71
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
void Fill(long long x)
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:70
DQMDaqInfo(const edm::ParameterSet &)
Definition: DQMDaqInfo.cc:4
DQMStore * dbe_
Definition: DQMDaqInfo.h:61
int iEvent
Definition: GenABIO.cc:230
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:69
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:75
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: DQMDaqInfo.cc:159
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:76
virtual void beginJob()
Definition: DQMDaqInfo.cc:62
const T & get() const
Definition: EventSetup.h:55
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:72
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:74
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition: DQMDaqInfo.cc:12
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition: DQMDaqInfo.cc:57
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:719
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125