CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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.

References i, j, and findQualityFiles::size.

19  {
20  isUS=false; isMP=false;
21  if (pt==0) return 0;
22  int size=0;
23  typename Coll::const_iterator i=pt->find(DetIdClass(did));
24  if (i!=pt->end()) {
25  isUS=i->zsUnsuppressed();
26  isMP=i->zsMarkAndPass();
27  presamples=i->presamples();
28  size=i->size();
29  for (int j=0; j<size; j++)
30  buffer[j]=(*i)[j].raw();
31  }
32  return size;
33 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
tuple size
Write out results.
static unsigned char processTrig ( const HcalTrigPrimDigiCollection pt,
const HcalTrigTowerDetId tid,
unsigned short *  buffer 
)
static

Definition at line 35 of file HcalPacker.cc.

References edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), i, j, and findQualityFiles::size.

Referenced by HcalPacker::pack().

35  {
36  if (pt==0) return 0;
37  int size=0;
39  if (i!=pt->end()) {
40  int presamples=i->presamples();
41  int samples=i->size();
42 
43  for (int j=0; j<samples; j++) {
44  buffer[j]=(*i)[j].raw();
45  if (j==presamples) buffer[j]|=0x0200;
46  }
47  }
48  return size;
49 }
int i
Definition: DBlmapReader.cc:9
std::vector< T >::const_iterator const_iterator
int j
Definition: DBlmapReader.cc:9
const_iterator end() const
iterator find(key_type k)
tuple size
Write out results.