|
|
#include <CalibCalorimetry/HcalLuttoDB/src/HcalLuttoDB.cc>
|
void | analyze (const edm::Event &, const edm::EventSetup &) override |
|
void | beginJob () override |
|
void | endJob () override |
|
| HcalLuttoDB (const edm::ParameterSet &) |
|
| ~HcalLuttoDB () 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 &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
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 |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &) |
|
static bool | wantsGlobalLuminosityBlocks () |
|
static bool | wantsGlobalRuns () |
|
static bool | wantsInputProcessBlocks () |
|
static bool | wantsProcessBlocks () |
|
static bool | wantsStreamLuminosityBlocks () |
|
static bool | wantsStreamRuns () |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Description: <one line="" class="" summary>=""> R Implementation: <Notes on="" implementation>="">
Definition at line 54 of file HcalLuttoDB.cc.
◆ HcalLuttoDB()
◆ ~HcalLuttoDB()
HcalLuttoDB::~HcalLuttoDB |
( |
| ) |
|
|
override |
◆ analyze()
Implements edm::EDAnalyzer.
Definition at line 270 of file HcalLuttoDB.cc.
274 edm::LogInfo(
"Hcal") <<
"Beginning dump of Hcal TPG LUTS (this may take a minute or two)";
284 std::vector<HcalElectronicsId>::iterator itreid;
286 std::ostream* pfile =
nullptr;
289 for (
int crate = 0; crate < 20; crate++) {
291 for (itreid = allEID.begin(); itreid != allEID.end(); ++itreid) {
292 if (itreid->readoutVMECrateId() != crate)
294 if (itreid->isTriggerChainId()) {
301 else if (pfile ==
nullptr)
319 else if (pfile ==
nullptr)
330 if (pfile !=
nullptr) {
332 *pfile <<
"</CFGBrickSet>\n";
337 *
oc_ <<
"</CFGBrick>\n";
References HcalElectronicsMap::allElectronicsId(), HcalGenericDetId::genericSubdet(), edm::EventSetup::getData(), HcalDbService::getHcalMapping(), HcalTPGCoder::getLinearizationLUT(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalElectronicsMap::lookup(), HcalElectronicsMap::lookupTrigger(), and DetId::null().
◆ beginJob()
void HcalLuttoDB::beginJob |
( |
void |
| ) |
|
|
overridevirtual |
◆ endJob()
void HcalLuttoDB::endJob |
( |
void |
| ) |
|
|
overridevirtual |
◆ extractOutputLut()
◆ openChecksums()
std::ostream * HcalLuttoDB::openChecksums |
( |
| ) |
|
|
private |
◆ openPerCrate()
std::ostream * HcalLuttoDB::openPerCrate |
( |
int |
crate | ) |
|
|
private |
◆ openPerLut1()
◆ openPerLut2()
◆ writeoutlut1()
void HcalLuttoDB::writeoutlut1 |
( |
HcalDetId |
id, |
|
|
HcalElectronicsId |
eid, |
|
|
const std::vector< unsigned short > & |
lut, |
|
|
std::ostream & |
os |
|
) |
| |
|
private |
Definition at line 154 of file HcalLuttoDB.cc.
158 os <<
"<CFGBrick> " << std::endl;
159 os <<
" <Parameter name='IETA' type='int'>" <<
id.ieta() <<
"</Parameter>" << std::endl;
160 os <<
" <Parameter name='IPHI' type='int'>" <<
id.iphi() <<
"</Parameter>" << std::endl;
161 os <<
" <Parameter name='DEPTH' type='int'>" <<
id.depth() <<
"</Parameter>" << std::endl;
162 os <<
" <Parameter name='CRATE' type='int'>" <<
eid.readoutVMECrateId() <<
"</Parameter>" << std::endl;
163 os <<
" <Parameter name='SLOT' type='int'>" <<
eid.htrSlot() <<
"</Parameter>" << std::endl;
164 os <<
" <Parameter name='TOPBOTTOM' type='int'>" <<
eid.htrTopBottom() <<
"</Parameter>" << std::endl;
165 os <<
" <Parameter name='FIBER' type='int'>" <<
eid.fiberIndex() <<
"</Parameter>" << std::endl;
166 os <<
" <Parameter name='FIBERCHAN' type='int'>" <<
eid.fiberChanId() <<
"</Parameter>" << std::endl;
167 os <<
" <Parameter name='LUT_TYPE' type='int'>1</Parameter>" << std::endl;
168 os <<
" <Parameter name='CREATIONTAG' type='string'>" <<
creationtag_ <<
"</Parameter>" << std::endl;
169 os <<
" <Parameter name='CREATIONSTAMP' type='string'>" <<
creationstamp_ <<
"</Parameter>" << std::endl;
170 os <<
" <Parameter name='FORMATREVISION' type='string'>" <<
formatRevision_ <<
"</Parameter>" << std::endl;
171 os <<
" <Parameter name='TARGETFIRMWARE' type='string'>" <<
targetfirmware_ <<
"</Parameter>" << std::endl;
172 int generalizedIndex =
id.ietaAbs() + 1000 *
id.depth() + 10000 *
id.iphi() + ((
id.ieta() < 0) ? (0) : (100)) +
173 ((
id.subdet() ==
HcalForward &&
id.ietaAbs() == 29) ? (4 * 10000) : (0));
175 os <<
" <Parameter name='GENERALIZEDINDEX' type='int'>" << generalizedIndex <<
"</Parameter>" << std::endl;
178 md5_byte_t digest[16];
179 unsigned char tool[2];
181 for (
int i = 0;
i < 128;
i++) {
182 tool[0] = lut[
i] & 0xFF;
183 tool[1] = (lut[
i] >> 8) & 0xFF;
184 md5_append(&md5er, tool, 2);
186 md5_finish(&md5er, digest);
187 os <<
" <Parameter name='CHECKSUM' type='string'>";
188 for (
int i = 0;
i < 16;
i++)
189 os << std::hex << (((
int)(digest[
i])) & 0xFF);
190 os <<
"</Parameter>\n";
192 *
oc_ <<
" <Data crate='" <<
eid.readoutVMECrateId() <<
"' slot='" <<
eid.htrSlot() <<
"' fpga='"
193 <<
eid.htrTopBottom() <<
"' fiber='" <<
eid.fiberIndex() <<
"' fiberchan='" <<
eid.fiberChanId()
194 <<
"' luttype='1' elements='1' encoding='hex'>";
195 for (
int i = 0;
i < 16;
i++)
196 *
oc_ << std::hex << (((
int)(digest[
i])) & 0xFF);
199 os <<
" <Data elements='128' encoding='hex'> " << std::endl;
201 for (
int initr2 = 0; initr2 < 128; initr2++) {
202 os << lut[initr2] <<
" ";
206 os <<
" </Data> " << std::endl;
207 os <<
"</CFGBrick> " << std::endl;
References creationtag_, TauDecayModes::dec, runTauDisplay::eid, formatRevision_, HcalForward, mps_fire::i, and targetfirmware_.
◆ writeoutlut2()
Definition at line 210 of file HcalLuttoDB.cc.
214 os <<
"<CFGBrick> " << std::endl;
215 os <<
" <Parameter name='IETA' type='int'>" <<
id.ieta() <<
"</Parameter>" << std::endl;
216 os <<
" <Parameter name='IPHI' type='int'>" <<
id.iphi() <<
"</Parameter>" << std::endl;
217 os <<
" <Parameter name='CRATE' type='int'>" <<
eid.readoutVMECrateId() <<
"</Parameter>" << std::endl;
218 os <<
" <Parameter name='SLOT' type='int'>" <<
eid.htrSlot() <<
"</Parameter>" << std::endl;
219 os <<
" <Parameter name='TOPBOTTOM' type='int'>" <<
eid.htrTopBottom() <<
"</Parameter>" << std::endl;
220 os <<
" <Parameter name='SLB' type='int'>" <<
eid.slbSiteNumber() <<
"</Parameter>" << std::endl;
221 os <<
" <Parameter name='SLBCHAN' type='int'>" <<
eid.slbChannelIndex() <<
"</Parameter>" << std::endl;
222 os <<
" <Parameter name='LUT_TYPE' type='int'>2</Parameter>" << std::endl;
223 os <<
" <Parameter name='CREATIONTAG' type='string'>" <<
creationtag_ <<
"</Parameter>" << std::endl;
224 os <<
" <Parameter name='CREATIONSTAMP' type='string'>" <<
creationstamp_ <<
"</Parameter>" << std::endl;
225 os <<
" <Parameter name='FORMATREVISION' type='string'>" <<
formatRevision_ <<
"</Parameter>" << std::endl;
226 os <<
" <Parameter name='TARGETFIRMWARE' type='string'>" <<
targetfirmware_ <<
"</Parameter>" << std::endl;
227 int generalizedIndex =
id.ietaAbs() + 10000 *
id.iphi() + ((
id.ieta() < 0) ? (0) : (100));
229 os <<
" <Parameter name='GENERALIZEDINDEX' type='int'>" << generalizedIndex <<
"</Parameter>" << std::endl;
233 md5_byte_t digest[16];
235 md5_append(&md5er, &(lut[0]), 1024);
236 md5_finish(&md5er, digest);
237 os <<
" <Parameter name='CHECKSUM' type='string'>";
238 for (
int i = 0;
i < 16;
i++)
239 os << std::hex << (((
int)(digest[
i])) & 0xFF);
240 os <<
"</Parameter>\n";
242 *
oc_ <<
" <Data crate='" <<
eid.readoutVMECrateId() <<
"' slot='" <<
eid.htrSlot() <<
"' fpga='"
243 <<
eid.htrTopBottom() <<
"' slb='" <<
eid.slbSiteNumber() <<
"' slbchan='" <<
eid.slbChannelIndex()
244 <<
"' luttype='2' elements='1' encoding='hex'>";
245 for (
int i = 0;
i < 16;
i++)
246 *
oc_ << std::hex << (((
int)(digest[
i])) & 0xFF);
249 os <<
" <Data elements='1024' encoding='hex'> " << std::endl;
251 for (
int initr2 = 0; initr2 < 1024; initr2++) {
252 os << (
int(lut[initr2]) & 0xFF) <<
" ";
256 os <<
" </Data> " << std::endl;
257 os <<
"</CFGBrick> " << std::endl;
References creationtag_, TauDecayModes::dec, runTauDisplay::eid, formatRevision_, mps_fire::i, createfilelist::int, and targetfirmware_.
◆ creationstamp_
std::string HcalLuttoDB::creationstamp_ |
|
private |
◆ fileformat_
std::string HcalLuttoDB::fileformat_ |
|
private |
◆ filePerCrate_
bool HcalLuttoDB::filePerCrate_ |
|
private |
◆ oc_
std::ostream* HcalLuttoDB::oc_ |
|
private |
◆ tokcaloCode_
◆ tokdb_
◆ tokhcalCode_
void writeoutlut1(HcalDetId id, HcalElectronicsId eid, const std::vector< unsigned short > &lut, std::ostream &os)
edm::ESGetToken< HcalTPGCoder, HcalTPGRecord > tokhcalCode_
std::vector< HcalElectronicsId > allElectronicsId() const
std::ostream * openPerLut2(HcalElectronicsId eid)
virtual std::vector< unsigned short > getLinearizationLUT(HcalDetId id) const
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all...
constexpr bool null() const
is this a null id ?
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
const HcalElectronicsMap * getHcalMapping() const
std::ostream * openChecksums()
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
edm::ESGetToken< CaloTPGTranscoder, CaloTPGRecord > tokcaloCode_
void writeoutlut2(HcalTrigTowerDetId id, HcalElectronicsId eid, const std::vector< unsigned char > &lut, std::ostream &os)
std::ostream * openPerCrate(int crate)
edm::ESGetToken< HcalDbService, HcalDbRecord > tokdb_
std::ostream * openPerLut1(HcalElectronicsId eid)
static const int formatRevision_
bool getData(T &iHolder) const
std::string targetfirmware_
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi....
HcalGenericSubdetector genericSubdet() const
T getParameter(std::string const &) const
std::string creationstamp_
std::vector< unsigned char > extractOutputLut(const CaloTPGTranscoder &coder, HcalTrigTowerDetId chan)
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, int fineGrain) const =0
Compression from linear samples+fine grain in the HTR.