1 #include "../interface/RawDataTask.h"
32 hltTaskMode_ = commonParams.getUntrackedParameter<
int>(
"hltTaskMode");
35 if(hltTaskMode_ != 0 && hltTaskFolder_.size() == 0)
36 throw cms::Exception(
"InvalidConfiguration") <<
"HLTTask mode needs a folder name";
38 if(hltTaskMode_ != 0){
39 std::map<std::string, std::string> replacements;
58 eventTypes[0] =
"UNKNOWN";
145 if(gtFED.size() >
sizeof(
uint64_t)){
146 uint32_t *halfHeader((uint32_t *)gtFED.data());
147 l1A_ = *(halfHeader + 1) & 0xffffff;
150 for(
unsigned iFED(601); iFED <= 654; iFED++){
152 unsigned length(fedData.size() /
sizeof(
uint64_t));
156 const uint64_t* pData(reinterpret_cast<const uint64_t*>(fedData.data()));
157 bool crcError((pData[length - 1] >> 2) & 0x1);
174 map<int, int> l1aCounts;
176 l1aCounts[dcchItr->getLV1()]++;
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;
188 unsigned dccId(dcchItr->id());
190 int dccL1A(dcchItr->getLV1());
191 short dccL1AShort(dccL1A & 0xfff);
192 int dccBX(dcchItr->getBX());
200 const vector<short> &feStatus(dcchItr->getFEStatus());
201 const vector<short> &feBxs(dcchItr->getFEBxs());
202 const vector<short> &feL1s(dcchItr->getFELv1());
204 bool feDesync(
false);
205 bool statusError(
false);
207 for(
unsigned iFE(0); iFE < feStatus.size(); iFE++){
210 short status(feStatus[iFE]);
213 if(feBxs[iFE] != dccBX && feBxs[iFE] != -1 && dccBX != -1){
220 if(feL1s[iFE] +
feL1Offset_ != dccL1AShort && feL1s[iFE] != -1 && dccL1AShort != 0){
226 if(iFE >= 68)
continue;
253 const vector<short> &tccBx(dcchItr->getTCCBx());
254 const vector<short> &tccL1(dcchItr->getTCCLv1());
256 if(tccBx.size() == 4){
257 if(dccId <= kEEmHigh + 1 || dccId >=
kEEpLow + 1){
258 for(
int iTCC(0); iTCC < 4; iTCC++){
260 if(tccBx[iTCC] != dccBX && tccBx[iTCC] != -1 && dccBX != -1)
263 if(tccL1[iTCC] != dccL1AShort && tccL1[iTCC] != -1 && dccL1AShort != 0)
269 if(tccBx[0] != dccBX && tccBx[0] != -1 && dccBX != -1)
272 if(tccL1[0] != dccL1AShort && tccL1[0] != -1 && dccL1AShort != 0)
278 short srpBx(dcchItr->getSRPBx());
279 short srpL1(dcchItr->getSRPLv1());
281 if(srpBx != dccBX && srpBx != -1 && dccBX != -1)
284 if(srpL1 != dccL1AShort && srpL1 != -1 && dccL1AShort != 0)
287 const int calibBX(3490);
289 short runType(dcchItr->getRunType() + 1);
290 if(runType < 0 || runType > 22)
runType = 0;
304 eventTypeAxis.
low = 0.;
309 feStatusAxis.
low = 0.;
std::vector< std::pair< Collections, Collections > > dependencies_
const EcalElectronicsMapping * getElectronicsMap()
std::vector< T >::const_iterator const_iterator
int bunchCrossing() const
void runOnRawData(const EcalRawDataCollection &, Collections)
unsigned dccId(const DetId &)
bool ccuExists(unsigned, unsigned)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
std::string hltTaskFolder_
RawDataTask(const edm::ParameterSet &, const edm::ParameterSet &)
static void setMEData(std::vector< MEData > &)
const_iterator end() const
std::vector< MESet * > MEs_
unsigned long long uint64_t
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
edm::EventAuxiliary::ExperimentType experimentType() const
void beginEvent(const edm::Event &, const edm::EventSetup &)
DEFINE_ECALDQM_WORKER(CertificationClient)
void runOnSource(const FEDRawDataCollection &, Collections)
const_iterator begin() const