CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
CastorRecHitPerChan Namespace Reference

Functions

template<class RecHit >
void perChanHists (const RecHit &rhit, std::map< HcalCastorDetId, MonitorElement * > &toolE, std::map< HcalCastorDetId, MonitorElement * > &toolT, DQMStore *dbe, std::string baseFolder)
 

Function Documentation

template<class RecHit >
void CastorRecHitPerChan::perChanHists ( const RecHit &  rhit,
std::map< HcalCastorDetId, MonitorElement * > &  toolE,
std::map< HcalCastorDetId, MonitorElement * > &  toolT,
DQMStore dbe,
std::string  baseFolder 
)
inline

Definition at line 152 of file CastorRecHitMonitor.cc.

References DQMStore::book1D(), MonitorElement::Fill(), mergeVDriftHistosByStation::name, DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

155  {
156 
157  std::map<HcalCastorDetId,MonitorElement*>::iterator _mei;
158 
159  std::string type = "CastorRecHitPerChannel";
160  if(dbe) dbe->setCurrentFolder(baseFolder+"/"+type);
161 
163  _mei=toolE.find(rhit.id()); //-- look for a histogram with this hit's id !!!
164  if (_mei!=toolE.end()){
165  if (_mei->second==0) return;
166  else _mei->second->Fill(rhit.energy()); //-- if it's there, fill it with energy
167  }
168  else{
169  if(dbe){
170  char name[1024];
171  sprintf(name,"CastorRecHit Energy zside=%d module=%d sector=%d", rhit.id().zside(), rhit.id().module(), rhit.id().sector());
172  toolE[rhit.id()] = dbe->book1D(name,name,60,-10,20);
173  toolE[rhit.id()]->Fill(rhit.energy());
174  }
175  }
176 
178  _mei=toolT.find(rhit.id()); //-- look for a histogram with this hit's id
179  if (_mei!=toolT.end()){
180  if (_mei->second==0) return;
181  else _mei->second->Fill(rhit.time()); //-- if it's there, fill it with time
182  }
183  else{
184  if(dbe){
185  char name[1024];
186  sprintf(name,"CastorRecHit Time zside=%d module=%d sector=%d", rhit.id().zside(), rhit.id().module(), rhit.id().sector());
187  toolT[rhit.id()] = dbe->book1D(name,name,200,-100,100);
188  toolT[rhit.id()]->Fill(rhit.time());
189  }
190  }
191 
192 
193  }
type
Definition: HCALResponse.h:21
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
void Fill(long long x)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667