#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.
|
inline |
Definition at line 204 of file GenABIO.cc.
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.
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] | ||
) |
Definition at line 389 of file GenABIO.cc.
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.
string getABABInputStream | ( | const char | tccFlags[nTTInEta][nTTInPhi], |
int | iABEta, | ||
int | iABPhi, | ||
int | iABCh | ||
) |
Definition at line 821 of file GenABIO.cc.
string getABABOutputStream | ( | const char | tccFlags[nTTInEta][nTTInPhi], |
int | iABEta, | ||
int | iABPhi, | ||
int | iABCh | ||
) |
Definition at line 753 of file GenABIO.cc.
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.
string getABTCCInputStream | ( | const char | tccFlags[nTTInEta][nTTInPhi], |
int | iABEta, | ||
int | iABPhi, | ||
int | iTCCCh | ||
) |
Definition at line 723 of file GenABIO.cc.
void getABTTPhiBounds | ( | int | iABPhi, |
int & | iTTPhiMin, | ||
int & | iTTPhiMax | ||
) |
Definition at line 833 of file GenABIO.cc.
string getFlagStream | ( | char | flags[nTTInEta][nTTInPhi], |
int | iEtaMin, | ||
int | iEtaMax, | ||
int | iPhiMin, | ||
int | iPhiMax | ||
) |
Definition at line 689 of file GenABIO.cc.
int main | ( | int | argc, |
char * | argv[] | ||
) |
bool readSRF | ( | FILE * | file, |
char | barrelSrFlags[nBarrelTTInEta][nTTInPhi], | ||
char | endcapSrFlags[nEndcaps][nSupercrystalXBins][nSupercrystalYBins] | ||
) |
Definition at line 540 of file GenABIO.cc.
bool readTTF | ( | FILE * | file, |
char | ttFlags[nTTInEta][nTTInPhi] | ||
) |
Definition at line 506 of file GenABIO.cc.
void writeABIOFileHeader | ( | ofstream & | f, |
int | abNum | ||
) |
Definition at line 670 of file GenABIO.cc.
void writeABSRFFileHeader | ( | ofstream & | f, |
int | abNum | ||
) |
Definition at line 643 of file GenABIO.cc.
void writeABTTFFileHeader | ( | ofstream & | f, |
int | abNum | ||
) |
Definition at line 630 of file GenABIO.cc.
const char* abIOFilePostfix = ".txt" |
Definition at line 169 of file GenABIO.cc.
const char* abIOFilePrefix = "IO_AB" |
Definition at line 168 of file GenABIO.cc.
const char* abSRFFilePostfix = ".txt" |
Definition at line 167 of file GenABIO.cc.
const char* abSRFFilePrefix = "AF_AB" |
Definition at line 166 of file GenABIO.cc.
const char* abTTFFilePostfix = ".txt" |
Definition at line 165 of file GenABIO.cc.
const char* abTTFFilePrefix = "TTF_AB" |
Definition at line 164 of file GenABIO.cc.
roAction_t actions[nactions] |
Definition at line 187 of file GenABIO.cc.
Referenced by Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::centerViewMenuButtonClicked().
Definition at line 191 of file GenABIO.cc.
int iEvent = 0 |
Definition at line 230 of file GenABIO.cc.
Referenced by pat::LeptonVertexSignificance::calculate(), VarSplitter::eval(), VariablePower::eval(), main(), cms::CompoundJetProducer::output(), PFEGammaToCandidateRemapper::produce(), ConeIsolation::produce(), ImpactParameter::produce(), and pat::helper::AnyNumberAssociationAdaptor::run().
const int iTCCEtaBounds[nTCCInEta+1] = {0,7,11,28,45,49,56} |
Definition at line 162 of file GenABIO.cc.
const int iTTEtaMax[nABInEta] = {10,27,44,55} |
Definition at line 156 of file GenABIO.cc.
const int iTTEtaMin[nABInEta] = {0,11,28,45} |
Definition at line 155 of file GenABIO.cc.
const int iTTEtaSign[nABInEta] = {-1,-1,1,1} |
Definition at line 157 of file GenABIO.cc.
Definition at line 153 of file GenABIO.cc.
const int nABABCh = 8 |
Definition at line 149 of file GenABIO.cc.
const int nABInEta =4 |
Number of ABs in a phi-sector
Definition at line 142 of file GenABIO.cc.
const int nABInPhi =3 |
Number of ABs in an eta slice
Definition at line 145 of file GenABIO.cc.
const int nABTCCCh = 12 |
Definition at line 150 of file GenABIO.cc.
const int nactions = 8 |
Definition at line 185 of file GenABIO.cc.
|
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.
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().
|
static |
Number of trigger towers along eta in one endcap
Definition at line 129 of file GenABIO.cc.
|
static |
Range of the x-index of endcap crystals (xman-xmin+1).
Definition at line 111 of file GenABIO.cc.
|
static |
Range of the y-index of endcap crystals (yman-ymin+1).
Definition at line 114 of file GenABIO.cc.
|
static |
Range of endcap supercrystal x-index (xmax-xmin+1)
Definition at line 120 of file GenABIO.cc.
|
static |
Range of endcap supercrystal y-index (ymay-ymin+1)
Definition at line 123 of file GenABIO.cc.
const int nTCCInEta = 6 |
Definition at line 152 of file GenABIO.cc.
Definition at line 154 of file GenABIO.cc.
|
static |
Number of trigger towers along eta for the whole ECAL
Definition at line 135 of file GenABIO.cc.
|
static |
Number of trigger towers in an eta ring
Definition at line 139 of file GenABIO.cc.
char roFlagMarker[] |
Definition at line 181 of file GenABIO.cc.
const char* srfFilename = "SRF.txt" |
Definition at line 171 of file GenABIO.cc.
char srp2roFlags[128] |
Definition at line 178 of file GenABIO.cc.
Definition at line 175 of file GenABIO.cc.
|
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.
int theAB = -1 |
Definition at line 232 of file GenABIO.cc.
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.