Classes | |
struct | MatacqEventId |
class | PosEstimator |
struct | stats_t |
Public Types | |
enum | calibTrigType_t { laserType = 4, ledType = 5, tpType = 6, pedType = 7 } |
Public Types inherited from edm::one::EDProducerBase | |
typedef EDProducerBase | ModuleType |
Public Types inherited from edm::ProducerBase | |
template<typename T > | |
using | BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T > |
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Private Types | |
typedef FILE * | FILE_t |
typedef off_t | filepos_t |
Private Member Functions | |
void | addMatacqData (edm::Event &event) |
int | getCalibTriggerType (edm::Event &ev) const |
bool | getMatacqEvent (uint32_t runNumber, int32_t orbitId, bool fileChange) |
bool | getMatacqFile (uint32_t runNumber, uint32_t orbitId, bool *fileChange=nullptr) |
uint32_t | getOrbitId (edm::Event &ev) const |
bool | getOrbitRange (uint32_t &firstOrb, uint32_t &lastOrb) |
uint32_t | getRunNumber (edm::Event &ev) const |
void | loadOrbitOffset () |
bool | mcheck (const std::string &name) |
void | mclose () |
bool | meof () |
bool | misOpened () |
bool | mopen (const std::string &name) |
bool | mread (char *buf, size_t n, const char *mess=nullptr, bool peek=false) |
bool | mrewind () |
bool | mseek (filepos_t offset, int whence=SEEK_SET, const char *mess=nullptr) |
bool | msize (filepos_t &s) |
bool | mtell (filepos_t &pos) |
void | newRun (int prevRun, int newRun) |
Static Private Member Functions | |
static std::string | runSubDir (uint32_t runNumber) |
Private Attributes | |
std::vector< unsigned char > | data_ |
std::string | digiInstanceName_ |
bool | disabled_ |
bool | doOrbitOffset_ |
int | eventSkipCounter_ |
int | fastRetrievalThresh_ |
std::vector< std::string > | fileNames_ |
MatacqDataFormatter | formatter_ |
bool | ignoreTriggerType_ |
FILE_t | inFile_ |
std::string | inFileName_ |
edm::InputTag | inputRawCollection_ |
edm::EDGetTokenT< FEDRawDataCollection > | inputRawCollectionToken_ |
int32_t | lastOrb_ |
std::ofstream | logFile_ |
std::string | logFileName_ |
bool | logTiming_ |
MatacqRawEvent | matacq_ |
bool | mergeRaw_ |
int | onErrorDisablingEvtCnt_ |
uint32_t | openedFileRunNumber_ |
std::map< uint32_t, uint32_t > | orbitOffset_ |
std::string | orbitOffsetFile_ |
PosEstimator | posEstim_ |
bool | produceDigis_ |
bool | produceRaw_ |
std::string | rawInstanceName_ |
uint32_t | runNumber_ |
timeval | startTime_ |
struct MatacqProducer::stats_t | stats_ |
std::ofstream | timeLog_ |
std::string | timeLogFile_ |
timeval | timer_ |
bool | timing_ |
int | verbosity_ |
Static Private Attributes | |
static const int | bufferSize = 30000 |
static const int | matacqFedId_ = 655 |
static const int | orbitTolerance_ = 80 |
static const stats_t | stats_init = {0, 0, 0} |
Additional Inherited Members | |
Static Public Member Functions inherited from edm::one::EDProducerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::ProducerBase | |
template<Transition Tr = Transition::Event> | |
auto | produces (std::string instanceName) noexcept |
declare what type of product will make and with which optional label More... | |
template<Transition B> | |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
template<BranchType B> | |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
template<typename ProductType , Transition B> | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<class ProductType > | |
BranchAliasSetterT< ProductType > | produces () |
template<typename ProductType , BranchType B> | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<typename ProductType , BranchType B> | |
BranchAliasSetterT< ProductType > | produces () |
template<class ProductType > | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<typename ProductType , Transition B> | |
BranchAliasSetterT< ProductType > | produces () |
template<Transition Tr = Transition::Event> | |
auto | produces () noexcept |
ProducesCollector | producesCollector () |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
template<BranchType B = InEvent> | |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
template<Transition Tr = Transition::Event> | |
constexpr auto | esConsumes () |
template<Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag tag) |
template<Transition Tr = Transition::Event> | |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
Used with EventSetupRecord::doGet. More... | |
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) |
void | resetItemsToGetFrom (BranchType iType) |
Definition at line 37 of file MatacqProducer.cc.
|
private |
Definition at line 47 of file MatacqProducer.cc.
|
private |
Definition at line 46 of file MatacqProducer.cc.
Enumerator | |
---|---|
laserType | |
ledType | |
tpType | |
pedType |
Definition at line 39 of file MatacqProducer.cc.
|
explicit |
Constructor
params | seletive readout parameters |
Definition at line 372 of file MatacqProducer.cc.
References gather_cfg::cout, digiInstanceName_, doOrbitOffset_, Exception, inputRawCollectionToken_, loadOrbitOffset(), logFile_, logFileName_, logTiming_, now(), orbitOffsetFile_, MillePedeFileConverter_cfg::out, submitPVValidationJobs::params, posEstim_, produceDigis_, produceRaw_, rawInstanceName_, startTime_, timeLog_, timeLogFile_, timer_, MatacqProducer::PosEstimator::verbosity(), and verbosity_.
|
override |
Destructor
Definition at line 1131 of file MatacqProducer.cc.
References gather_cfg::cout, logTiming_, mclose(), now(), startTime_, and submitPVValidationJobs::t.
|
private |
Add matacq digi to the event
event | the event |
digiInstanceName_ | name to give to the matacq digi instance |
Definition at line 484 of file MatacqProducer.cc.
References bufferSize, filterCSVwithJSON::copy, gather_cfg::cout, data_, DigiToRawDM_cff::digiColl, digiInstanceName_, doOrbitOffset_, eventSkipCounter_, FEDRawDataCollection::FEDData(), formatter_, getCalibTriggerType(), MatacqRawEvent::getDccLen(), getMatacqEvent(), getMatacqFile(), getOrbitId(), MatacqRawEvent::getOrbitId(), MatacqRawEvent::getParsedLen(), getRunNumber(), ignoreTriggerType_, inputRawCollectionToken_, MatacqDataFormatter::interpretRawData(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, laserType, matacq_, matacqFedId_, mergeRaw_, eostools::move(), MatacqProducer::stats_t::nLaserEventsWithMatacq, MatacqProducer::stats_t::nNonLaserEventsWithMatacq, now(), orbitOffset_, produceDigis_, produceRaw_, rawInstanceName_, convertSQLiteXML::runNumber, FEDRawData::size(), stats_, and verbosity_.
Referenced by produce().
|
private |
Definition at line 1002 of file MatacqProducer.cc.
References data, makeMEIFBenchmarkPlots::ev, Exception, FEDRawDataCollection::FEDData(), EcalPhiSymFlatTableProducers_cfi::id, inputRawCollectionToken_, FEDNumbering::inRange(), edm::HandleBase::isValid(), AlCaHLTBitMon_ParallelJobs::p, and edm_modernize_messagelogger::stat.
Referenced by addMatacqData().
|
private |
Definition at line 636 of file MatacqProducer.cc.
References funct::abs(), gather_cfg::cout, data_, MatacqProducer::PosEstimator::eventLength(), Exception, runEdmFileComparison::failed, fastRetrievalThresh_, newFWLiteAna::found, MatacqRawEvent::getDccLen(), MatacqRawEvent::getOrbitId(), MatacqRawEvent::getRunNum(), inFileName_, createfilelist::int, MatacqProducer::PosEstimator::invalid(), lastOrb_, matacq_, mread(), mrewind(), mseek(), msize(), mtell(), now(), HLT_IsoTrack_cff::offset, orbitTolerance_, MatacqProducer::PosEstimator::pos(), posEstim_, writedatasetfile::run, convertSQLiteXML::runNumber, and verbosity_.
Referenced by addMatacqData().
|
private |
Retrieve the file containing a given matacq event
runNumber | Number of the run the matacq event is looking from |
orbitId | Id of the orbit of the matacq event |
fileChange | if not null pointer, set to true if the file changed. |
Definition at line 835 of file MatacqProducer.cc.
References gather_cfg::cout, eventSkipCounter_, fileNames_, alignmentValidation::fname, newFWLiteAna::found, g, getOrbitRange(), RooUtil::FileUtil::glob(), mps_fire::i, MatacqProducer::PosEstimator::init(), lastOrb_, misOpened(), mopen(), now(), onErrorDisablingEvtCnt_, openedFileRunNumber_, posEstim_, convertSQLiteXML::runNumber, runSubDir(), and verbosity_.
Referenced by addMatacqData().
|
private |
Definition at line 961 of file MatacqProducer.cc.
References funct::abs(), data, makeMEIFBenchmarkPlots::ev, Exception, FEDRawDataCollection::FEDData(), EcalPhiSymFlatTableProducers_cfi::id, inputRawCollectionToken_, FEDNumbering::inRange(), edm::HandleBase::isValid(), and orbitTolerance_.
Referenced by addMatacqData().
|
private |
Definition at line 1441 of file MatacqProducer.cc.
References MatacqRawEvent::getDccLen(), MatacqRawEvent::getOrbitId(), RecoTauValidation_cfi::header, createfilelist::int, mread(), mseek(), msize(), mtell(), nEvts, and createJobs::tmp.
Referenced by getMatacqFile().
|
private |
Definition at line 959 of file MatacqProducer.cc.
References makeMEIFBenchmarkPlots::ev.
Referenced by addMatacqData(), and produce().
|
private |
Loading orbit correction table from file.
Definition at line 1144 of file MatacqProducer.cc.
References visDQMUpload::buf, gather_cfg::cout, Exception, f, WZElectronSkims53X_cff::max, now(), orbitOffset_, orbitOffsetFile_, writedatasetfile::run, and alignCSCRings::s.
Referenced by MatacqProducer().
|
private |
Definition at line 1378 of file MatacqProducer.cc.
References mergeVDriftHistosByStation::name, and edm_modernize_messagelogger::stat.
|
private |
Definition at line 1404 of file MatacqProducer.cc.
References inFile_.
Referenced by mopen(), and ~MatacqProducer().
|
private |
|
private |
Definition at line 1410 of file MatacqProducer.cc.
References inFile_.
Referenced by getMatacqFile().
|
private |
Definition at line 1391 of file MatacqProducer.cc.
References inFile_, inFileName_, mclose(), and mergeVDriftHistosByStation::name.
Referenced by getMatacqFile().
|
private |
Read a data block from input file. On failure file position is restored and if position restoring fails, file is rewind.
buf | buffer to store read data |
n | size of data block |
mess | text to insert in the eventual error message. |
peek | if true file position is restored after the data read |
Definition at line 1327 of file MatacqProducer.cc.
References visDQMUpload::buf, gather_cfg::cout, inFile_, lastOrb_, mrewind(), create_idmaps::n, now(), and verbosity_.
Referenced by getMatacqEvent(), getOrbitRange(), and MatacqProducer::PosEstimator::init().
|
private |
Definition at line 1371 of file MatacqProducer.cc.
References inFile_.
Referenced by getMatacqEvent(), MatacqProducer::PosEstimator::init(), mread(), and mseek().
|
private |
Move input file read pointer. On failure file is rewind.
buf | buffer to store read data |
n | size of data block |
mess | text to insert in the eventual error message. |
Definition at line 1305 of file MatacqProducer.cc.
References gather_cfg::cout, inFile_, mrewind(), now(), HLT_IsoTrack_cff::offset, and verbosity_.
Referenced by getMatacqEvent(), getOrbitRange(), and MatacqProducer::PosEstimator::init().
|
private |
Definition at line 1358 of file MatacqProducer.cc.
References visDQMUpload::buf, inFile_, and alignCSCRings::s.
Referenced by getMatacqEvent(), getOrbitRange(), and MatacqProducer::PosEstimator::init().
|
private |
Definition at line 1320 of file MatacqProducer.cc.
References inFile_.
Referenced by getMatacqEvent(), and getOrbitRange().
|
private |
Definition at line 1427 of file MatacqProducer.cc.
References eventSkipCounter_, logFile_, MatacqProducer::stats_t::nEvents, MatacqProducer::stats_t::nLaserEventsWithMatacq, MatacqProducer::stats_t::nNonLaserEventsWithMatacq, now(), runNumber_, and stats_.
Referenced by produce().
|
overridevirtual |
Produces the EDM products
CMS | event |
eventSetup | event conditions |
Implements edm::one::EDProducerBase.
Definition at line 453 of file MatacqProducer.cc.
References addMatacqData(), gather_cfg::cout, disabled_, getRunNumber(), logTiming_, MatacqProducer::stats_t::nEvents, newRun(), now(), convertSQLiteXML::runNumber, runNumber_, startTime_, stats_, submitPVValidationJobs::t, timeLog_, timer_, and verbosity_.
|
staticprivate |
Definition at line 1420 of file MatacqProducer.cc.
References convertSQLiteXML::runNumber, and units().
Referenced by getMatacqFile().
|
staticprivate |
Definition at line 239 of file MatacqProducer.cc.
Referenced by addMatacqData().
|
private |
Definition at line 241 of file MatacqProducer.cc.
Referenced by addMatacqData(), and getMatacqEvent().
|
private |
Instance name to use for the produced Matacq digi collection
Definition at line 188 of file MatacqProducer.cc.
Referenced by addMatacqData(), and MatacqProducer().
|
private |
Parameter to disable matacq data production. For timing purpose.
Definition at line 200 of file MatacqProducer.cc.
Referenced by produce().
|
private |
Switch for orbit ID correction.
Definition at line 264 of file MatacqProducer.cc.
Referenced by addMatacqData(), and MatacqProducer().
|
private |
counter for event skipping
Definition at line 289 of file MatacqProducer.cc.
Referenced by addMatacqData(), getMatacqFile(), and newRun().
|
private |
Definition at line 246 of file MatacqProducer.cc.
Referenced by getMatacqEvent().
|
private |
Definition at line 184 of file MatacqProducer.cc.
Referenced by getMatacqFile().
|
private |
Definition at line 242 of file MatacqProducer.cc.
Referenced by addMatacqData().
|
private |
When true look for matacq data independently of trigger type.
Definition at line 231 of file MatacqProducer.cc.
Referenced by addMatacqData().
|
private |
|
private |
Name of currently opened matacq file
Definition at line 268 of file MatacqProducer.cc.
Referenced by getMatacqEvent(), and mopen().
|
private |
Name of the raw data collection the Matacq data must be merge to if merging is enabled.
Definition at line 217 of file MatacqProducer.cc.
|
private |
EDM token to access the raw data collection the Matacq data must be merge to if merging is enabled.
Definition at line 222 of file MatacqProducer.cc.
Referenced by addMatacqData(), getCalibTriggerType(), getOrbitId(), and MatacqProducer().
|
private |
Definition at line 245 of file MatacqProducer.cc.
Referenced by getMatacqEvent(), getMatacqFile(), and mread().
|
private |
Log file
Definition at line 285 of file MatacqProducer.cc.
Referenced by MatacqProducer(), and newRun().
|
private |
|
private |
Switch for code timing.
Definition at line 308 of file MatacqProducer.cc.
Referenced by MatacqProducer(), produce(), and ~MatacqProducer().
|
private |
Definition at line 233 of file MatacqProducer.cc.
Referenced by addMatacqData(), and getMatacqEvent().
|
staticprivate |
Definition at line 270 of file MatacqProducer.cc.
Referenced by addMatacqData().
|
private |
Switch for merging Matacq raw data with existing raw data collection.
Definition at line 227 of file MatacqProducer.cc.
Referenced by addMatacqData().
|
private |
Number of events to skip in case of error
Definition at line 293 of file MatacqProducer.cc.
Referenced by getMatacqFile().
|
private |
Definition at line 244 of file MatacqProducer.cc.
Referenced by getMatacqFile().
|
private |
Orbit offset table.
Definition at line 260 of file MatacqProducer.cc.
Referenced by addMatacqData(), and loadOrbitOffset().
|
private |
File name of table with orbit offset between matacq event and DCC. Used to recover data suffering from orbit miss-synchonization
Definition at line 256 of file MatacqProducer.cc.
Referenced by loadOrbitOffset(), and MatacqProducer().
|
staticprivate |
Definition at line 243 of file MatacqProducer.cc.
Referenced by getMatacqEvent(), and getOrbitId().
|
private |
Definition at line 248 of file MatacqProducer.cc.
Referenced by getMatacqEvent(), getMatacqFile(), and MatacqProducer().
|
private |
Swictch for Matacq digi producion
Definition at line 208 of file MatacqProducer.cc.
Referenced by addMatacqData(), and MatacqProducer().
|
private |
Switch for Matacq FED raw data production
Definition at line 212 of file MatacqProducer.cc.
Referenced by addMatacqData(), and MatacqProducer().
|
private |
Instance name to use for the produced Matacq raw data collection
Definition at line 192 of file MatacqProducer.cc.
Referenced by addMatacqData(), and MatacqProducer().
|
private |
Number of the currently processed run
Definition at line 312 of file MatacqProducer.cc.
|
private |
Definition at line 250 of file MatacqProducer.cc.
Referenced by MatacqProducer(), produce(), and ~MatacqProducer().
|
private |
Referenced by addMatacqData(), newRun(), and produce().
|
staticprivate |
Definition at line 278 of file MatacqProducer.cc.
|
private |
Output stream to log code timing
Definition at line 304 of file MatacqProducer.cc.
Referenced by MatacqProducer(), and produce().
|
private |
Name of file to log timing
Definition at line 297 of file MatacqProducer.cc.
Referenced by MatacqProducer().
|
private |
Buffer for timing
Definition at line 300 of file MatacqProducer.cc.
Referenced by MatacqProducer(), and produce().
|
private |
Parameter to switch module timing.
Definition at line 196 of file MatacqProducer.cc.
|
private |
Verbosity level
Definition at line 204 of file MatacqProducer.cc.
Referenced by addMatacqData(), getMatacqEvent(), getMatacqFile(), MatacqProducer(), mread(), mseek(), MatacqProducer::PosEstimator::pos(), and produce().