20 #ifdef WITH_ECAL_COND_DB
59 for (
int i=0;
i<3;
i++) {
65 for (
int i=0;
i<2;
i++) {
128 if (
i01_[ism-1] )
delete i01_[ism-1];
129 if (
i02_[ism-1] )
delete i02_[ism-1];
132 for (
int i=0;
i<3; ++
i ) {
138 for (
int i=0;
i<2; ++
i ) {
146 for (
int i=0;
i<3; ++
i ) {
152 for (
int i=0;
i<2; ++
i ) {
160 #ifdef WITH_ECAL_COND_DB
168 std::map<EcalLogicID, MonOccupancyDat>
dataset;
179 const float n_min_tot = 1000.;
180 const float n_min_bin = 10.;
183 float mean01, mean02;
186 for (
int ie = 1; ie <= 85; ie++ ) {
187 for (
int ip = 1; ip <= 20; ip++ ) {
190 mean01 = mean02 = -1.;
193 bool update_channel =
false;
195 if (
i01_[ism-1] &&
i01_[ism-1]->GetEntries() >= n_min_tot ) {
196 num01 =
i01_[ism-1]->GetBinContent(ie, ip);
197 if ( num01 >= n_min_bin ) update_channel =
true;
200 if (
i02_[ism-1] &&
i02_[ism-1]->GetEntries() >= n_min_tot ) {
201 num02 =
i02_[ism-1]->GetBinEntries(
i02_[ism-1]->GetBin(ie, ip));
202 if ( num02 >= n_min_bin ) {
203 mean02 =
i02_[ism-1]->GetBinContent(ie, ip);
204 rms02 =
i02_[ism-1]->GetBinError(ie, ip);
208 if ( update_channel ) {
214 std::cout <<
"Digi (" << ie <<
"," << ip <<
") " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
215 std::cout <<
"RecHitThr (" << ie <<
"," << ip <<
") " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
245 }
catch (std::runtime_error &
e) {
259 if (
ievt_ % 10 == 0 ) {
273 i02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me,
cloneME_,
i02_[ism-1] );
Cache logicID vector from database.
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > superModules_
virtual ~EBOccupancyClient()
Destructor.
EBOccupancyClient(const edm::ParameterSet &ps)
Constructor.
void setAvgEnergy(float energy)
void beginRun(void)
BeginRun.
void cleanup(void)
Cleanup.
Some "id" conversions.
void setEventsOverLowThreshold(int events)
static std::string sEB(const unsigned ism)
static unsigned icEB(const unsigned ism, const unsigned ix, const unsigned iy)
void beginJob(void)
BeginJob.
void analyze(void)
Analyze.
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Ecal Monitor Utils for Client.
void setEventsOverHighThreshold(int events)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
int ism(int ieta, int iphi)
void setCurrentFolder(const std::string &fullpath)