Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run3-sim118A Try to replace getByLabel with token in SimCalorimetry/EcalElectronicsEmulation #37752

Merged
merged 5 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions SimCalorimetry/EcalElectronicsEmulation/interface/EcalSimRawData.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ class EcalSimRawData : public edm::one::EDAnalyzer<> {

/** Destructor
*/
~EcalSimRawData() override{};
~EcalSimRawData() override = default;

/** Main method. Called back for each event. This method produced the
* raw data and write them to disk.
*/
void analyze(const edm::Event &, const edm::EventSetup &) override;

private:
enum tokenType { tcp = 0, tp = 1 };

int iEvent;

/** Number of crystals in ECAL barrel along eta
Expand Down Expand Up @@ -275,23 +277,23 @@ class EcalSimRawData : public edm::one::EDAnalyzer<> {
* @param iEvent event index
* @param adcCount the payload, the ADC count of the channels.
*/
void genFeData(std::string basename, int iEvent, const std::vector<uint16_t> adcCount[nEbEta][nEbPhi]) const;
void genFeData(std::string &basename, int iEvent, const std::vector<uint16_t> adcCount[nEbEta][nEbPhi]) const;

/** Generates FE trigger primitives data
* @param basename base for the output file name. DCC number is appended to
* the name
* @param iEvent event index
* @param tps the payload, the trigger primitives
*/
void genTccIn(std::string basename, int iEvent, const int tps[nTtEta][nTtPhi]) const;
void genTccIn(std::string &basename, int iEvent, const int tps[nTtEta][nTtPhi]) const;

/** Generates TCC->DCC data
* @param basename base for the output file name. DCC number is appended to
* the name
* @param iEvent event index
* @param tps the payload, the trigger primitives
*/
void genTccOut(std::string basename, int iEvent, const int tps[nTtEta][nTtPhi]) const;
void genTccOut(std::string &basename, int iEvent, const int tps[nTtEta][nTtPhi]) const;

/** Retrieves barrel digis (APD ADC count).
* @param event CMS event
Expand All @@ -307,7 +309,7 @@ class EcalSimRawData : public edm::one::EDAnalyzer<> {
* @param collName label of the EDM collection containing the TP.
* @param tp [out] the trigger primitives
*/
void getTp(const edm::Event &event, const std::string &collName, int tp[nTtEta][nTtPhi]) const;
void getTp(const edm::Event &event, tokenType type, int tp[nTtEta][nTtPhi]) const;

/** Help function to get the file extension which depends on the output
* formats.
Expand Down Expand Up @@ -338,7 +340,7 @@ class EcalSimRawData : public edm::one::EDAnalyzer<> {
* @param iEvent event index
* @param the trigger tower flags
*/
void genSrData(std::string basename, int iEvent, int ttf[nEbTtEta][nTtPhi]) const;
void genSrData(std::string &basename, int iEvent, int ttf[nEbTtEta][nTtPhi]) const;

private:
/** Name of module/plugin/producer making digis
Expand Down Expand Up @@ -440,4 +442,9 @@ class EcalSimRawData : public edm::one::EDAnalyzer<> {
/** basename for output files
*/
std::string basename_;

edm::EDGetTokenT<EESrFlagCollection> eeSrFlagToken_;
edm::EDGetTokenT<EBSrFlagCollection> ebSrFlagToken_;
edm::EDGetTokenT<EBDigiCollection> ebDigisToken_;
edm::EDGetTokenT<EcalTrigPrimDigiCollection> trigPrimDigisToken_[2];
};
Loading