CMS 3D CMS Logo

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)
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 
) [inline]

Definition at line 19 of file HcalPacker.cc.

References i, j, and size.

00019                                                                                        {
00020   if (pt==0) return 0;
00021   int size=0;
00022   typename Coll::const_iterator i=pt->find(DetIdClass(did));
00023   if (i!=pt->end()) {
00024     presamples=i->presamples();
00025     size=i->size();
00026     for (int j=0; j<size; j++) 
00027       buffer[j]=(*i)[j].raw();
00028   }
00029   return size;
00030 }

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

Definition at line 32 of file HcalPacker.cc.

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

Referenced by HcalPacker::pack().

00032                                                                                                                               {
00033   if (pt==0) return 0;
00034   int size=0;
00035   HcalTrigPrimDigiCollection::const_iterator i=pt->find(tid);
00036   if (i!=pt->end()) {
00037     int presamples=i->presamples();
00038     int samples=i->size();
00039 
00040     for (int j=0; j<samples; j++) {
00041        buffer[j]=(*i)[j].raw();
00042        if (j==presamples) buffer[j]|=0x0200;
00043     }
00044   }
00045   return size;
00046 }


Generated on Tue Jun 9 17:52:52 2009 for CMSSW by  doxygen 1.5.4