|
| L1TStage2InputPatternWriter (const edm::ParameterSet &) |
|
| ~L1TStage2InputPatternWriter () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzer () |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () |
|
SerialTaskQueue * | globalRunsQueue () |
|
ModuleDescription const & | moduleDescription () const |
|
std::string | workerType () const |
|
| ~EDAnalyzer () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDAnalyzer | ModuleType |
|
typedef ProductLabels | Labels |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 48 of file L1TStage2InputPatternWriter.cc.
Definition at line 145 of file L1TStage2InputPatternWriter.cc.
References l1t::CaloTools::caloEta(), data, data_, dataValid_, edm::Event::getByToken(), l1t::CaloTools::getTower(), l1t::CaloTower::hwEtRatio(), l1t::L1Candidate::hwPt(), l1t::L1Candidate::hwQual(), m_towerToken, nChan_, nClearFrames_, nEvents_, nFrame_, nHeaderFrames_, nPayloadFrames_, and nQuad_.
156 std::vector<l1t::CaloTower> towers;
158 for(std::vector<l1t::CaloTower>::const_iterator tower = towHandle->begin(0);
159 tower != towHandle->end(0);
161 towers.push_back(*tower);
171 for (
unsigned iQuad=0; iQuad<
nQuad_; ++iQuad ) {
172 for (
unsigned iChan=0; iChan<
nChan_; ++iChan ) {
177 unsigned iLink = (iQuad*
nChan_)+iChan;
180 data_.at(iLink).push_back( data );
196 for (
unsigned iQuad=0; iQuad<
nQuad_; ++iQuad ) {
197 for (
unsigned iChan=0; iChan<
nChan_; ++iChan ) {
202 int iLink = (iQuad*
nChan_)+iChan;
203 int ietaSgn = (iLink % 2==0 ? +1 : -1);
204 int ieta = ietaSgn * (iFrame + 1);
205 int iphi = 1+(iLink % 2==0 ? iLink : iLink-1);
209 data |= tower.
hwPt() & 0x1ff;
211 data |= (tower.
hwQual() & 0xf)<<12;
216 data |= (tower.
hwPt() & 0x1ff)<<16;
218 data |= (tower.
hwQual() & 0xf)<<28;
221 data_.at(iLink).push_back( data );
238 for (
unsigned iQuad=0; iQuad<
nQuad_; ++iQuad ) {
239 for (
unsigned iChan=0; iChan<
nChan_; ++iChan ) {
244 unsigned iLink = (iQuad*
nChan_)+iChan;
247 data_.at(iLink).push_back( data );
bool getByToken(EDGetToken token, Handle< PROD > &result) const
char data[epos_bytes_allocation]
void L1TStage2InputPatternWriter::endJob |
( |
void |
| ) |
|
|
overrideprivatevirtual |
Reimplemented from edm::EDAnalyzer.
Definition at line 271 of file L1TStage2InputPatternWriter.cc.
References MessageLogger_cfi::cerr, gather_cfg::cout, data_, dataValid_, TauDecayModes::dec, filename_, mps_fire::i, LogDebug, nChan_, nClearFrames_, nEvents_, nFrame_, nHeaderFrames_, nPayloadFrames_, nQuad_, outDir_, and parallelization::uint().
278 unsigned int evPerFile = floor(1024/framesPerEv);
281 unsigned int framesPerFile = framesPerEv*evPerFile;
284 unsigned int nOutFiles = ceil(
nEvents_/evPerFile);
288 LogDebug(
"L1TDebug") <<
"Writing " << nOutFiles <<
" files" << std::endl;
289 LogDebug(
"L1TDebug") <<
"Output directory: ./" <<
outDir_ <<
"/" << std::endl;
292 std::vector< std::ofstream > outFiles(nOutFiles);
295 for(
uint itFile=0; itFile<nOutFiles; ++itFile){
296 std::stringstream outFilename;
298 outFiles[itFile] = std::ofstream(outFilename.str());
299 LogDebug(
"L1TDebug") <<
"Writing to file: ./" << outFilename.str() << std::endl;
300 std::cout <<
"Writing to file: ./" << outFilename.str() << std::endl;
302 outFiles[itFile] <<
"Board MP7_TEST" << std::endl;
305 outFiles[itFile] <<
" Quad/Chan : ";
307 for (
unsigned j=0; j<
nChan_; ++j ) {
308 outFiles[itFile] <<
" q" << setfill(
'0') << setw(2) <<
i <<
"c" << j <<
" ";
311 outFiles[itFile] << std::endl;
314 outFiles[itFile] <<
" Link : ";
316 for (
unsigned j=0; j<
nChan_; ++j ) {
317 outFiles[itFile] <<
" " << setfill(
'0') << setw(2) << (
i*
nChan_)+j <<
" ";
321 outFiles[itFile] << std::endl;
324 unsigned iFileFrame=0;
325 for (
unsigned iFrame=itFile*framesPerFile; iFrame<(itFile*framesPerFile+framesPerFile); ++iFrame ) {
327 outFiles[itFile] <<
"Frame " <<
std::dec << std::setw(4) << std::setfill(
'0') << iFileFrame <<
" : ";
328 for (
unsigned iQuad=0; iQuad<
nQuad_; ++iQuad ) {
329 for (
unsigned iChan=0; iChan<
nChan_; ++iChan ) {
330 unsigned iLink = (iQuad*
nChan_)+iChan;
331 if (iLink<
data_.size() && iFrame<
data_.at(iLink).size()) {
332 outFiles[itFile] << std::hex << ::std::setw(1) <<
dataValid_.at(iFrame) <<
"v" << std::hex << std::setw(8) << std::setfill(
'0') <<
data_.at(iLink).at(iFrame) <<
" ";
335 std::cerr <<
"Out of range : " << iLink <<
", " << iFrame << std::endl;
340 outFiles[itFile] << std::endl;
343 outFiles[itFile].close();