CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
ecaldqm::RawDataTask Class Reference

#include <RawDataTask.h>

Inheritance diagram for ecaldqm::RawDataTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Types

enum  Constants { nEventTypes = 25 }
 
enum  MESets {
  kEventTypePreCalib, kEventTypeCalib, kEventTypePostCalib, kCRC,
  kRunNumber, kOrbit, kTriggerType, kL1ADCC,
  kL1AFE, kL1ATCC, kL1ASRP, kBXDCC,
  kBXFE, kBXTCC, kBXSRP, kDesyncByLumi,
  kDesyncTotal, kFEStatus, kFEByLumi, kFEDEntries,
  kFEDFatal, nMESets
}
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

void analyze (const void *, Collections) override
 
void beginEvent (const edm::Event &, const edm::EventSetup &) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void bookMEs () override
 
 RawDataTask (const edm::ParameterSet &, const edm::ParameterSet &)
 
void runOnRawData (const EcalRawDataCollection &, Collections)
 
void runOnSource (const FEDRawDataCollection &, Collections)
 
 ~RawDataTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
 DQWorkerTask (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endEvent (const edm::Event &, const edm::EventSetup &)
 
virtual bool filterRunType (const std::vector< short > &)
 
virtual bool filterTrigger (const edm::TriggerResultsByName &)
 
virtual const std::vector
< std::pair< Collections,
Collections > > & 
getDependencies ()
 
virtual bool runsOn (unsigned)
 
virtual ~DQWorkerTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
 DQWorker (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
const std::vector< MESet * > & getMEs ()
 
virtual std::string const & getName ()
 
virtual bool isInitialized ()
 
virtual void reset ()
 
virtual void setInitialized (bool _init)
 
virtual void setVerbosity (int _verbosity)
 
virtual ~DQWorker ()
 

Static Public Member Functions

static void setMEData (std::vector< MEData > &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void setMEData (std::vector< MEData > &)
 

Private Attributes

int bx_
 
int feL1Offset_
 
std::string hltTaskFolder_
 
int hltTaskMode_
 
int l1A_
 
int orbit_
 
int run_
 
short triggerType_
 

Additional Inherited Members

- Static Public Attributes inherited from ecaldqm::DQWorker
static std::map< std::string,
std::vector< MEData > > 
meData
 
- Protected Member Functions inherited from ecaldqm::DQWorker
MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
 
void meSet_ (unsigned, edm::ParameterSet const &)
 
- Protected Attributes inherited from ecaldqm::DQWorkerTask
uint32_t collectionMask_
 
std::vector< std::pair
< Collections, Collections > > 
dependencies_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Detailed Description

Definition at line 11 of file RawDataTask.h.

Member Enumeration Documentation

Enumerator
nEventTypes 

Definition at line 52 of file RawDataTask.h.

52  {
53  nEventTypes = 25
54  };
Enumerator
kEventTypePreCalib 
kEventTypeCalib 
kEventTypePostCalib 
kCRC 
kRunNumber 
kOrbit 
kTriggerType 
kL1ADCC 
kL1AFE 
kL1ATCC 
kL1ASRP 
kBXDCC 
kBXFE 
kBXTCC 
kBXSRP 
kDesyncByLumi 
kDesyncTotal 
kFEStatus 
kFEByLumi 
kFEDEntries 
kFEDFatal 
nMESets 

Definition at line 26 of file RawDataTask.h.

26  {
27  kEventTypePreCalib, // h1f
28  kEventTypeCalib, // h1f
29  kEventTypePostCalib, // h1f
30  kCRC, // h1f
31  kRunNumber, // h1f
32  kOrbit, // h1f
33  kTriggerType, // h1f
34  kL1ADCC, // h1f
35  kL1AFE, // h1f
36  // kL1AFEMap, // h2f
37  kL1ATCC, // h1f
38  kL1ASRP, // h1f
39  kBXDCC, // h1f
40  kBXFE, // h1f
41  kBXTCC, // h1f
42  kBXSRP, // h1f
43  kDesyncByLumi, // h1f
44  kDesyncTotal, // h1f
45  kFEStatus, // h1f
46  kFEByLumi, // h1f
48  kFEDFatal,
49  nMESets
50  };

Constructor & Destructor Documentation

ecaldqm::RawDataTask::RawDataTask ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 12 of file RawDataTask.cc.

References ecaldqm::DQWorkerTask::collectionMask_, ecaldqm::DQWorkerTask::dependencies_, edm::ParameterSet::getUntrackedParameterSet(), hltTaskFolder_, hltTaskMode_, ecaldqm::kEcalRawData, kFEDEntries, kFEDFatal, ecaldqm::kLumiSection, ecaldqm::kSource, ecaldqm::DQWorker::MEs_, and AlCaHLTBitMon_QueryRunRegistry::string.

12  :
13  DQWorkerTask(_params, _paths, "RawDataTask"),
14  hltTaskMode_(0),
15  hltTaskFolder_(""),
16  run_(0),
17  l1A_(0),
18  orbit_(0),
19  bx_(0),
20  triggerType_(0),
21  feL1Offset_(0)
22  {
24  (0x1 << kLumiSection) |
25  (0x1 << kSource) |
26  (0x1 << kEcalRawData);
27 
28  dependencies_.push_back(std::pair<Collections, Collections>(kEcalRawData, kSource));
29 
30  edm::ParameterSet const& commonParams(_params.getUntrackedParameterSet("Common"));
31 
32  hltTaskMode_ = commonParams.getUntrackedParameter<int>("hltTaskMode");
33  hltTaskFolder_ = commonParams.getUntrackedParameter<std::string>("hltTaskFolder");
34 
35  if(hltTaskMode_ != 0 && hltTaskFolder_.size() == 0)
36  throw cms::Exception("InvalidConfiguration") << "HLTTask mode needs a folder name";
37 
38  if(hltTaskMode_ != 0){
39  std::map<std::string, std::string> replacements;
40  replacements["hlttask"] = hltTaskFolder_;
41 
42  MEs_[kFEDEntries]->name(replacements);
43  MEs_[kFEDFatal]->name(replacements);
44  }
45  }
std::vector< std::pair< Collections, Collections > > dependencies_
Definition: DQWorkerTask.h:31
DQWorkerTask(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
Definition: DQWorkerTask.cc:5
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
std::string hltTaskFolder_
Definition: RawDataTask.h:60
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
ecaldqm::RawDataTask::~RawDataTask ( )

Definition at line 47 of file RawDataTask.cc.

48  {
49  }

Member Function Documentation

void ecaldqm::RawDataTask::analyze ( const void *  _p,
Collections  _collection 
)
inlineoverridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 70 of file RawDataTask.h.

References ecaldqm::kEcalRawData, ecaldqm::kSource, runOnRawData(), and runOnSource().

70  {
71  switch(_collection){
72  case kSource:
73  runOnSource(*static_cast<const FEDRawDataCollection*>(_p), _collection);
74  break;
75  case kEcalRawData:
76  runOnRawData(*static_cast<const EcalRawDataCollection*>(_p), _collection);
77  break;
78  default:
79  break;
80  }
81  }
void runOnRawData(const EcalRawDataCollection &, Collections)
Definition: RawDataTask.cc:166
void runOnSource(const FEDRawDataCollection &, Collections)
Definition: RawDataTask.cc:141
void ecaldqm::RawDataTask::beginEvent ( const edm::Event _evt,
const edm::EventSetup  
)
overridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 130 of file RawDataTask.cc.

References edm::EventBase::bunchCrossing(), bx_, edm::EventBase::experimentType(), feL1Offset_, edm::EventBase::isRealData(), l1A_, orbit_, edm::EventBase::orbitNumber(), edm::Event::run(), run_, and triggerType_.

131  {
132  run_ = _evt.run();
133  orbit_ = _evt.orbitNumber() & 0xffffff;
134  bx_ = _evt.bunchCrossing() & 0xfff;
135  triggerType_ = _evt.experimentType() & 0xf;
136  l1A_ = 0;
137  feL1Offset_ = _evt.isRealData() ? 1 : 0;
138  }
int bunchCrossing() const
Definition: EventBase.h:62
bool isRealData() const
Definition: EventBase.h:60
RunNumber_t run() const
Definition: Event.h:88
int orbitNumber() const
Definition: EventBase.h:63
edm::EventAuxiliary::ExperimentType experimentType() const
Definition: EventBase.h:61
void ecaldqm::RawDataTask::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 123 of file RawDataTask.cc.

References kDesyncByLumi, kFEByLumi, and ecaldqm::DQWorker::MEs_.

124  {
125  if(MEs_[kDesyncByLumi]->isActive()) MEs_[kDesyncByLumi]->reset();
126  if(MEs_[kFEByLumi]->isActive()) MEs_[kFEByLumi]->reset();
127  }
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
void ecaldqm::RawDataTask::bookMEs ( )
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 52 of file RawDataTask.cc.

References EcalDCCHeaderBlock::BEAMH2, EcalDCCHeaderBlock::BEAMH4, ecaldqm::BlockSize, ecaldqm::DQWorker::bookMEs(), ecaldqm::BXDesync, EcalDCCHeaderBlock::CALIB_LOCAL, ecaldqm::ChannelId, EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, ecaldqm::Disabled, ecaldqm::Enabled, ecaldqm::FIFOFull, ecaldqm::FIFOFullL1ADesync, ecaldqm::ForcedZS, EcalDCCHeaderBlock::HALO_GLOBAL, EcalDCCHeaderBlock::HALO_LOCAL, ecaldqm::HeaderError, hltTaskMode_, ecaldqm::HParity, i, kEventTypeCalib, kEventTypePostCalib, kEventTypePreCalib, kFEByLumi, kFEDEntries, kFEDFatal, kFEStatus, ecaldqm::L1ABXDesync, ecaldqm::L1ADesync, EcalDCCHeaderBlock::LASER_DELAY_SCAN, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_POWER_SCAN, EcalDCCHeaderBlock::LASER_STD, EcalDCCHeaderBlock::LED_GAP, EcalDCCHeaderBlock::LED_STD, ecaldqm::LinkError, ecaldqm::DQWorker::MEs_, EcalDCCHeaderBlock::MTCC, nEventTypes, ecaldqm::nFEFlags, EcalDCCHeaderBlock::PEDESTAL_25NS_SCAN, EcalDCCHeaderBlock::PEDESTAL_GAP, EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN, EcalDCCHeaderBlock::PEDESTAL_STD, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, AlCaHLTBitMon_QueryRunRegistry::string, ecaldqm::Suppressed, EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, EcalDCCHeaderBlock::TESTPULSE_SCAN_MEM, ecaldqm::Timeout, and ecaldqm::VParity.

53  {
55 
56  if(hltTaskMode_ != 1){
57  std::string eventTypes[nEventTypes];
58  eventTypes[0] = "UNKNOWN";
59  // From DataFormats/EcalRawData/interface/EcalDCCHeaderBlock.h; should move to reflex
60  eventTypes[EcalDCCHeaderBlock::COSMIC + 1] = "COSMIC";
61  eventTypes[EcalDCCHeaderBlock::BEAMH4 + 1] = "BEAMH4";
62  eventTypes[EcalDCCHeaderBlock::BEAMH2 + 1] = "BEAMH2";
63  eventTypes[EcalDCCHeaderBlock::MTCC + 1] = "MTCC";
64  eventTypes[EcalDCCHeaderBlock::LASER_STD + 1] = "LASER_STD";
65  eventTypes[EcalDCCHeaderBlock::LASER_POWER_SCAN + 1] = "LASER_POWER_SCAN";
66  eventTypes[EcalDCCHeaderBlock::LASER_DELAY_SCAN + 1] = "LASER_DELAY_SCAN";
67  eventTypes[EcalDCCHeaderBlock::TESTPULSE_SCAN_MEM + 1] = "TESTPULSE_SCAN_MEM";
68  eventTypes[EcalDCCHeaderBlock::TESTPULSE_MGPA + 1] = "TESTPULSE_MGPA";
69  eventTypes[EcalDCCHeaderBlock::PEDESTAL_STD + 1] = "PEDESTAL_STD";
70  eventTypes[EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN + 1] = "PEDESTAL_OFFSET_SCAN";
71  eventTypes[EcalDCCHeaderBlock::PEDESTAL_25NS_SCAN + 1] = "PEDESTAL_25NS_SCAN";
72  eventTypes[EcalDCCHeaderBlock::LED_STD + 1] = "LED_STD";
73  eventTypes[EcalDCCHeaderBlock::PHYSICS_GLOBAL + 1] = "PHYSICS_GLOBAL";
74  eventTypes[EcalDCCHeaderBlock::COSMICS_GLOBAL + 1] = "COSMICS_GLOBAL";
75  eventTypes[EcalDCCHeaderBlock::HALO_GLOBAL + 1] = "HALO_GLOBAL";
76  eventTypes[EcalDCCHeaderBlock::LASER_GAP + 1] = "LASER_GAP";
77  eventTypes[EcalDCCHeaderBlock::TESTPULSE_GAP + 1] = "TESTPULSE_GAP";
78  eventTypes[EcalDCCHeaderBlock::PEDESTAL_GAP + 1] = "PEDESTAL_GAP";
79  eventTypes[EcalDCCHeaderBlock::LED_GAP + 1] = "LED_GAP";
80  eventTypes[EcalDCCHeaderBlock::PHYSICS_LOCAL + 1] = "PHYSICS_LOCAL";
81  eventTypes[EcalDCCHeaderBlock::COSMICS_LOCAL + 1] = "COSMICS_LOCAL";
82  eventTypes[EcalDCCHeaderBlock::HALO_LOCAL + 1] = "HALO_LOCAL";
83  eventTypes[EcalDCCHeaderBlock::CALIB_LOCAL + 1] = "CALIB_LOCAL";
84 
85  std::string statuses[nFEFlags];
86  statuses[Enabled] = "ENABLED";
87  statuses[Disabled] = "DISABLED";
88  statuses[Timeout] = "TIMEOUT";
89  statuses[HeaderError] = "HEADERERROR";
90  statuses[ChannelId] = "CHANNELID";
91  statuses[LinkError] = "LINKERROR";
92  statuses[BlockSize] = "BLOCKSIZE";
93  statuses[Suppressed] = "SUPPRESSED";
94  statuses[FIFOFull] = "FIFOFULL";
95  statuses[L1ADesync] = "L1ADESYNC";
96  statuses[BXDesync] = "BXDESYNC";
97  statuses[L1ABXDesync] = "L1ABXDESYNC";
98  statuses[FIFOFullL1ADesync] = "FIFOFULLL1ADESYNC";
99  statuses[HParity] = "HPARITY";
100  statuses[VParity] = "VPARITY";
101  statuses[ForcedZS] = "FORCEDZS";
102 
103  for(unsigned iME(kEventTypePreCalib); iME < kFEByLumi; iME++)
104  MEs_[iME]->book();
105 
106  for(int i(1); i <= nEventTypes; i++){
107  MEs_[kEventTypePreCalib]->setBinLabel(0, i, eventTypes[i - 1], 1);
108  MEs_[kEventTypeCalib]->setBinLabel(0, i, eventTypes[i - 1], 1);
109  MEs_[kEventTypePostCalib]->setBinLabel(0, i, eventTypes[i - 1], 1);
110  }
111 
112  for(int i(1); i <= nFEFlags; i++)
113  MEs_[kFEStatus]->setBinLabel(-1, i, statuses[i - 1], 2);
114  }
115 
116  if(hltTaskMode_ != 0){
117  MEs_[kFEDEntries]->book();
118  MEs_[kFEDFatal]->book();
119  }
120  }
int i
Definition: DBlmapReader.cc:9
virtual void bookMEs()
Definition: DQWorker.cc:48
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
void ecaldqm::RawDataTask::runOnRawData ( const EcalRawDataCollection _dcchs,
Collections   
)

Definition at line 166 of file RawDataTask.cc.

References asciidump::at, edm::SortedCollection< T, SORT >::begin(), ecaldqm::BlockSize, bx_, ecaldqm::BXDesync, ecaldqm::ccuExists(), ecaldqm::ChannelId, ecaldqm::dccId(), edm::SortedCollection< T, SORT >::end(), feL1Offset_, lumiContext::fill, ecaldqm::getElectronicsMap(), ecaldqm::HeaderError, hltTaskMode_, ecaldqm::HParity, kBXDCC, kBXFE, kBXSRP, kBXTCC, kDesyncByLumi, kDesyncTotal, ecaldqm::kEEpLow, kEventTypeCalib, kEventTypePostCalib, kEventTypePreCalib, kFEByLumi, kFEStatus, kL1ADCC, kL1AFE, kL1ASRP, kL1ATCC, kOrbit, kRunNumber, kTriggerType, l1A_, ecaldqm::L1ABXDesync, ecaldqm::L1ADesync, ecaldqm::LinkError, ecaldqm::DQWorker::MEs_, orbit_, run_, environment_file_cff::runType, ntuplemaker::status, ecaldqm::Timeout, triggerType_, and ecaldqm::VParity.

Referenced by analyze().

167  {
168  using namespace std;
169 
170  if(hltTaskMode_ == 1) return;
171 
172  if(!l1A_){
173  // majority vote on L1A.. is there no better implementation?
174  map<int, int> l1aCounts;
175  for(EcalRawDataCollection::const_iterator dcchItr(_dcchs.begin()); dcchItr != _dcchs.end(); ++dcchItr){
176  l1aCounts[dcchItr->getLV1()]++;
177  }
178  int maxVote(0);
179  for(map<int, int>::iterator l1aItr(l1aCounts.begin()); l1aItr != l1aCounts.end(); ++l1aItr){
180  if(l1aItr->second > maxVote){
181  maxVote = l1aItr->second;
182  l1A_ = l1aItr->first;
183  }
184  }
185  }
186 
187  for(EcalRawDataCollection::const_iterator dcchItr(_dcchs.begin()); dcchItr != _dcchs.end(); ++dcchItr){
188  unsigned dccId(dcchItr->id());
189 
190  int dccL1A(dcchItr->getLV1());
191  short dccL1AShort(dccL1A & 0xfff);
192  int dccBX(dcchItr->getBX());
193 
194  if(dcchItr->getRunNumber() != run_) MEs_[kRunNumber]->fill(dccId);
195  if(dcchItr->getOrbit() != orbit_) MEs_[kOrbit]->fill(dccId);
196  if(dcchItr->getBasicTriggerType() != triggerType_) MEs_[kTriggerType]->fill(dccId);
197  if(dccL1A != l1A_) MEs_[kL1ADCC]->fill(dccId);
198  if(dccBX != bx_) MEs_[kBXDCC]->fill(dccId);
199 
200  const vector<short> &feStatus(dcchItr->getFEStatus());
201  const vector<short> &feBxs(dcchItr->getFEBxs());
202  const vector<short> &feL1s(dcchItr->getFELv1());
203 
204  bool feDesync(false);
205  bool statusError(false);
206 
207  for(unsigned iFE(0); iFE < feStatus.size(); iFE++){
208  if(!ccuExists(dccId, iFE + 1)) continue;
209 
210  short status(feStatus[iFE]);
211 
212  if(status != BXDesync && status != L1ABXDesync){ // BX desync not detected in the DCC
213  if(feBxs[iFE] != dccBX && feBxs[iFE] != -1 && dccBX != -1){
214  MEs_[kBXFE]->fill(dccId);
215  feDesync = true;
216  }
217  }
218 
219  if(status != L1ADesync && status != L1ABXDesync){
220  if(feL1s[iFE] + feL1Offset_ != dccL1AShort && feL1s[iFE] != -1 && dccL1AShort != 0){
221  MEs_[kL1AFE]->fill(dccId);
222  feDesync = true;
223  }
224  }
225 
226  if(iFE >= 68) continue;
227 
228  DetId id(getElectronicsMap()->dccTowerConstituents(dccId, iFE + 1).at(0));
229  MEs_[kFEStatus]->fill(id, status + 0.5);
230 
231  switch(status){
232  case Timeout:
233  case HeaderError:
234  case ChannelId:
235  case LinkError:
236  case BlockSize:
237  case L1ADesync:
238  case BXDesync:
239  case L1ABXDesync:
240  case HParity:
241  case VParity:
242  statusError = true;
243  break;
244  default:
245  continue;
246  }
247  }
248 
249  if(feDesync) MEs_[kDesyncByLumi]->fill(dccId);
250  if(feDesync) MEs_[kDesyncTotal]->fill(dccId);
251  if(statusError) MEs_[kFEByLumi]->fill(dccId);
252 
253  const vector<short> &tccBx(dcchItr->getTCCBx());
254  const vector<short> &tccL1(dcchItr->getTCCLv1());
255 
256  if(tccBx.size() == 4){ // EB uses tccBx[0]; EE uses all
257  if(dccId <= kEEmHigh + 1 || dccId >= kEEpLow + 1){
258  for(int iTCC(0); iTCC < 4; iTCC++){
259 
260  if(tccBx[iTCC] != dccBX && tccBx[iTCC] != -1 && dccBX != -1)
261  MEs_[kBXTCC]->fill(dccId);
262 
263  if(tccL1[iTCC] != dccL1AShort && tccL1[iTCC] != -1 && dccL1AShort != 0)
264  MEs_[kL1ATCC]->fill(dccId);
265 
266  }
267  }else{
268 
269  if(tccBx[0] != dccBX && tccBx[0] != -1 && dccBX != -1)
270  MEs_[kBXTCC]->fill(dccId);
271 
272  if(tccL1[0] != dccL1AShort && tccL1[0] != -1 && dccL1AShort != 0)
273  MEs_[kL1ATCC]->fill(dccId);
274 
275  }
276  }
277 
278  short srpBx(dcchItr->getSRPBx());
279  short srpL1(dcchItr->getSRPLv1());
280 
281  if(srpBx != dccBX && srpBx != -1 && dccBX != -1)
282  MEs_[kBXSRP]->fill(dccId);
283 
284  if(srpL1 != dccL1AShort && srpL1 != -1 && dccL1AShort != 0)
285  MEs_[kL1ASRP]->fill(dccId);
286 
287  const int calibBX(3490);
288 
289  short runType(dcchItr->getRunType() + 1);
290  if(runType < 0 || runType > 22) runType = 0;
291  if(dccBX < calibBX) MEs_[kEventTypePreCalib]->fill(dccId, runType + 0.5, 1. / 54.);
292  else if(dccBX == calibBX) MEs_[kEventTypeCalib]->fill(dccId, runType + 0.5, 1. / 54.);
293  else MEs_[kEventTypePostCalib]->fill(dccId, runType + 0.5, 1. / 54.);
294 
295  }
296  }
const EcalElectronicsMapping * getElectronicsMap()
string fill
Definition: lumiContext.py:319
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
unsigned dccId(const DetId &)
bool ccuExists(unsigned, unsigned)
const_iterator end() const
Definition: DetId.h:18
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
tuple status
Definition: ntuplemaker.py:245
const_iterator begin() const
list at
Definition: asciidump.py:428
void ecaldqm::RawDataTask::runOnSource ( const FEDRawDataCollection _fedRaw,
Collections   
)

Definition at line 141 of file RawDataTask.cc.

References FEDRawDataCollection::FEDData(), kCRC, kFEDEntries, kFEDFatal, l1A_, and ecaldqm::DQWorker::MEs_.

Referenced by analyze().

142  {
143  // Get GT L1 info
144  const FEDRawData &gtFED(_fedRaw.FEDData(812));
145  if(gtFED.size() > sizeof(uint64_t)){ // FED header is one 64 bit word
146  uint32_t *halfHeader((uint32_t *)gtFED.data());
147  l1A_ = *(halfHeader + 1) & 0xffffff;
148  }
149 
150  for(unsigned iFED(601); iFED <= 654; iFED++){
151  const FEDRawData& fedData(_fedRaw.FEDData(iFED));
152  unsigned length(fedData.size() / sizeof(uint64_t));
153  if(length > 1){ // FED header is one 64 bit word
154  if(MEs_[kFEDEntries]->isActive()) MEs_[kFEDEntries]->fill(iFED - 600);
155 
156  const uint64_t* pData(reinterpret_cast<const uint64_t*>(fedData.data()));
157  bool crcError((pData[length - 1] >> 2) & 0x1);
158 
159  if(crcError && MEs_[kFEDFatal]->isActive()) MEs_[kFEDFatal]->fill(iFED - 600);
160  if(crcError && MEs_[kCRC]->isActive()) MEs_[kCRC]->fill(iFED - 600);
161  }
162  }
163  }
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
unsigned long long uint64_t
Definition: Time.h:15
void ecaldqm::RawDataTask::setMEData ( std::vector< MEData > &  _data)
static

Definition at line 300 of file RawDataTask.cc.

References MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, EcalDQMBinningService::AxisSpecs::high, kBXDCC, kBXFE, kBXSRP, kBXTCC, kCRC, EcalDQMBinningService::kDCC, kDesyncByLumi, kDesyncTotal, EcalDQMBinningService::kEcal, EcalDQMBinningService::kEcal2P, kEventTypeCalib, kEventTypePostCalib, kEventTypePreCalib, kFEByLumi, kFEDEntries, kFEDFatal, kFEStatus, kL1ADCC, kL1AFE, kL1ASRP, kL1ATCC, kOrbit, kRunNumber, EcalDQMBinningService::kSM, EcalDQMBinningService::kSuperCrystal, kTriggerType, EcalDQMBinningService::kUser, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, nEventTypes, and ecaldqm::nFEFlags.

301  {
302  BinService::AxisSpecs eventTypeAxis;
303  eventTypeAxis.nbins = nEventTypes;
304  eventTypeAxis.low = 0.;
305  eventTypeAxis.high = nEventTypes;
306 
307  BinService::AxisSpecs feStatusAxis;
308  feStatusAxis.nbins = nFEFlags;
309  feStatusAxis.low = 0.;
310  feStatusAxis.high = nFEFlags;
311 
312  _data[kEventTypePreCalib] = MEData("EventTypePreCalib", BinService::kEcal, BinService::kUser, MonitorElement::DQM_KIND_TH1F, &eventTypeAxis);
313  _data[kEventTypeCalib] = MEData("EventTypeCalib", BinService::kEcal, BinService::kUser, MonitorElement::DQM_KIND_TH1F, &eventTypeAxis);
314  _data[kEventTypePostCalib] = MEData("EventTypePostCalib", BinService::kEcal, BinService::kUser, MonitorElement::DQM_KIND_TH1F, &eventTypeAxis);
329  _data[kFEStatus] = MEData("FEStatus", BinService::kSM, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH2F, 0, &feStatusAxis);
333  }

Member Data Documentation

int ecaldqm::RawDataTask::bx_
private

Definition at line 64 of file RawDataTask.h.

Referenced by beginEvent(), and runOnRawData().

int ecaldqm::RawDataTask::feL1Offset_
private

Definition at line 66 of file RawDataTask.h.

Referenced by beginEvent(), and runOnRawData().

std::string ecaldqm::RawDataTask::hltTaskFolder_
private

Definition at line 60 of file RawDataTask.h.

Referenced by RawDataTask().

int ecaldqm::RawDataTask::hltTaskMode_
private

Definition at line 59 of file RawDataTask.h.

Referenced by bookMEs(), RawDataTask(), and runOnRawData().

int ecaldqm::RawDataTask::l1A_
private

Definition at line 62 of file RawDataTask.h.

Referenced by beginEvent(), runOnRawData(), and runOnSource().

int ecaldqm::RawDataTask::orbit_
private

Definition at line 63 of file RawDataTask.h.

Referenced by beginEvent(), and runOnRawData().

int ecaldqm::RawDataTask::run_
private

Definition at line 61 of file RawDataTask.h.

Referenced by beginEvent(), and runOnRawData().

short ecaldqm::RawDataTask::triggerType_
private

Definition at line 65 of file RawDataTask.h.

Referenced by beginEvent(), and runOnRawData().