00001 #ifndef DIGIECAL_ECALDIGICOLLECTION_H 00002 #define DIGIECAL_ECALDIGICOLLECTION_H 00003 00004 #include "DataFormats/EcalDigi/interface/EBDataFrame.h" 00005 #include "DataFormats/EcalDigi/interface/EEDataFrame.h" 00006 #include "DataFormats/EcalDigi/interface/ESDataFrame.h" 00007 #include "DataFormats/EcalDigi/interface/EcalTriggerPrimitiveDigi.h" 00008 #include "DataFormats/EcalDigi/interface/EcalTrigPrimCompactColl.h" 00009 #include "DataFormats/EcalDigi/interface/EcalPseudoStripInputDigi.h" 00010 #include "DataFormats/EcalDigi/interface/EBSrFlag.h" 00011 #include "DataFormats/EcalDigi/interface/EESrFlag.h" 00012 #include "DataFormats/EcalDigi/interface/EcalPnDiodeDigi.h" 00013 #include "DataFormats/EcalDigi/interface/EcalMatacqDigi.h" 00014 #include "DataFormats/Common/interface/SortedCollection.h" 00015 00016 #include "DataFormats/DetId/interface/DetId.h" 00017 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" 00018 #include "DataFormats/Common/interface/DataFrameContainer.h" 00019 00020 class EcalDigiCollection : public edm::DataFrameContainer { 00021 public: 00022 typedef edm::DataFrameContainer::size_type size_type; 00023 static const size_type MAXSAMPLES = 10; 00024 explicit EcalDigiCollection(size_type istride=MAXSAMPLES, int isubdet=0) : 00025 edm::DataFrameContainer(istride, isubdet){} 00026 void swap(DataFrameContainer& other) {this->DataFrameContainer::swap(other);} 00027 }; 00028 00029 // make edm (and ecal client) happy 00030 class EBDigiCollection : public EcalDigiCollection { 00031 public: 00032 typedef edm::DataFrameContainer::size_type size_type; 00033 typedef EBDataFrame Digi; 00034 typedef Digi::key_type DetId; 00035 00036 EBDigiCollection(size_type istride=MAXSAMPLES) : 00037 EcalDigiCollection(istride, EcalBarrel){} 00038 void swap(EBDigiCollection& other) {this->EcalDigiCollection::swap(other);} 00039 }; 00040 00041 class EEDigiCollection : public EcalDigiCollection { 00042 public: 00043 typedef edm::DataFrameContainer::size_type size_type; 00044 typedef EEDataFrame Digi; 00045 typedef Digi::key_type DetId; 00046 00047 EEDigiCollection(size_type istride=MAXSAMPLES) : 00048 EcalDigiCollection(istride, EcalEndcap){} 00049 void swap(EEDigiCollection& other) {this->EcalDigiCollection::swap(other);} 00050 }; 00051 00052 // Free swap functions 00053 inline 00054 void swap(EcalDigiCollection& lhs, EcalDigiCollection& rhs) { 00055 lhs.swap(rhs); 00056 } 00057 00058 inline 00059 void swap(EBDigiCollection& lhs, EBDigiCollection& rhs) { 00060 lhs.swap(rhs); 00061 } 00062 00063 inline 00064 void swap(EEDigiCollection& lhs, EEDigiCollection& rhs) { 00065 lhs.swap(rhs); 00066 } 00067 00068 //typedef EcalDigiCollection EBDigiCollection; 00069 //typedef EcalDigiCollection EEDigiCollection; 00070 00071 typedef edm::SortedCollection<ESDataFrame> ESDigiCollection; 00072 00075 typedef edm::SortedCollection<EcalTriggerPrimitiveDigi> EcalTrigPrimDigiCollection; 00076 00077 typedef edm::SortedCollection<EcalPseudoStripInputDigi> EcalPSInputDigiCollection; 00078 typedef edm::SortedCollection<EBSrFlag> EBSrFlagCollection; 00079 typedef edm::SortedCollection<EESrFlag> EESrFlagCollection; 00080 typedef edm::SortedCollection<EcalPnDiodeDigi> EcalPnDiodeDigiCollection; 00081 typedef edm::SortedCollection<EcalMatacqDigi> EcalMatacqDigiCollection; 00082 00083 #endif