#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "ecalDccMap.h"
#include <errno.h>
Go to the source code of this file.
Macros | |
#define | SIZE_MAX ((size_t) -1) |
#define | SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) |
Enumerations | |
enum | roAction_t { suppress =0, sr2, sr1, full, fsuppress, fsr2, fsr1, ffull } |
Functions | |
void | abConnect (int iAB, int iABCh, int &iOtherAB, int &iOtherABCh) |
int | abNum (int iABEta, int iABPhi) |
void | fillABIOFiles (const char ttFlags[nTTInEta][nTTInPhi], const char barrelSrFlags[nBarrelTTInEta][nTTInPhi], const char endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], ofstream files[]) |
void | fillABSRPFiles (const char barrelSrFlags[nBarrelTTInEta][nTTInPhi], const char endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], ofstream files[]) |
void | fillABSRPFiles (const char barrelSrFlags[nBarrelTTInEta][nTTInPhi], const char endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], ofstream files[nAB]) |
void | fillABTTFFiles (const char ttFlags[nTTInEta][nTTInPhi], ofstream files[]) |
string | getABABInputStream (const char tccFlags[nTTInEta][nTTInPhi], int iABEta, int iABPhi, int iABCh) |
string | getABABOutputStream (const char tccFlags[nTTInEta][nTTInPhi], int iABEta, int iABPhi, int iABCh) |
string | getABDCCOutputStream (const char barrelSrFlags[nBarrelTTInEta][nTTInPhi], const char endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], int iABEta, int iABPhi, int DCCCh) |
string | getABTCCInputStream (const char tccFlags[nTTInEta][nTTInPhi], int iABEta, int iABPhi, int iTCCCh) |
void | getABTTPhiBounds (int iABPhi, int &iTTPhiMin, int &iTTPhiMax) |
string | getFlagStream (char flags[nTTInEta][nTTInPhi], int iEtaMin, int iEtaMax, int iPhiMin, int iPhiMax) |
int | main (int argc, char *argv[]) |
bool | readSRF (FILE *file, char barrelSrFlags[nBarrelTTInEta][nTTInPhi], char endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins]) |
bool | readTTF (FILE *file, char ttFlags[nTTInEta][nTTInPhi]) |
void | writeABIOFileHeader (ofstream &f, int abNum) |
void | writeABSRFFileHeader (ofstream &f, int abNum) |
void | writeABTTFFileHeader (ofstream &f, int abNum) |
Variables | |
const char * | abIOFilePostfix = ".txt" |
const char * | abIOFilePrefix = "IO_AB" |
const char * | abSRFFilePostfix = ".txt" |
const char * | abSRFFilePrefix = "AF_AB" |
const char * | abTTFFilePostfix = ".txt" |
const char * | abTTFFilePrefix = "TTF_AB" |
roAction_t | actions [nactions] |
vector< pair< int, int > > | ecalDccSC [nEndcaps][nDCCEE] |
int | iEvent = 0 |
const int | iTCCEtaBounds [nTCCInEta+1] = {0,7,11,28,45,49,56} |
const int | iTTEtaMax [nABInEta] = {10,27,44,55} |
const int | iTTEtaMin [nABInEta] = {0,11,28,45} |
const int | iTTEtaSign [nABInEta] = {-1,-1,1,1} |
const int | nAB = nABInPhi*nABInEta |
const int | nABABCh = 8 |
const int | nABInEta =4 |
const int | nABInPhi =3 |
const int | nABTCCCh = 12 |
const int | nactions = 8 |
static const int | nBarrelTTInEta = 34 |
const int | nDCCCh = 12 |
const int | nDCCEE = 9 |
static const int | nEndcaps = 2 |
static const int | nEndcapTTInEta = 11 |
static const int | nEndcapXBins = 100 |
static const int | nEndcapYBins = 100 |
static const int | nSupercrystalXBins = nEndcapXBins/supercrystalEdge |
static const int | nSupercrystalYBins = nEndcapYBins/supercrystalEdge |
const int | nTCCInEta = 6 |
const int | nTTInABAlongPhi =nTTInPhi/nABInPhi |
static const int | nTTInEta |
static const int | nTTInPhi = 72 |
char | roFlagMarker [] |
const char * | srfFilename = "SRF.txt" |
char | srp2roFlags [128] |
const char | srpFlagMarker [] = {'.', 'S', 'N', 'C', '4','5','6','7'} |
static const int | supercrystalEdge = 5 |
const char | tccFlagMarker [] = {'.', 'S', '?', 'C', '4', '5', '6', '7'} |
int | theAB = -1 |
const char * | ttfFilename = "TTF.txt" |
const char * | xconnectFilename = "xconnect_universal.txt" |
GenABIO is a standalone program to produce individual SRP card trigger tower and selective readout action flags from TTF.txt and SRF.txt global flag files. Run 'GenABIO -h' for usage.
Definition in file GenABIO.cc.
#define SIZE_MAX ((size_t) -1) |
Definition at line 25 of file GenABIO.cc.
#define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) |
Definition at line 28 of file GenABIO.cc.
enum roAction_t |
Enumerator | |
---|---|
suppress | |
sr2 | |
sr1 | |
full | |
fsuppress | |
fsr2 | |
fsr1 | |
ffull |
Definition at line 180 of file GenABIO.cc.
void abConnect | ( | int | iAB, |
int | iABCh, | ||
int & | iOtherAB, | ||
int & | iOtherABCh | ||
) |
Definition at line 838 of file GenABIO.cc.
References trackerHits::c, dtNoiseDBValidation_cfg::cerr, cmsRelvalreport::exit, f, i, nAB, nABABCh, NULL, and xconnectFilename.
Referenced by getABABInputStream().
|
inline |
Definition at line 204 of file GenABIO.cc.
Referenced by fillABIOFiles(), fillABSRPFiles(), fillABTTFFiles(), and getABABInputStream().
void fillABIOFiles | ( | const char | ttFlags[nTTInEta][nTTInPhi], |
const char | barrelSrFlags[nBarrelTTInEta][nTTInPhi], | ||
const char | endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], | ||
ofstream | files[] | ||
) |
Definition at line 459 of file GenABIO.cc.
References abNum(), getABABInputStream(), getABABOutputStream(), getABDCCOutputStream(), getABTCCInputStream(), iEvent, nABABCh, nABInEta, nABInPhi, nABTCCCh, and nDCCCh.
Referenced by main().
void fillABSRPFiles | ( | const char | barrelSrFlags[nBarrelTTInEta][nTTInPhi], |
const char | endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], | ||
ofstream | files[] | ||
) |
Referenced by main().
void fillABSRPFiles | ( | const char | barrelSrFlags[nBarrelTTInEta][nTTInPhi], |
const char | endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], | ||
ofstream | files[nAB] | ||
) |
Definition at line 389 of file GenABIO.cc.
References abNum(), abOfDcc(), dccIndexOfRU(), dqmPostProcessing_online::files, getABTTPhiBounds(), i, iEvent, iTTEtaMax, iTTEtaMin, iTTEtaSign, mod(), nAB, nABInPhi, nEndcaps, nEndcapTTInEta, nSupercrystalXBins, nSupercrystalYBins, nTTInABAlongPhi, and srp2roFlags.
void fillABTTFFiles | ( | const char | ttFlags[nTTInEta][nTTInPhi], |
ofstream | files[] | ||
) |
Produces one file per AB. Each file contains the TT flags the AB receives from its inputs.
Definition at line 357 of file GenABIO.cc.
References abNum(), getABTTPhiBounds(), i, iEvent, iTTEtaMax, iTTEtaMin, iTTEtaSign, mod(), nABInEta, nABInPhi, and nTTInABAlongPhi.
Referenced by main().
string getABABInputStream | ( | const char | tccFlags[nTTInEta][nTTInPhi], |
int | iABEta, | ||
int | iABPhi, | ||
int | iABCh | ||
) |
Definition at line 821 of file GenABIO.cc.
References abConnect(), abNum(), and getABABOutputStream().
Referenced by fillABIOFiles().
string getABABOutputStream | ( | const char | tccFlags[nTTInEta][nTTInPhi], |
int | iABEta, | ||
int | iABPhi, | ||
int | iABCh | ||
) |
Definition at line 753 of file GenABIO.cc.
References Reference_intrackfit_cff::barrel, getABTCCInputStream(), and alignCSCRings::s.
Referenced by fillABIOFiles(), and getABABInputStream().
string getABDCCOutputStream | ( | const char | barrelSrFlags[nBarrelTTInEta][nTTInPhi], |
const char | endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins], | ||
int | iABEta, | ||
int | iABPhi, | ||
int | DCCCh | ||
) |
Definition at line 878 of file GenABIO.cc.
References Reference_intrackfit_cff::barrel, ecalDccSC, getABTCCInputStream(), i, nEndcapTTInEta, srp2roFlags, and edmStreamStallGrapher::stream.
Referenced by fillABIOFiles().
string getABTCCInputStream | ( | const char | tccFlags[nTTInEta][nTTInPhi], |
int | iABEta, | ||
int | iABPhi, | ||
int | iTCCCh | ||
) |
Definition at line 723 of file GenABIO.cc.
References getABTTPhiBounds(), getFlagStream(), and iTCCEtaBounds.
Referenced by fillABIOFiles(), getABABOutputStream(), and getABDCCOutputStream().
void getABTTPhiBounds | ( | int | iABPhi, |
int & | iTTPhiMin, | ||
int & | iTTPhiMax | ||
) |
Definition at line 833 of file GenABIO.cc.
References mod(), nTTInABAlongPhi, and nTTInPhi.
Referenced by fillABSRPFiles(), fillABTTFFiles(), and getABTCCInputStream().
string getFlagStream | ( | char | flags[nTTInEta][nTTInPhi], |
int | iEtaMin, | ||
int | iEtaMax, | ||
int | iPhiMin, | ||
int | iPhiMax | ||
) |
Definition at line 689 of file GenABIO.cc.
References dtNoiseDBValidation_cfg::cerr, cmsRelvalreport::exit, flags, mod(), nTTInEta, and zPos.
Referenced by getABTCCInputStream().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 234 of file GenABIO.cc.
References abIOFilePostfix, abIOFilePrefix, abSRFFilePostfix, abSRFFilePrefix, abTTFFilePostfix, abTTFFilePrefix, actions, dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, dccPhiIndexOfRU(), ecalDccSC, cmsRelvalreport::exit, fillABIOFiles(), fillABSRPFiles(), fillABTTFFiles(), i, iEvent, nAB, nactions, nBarrelTTInEta, nEndcaps, nEndcapXBins, nEndcapYBins, nSupercrystalXBins, nSupercrystalYBins, nTTInEta, nTTInPhi, NULL, dbtoconf::out, readSRF(), readTTF(), roFlagMarker, alignCSCRings::s, srfFilename, srp2roFlags, srpFlagMarker, theAB, ttfFilename, writeABIOFileHeader(), writeABSRFFileHeader(), and writeABTTFFileHeader().
bool readSRF | ( | FILE * | file, |
char | barrelSrFlags[nBarrelTTInEta][nTTInPhi], | ||
char | endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins] | ||
) |
Definition at line 540 of file GenABIO.cc.
References dtNoiseDBValidation_cfg::cerr, cmsRelvalreport::exit, geometryCSVtoXML::line, nBarrelTTInEta, nEndcaps, nSupercrystalXBins, nSupercrystalYBins, nTTInPhi, NULL, SiPixelLorentzAngle_cfi::read, and srfFilename.
Referenced by main().
bool readTTF | ( | FILE * | file, |
char | ttFlags[nTTInEta][nTTInPhi] | ||
) |
Definition at line 506 of file GenABIO.cc.
References dtNoiseDBValidation_cfg::cerr, cmsRelvalreport::exit, geometryCSVtoXML::line, nTTInEta, nTTInPhi, NULL, SiPixelLorentzAngle_cfi::read, and ttfFilename.
Referenced by main().
void writeABIOFileHeader | ( | ofstream & | f, |
int | abNum | ||
) |
Definition at line 670 of file GenABIO.cc.
References actions, roFlagMarker, srpFlagMarker, edmStreamStallGrapher::t, tccFlagMarker, and cond::rpcobgas::time.
Referenced by main().
void writeABSRFFileHeader | ( | ofstream & | f, |
int | abNum | ||
) |
Definition at line 643 of file GenABIO.cc.
References actions, roFlagMarker, edmStreamStallGrapher::t, and cond::rpcobgas::time.
Referenced by main().
void writeABTTFFileHeader | ( | ofstream & | f, |
int | abNum | ||
) |
Definition at line 630 of file GenABIO.cc.
References srpFlagMarker, edmStreamStallGrapher::t, and cond::rpcobgas::time.
Referenced by main().
const char* abIOFilePostfix = ".txt" |
Definition at line 169 of file GenABIO.cc.
Referenced by main().
const char* abIOFilePrefix = "IO_AB" |
Definition at line 168 of file GenABIO.cc.
Referenced by main().
const char* abSRFFilePostfix = ".txt" |
Definition at line 167 of file GenABIO.cc.
Referenced by main().
const char* abSRFFilePrefix = "AF_AB" |
Definition at line 166 of file GenABIO.cc.
Referenced by main().
const char* abTTFFilePostfix = ".txt" |
Definition at line 165 of file GenABIO.cc.
Referenced by main().
const char* abTTFFilePrefix = "TTF_AB" |
Definition at line 164 of file GenABIO.cc.
Referenced by main().
roAction_t actions[nactions] |
Definition at line 187 of file GenABIO.cc.
Referenced by Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::centerViewMenuButtonClicked(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::centerViewMenuButtonClicked(), main(), operator<<(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::updateViewMenu(), writeABIOFileHeader(), and writeABSRFFileHeader().
Definition at line 191 of file GenABIO.cc.
Referenced by getABDCCOutputStream(), and main().
int iEvent = 0 |
Definition at line 230 of file GenABIO.cc.
Referenced by SiStripGainFromData::algoAnalyze(), Digi2Raw2Digi::analyze(), RawDataConverter::analyze(), HcalDigiTester::analyze(), HLTMonPhotonSource::analyze(), EcalSimRawData::analyze(), HLTMonElectron::analyze(), HLTMon::analyze(), CastorDumpConditions::analyze(), HcalDigisValidation::analyze(), FFTJetTreeDump::analyze(), CSCSkim::beginJob(), RPCNoise::beginJob(), pat::LeptonVertexSignificance::calculate(), VarSplitter::eval(), VariablePower::eval(), TCTauAlgorithm::eventSetup(), ConfigurableHisto::fill(), fillABIOFiles(), fillABSRPFiles(), fillABTTFFiles(), MuonTimingFiller::fillTiming(), ConfigurableAnalysis::filter(), CSCSkim::filter(), RPCNoise::filter(), CSCEfficiency::filter(), FWFileEntry::filterEventsWithCustomParser(), MuonDetLayerMeasurements::groupedMeasurements(), main(), FWEventItemsManager::newEvent(), SubjetFilterJetProducer::output(), cms::CompoundJetProducer::output(), VirtualJetProducer::output(), pf2pat::TopProjectorAlgo< Top, Bottom >::processCollection(), TtDilepEvtSolutionMaker::produce(), TtSemiEvtSolutionMaker::produce(), pat::MatcherUsingTracks::produce(), EcalSelectiveReadoutProducer::produce(), PFLinker::produce(), SiStripFineDelayHit::produce(), pf2pat::TopProjectorAlgo< Top, Bottom >::produce(), TriggerSummaryProducerAOD::produce(), FFTJetPatRecoProducer::produce(), FFTJetProducer::produce(), SiStripFineDelayHit::produceNoTracking(), MuonDetLayerMeasurements::recHits(), KalmanAlignmentAlgorithm::run(), and FWEventItem::setEvent().
const int iTCCEtaBounds[nTCCInEta+1] = {0,7,11,28,45,49,56} |
Definition at line 162 of file GenABIO.cc.
Referenced by getABTCCInputStream().
const int iTTEtaMax[nABInEta] = {10,27,44,55} |
Definition at line 156 of file GenABIO.cc.
Referenced by fillABSRPFiles(), and fillABTTFFiles().
const int iTTEtaMin[nABInEta] = {0,11,28,45} |
Definition at line 155 of file GenABIO.cc.
Referenced by fillABSRPFiles(), and fillABTTFFiles().
const int iTTEtaSign[nABInEta] = {-1,-1,1,1} |
Definition at line 157 of file GenABIO.cc.
Referenced by fillABSRPFiles(), and fillABTTFFiles().
Definition at line 153 of file GenABIO.cc.
Referenced by abConnect(), fillABSRPFiles(), and main().
const int nABABCh = 8 |
Definition at line 149 of file GenABIO.cc.
Referenced by abConnect(), and fillABIOFiles().
const int nABInEta =4 |
Number of ABs in a phi-sector
Definition at line 142 of file GenABIO.cc.
Referenced by fillABIOFiles(), and fillABTTFFiles().
const int nABInPhi =3 |
Number of ABs in an eta slice
Definition at line 145 of file GenABIO.cc.
Referenced by fillABIOFiles(), fillABSRPFiles(), and fillABTTFFiles().
const int nABTCCCh = 12 |
Definition at line 150 of file GenABIO.cc.
Referenced by fillABIOFiles().
const int nactions = 8 |
Definition at line 185 of file GenABIO.cc.
Referenced by main().
|
static |
Number of barrel trigger towers along eta
Definition at line 132 of file GenABIO.cc.
const int nDCCCh = 12 |
Definition at line 151 of file GenABIO.cc.
Referenced by fillABIOFiles().
const int nDCCEE = 9 |
Number of DCCs in an endcap
Definition at line 148 of file GenABIO.cc.
|
static |
Number of endcap, obviously tow
Definition at line 126 of file GenABIO.cc.
Referenced by HLTCSCAcceptBusyFilter::AcceptManyHitsInChamber(), EcalSimRawData::analyze(), fillABSRPFiles(), EcalSimRawData::getSrfs(), main(), EcalSelectiveReadoutProducer::printSrFlags(), and readSRF().
|
static |
Number of trigger towers along eta in one endcap
Definition at line 129 of file GenABIO.cc.
Referenced by fillABSRPFiles(), and getABDCCOutputStream().
|
static |
Range of the x-index of endcap crystals (xman-xmin+1).
Definition at line 111 of file GenABIO.cc.
Referenced by main().
|
static |
Range of the y-index of endcap crystals (yman-ymin+1).
Definition at line 114 of file GenABIO.cc.
Referenced by main().
|
static |
Range of endcap supercrystal x-index (xmax-xmin+1)
Definition at line 120 of file GenABIO.cc.
Referenced by fillABSRPFiles(), main(), and readSRF().
|
static |
Range of endcap supercrystal y-index (ymay-ymin+1)
Definition at line 123 of file GenABIO.cc.
Referenced by fillABSRPFiles(), main(), and readSRF().
const int nTCCInEta = 6 |
Definition at line 152 of file GenABIO.cc.
Definition at line 154 of file GenABIO.cc.
Referenced by fillABSRPFiles(), fillABTTFFiles(), and getABTTPhiBounds().
|
static |
Number of trigger towers along eta for the whole ECAL
Definition at line 135 of file GenABIO.cc.
Referenced by getFlagStream(), main(), and readTTF().
|
static |
Number of trigger towers in an eta ring
Definition at line 139 of file GenABIO.cc.
Referenced by getABTTPhiBounds(), main(), readSRF(), and readTTF().
char roFlagMarker[] |
Definition at line 181 of file GenABIO.cc.
Referenced by main(), writeABIOFileHeader(), and writeABSRFFileHeader().
const char* srfFilename = "SRF.txt" |
Definition at line 171 of file GenABIO.cc.
char srp2roFlags[128] |
Definition at line 178 of file GenABIO.cc.
Referenced by fillABSRPFiles(), getABDCCOutputStream(), and main().
Definition at line 175 of file GenABIO.cc.
Referenced by main(), EcalSelectiveReadoutProducer::printSrFlags(), writeABIOFileHeader(), and writeABTTFFileHeader().
|
static |
Edge size of a supercrystal. A supercrystal is a tower of 5x5 crystals.
Definition at line 117 of file GenABIO.cc.
const char tccFlagMarker[] = {'.', 'S', '?', 'C', '4', '5', '6', '7'} |
Definition at line 176 of file GenABIO.cc.
Referenced by EcalSelectiveReadoutSuppressor::printTTFlags(), EcalSelectiveReadoutProducer::printTTFlags(), and writeABIOFileHeader().
int theAB = -1 |
Definition at line 232 of file GenABIO.cc.
Referenced by main().
const char* ttfFilename = "TTF.txt" |
Definition at line 172 of file GenABIO.cc.
const char* xconnectFilename = "xconnect_universal.txt" |
Definition at line 173 of file GenABIO.cc.
Referenced by abConnect().