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  * $Date: 2010/01/05 10:15:45 $
6  * $Revision: 1.6 $
7  * \author G. Cerminara - INFN Torino
8  */
9 
10 
13 
17 
20 
24 
25 
28 
30 
31 
32 
33 using namespace std;
34 using namespace edm;
35 
36 
37 
39 
40 
41 
42 
44 
45 
46 
48  // get the DQMStore
49  theDbe = Service<DQMStore>().operator->();
50 
51  // book the ME
52  // global fraction
53  theDbe->setCurrentFolder("DT/EventInfo");
54  totalDAQFraction = theDbe->bookFloat("DAQSummary");
55  totalDAQFraction->Fill(-1);
56 
57  // map
58  daqMap = theDbe->book2D("DAQSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
59  daqMap->setAxisTitle("sector",1);
60  daqMap->setAxisTitle("wheel",2);
61 
62 
63  // Wheel "fractions" -> will be 0 or 1
64  theDbe->setCurrentFolder("DT/EventInfo/DAQContents");
65  for(int wheel = -2; wheel != 3; ++wheel) {
66  stringstream streams;
67  streams << "DT_Wheel" << wheel;
68  daqFractions[wheel] = theDbe->bookFloat(streams.str());
69  daqFractions[wheel]->Fill(-1);
70  }
71 
72  //
73 
74 }
75 
76 
77 
79  // create a record key for RunInfoRcd
81 
82 
83  if(setup.find(recordKey) != 0) {
84  // reset to 0
85  totalDAQFraction->Fill(0.);
86  daqFractions[-2]->Fill(0.);
87  daqFractions[-1]->Fill(0.);
88  daqFractions[-0]->Fill(0.);
89  daqFractions[1]->Fill(0.);
90  daqFractions[2]->Fill(0.);
91 
92  daqMap->Reset();
93 
94  //get fed summary information
95  ESHandle<RunInfo> sumFED;
96  setup.get<RunInfoRcd>().get(sumFED);
97  vector<int> fedInIDs = sumFED->m_fed_in;
98 
99 
100  // the range of DT feds
101  static int FEDIDmin = FEDNumbering::MINDTFEDID;
102  static int FEDIDMax = FEDNumbering::MAXDTFEDID;
103 
104  // loop on all active feds
105  for(vector<int>::const_iterator fed = fedInIDs.begin();
106  fed != fedInIDs.end();
107  ++fed) {
108  // check if the fed is in the DT range
109  if(!(*fed >= FEDIDmin && *fed <= FEDIDMax)) continue;
110 
111  // check if the 12 channels are connected to any sector and fill the wheel percentage accordignly
112  int wheel = -99;
113  int sector = -99;
114  int dummy = -99;
115  for(int ros = 1; ros != 13; ++ros) {
116  if(!mapping->readOutToGeometry(*fed,ros,2,2,2,wheel,dummy,sector,dummy,dummy,dummy)) {
117  LogTrace("DQM|DTMonitorClient|DTDAQInfo")
118  << "FED: " << *fed << " Ch: " << ros << " wheel: " << wheel << " Sect: " << sector << endl;
119  daqFractions[wheel]->Fill(daqFractions[wheel]->getFloatValue() + 1./12.);
120  totalDAQFraction->Fill(totalDAQFraction->getFloatValue() + 1./60.);
121  daqMap->Fill(sector,wheel);
122  }
123  }
124  }
125  } else {
126  LogWarning("DQM|DTMonitorClient|DTDAQInfo") << "*** Warning: record key not found for RunInfoRcd" << endl;
127  totalDAQFraction->Fill(-1);
128  for(int wheel = -2; wheel != 3; ++wheel) {
129  daqFractions[wheel]->Fill(-1);
130  }
131  return;
132  }
133 }
134 
135 
136 
137 
139 
140 
141 
143 
144 
145 
147 
148 
149 
151  // retrieve the mapping
152  setup.get<DTReadOutMappingRcd>().get(mapping);
153 }
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:138
tuple lumi
Definition: fjr2json.py:35
virtual void beginJob()
Definition: DTDAQInfo.cc:47
virtual void beginRun(const edm::Run &run, const edm::EventSetup &setup)
Definition: DTDAQInfo.cc:150
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:146
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:78
const T & get() const
Definition: EventSetup.h:55
virtual ~DTDAQInfo()
Destructor.
Definition: DTDAQInfo.cc:43
DTDAQInfo(const edm::ParameterSet &pset)
Constructor.
Definition: DTDAQInfo.cc:38
virtual void endJob()
Definition: DTDAQInfo.cc:142
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:36