CMSSW/ DataFormats/ EcalDigi/ interface/ EcalDigiCollections.h

001 #ifndef DIGIECAL_ECALDIGICOLLECTION_H
002 #define DIGIECAL_ECALDIGICOLLECTION_H
003 
004 #include "DataFormats/EcalDigi/interface/EBDataFrame.h"
005 #include "DataFormats/EcalDigi/interface/EEDataFrame.h"
006 #include "DataFormats/EcalDigi/interface/ESDataFrame.h"
007 #include "DataFormats/EcalDigi/interface/EcalTriggerPrimitiveDigi.h"
008 #include "DataFormats/EcalDigi/interface/EcalPseudoStripInputDigi.h"
009 #include "DataFormats/EcalDigi/interface/EBSrFlag.h"
010 #include "DataFormats/EcalDigi/interface/EESrFlag.h"
011 #include "DataFormats/EcalDigi/interface/EcalPnDiodeDigi.h"
012 #include "DataFormats/EcalDigi/interface/EcalMatacqDigi.h"
013 #include "DataFormats/Common/interface/SortedCollection.h"
014 
015 #include "DataFormats/DetId/interface/DetId.h"
016 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
017 #include "DataFormats/Common/interface/DataFrameContainer.h"
018 
019 class EcalDigiCollection : public edm::DataFrameContainer {
020 public:
021   typedef edm::DataFrameContainer::size_type size_type;
022   static const size_type MAXSAMPLES = 10;
023   explicit EcalDigiCollection(size_type istride=MAXSAMPLES, int isubdet=0)  : 
024     edm::DataFrameContainer(istride, isubdet){}
025   void swap(DataFrameContainer& other) {this->DataFrameContainer::swap(other);}
026 };
027 
028 // make edm (and ecal client) happy
029 class EBDigiCollection : public  EcalDigiCollection {
030 public:
031   typedef edm::DataFrameContainer::size_type size_type;
032   typedef EBDataFrame Digi;
033   typedef Digi::key_type DetId;
034 
035   EBDigiCollection(size_type istride=MAXSAMPLES) : 
036     EcalDigiCollection(istride, EcalBarrel){}
037   void swap(EBDigiCollection& other) {this->EcalDigiCollection::swap(other);}
038 };
039 
040 class EEDigiCollection : public  EcalDigiCollection {
041 public:  
042   typedef edm::DataFrameContainer::size_type size_type;
043   typedef EEDataFrame Digi;
044   typedef Digi::key_type DetId;
045 
046   EEDigiCollection(size_type istride=MAXSAMPLES) : 
047     EcalDigiCollection(istride, EcalEndcap){}
048   void swap(EEDigiCollection& other) {this->EcalDigiCollection::swap(other);}
049 };
050 
051 // Free swap functions
052 inline
053 void swap(EcalDigiCollection& lhs, EcalDigiCollection& rhs) {
054   lhs.swap(rhs);
055 }
056 
057 inline
058 void swap(EBDigiCollection& lhs, EBDigiCollection& rhs) {
059   lhs.swap(rhs);
060 }
061 
062 inline
063 void swap(EEDigiCollection& lhs, EEDigiCollection& rhs) {
064   lhs.swap(rhs);
065 }
066 
067 //typedef  EcalDigiCollection EBDigiCollection;
068 //typedef  EcalDigiCollection EEDigiCollection;
069 
070 typedef edm::SortedCollection<ESDataFrame> ESDigiCollection;
071 typedef edm::SortedCollection<EcalTriggerPrimitiveDigi> EcalTrigPrimDigiCollection;
072 typedef edm::SortedCollection<EcalPseudoStripInputDigi> EcalPSInputDigiCollection;
073 typedef edm::SortedCollection<EBSrFlag> EBSrFlagCollection;
074 typedef edm::SortedCollection<EESrFlag> EESrFlagCollection;
075 typedef edm::SortedCollection<EcalPnDiodeDigi> EcalPnDiodeDigiCollection;
076 typedef edm::SortedCollection<EcalMatacqDigi> EcalMatacqDigiCollection;
077 
078 #endif

-- DavidCockerill - 23-Aug-2010

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2010-08-23 - DavidCockerill
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback