Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:16

0001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 8; -*-
0002 #include "DataFormats/EcalDigi/interface/EcalMatacqDigi.h"
0003 
0004 using namespace std;
0005 
0006 const double EcalMatacqDigi::lsb_ = 0.25e-3;  // in Volt
0007 
0008 #if 0
0009 void EcalMatacqDigi::setSize(const int& size) {
0010   if (size<0) size_=0;
0011   else if (size>MAXSAMPLES) size_=MAXSAMPLES;
0012   else size_=size;
0013 }
0014 #endif
0015 
0016 std::ostream& operator<<(std::ostream& s, const EcalMatacqDigi& digi) {
0017   s << digi.size() << " samples " << std::endl;
0018   for (int i = 0; i < digi.size(); i++) {
0019     s << "  " << digi.amplitudeV(i) << std::endl;
0020   }
0021   return s;
0022 }
0023 
0024 void EcalMatacqDigi::swap(EcalMatacqDigi& a) {
0025   data_.swap(a.data_);
0026   std::swap(chId_, a.chId_);
0027   std::swap(ts_, a.ts_);
0028   std::swap(tTrigS_, a.tTrigS_);
0029   std::swap(version_, a.version_);
0030 #if (ECAL_MATACQ_DIGI_VERS >= 2)
0031   std::swap(bxId_, a.bxId_);
0032   std::swap(l1a_, a.l1a_);
0033   std::swap(triggerType_, a.triggerType_);
0034   std::swap(orbitId_, a.orbitId_);
0035   std::swap(trigRec_, a.trigRec_);
0036   std::swap(postTrig_, a.postTrig_);
0037   std::swap(vernier_, a.vernier_);
0038   std::swap(delayA_, a.delayA_);
0039   std::swap(emtcDelay_, a.emtcDelay_);
0040   std::swap(emtcPhase_, a.emtcPhase_);
0041   std::swap(attenuation_dB_, a.attenuation_dB_);
0042   std::swap(laserPower_, a.laserPower_);
0043   std::swap(tv_sec_, a.tv_sec_);
0044   std::swap(tv_usec_, a.tv_usec_);
0045 #endif
0046 }