CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTDAQInfo.cc
Go to the documentation of this file.
1 
2 /*
3  * See header file for a description of this class.
4  *
5  * \author G. Cerminara - INFN Torino
6  */
7 
8 
11 
15 
18 
22 
23 
26 
28 
29 
30 
31 using namespace std;
32 using namespace edm;
33 
34 
35 
37 
38 
39 
40 
42 
43 
44 
46  // get the DQMStore
47  theDbe = Service<DQMStore>().operator->();
48 
49  // book the ME
50  // global fraction
51  theDbe->setCurrentFolder("DT/EventInfo");
52  totalDAQFraction = theDbe->bookFloat("DAQSummary");
53  totalDAQFraction->Fill(-1);
54 
55  // map
56  daqMap = theDbe->book2D("DAQSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
57  daqMap->setAxisTitle("sector",1);
58  daqMap->setAxisTitle("wheel",2);
59 
60 
61  // Wheel "fractions" -> will be 0 or 1
62  theDbe->setCurrentFolder("DT/EventInfo/DAQContents");
63  for(int wheel = -2; wheel != 3; ++wheel) {
64  stringstream streams;
65  streams << "DT_Wheel" << wheel;
66  daqFractions[wheel] = theDbe->bookFloat(streams.str());
67  daqFractions[wheel]->Fill(-1);
68  }
69 
70  //
71 
72 }
73 
74 
75 
77  // create a record key for RunInfoRcd
79 
80 
81  if(setup.find(recordKey) != 0) {
82  // reset to 0
83  totalDAQFraction->Fill(0.);
84  daqFractions[-2]->Fill(0.);
85  daqFractions[-1]->Fill(0.);
86  daqFractions[-0]->Fill(0.);
87  daqFractions[1]->Fill(0.);
88  daqFractions[2]->Fill(0.);
89 
90  daqMap->Reset();
91 
92  //get fed summary information
93  ESHandle<RunInfo> sumFED;
94  setup.get<RunInfoRcd>().get(sumFED);
95  vector<int> fedInIDs = sumFED->m_fed_in;
96 
97 
98  // the range of DT feds
99  static int FEDIDmin = FEDNumbering::MINDTFEDID;
100  static int FEDIDMax = FEDNumbering::MAXDTFEDID;
101 
102  // loop on all active feds
103  for(vector<int>::const_iterator fed = fedInIDs.begin();
104  fed != fedInIDs.end();
105  ++fed) {
106  // check if the fed is in the DT range
107  if(!(*fed >= FEDIDmin && *fed <= FEDIDMax)) continue;
108 
109  // check if the 12 channels are connected to any sector and fill the wheel percentage accordignly
110  int wheel = -99;
111  int sector = -99;
112  int dummy = -99;
113  for(int ros = 1; ros != 13; ++ros) {
114  if(!mapping->readOutToGeometry(*fed,ros,2,2,2,wheel,dummy,sector,dummy,dummy,dummy)) {
115  LogTrace("DQM|DTMonitorClient|DTDAQInfo")
116  << "FED: " << *fed << " Ch: " << ros << " wheel: " << wheel << " Sect: " << sector << endl;
117  daqFractions[wheel]->Fill(daqFractions[wheel]->getFloatValue() + 1./12.);
118  totalDAQFraction->Fill(totalDAQFraction->getFloatValue() + 1./60.);
119  daqMap->Fill(sector,wheel);
120  }
121  }
122  }
123  } else {
124  LogWarning("DQM|DTMonitorClient|DTDAQInfo") << "*** Warning: record key not found for RunInfoRcd" << endl;
125  totalDAQFraction->Fill(-1);
126  for(int wheel = -2; wheel != 3; ++wheel) {
127  daqFractions[wheel]->Fill(-1);
128  }
129  return;
130  }
131 }
132 
133 
134 
135 
137 
138 
139 
141 
142 
143 
145 
146 
147 
149  // retrieve the mapping
150  setup.get<DTReadOutMappingRcd>().get(mapping);
151 }
std::pair< const char *, const std::type_info * > findType(const char *iClassName)
Definition: typelookup.cc:51
virtual void endLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
Definition: DTDAQInfo.cc:136
tuple lumi
Definition: fjr2json.py:35
virtual void beginJob()
Definition: DTDAQInfo.cc:45
virtual void beginRun(const edm::Run &run, const edm::EventSetup &setup)
Definition: DTDAQInfo.cc:148
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
Definition: DTDAQInfo.cc:144
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
#define LogTrace(id)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
Definition: DTDAQInfo.cc:76
const T & get() const
Definition: EventSetup.h:55
virtual ~DTDAQInfo()
Destructor.
Definition: DTDAQInfo.cc:41
DTDAQInfo(const edm::ParameterSet &pset)
Constructor.
Definition: DTDAQInfo.cc:36
virtual void endJob()
Definition: DTDAQInfo.cc:140
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:41