CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/EventFilter/CastorRawToDigi/src/CastorPacker.cc File Reference

#include "EventFilter/CastorRawToDigi/interface/CastorPacker.h"
#include "EventFilter/CastorRawToDigi/interface/CastorCollections.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)

Function Documentation

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

Definition at line 11 of file CastorPacker.cc.

References i, j, and findQualityFiles::size.

                                                                                       {
  if (pt==0) return 0;
  int size=0;
  typename Coll::const_iterator i=pt->find(DetIdClass(did));
  if (i!=pt->end()) {
    presamples=i->presamples();
    size=i->size();
    for (int j=0; j<size; j++) 
      buffer[j]=(*i)[j].raw();
  }
  return size;
}