#include <NewAlignment/LaserAlignmentT0Producer/src/LaserAlignmentT0Producer.cc>
Public Member Functions | |
LaserAlignmentT0Producer (const edm::ParameterSet &) | |
Loops all input SiStripDigi or SiStripRawDigi collections and announces the corresponding product. | |
~LaserAlignmentT0Producer () | |
Private Member Functions | |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | endJob () |
void | FillDetIds (void) |
fill a vector with all the det ids of the 434 siStrip modules relevant to the LAS | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
outline: loops alls input strip digi products branches depending on if it contains SiStripDigi or SiStripRawDigi for each product: selects only LAS module DetSets and copies them to new DetSetVector | |
Private Attributes | |
std::string | digiLabel |
std::string | digiProducer |
std::vector< edm::ParameterSet > | digiProducerList |
std::string | digiType |
std::vector< unsigned int > | theLasDetIds |
Implementation: <Notes on="" implementation>="">
Definition at line 35 of file LaserAlignmentT0Producer.h.
LaserAlignmentT0Producer::LaserAlignmentT0Producer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Loops all input SiStripDigi or SiStripRawDigi collections and announces the corresponding product.
Definition at line 15 of file LaserAlignmentT0Producer.cc.
References digiLabel, digiProducer, digiProducerList, digiType, lat::endl(), Exception, and edm::ParameterSet::getParameter().
00015 { 00016 00017 // alias for the Branches in the output file 00018 std::string alias ( iConfig.getParameter<std::string>( "@module_label" ) ); 00019 00020 // the list of input digi products from the cfg 00021 digiProducerList = iConfig.getParameter<std::vector<edm::ParameterSet> >( "DigiProducerList" ); 00022 00023 // loop all input products 00024 for ( std::vector<edm::ParameterSet>::iterator aDigiProducer = digiProducerList.begin(); aDigiProducer != digiProducerList.end(); ++aDigiProducer ) { 00025 std::string digiProducer = aDigiProducer->getParameter<std::string>( "DigiProducer" ); 00026 std::string digiLabel = aDigiProducer->getParameter<std::string>( "DigiLabel" ); 00027 std::string digiType = aDigiProducer->getParameter<std::string>( "DigiType" ); 00028 00029 // check if raw/processed digis in this collection 00030 if( digiType == "Raw" ) { 00031 produces<edm::DetSetVector<SiStripRawDigi> >( digiLabel ).setBranchAlias( alias + "siStripRawDigis" ); 00032 } 00033 else if ( digiType == "Processed" ) { // "ZeroSuppressed" digis (non-raw) 00034 produces<edm::DetSetVector<SiStripDigi> >( digiLabel ).setBranchAlias( alias + "siStripDigis" ); 00035 } 00036 else { 00037 throw cms::Exception("LaserAlignmentT0Producer") << "ERROR ** Unknown DigiType: " << digiType << " specified in cfg file" << std::endl; 00038 } 00039 00040 } 00041 00042 }
LaserAlignmentT0Producer::~LaserAlignmentT0Producer | ( | ) |
void LaserAlignmentT0Producer::beginJob | ( | const edm::EventSetup & | ) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 162 of file LaserAlignmentT0Producer.cc.
References FillDetIds().
00162 { 00163 00164 // fill the vector with LAS det ids 00165 FillDetIds(); 00166 00167 }
fill a vector with all the det ids of the 434 siStrip modules relevant to the LAS
(ugly mechanism, should later be replaced by some hash-based)
Definition at line 190 of file LaserAlignmentT0Producer.cc.
References theLasDetIds.
Referenced by beginJob().
00190 { 00191 00192 theLasDetIds.resize( 0 ); 00193 00194 // TEC+ internal alignment modules 00195 theLasDetIds.push_back( 470307208 ); theLasDetIds.push_back( 470323592 ); theLasDetIds.push_back( 470339976 ); 00196 theLasDetIds.push_back( 470356360 ); theLasDetIds.push_back( 470372744 ); theLasDetIds.push_back( 470389128 ); 00197 theLasDetIds.push_back( 470405512 ); theLasDetIds.push_back( 470421896 ); theLasDetIds.push_back( 470438280 ); 00198 theLasDetIds.push_back( 470307464 ); theLasDetIds.push_back( 470323848 ); theLasDetIds.push_back( 470340232 ); 00199 theLasDetIds.push_back( 470356616 ); theLasDetIds.push_back( 470373000 ); theLasDetIds.push_back( 470389384 ); 00200 theLasDetIds.push_back( 470405768 ); theLasDetIds.push_back( 470422152 ); theLasDetIds.push_back( 470438536 ); 00201 theLasDetIds.push_back( 470307720 ); theLasDetIds.push_back( 470324104 ); theLasDetIds.push_back( 470340488 ); 00202 theLasDetIds.push_back( 470356872 ); theLasDetIds.push_back( 470373256 ); theLasDetIds.push_back( 470389640 ); 00203 theLasDetIds.push_back( 470406024 ); theLasDetIds.push_back( 470422408 ); theLasDetIds.push_back( 470438792 ); 00204 theLasDetIds.push_back( 470307976 ); theLasDetIds.push_back( 470324360 ); theLasDetIds.push_back( 470340744 ); 00205 theLasDetIds.push_back( 470357128 ); theLasDetIds.push_back( 470373512 ); theLasDetIds.push_back( 470389896 ); 00206 theLasDetIds.push_back( 470406280 ); theLasDetIds.push_back( 470422664 ); theLasDetIds.push_back( 470439048 ); 00207 theLasDetIds.push_back( 470308232 ); theLasDetIds.push_back( 470324616 ); theLasDetIds.push_back( 470341000 ); 00208 theLasDetIds.push_back( 470357384 ); theLasDetIds.push_back( 470373768 ); theLasDetIds.push_back( 470390152 ); 00209 theLasDetIds.push_back( 470406536 ); theLasDetIds.push_back( 470422920 ); theLasDetIds.push_back( 470439304 ); 00210 theLasDetIds.push_back( 470308488 ); theLasDetIds.push_back( 470324872 ); theLasDetIds.push_back( 470341256 ); 00211 theLasDetIds.push_back( 470357640 ); theLasDetIds.push_back( 470374024 ); theLasDetIds.push_back( 470390408 ); 00212 theLasDetIds.push_back( 470406792 ); theLasDetIds.push_back( 470423176 ); theLasDetIds.push_back( 470439560 ); 00213 theLasDetIds.push_back( 470308744 ); theLasDetIds.push_back( 470325128 ); theLasDetIds.push_back( 470341512 ); 00214 theLasDetIds.push_back( 470357896 ); theLasDetIds.push_back( 470374280 ); theLasDetIds.push_back( 470390664 ); 00215 theLasDetIds.push_back( 470407048 ); theLasDetIds.push_back( 470423432 ); theLasDetIds.push_back( 470439816 ); 00216 theLasDetIds.push_back( 470309000 ); theLasDetIds.push_back( 470325384 ); theLasDetIds.push_back( 470341768 ); 00217 theLasDetIds.push_back( 470358152 ); theLasDetIds.push_back( 470374536 ); theLasDetIds.push_back( 470390920 ); 00218 theLasDetIds.push_back( 470407304 ); theLasDetIds.push_back( 470423688 ); theLasDetIds.push_back( 470440072 ); 00219 theLasDetIds.push_back( 470307272 ); theLasDetIds.push_back( 470323656 ); theLasDetIds.push_back( 470340040 ); 00220 theLasDetIds.push_back( 470356424 ); theLasDetIds.push_back( 470372808 ); theLasDetIds.push_back( 470389192 ); 00221 theLasDetIds.push_back( 470405576 ); theLasDetIds.push_back( 470421960 ); theLasDetIds.push_back( 470438344 ); 00222 theLasDetIds.push_back( 470307528 ); theLasDetIds.push_back( 470323912 ); theLasDetIds.push_back( 470340296 ); 00223 theLasDetIds.push_back( 470356680 ); theLasDetIds.push_back( 470373064 ); theLasDetIds.push_back( 470389448 ); 00224 theLasDetIds.push_back( 470405832 ); theLasDetIds.push_back( 470422216 ); theLasDetIds.push_back( 470438600 ); 00225 theLasDetIds.push_back( 470307784 ); theLasDetIds.push_back( 470324168 ); theLasDetIds.push_back( 470340552 ); 00226 theLasDetIds.push_back( 470356936 ); theLasDetIds.push_back( 470373320 ); theLasDetIds.push_back( 470389704 ); 00227 theLasDetIds.push_back( 470406088 ); theLasDetIds.push_back( 470422472 ); theLasDetIds.push_back( 470438856 ); 00228 theLasDetIds.push_back( 470308040 ); theLasDetIds.push_back( 470324424 ); theLasDetIds.push_back( 470340808 ); 00229 theLasDetIds.push_back( 470357192 ); theLasDetIds.push_back( 470373576 ); theLasDetIds.push_back( 470389960 ); 00230 theLasDetIds.push_back( 470406344 ); theLasDetIds.push_back( 470422728 ); theLasDetIds.push_back( 470439112 ); 00231 theLasDetIds.push_back( 470308296 ); theLasDetIds.push_back( 470324680 ); theLasDetIds.push_back( 470341064 ); 00232 theLasDetIds.push_back( 470357448 ); theLasDetIds.push_back( 470373832 ); theLasDetIds.push_back( 470390216 ); 00233 theLasDetIds.push_back( 470406600 ); theLasDetIds.push_back( 470422984 ); theLasDetIds.push_back( 470439368 ); 00234 theLasDetIds.push_back( 470308552 ); theLasDetIds.push_back( 470324936 ); theLasDetIds.push_back( 470341320 ); 00235 theLasDetIds.push_back( 470357704 ); theLasDetIds.push_back( 470374088 ); theLasDetIds.push_back( 470390472 ); 00236 theLasDetIds.push_back( 470406856 ); theLasDetIds.push_back( 470423240 ); theLasDetIds.push_back( 470439624 ); 00237 theLasDetIds.push_back( 470308808 ); theLasDetIds.push_back( 470325192 ); theLasDetIds.push_back( 470341576 ); 00238 theLasDetIds.push_back( 470357960 ); theLasDetIds.push_back( 470374344 ); theLasDetIds.push_back( 470390728 ); 00239 theLasDetIds.push_back( 470407112 ); theLasDetIds.push_back( 470423496 ); theLasDetIds.push_back( 470439880 ); 00240 theLasDetIds.push_back( 470309064 ); theLasDetIds.push_back( 470325448 ); theLasDetIds.push_back( 470341832 ); 00241 theLasDetIds.push_back( 470358216 ); theLasDetIds.push_back( 470374600 ); theLasDetIds.push_back( 470390984 ); 00242 theLasDetIds.push_back( 470407368 ); theLasDetIds.push_back( 470423752 ); theLasDetIds.push_back( 470440136 ); 00243 00244 // TEC- internal alignment modules 00245 theLasDetIds.push_back( 470045064 ); theLasDetIds.push_back( 470061448 ); theLasDetIds.push_back( 470077832 ); 00246 theLasDetIds.push_back( 470094216 ); theLasDetIds.push_back( 470110600 ); theLasDetIds.push_back( 470126984 ); 00247 theLasDetIds.push_back( 470143368 ); theLasDetIds.push_back( 470159752 ); theLasDetIds.push_back( 470176136 ); 00248 theLasDetIds.push_back( 470045320 ); theLasDetIds.push_back( 470061704 ); theLasDetIds.push_back( 470078088 ); 00249 theLasDetIds.push_back( 470094472 ); theLasDetIds.push_back( 470110856 ); theLasDetIds.push_back( 470127240 ); 00250 theLasDetIds.push_back( 470143624 ); theLasDetIds.push_back( 470160008 ); theLasDetIds.push_back( 470176392 ); 00251 theLasDetIds.push_back( 470045576 ); theLasDetIds.push_back( 470061960 ); theLasDetIds.push_back( 470078344 ); 00252 theLasDetIds.push_back( 470094728 ); theLasDetIds.push_back( 470111112 ); theLasDetIds.push_back( 470127496 ); 00253 theLasDetIds.push_back( 470143880 ); theLasDetIds.push_back( 470160264 ); theLasDetIds.push_back( 470176648 ); 00254 theLasDetIds.push_back( 470045832 ); theLasDetIds.push_back( 470062216 ); theLasDetIds.push_back( 470078600 ); 00255 theLasDetIds.push_back( 470094984 ); theLasDetIds.push_back( 470111368 ); theLasDetIds.push_back( 470127752 ); 00256 theLasDetIds.push_back( 470144136 ); theLasDetIds.push_back( 470160520 ); theLasDetIds.push_back( 470176904 ); 00257 theLasDetIds.push_back( 470046088 ); theLasDetIds.push_back( 470062472 ); theLasDetIds.push_back( 470078856 ); 00258 theLasDetIds.push_back( 470095240 ); theLasDetIds.push_back( 470111624 ); theLasDetIds.push_back( 470128008 ); 00259 theLasDetIds.push_back( 470144392 ); theLasDetIds.push_back( 470160776 ); theLasDetIds.push_back( 470177160 ); 00260 theLasDetIds.push_back( 470046344 ); theLasDetIds.push_back( 470062728 ); theLasDetIds.push_back( 470079112 ); 00261 theLasDetIds.push_back( 470095496 ); theLasDetIds.push_back( 470111880 ); theLasDetIds.push_back( 470128264 ); 00262 theLasDetIds.push_back( 470144648 ); theLasDetIds.push_back( 470161032 ); theLasDetIds.push_back( 470177416 ); 00263 theLasDetIds.push_back( 470046600 ); theLasDetIds.push_back( 470062984 ); theLasDetIds.push_back( 470079368 ); 00264 theLasDetIds.push_back( 470095752 ); theLasDetIds.push_back( 470112136 ); theLasDetIds.push_back( 470128520 ); 00265 theLasDetIds.push_back( 470144904 ); theLasDetIds.push_back( 470161288 ); theLasDetIds.push_back( 470177672 ); 00266 theLasDetIds.push_back( 470046856 ); theLasDetIds.push_back( 470063240 ); theLasDetIds.push_back( 470079624 ); 00267 theLasDetIds.push_back( 470096008 ); theLasDetIds.push_back( 470112392 ); theLasDetIds.push_back( 470128776 ); 00268 theLasDetIds.push_back( 470145160 ); theLasDetIds.push_back( 470161544 ); theLasDetIds.push_back( 470177928 ); 00269 theLasDetIds.push_back( 470045128 ); theLasDetIds.push_back( 470061512 ); theLasDetIds.push_back( 470077896 ); 00270 theLasDetIds.push_back( 470094280 ); theLasDetIds.push_back( 470110664 ); theLasDetIds.push_back( 470127048 ); 00271 theLasDetIds.push_back( 470143432 ); theLasDetIds.push_back( 470159816 ); theLasDetIds.push_back( 470176200 ); 00272 theLasDetIds.push_back( 470045384 ); theLasDetIds.push_back( 470061768 ); theLasDetIds.push_back( 470078152 ); 00273 theLasDetIds.push_back( 470094536 ); theLasDetIds.push_back( 470110920 ); theLasDetIds.push_back( 470127304 ); 00274 theLasDetIds.push_back( 470143688 ); theLasDetIds.push_back( 470160072 ); theLasDetIds.push_back( 470176456 ); 00275 theLasDetIds.push_back( 470045640 ); theLasDetIds.push_back( 470062024 ); theLasDetIds.push_back( 470078408 ); 00276 theLasDetIds.push_back( 470094792 ); theLasDetIds.push_back( 470111176 ); theLasDetIds.push_back( 470127560 ); 00277 theLasDetIds.push_back( 470143944 ); theLasDetIds.push_back( 470160328 ); theLasDetIds.push_back( 470176712 ); 00278 theLasDetIds.push_back( 470045896 ); theLasDetIds.push_back( 470062280 ); theLasDetIds.push_back( 470078664 ); 00279 theLasDetIds.push_back( 470095048 ); theLasDetIds.push_back( 470111432 ); theLasDetIds.push_back( 470127816 ); 00280 theLasDetIds.push_back( 470144200 ); theLasDetIds.push_back( 470160584 ); theLasDetIds.push_back( 470176968 ); 00281 theLasDetIds.push_back( 470046152 ); theLasDetIds.push_back( 470062536 ); theLasDetIds.push_back( 470078920 ); 00282 theLasDetIds.push_back( 470095304 ); theLasDetIds.push_back( 470111688 ); theLasDetIds.push_back( 470128072 ); 00283 theLasDetIds.push_back( 470144456 ); theLasDetIds.push_back( 470160840 ); theLasDetIds.push_back( 470177224 ); 00284 theLasDetIds.push_back( 470046408 ); theLasDetIds.push_back( 470062792 ); theLasDetIds.push_back( 470079176 ); 00285 theLasDetIds.push_back( 470095560 ); theLasDetIds.push_back( 470111944 ); theLasDetIds.push_back( 470128328 ); 00286 theLasDetIds.push_back( 470144712 ); theLasDetIds.push_back( 470161096 ); theLasDetIds.push_back( 470177480 ); 00287 theLasDetIds.push_back( 470046664 ); theLasDetIds.push_back( 470063048 ); theLasDetIds.push_back( 470079432 ); 00288 theLasDetIds.push_back( 470095816 ); theLasDetIds.push_back( 470112200 ); theLasDetIds.push_back( 470128584 ); 00289 theLasDetIds.push_back( 470144968 ); theLasDetIds.push_back( 470161352 ); theLasDetIds.push_back( 470177736 ); 00290 theLasDetIds.push_back( 470046920 ); theLasDetIds.push_back( 470063304 ); theLasDetIds.push_back( 470079688 ); 00291 theLasDetIds.push_back( 470096072 ); theLasDetIds.push_back( 470112456 ); theLasDetIds.push_back( 470128840 ); 00292 theLasDetIds.push_back( 470145224 ); theLasDetIds.push_back( 470161608 ); theLasDetIds.push_back( 470177992 ); 00293 00294 // TEC+ alignment tube modules 00295 theLasDetIds.push_back( 470307468 ); theLasDetIds.push_back( 470323852 ); theLasDetIds.push_back( 470340236 ); 00296 theLasDetIds.push_back( 470356620 ); theLasDetIds.push_back( 470373004 ); theLasDetIds.push_back( 470307716 ); 00297 theLasDetIds.push_back( 470324100 ); theLasDetIds.push_back( 470340484 ); theLasDetIds.push_back( 470356868 ); 00298 theLasDetIds.push_back( 470373252 ); theLasDetIds.push_back( 470308236 ); theLasDetIds.push_back( 470324620 ); 00299 theLasDetIds.push_back( 470341004 ); theLasDetIds.push_back( 470357388 ); theLasDetIds.push_back( 470373772 ); 00300 theLasDetIds.push_back( 470308748 ); theLasDetIds.push_back( 470325132 ); theLasDetIds.push_back( 470341516 ); 00301 theLasDetIds.push_back( 470357900 ); theLasDetIds.push_back( 470374284 ); theLasDetIds.push_back( 470308996 ); 00302 theLasDetIds.push_back( 470325380 ); theLasDetIds.push_back( 470341764 ); theLasDetIds.push_back( 470358148 ); 00303 theLasDetIds.push_back( 470374532 ); 00304 00305 // TEC- alignment tube modules 00306 theLasDetIds.push_back( 470045316 ); theLasDetIds.push_back( 470061700 ); theLasDetIds.push_back( 470078084 ); 00307 theLasDetIds.push_back( 470094468 ); theLasDetIds.push_back( 470110852 ); theLasDetIds.push_back( 470045580 ); 00308 theLasDetIds.push_back( 470061964 ); theLasDetIds.push_back( 470078348 ); theLasDetIds.push_back( 470094732 ); 00309 theLasDetIds.push_back( 470111116 ); theLasDetIds.push_back( 470046084 ); theLasDetIds.push_back( 470062468 ); 00310 theLasDetIds.push_back( 470078852 ); theLasDetIds.push_back( 470095236 ); theLasDetIds.push_back( 470111620 ); 00311 theLasDetIds.push_back( 470046596 ); theLasDetIds.push_back( 470062980 ); theLasDetIds.push_back( 470079364 ); 00312 theLasDetIds.push_back( 470095748 ); theLasDetIds.push_back( 470112132 ); theLasDetIds.push_back( 470046860 ); 00313 theLasDetIds.push_back( 470063244 ); theLasDetIds.push_back( 470079628 ); theLasDetIds.push_back( 470096012 ); 00314 theLasDetIds.push_back( 470112396 ); 00315 00316 // TIB alignment tube modules 00317 theLasDetIds.push_back( 369174604 ); theLasDetIds.push_back( 369174600 ); theLasDetIds.push_back( 369174596 ); 00318 theLasDetIds.push_back( 369170500 ); theLasDetIds.push_back( 369170504 ); theLasDetIds.push_back( 369170508 ); 00319 theLasDetIds.push_back( 369174732 ); theLasDetIds.push_back( 369174728 ); theLasDetIds.push_back( 369174724 ); 00320 theLasDetIds.push_back( 369170628 ); theLasDetIds.push_back( 369170632 ); theLasDetIds.push_back( 369170636 ); 00321 theLasDetIds.push_back( 369174812 ); theLasDetIds.push_back( 369174808 ); theLasDetIds.push_back( 369174804 ); 00322 theLasDetIds.push_back( 369170708 ); theLasDetIds.push_back( 369170712 ); theLasDetIds.push_back( 369170716 ); 00323 theLasDetIds.push_back( 369174940 ); theLasDetIds.push_back( 369174936 ); theLasDetIds.push_back( 369174932 ); 00324 theLasDetIds.push_back( 369170836 ); theLasDetIds.push_back( 369170840 ); theLasDetIds.push_back( 369170844 ); 00325 theLasDetIds.push_back( 369175068 ); theLasDetIds.push_back( 369175064 ); theLasDetIds.push_back( 369175060 ); 00326 theLasDetIds.push_back( 369170964 ); theLasDetIds.push_back( 369170968 ); theLasDetIds.push_back( 369170972 ); 00327 theLasDetIds.push_back( 369175164 ); theLasDetIds.push_back( 369175160 ); theLasDetIds.push_back( 369175156 ); 00328 theLasDetIds.push_back( 369171060 ); theLasDetIds.push_back( 369171064 ); theLasDetIds.push_back( 369171068 ); 00329 theLasDetIds.push_back( 369175292 ); theLasDetIds.push_back( 369175288 ); theLasDetIds.push_back( 369175284 ); 00330 theLasDetIds.push_back( 369171188 ); theLasDetIds.push_back( 369171192 ); theLasDetIds.push_back( 369171196 ); 00331 theLasDetIds.push_back( 369175372 ); theLasDetIds.push_back( 369175368 ); theLasDetIds.push_back( 369175364 ); 00332 theLasDetIds.push_back( 369171268 ); theLasDetIds.push_back( 369171272 ); theLasDetIds.push_back( 369171276 ); 00333 00334 // TOB alignment tube modules 00335 theLasDetIds.push_back( 436232314 ); theLasDetIds.push_back( 436232306 ); theLasDetIds.push_back( 436232298 ); 00336 theLasDetIds.push_back( 436228198 ); theLasDetIds.push_back( 436228206 ); theLasDetIds.push_back( 436228214 ); 00337 theLasDetIds.push_back( 436232506 ); theLasDetIds.push_back( 436232498 ); theLasDetIds.push_back( 436232490 ); 00338 theLasDetIds.push_back( 436228390 ); theLasDetIds.push_back( 436228398 ); theLasDetIds.push_back( 436228406 ); 00339 theLasDetIds.push_back( 436232634 ); theLasDetIds.push_back( 436232626 ); theLasDetIds.push_back( 436232618 ); 00340 theLasDetIds.push_back( 436228518 ); theLasDetIds.push_back( 436228526 ); theLasDetIds.push_back( 436228534 ); 00341 theLasDetIds.push_back( 436232826 ); theLasDetIds.push_back( 436232818 ); theLasDetIds.push_back( 436232810 ); 00342 theLasDetIds.push_back( 436228710 ); theLasDetIds.push_back( 436228718 ); theLasDetIds.push_back( 436228726 ); 00343 theLasDetIds.push_back( 436233018 ); theLasDetIds.push_back( 436233010 ); theLasDetIds.push_back( 436233002 ); 00344 theLasDetIds.push_back( 436228902 ); theLasDetIds.push_back( 436228910 ); theLasDetIds.push_back( 436228918 ); 00345 theLasDetIds.push_back( 436233146 ); theLasDetIds.push_back( 436233138 ); theLasDetIds.push_back( 436233130 ); 00346 theLasDetIds.push_back( 436229030 ); theLasDetIds.push_back( 436229038 ); theLasDetIds.push_back( 436229046 ); 00347 theLasDetIds.push_back( 436233338 ); theLasDetIds.push_back( 436233330 ); theLasDetIds.push_back( 436233322 ); 00348 theLasDetIds.push_back( 436229222 ); theLasDetIds.push_back( 436229230 ); theLasDetIds.push_back( 436229238 ); 00349 theLasDetIds.push_back( 436233466 ); theLasDetIds.push_back( 436233458 ); theLasDetIds.push_back( 436233450 ); 00350 theLasDetIds.push_back( 436229350 ); theLasDetIds.push_back( 436229358 ); theLasDetIds.push_back( 436229366 ); 00351 00352 }
void LaserAlignmentT0Producer::produce | ( | edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [private, virtual] |
outline: loops alls input strip digi products branches depending on if it contains SiStripDigi or SiStripRawDigi for each product: selects only LAS module DetSets and copies them to new DetSetVector
Implements edm::EDProducer.
Definition at line 61 of file LaserAlignmentT0Producer.cc.
References digiLabel, digiProducer, digiProducerList, digiType, lat::endl(), Exception, find(), edm::Event::getByLabel(), edm::Event::put(), and theLasDetIds.
00061 { 00062 00063 using namespace edm; 00064 00065 00066 // loop all input products 00067 for ( std::vector<edm::ParameterSet>::iterator aDigiProducer = digiProducerList.begin(); aDigiProducer != digiProducerList.end(); ++aDigiProducer ) { 00068 std::string digiProducer = aDigiProducer->getParameter<std::string>( "DigiProducer" ); 00069 std::string digiLabel = aDigiProducer->getParameter<std::string>( "DigiLabel" ); 00070 std::string digiType = aDigiProducer->getParameter<std::string>( "DigiType" ); 00071 00072 // now a distinction of cases: raw or processed digis? 00073 00074 // first we go for raw digis => SiStripRawDigi 00075 if( digiType == "Raw" ) { 00076 00077 // retrieve the SiStripRawDigis collection 00078 edm::Handle< edm::DetSetVector<SiStripRawDigi> > theStripDigis; 00079 iEvent.getByLabel( digiProducer, digiLabel, theStripDigis ); 00080 00081 // empty container 00082 std::vector<edm::DetSet<SiStripRawDigi> > theDigiVector; 00083 00084 // loop the incoming DetSetVector 00085 for( edm::DetSetVector<SiStripRawDigi>::const_iterator aDetSet = theStripDigis->begin(); aDetSet != theStripDigis->end(); ++aDetSet ) { 00086 00087 // is the current DetSet that of a LAS module? 00088 if( find( theLasDetIds.begin(), theLasDetIds.end(), aDetSet->detId() ) != theLasDetIds.end() ) { 00089 // yes it's a LAS module, so copy the Digis to the output 00090 00091 // a DetSet for output 00092 edm::DetSet<SiStripRawDigi> outputDetSet( aDetSet->detId() ); 00093 00094 // copy all the digis to the output DetSet. Unfortunately, there's no copy constructor.. 00095 for( edm::DetSet<SiStripRawDigi>::const_iterator aDigi = aDetSet->begin(); aDigi != aDetSet->end(); ++aDigi ) { 00096 outputDetSet.push_back( *aDigi ); 00097 } 00098 00099 // onto the later DetSetVector 00100 theDigiVector.push_back( outputDetSet ); 00101 00102 } 00103 00104 } 00105 00106 // create the output collection for the DetSetVector 00107 std::auto_ptr<edm::DetSetVector<SiStripRawDigi> > theDigiOutput( new edm::DetSetVector<SiStripRawDigi>( theDigiVector ) ); 00108 00109 // write output to file 00110 iEvent.put( theDigiOutput, digiLabel ); 00111 00112 } 00113 00114 00115 00116 00117 00118 // then we assume "ZeroSuppressed" (non-raw) => SiStripDigi 00119 // and do exactly the same as above 00120 else if( digiType == "Processed" ) { 00121 00122 edm::Handle< edm::DetSetVector<SiStripDigi> > theStripDigis; 00123 iEvent.getByLabel( digiProducer, digiLabel, theStripDigis ); 00124 00125 std::vector<edm::DetSet<SiStripDigi> > theDigiVector; 00126 00127 for( edm::DetSetVector<SiStripDigi>::const_iterator aDetSet = theStripDigis->begin(); aDetSet != theStripDigis->end(); ++aDetSet ) { 00128 if( find( theLasDetIds.begin(), theLasDetIds.end(), aDetSet->detId() ) != theLasDetIds.end() ) { 00129 00130 edm::DetSet<SiStripDigi> outputDetSet( aDetSet->detId() ); 00131 for( edm::DetSet<SiStripDigi>::const_iterator aDigi = aDetSet->begin(); aDigi != aDetSet->end(); ++aDigi ) { 00132 outputDetSet.push_back( *aDigi ); 00133 } 00134 00135 theDigiVector.push_back( outputDetSet ); 00136 00137 } 00138 } 00139 00140 std::auto_ptr<edm::DetSetVector<SiStripDigi> > theDigiOutput( new edm::DetSetVector<SiStripDigi>( theDigiVector ) ); 00141 iEvent.put( theDigiOutput, digiLabel ); 00142 00143 } 00144 00145 else { 00146 throw cms::Exception("LaserAlignmentT0Producer") << "ERROR ** Unknown DigiType: " << digiType << " specified in cfg file" << std::endl; 00147 } 00148 00149 00150 } // loop all input products 00151 00152 00153 }
std::string LaserAlignmentT0Producer::digiLabel [private] |
Definition at line 49 of file LaserAlignmentT0Producer.h.
Referenced by LaserAlignmentT0Producer(), and produce().
std::string LaserAlignmentT0Producer::digiProducer [private] |
Definition at line 48 of file LaserAlignmentT0Producer.h.
Referenced by LaserAlignmentT0Producer(), and produce().
std::vector<edm::ParameterSet> LaserAlignmentT0Producer::digiProducerList [private] |
Definition at line 47 of file LaserAlignmentT0Producer.h.
Referenced by LaserAlignmentT0Producer(), and produce().
std::string LaserAlignmentT0Producer::digiType [private] |
Definition at line 50 of file LaserAlignmentT0Producer.h.
Referenced by LaserAlignmentT0Producer(), and produce().
std::vector<unsigned int> LaserAlignmentT0Producer::theLasDetIds [private] |
Definition at line 53 of file LaserAlignmentT0Producer.h.
Referenced by FillDetIds(), and produce().