CMS 3D CMS Logo

Macros | Functions
EcalSRSettings.cc File Reference
#include "CondFormats/EcalObjects/interface/EcalSRSettings.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <sstream>
#include <iostream>
#include <cstdlib>
#include <cassert>
#include <algorithm>

Go to the source code of this file.

Macros

#define SR_PRINT(a)   o << #a ": " << val.a##_ << "\n";
 
#define SR_VPRINT(a)
 
#define SR_VVPRINT(a)
 

Functions

std::ostream & operator<< (std::ostream &o, const EcalSRSettings &val)
 

Macro Definition Documentation

◆ SR_PRINT

#define SR_PRINT (   a)    o << #a ": " << val.a##_ << "\n";

Definition at line 15 of file EcalSRSettings.cc.

Referenced by operator<<().

◆ SR_VPRINT

#define SR_VPRINT (   a)
Value:
o << #a; \
if (val.a##_.empty()) \
o << "[0.." << (val.a##_.size() - 1) << "]:"; \
else \
o << "[]: <empty>"; \
for (size_t i = 0; i < val.a##_.size(); ++i) \
o << "\t" << val.a##_[i]; \
o << "\n";
double a
Definition: hdecay.h:119

Definition at line 16 of file EcalSRSettings.cc.

Referenced by operator<<().

◆ SR_VVPRINT

#define SR_VVPRINT (   a)
Value:
if (val.a##_.empty()) \
o << #a "[][]: <empty>\n"; \
for (size_t i = 0; i < val.a##_.size(); ++i) { \
o << #a "[" << i << "]"; \
if (val.a##_.empty()) \
o << "[0.." << (val.a##_[i].size() - 1) << "]:"; \
else \
o << "[]: <empty>"; \
for (size_t j = 0; j < val.a##_[i].size(); ++j) \
o << "\t" << val.a##_[i][j]; \
o << "\n"; \
}
double a
Definition: hdecay.h:119

Definition at line 25 of file EcalSRSettings.cc.

Referenced by operator<<().

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  o,
const EcalSRSettings val 
)

Definition at line 39 of file EcalSRSettings.cc.

References actions, ecalDigis_beamcom09_cff::dccNormalizedWeights, spr::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, DigiCosmics_cff::ebDccAdcToGeV, ecalDigis_beamcom09_cff::ecalDccZs1stSample, ecalDigis_beamcom09_cff::eeDccAdcToGeV, EcalTangentSkim_cfg::o, SR_PRINT, SR_VPRINT, SR_VVPRINT, and ecalDigis_craft_cfi::symetricZS.

39  {
40  o << "# Neighbour eta range, neighborhood: (2*deltaEta+1)*(2*deltaPhi+1)\n"
41  "# In the vector contains:\n"
42  "# - 1 element, then value applies to whole ECAL\n"
43  "# - 2 elements, then element 0 applies to EB, element 1 to EE\n"
44  "# - 12 elements, then element i applied to SRP (i+1)\n"
45  "# SRP emulation (see SimCalorimetry/EcalSelectiveReadoutProcuders) supports\n"
46  "# only 1 element mode.\n";
48 
49  o << "\n# Neighbouring eta range, neighborhood: (2*deltaEta+1)*(2*deltaPhi+1)\n"
50  "# If the vector contains...\n"
51  "# ... 1 element, then value applies to whole ECAL\n"
52  "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
53  "# ... 12 elements, then element i applied to SRP (i+1)\n"
54  "# If the vector contains...\n"
55  "# ... 1 element, then value applies to whole ECAL\n"
56  "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
57  "# ... 12 elements, then element i applied to SRP (i+1)\n"
58  "# SRP emulation (see SimCalorimetry/EcalSelectiveReadoutProcuders) supports\n"
59  "# only the single-element mode.\n";
61 
62  o << "\n# Index of time sample (staring from 1) the first DCC weights is implied\n"
63  "# If the vector contains:\n"
64  "# ... 1 element, then value applies to whole ECAL\n"
65  "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
66  "# ... 54 elements, then element i applied to DCC (i+1) (FED ID 651+i)\n"
67  "# SRP emulation (see SimCalorimetry/EcalSelectiveReadoutProcuders) supports\n"
68  "# only the single-element mode.\n";
70 
71  o << "\n# ADC to GeV conversion factor used in ZS filter for EB\n";
73 
74  o << "\n# ADC to GeV conversion factor used in ZS filter for EE\n";
76 
77  o << "\n# DCC ZS FIR weights: weights are rounded in such way that in Hw\n"
78  "# representation (weigth*1024 rounded to nearest integer) the sum is null:\n"
79  "# Each element is a vector of 6 values, the 6 weights\n"
80  "# If the vector contains...\n"
81  "# ... 1 element, then the weight set applies to whole ECAL\n"
82  "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
83  "# ... 54 elements, then element i applied to DCC (i+1) (FED ID 651+i)\n";
85 
86  o << "\n# Switch to use a symetric zero suppression (cut on absolute value). For\n"
87  "# studies only, for time being it is not supported by the hardware.\n"
88  "# having troubles for vector<bool> with coral (3.8.0pre1), using vector<int> instead,\n"
89  "# 0 means false, a value different than 0 means true.\n"
90  "# If the vector contains...\n"
91  "# ... 1 element, then the weight set applies to whole ECAL\n"
92  "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
93  "# ... 54 elements, then element i applied to DCC (i+1) (FED ID 651+i)\n"
94  "# ... 75848 elements, then:\n"
95  "# for i < 61200, element i applies to EB crystal with denseIndex i\n"
96  "# (see EBDetId::denseIndex())\n"
97  "# for i >= 61200, element i applies to EE crystal with denseIndex (i+61200)\n"
98  "# (see EBDetId::denseIndex())\n"
99  "# SRP emulation supports only 1 element mode. Hardware does not support\n"
100  "# the symetric ZS, so symetricZS = 0 for real data.\n";
102 
103  o << "\n# ZS energy threshold in GeV to apply to low interest channels of barrel\n"
104  "# If the vector contains...\n"
105  "# ... 1 element, then the weight set applies to whole ECAL\n"
106  "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
107  "# ... 54 elements, then element i applied to DCC (i+1) (FED ID 651+i)\n"
108  "# SRP emulation supports only the 2-element mode.\n"
109  "# Corresponds to srpBarrelLowInterestChannelZS and srpEndcapLowInterestChannelZS\n"
110  "# of python configuration file parameters\n";
111  SR_VPRINT(srpLowInterestChannelZS);
112 
113  o << "\n# ZS energy threshold in GeV to apply to high interest channels of endcap\n"
114  "# If the vector contains...\n"
115  "# ... 1 element, then the weight set applies to whole ECAL\n"
116  "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
117  "# ... 54 elements, then element i applied to DCC (i+1) (FED ID 651+i)\n"
118  "# SRP emulation supports only the 2-element mode.\n"
119  "# Corresponds to srpBarrelLowInterestChannelZS and srpEndcapLowInterestChannelZS\n"
120  "# of python configuration file parameters\n";
121  SR_VPRINT(srpHighInterestChannelZS);
122 
123  // o << "\n# Switch to run w/o trigger primitive. For debug use only\n"
124  // "# having troubles for vector<bool> with coral (3.8.0pre1), using vector<int> instead\n"
125  // "# Parameter only relevant for emulation. For real data, must be contains 1 element with\n"
126  // "# value 0.\n"
127  // "# ... 1 element, then the weight set applies to whole ECAL\n"
128  // "# ... 2 elements, then element 0 applies to EB, element 1 to EE\n"
129  // "# ... 54 elements, then element i applied to DCC (i+1) (FED ID 651+i)\n"
130  // "# SRP emulation supports only the single-element mode.\n";
131  // SR_VPRINT(trigPrimBypass);\n"
132  //
133  // o << "\n# Mode selection for "# Trig bypass" mode\n"
134  // "# 0: TT thresholds applied on sum of crystal Et's\n"
135  // "# 1: TT thresholds applies on compressed Et from Trigger primitive\n"
136  // "# @see trigPrimByPass switch\n"
137  // "# Parameter only relevant for \n";
138  // SR_VPRINT(trigPrimBypassMode);
139  //
140  // o << "\n# for debug mode only:\n";
141  // SR_VPRINT( trigPrimBypassLTH);
142  //
143  // o << "\n# for debug mode only:\n";
144  // SR_VPRINT(trigPrimBypassHTH);
145  //
146  // o << "\n# for debug mode only\n"
147  // "# having troubles for vector<bool> with coral (3.8.0pre1), using vector<int> instead\n";
148  // SR_VPRINT( trigPrimBypassWithPeakFinder);
149  //
150  // o << "\n# Trigger Tower Flag to use when a flag is not found from the input\n"
151  // "# Trigger Primitive collection. Must be one of the following values:\n"
152  // "# 0: low interest, 1: mid interest, 3: high interest\n"
153  // "# 4: forced low interest, 5: forced mid interest, 7: forced high interest\n";
154  // SR_VPRINT(defaultTtf);\n"
155 
156  o << "\n# SR->action flag map. 4 elements\n"
157  "# action_[i]: action for flag value i\n";
159 
160  o << "\n# Masks for TTC inputs of SRP cards\n"
161  "# One element per TCC, that is 108 elements: element i applies to TCC (i+1)\n";
162  SR_VPRINT(tccMasksFromConfig);
163 
164  o << "\n# Masks for SRP-SRP inputs of SRP cards\n"
165  "# One element per SRP, that is 12 elements: element i applies to SRP (i+1)\n"
166  "# indices: [iSrp][iCh]\n";
167  SR_VVPRINT(srpMasksFromConfig);
168 
169  o << "\n# Masks for DCC output of SRP cards\n"
170  "# One element per DCC, that is 54 elements: element i applies to DCC (i+1)\n";
171  SR_VPRINT(dccMasks);
172 
173  o << "\n# Mask to enable pattern test. Typical value: 0.\n"
174  "# One element per SRP, that is 12 elements: element i applies to SRP (i+1)\n";
175  SR_VPRINT(srfMasks);
176 
177  o << "\n# Substitution flags used in patterm mode\n"
178  "# indices: [iSrp][iFlag]\n";
179  SR_VVPRINT(substitutionSrfs);
180 
181  o << "\n# Tester mode configuration\n";
182  SR_VPRINT(testerTccEmuSrpIds);
183  SR_VPRINT(testerSrpEmuSrpIds);
184  SR_VPRINT(testerDccTestSrpIds);
185  SR_VPRINT(testerSrpTestSrpIds);
187 
188  o << "\n# Per SRP card bunch crossing counter offset.\n"
189  "# This offset is added to the bxGlobalOffset\n";
190  SR_VPRINT(bxOffsets);
191 
192  o << "\n# SRP system bunch crossing counter offset.\n"
193  "# For each card the bxOffset[i]\n"
194  "# is added to this one.\n";
195  SR_PRINT(bxGlobalOffset);
196 
197  o << "\n# Switch for automatic channel masking. 0: disabled; 1: enabled. Standard configuration: 1.\n"
198  "# When enabled, if a FED is excluded from the run, the corresponding TCC inputs is automatically\n"
199  "# masked (overwrites the tccInputMasks).\n";
200  SR_PRINT(automaticMasks);
201 
202  o << "\n# Switch for automatic SRP card selection. 0: disabled; 1 : enabled..\n"
203  "# When enabled, if all the FEDs corresponding to a given SRP is excluded from the run,\n"
204  "# Then the corresponding SRP card is automatically excluded.\n";
205  SR_PRINT(automaticSrpSelect);
206 
207  return o;
208 }
roAction_t actions[nactions]
Definition: GenABIO.cc:181
#define SR_VPRINT(a)
static const double deltaEta
Definition: CaloConstants.h:8
#define SR_PRINT(a)
#define SR_VVPRINT(a)