CMS 3D CMS Logo

Functions
HcalPacker.cc File Reference
#include "EventFilter/HcalRawToDigi/interface/HcalPacker.h"
#include "EventFilter/HcalRawToDigi/interface/HcalHTRData.h"
#include "EventFilter/HcalRawToDigi/interface/HcalDCCHeader.h"
#include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/FEDRawData/interface/FEDTrailer.h"
#include "FWCore/Utilities/interface/CRC16.h"

Go to the source code of this file.

Functions

template<class Coll , class DetIdClass >
int process (const Coll *pt, const DetId &did, unsigned short *buffer, int &presamples, bool &isUS, bool &isMP)
 
static unsigned char processTrig (const HcalTrigPrimDigiCollection *pt, const HcalTrigTowerDetId &tid, unsigned short *buffer)
 

Function Documentation

◆ process()

template<class Coll , class DetIdClass >
int process ( const Coll *  pt,
const DetId did,
unsigned short *  buffer,
int &  presamples,
bool &  isUS,
bool &  isMP 
)

Definition at line 19 of file HcalPacker.cc.

19  {
20  isUS = false;
21  isMP = false;
22  if (pt == nullptr) {
23  return 0;
24  }
25  int size = 0;
26  typename Coll::const_iterator i = pt->find(DetIdClass(did));
27  if (i != pt->end()) {
28  isUS = i->zsUnsuppressed();
29  isMP = i->zsMarkAndPass();
30  presamples = i->presamples();
31  size = i->size();
32  for (int j = 0; j < size; j++) {
33  buffer[j] = (*i)[j].raw();
34  }
35  }
36  return size;
37 }

References edmScanValgrind::buffer, mps_fire::i, dqmiolumiharvest::j, hcalTTPDigis_cfi::presamples, DiDispStaMuonMonitor_cfi::pt, and findQualityFiles::size.

◆ processTrig()

static unsigned char processTrig ( const HcalTrigPrimDigiCollection pt,
const HcalTrigTowerDetId tid,
unsigned short *  buffer 
)
static

Definition at line 39 of file HcalPacker.cc.

41  {
42  if (pt == nullptr) {
43  return 0;
44  }
45  int size = 0;
47  bool any_nonzero = false;
48  if (i != pt->end()) {
49  int presamples = i->presamples();
50  size = i->size();
51 
52  for (int j = 0; j < size; j++) {
53  buffer[j] = (*i)[j].raw();
54  if ((buffer[j] & 0x1FF) != 0)
55  any_nonzero = true;
56  if (j == presamples) {
57  buffer[j] |= 0x0200;
58  }
59  }
60  }
61  return (any_nonzero) ? (size) : (0);
62 }

References edmScanValgrind::buffer, mps_fire::i, dqmiolumiharvest::j, hcalTTPDigis_cfi::presamples, DiDispStaMuonMonitor_cfi::pt, and findQualityFiles::size.

Referenced by HcalPacker::pack().

mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
hcalTTPDigis_cfi.presamples
presamples
Definition: hcalTTPDigis_cfi.py:9
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443