52 typedef std::map<uint32_t, std::vector<float> >
CMMap;
82 _inputTag(conf.getParameter<edm::InputTag> (
"CMCollection")),
83 _Algorithm(conf.getParameter<std::string>(
"Algorithm")),
84 _nEventsToUse(conf.getParameter<uint32_t>(
"NEvents"))
89 produces< edm::DetSetVector<SiStripProcessedRawDigi> > (
"MEANAPVCM");
117 std::vector<edm::DetSet<SiStripProcessedRawDigi> > meancm;
141 iEvent.
put( outputMeanCM,
"MEANAPVCM");
147 meancm.reserve(15000);
150 rawDigis = input.
begin(); rawDigis != input.
end(); rawDigis++) {
154 for(uint16_t
APV = 0;
APV < rawDigis->size()/128; ++
APV){
158 if(ped < MinPed) MinPed = ped;
160 if(MinPed>128) MinPed=128;
164 meancm.push_back(MeanCMDetSet);
171 CMMap::iterator itMap;
174 for(itInput = Input.
begin(); itInput != Input.
end(); ++itInput){
176 itMap =
_CMMap.find(detId);
178 std::vector<float> MeanCMNValue;
179 MeanCMNValue.clear();
181 std::vector< float >& MapContent = itMap->second;
182 std::vector<float>::iterator itMapVector = MapContent.begin();
183 for(itCM = itInput->
begin(); itCM != itInput->
end(); ++itCM, ++itMapVector){
184 MeanCMNValue.push_back(itCM->adc() + *itMapVector);
187 _CMMap.insert(itMap, std::pair<uint32_t, std::vector<float> >(detId,MeanCMNValue));
189 for(itCM = itInput->
begin(); itCM != itInput->
end(); ++itCM) MeanCMNValue.push_back(itCM->adc());
190 _CMMap.insert(std::pair<uint32_t, std::vector<float> >(detId,MeanCMNValue));
198 CMMap::iterator itMap;
199 std::vector<float>::const_iterator itMapVector;
202 meancm.reserve(15000);
204 for(itMap =
_CMMap.begin(); itMap !=
_CMMap.end(); ++itMap){
206 for(itMapVector = (itMap->second).begin(); itMapVector != (itMap->second).
end(); ++itMapVector) MeanCMDetSet.
push_back(*itMapVector/(
float)
_actualEvent);
207 meancm.push_back(MeanCMDetSet);
void push_back(const T &t)
#define DEFINE_FWK_MODULE(type)
std::pair< ContainerIterator, ContainerIterator > Range
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
std::map< uint32_t, std::vector< float > > CMMap
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator