18 : m_digiProducerToken(
20 m_headerProducerToken(
22 m_xmlFile(paramSet.getParameter<
std::
string>(
"xmlFile")),
23 m_DACmin(paramSet.getParameter<
int>(
"DACmin")),
24 m_DACmax(paramSet.getParameter<
int>(
"DACmax")),
25 m_RMSmax(paramSet.getParameter<double>(
"RMSmax")),
26 m_bestPed(paramSet.getParameter<
int>(
"bestPed")),
27 m_xtal(paramSet.getParameter<
int>(
"xtal")),
28 m_pedVSDAC(
"pedVSDAC",
"pedVSDAC", 100, 150, 250, m_DACmax - m_DACmin, m_DACmin, m_DACmax),
29 m_singlePedVSDAC_1(
"singlePedVSDAC_1",
30 "pedVSDAC (g1) for xtal " + TString(m_xtal),
37 m_singlePedVSDAC_2(
"singlePedVSDAC_2",
38 "pedVSDAC (g2) for xtal " + TString(m_xtal),
45 m_singlePedVSDAC_3(
"singlePedVSDAC_3",
46 "pedVSDAC (g3) for xtal " + TString(m_xtal),
66 LogDebug(
"testChannel") <<
"entering analyze ...";
72 edm::LogError(
"testChannel") <<
"Error! can't get the product for EcalRawDataCollection";
75 std::map<int, int> DACvalues;
90 edm::LogError(
"testChannel") <<
"Error! can't get the product for EBDigiCollection";
97 int crystalId =
EBDetId(itdigi->id()).ic();
100 edm::LogInfo(
"testChannel") <<
"channel " <<
event.id() <<
"\tcry: " << crystalId <<
"\tG: " <<
gainId 101 <<
"\tDAC: " << DACvalues[smId];
105 edm::LogInfo(
"testChannel") <<
"\t`-->" <<
df.sample(iSample).adc();
106 m_pedVSDAC.Fill(
df.sample(iSample).adc(), DACvalues[smId]);
107 if (crystalId ==
m_xtal) {
122 sprintf(ccout,
"out_%d.root",
m_xtal);
123 TFile
out(ccout,
"RECREATE");
132 profilo1->Write(
"singleProfile_1");
133 profilo2->Write(
"singleProfile_2");
134 profilo3->Write(
"singleProfile_3");
void endJob(void) override
EndJob.
std::vector< T >::const_iterator const_iterator
void analyze(edm::Event const &event, edm::EventSetup const &eventSetup) override
! Analyze
Log< level::Error, false > LogError
int getHeaderSMId(const int headerId)
~testChannel() override
Destructor.
void beginJob() override
BeginJob.
void subscribe(void)
Subscribe/Unsubscribe to Monitoring Elements.
const_iterator begin() const
const int m_DACmin
name of the xml file to be saved
const_iterator end() const
const_iterator end() const
Log< level::Info, false > LogInfo
const edm::EDGetTokenT< EBDigiCollection > m_digiProducerToken
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
const_iterator begin() const
The iterator returned can not safely be used across threads.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
testChannel(const edm::ParameterSet &ps)
Constructor.
static constexpr int MAXSAMPLES
int ism(int ieta, int iphi)
const edm::EDGetTokenT< EcalRawDataCollection > m_headerProducerToken
Token to access digis.