CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/DataFormats/EcalDigi/src/EcalMatacqDigi.cc

Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 8; -*-
00002 // $Id: EcalMatacqDigi.cc,v 1.6 2011/08/30 18:42:58 wmtan Exp $
00003 #include "DataFormats/EcalDigi/interface/EcalMatacqDigi.h"
00004 
00005 using namespace std;
00006 
00007 const double EcalMatacqDigi::lsb_ = 0.25e-3;// in Volt
00008 
00009 #if 0
00010 void EcalMatacqDigi::setSize(const int& size) {
00011   if (size<0) size_=0;
00012   else if (size>MAXSAMPLES) size_=MAXSAMPLES;
00013   else size_=size;
00014 }
00015 #endif
00016   
00017 std::ostream& operator<<(std::ostream& s, const EcalMatacqDigi& digi) {
00018   s << digi.size() << " samples " << std::endl;
00019   for (int i=0; i<digi.size(); i++){
00020     s << "  " << digi.amplitudeV(i) << std::endl;
00021   }
00022   return s;
00023 }
00024 
00025 void EcalMatacqDigi::swap(EcalMatacqDigi& a){
00026   data_.swap(a.data_);
00027   std::swap(chId_, a.chId_);
00028   std::swap(ts_, a.ts_);
00029   std::swap(tTrigS_, a.tTrigS_);
00030   std::swap(version_, a.version_);
00031 #if (ECAL_MATACQ_DIGI_VERS>=2)
00032   std::swap(bxId_, a.bxId_);
00033   std::swap(l1a_, a.l1a_);
00034   std::swap(triggerType_, a.triggerType_);
00035   std::swap(orbitId_, a.orbitId_);
00036   std::swap(trigRec_, a.trigRec_);
00037   std::swap(postTrig_, a.postTrig_);
00038   std::swap(vernier_, a.vernier_);
00039   std::swap(delayA_, a.delayA_);
00040   std::swap(emtcDelay_, a.emtcDelay_);
00041   std::swap(emtcPhase_, a.emtcPhase_);
00042   std::swap(attenuation_dB_, a.attenuation_dB_);
00043   std::swap(laserPower_, a.laserPower_);
00044   std::swap(tv_sec_, a.tv_sec_);
00045   std::swap(tv_usec_, a.tv_usec_);
00046 #endif
00047 }