#include <CaloCellGroup.h>
Definition at line 59 of file CaloCellGroup.h.
◆ CaloCellGroupList()
| CaloCellGroupList::CaloCellGroupList |
( |
| ) |
|
|
inline |
◆ dump()
Definition at line 284 of file CaloCellGroup.cxx.
284 {
285
286 std::cout << "Definitions: " << std::endl;
288 std::cout <<
"Group " <<
i <<
":" << std::endl;
290 }
291 std::cout << "Results: "<< std::endl;
292 for (
const Identifier&
id : caloCellId->
cell_range()) {
295 std::cout << " [";
296 for (std::size_t i=0;
i<
x.size();
i++)
297 std::cout <<
x[i] <<
" ";
298 std::cout << "]" << std::endl;
299 }
300 }
std::vector< CaloCellGroup > m_groups
const std::vector< float > & valuesForCell(const Identifier id)
std::string show_to_string(const Identifier id, const IdContext *context=0, char sep='.') const
id_range cell_range() const
Range over full set of Identifiers (LAr + Tiles)
◆ getDefaults()
| const std::vector< float > & CaloCellGroupList::getDefaults |
( |
| ) |
const |
|
inline |
◆ printDef()
| void CaloCellGroupList::printDef |
( |
| ) |
const |
Definition at line 302 of file CaloCellGroup.cxx.
302 {
303 std::cout << "Definitions: " << std::endl;
305 std::cout <<
"Group " <<
i <<
":" << std::endl;
307 }
308
309
310
311}
◆ setDefinition()
| bool CaloCellGroupList::setDefinition |
( |
const CaloCell_Base_ID * | caloCellId, |
|
|
const std::vector< std::string > & | definitions, |
|
|
MsgStream & | logStr ) |
Definition at line 226 of file CaloCellGroup.cxx.
227 {
228
231
232 if (definitions.empty()) {
233 logStr << MSG::WARNING <<
"No definition string found" <<
endmsg;
234 return true;
235 }
236
237
238 const std::string& defaultValueStr=definitions[0];
239
240 const char* ptr1=defaultValueStr.c_str();
241 char* ptr2;
243
244 do {
246 if (ptr1!=ptr2)
248 ptr1=const_cast<const char*>(ptr2+1);
249 }
250 while(*ptr2!='\0');
251
252
253 m_groups.resize(definitions.size()-1);
255 bool s=
m_groups[
i].setDefinition(caloCellId,definitions[i+1],logStr);
256 if (!s) return false;
258 logStr << MSG::ERROR <<
"Incosistent number of values!" <<
endmsg;
259 return false;
260 }
261 }
263 return true;
264}
bool strtof(const std::string &input, T &f)
◆ valuesForCell()
| const std::vector< float > & CaloCellGroupList::valuesForCell |
( |
const Identifier | id | ) |
|
Definition at line 267 of file CaloCellGroup.cxx.
267 {
269
271 }
272
274
275 std::vector<CaloCellGroup>::const_iterator
it=
m_groups.begin();
276 std::vector<CaloCellGroup>::const_iterator it_e=
m_groups.end();
277 for(;
it!=it_e;++
it) {
278
279 if (
it->inGroup(
id))
result=&(
it->getValue());
280 }
282}
◆ m_defaults
| std::vector<float> CaloCellGroupList::m_defaults |
|
private |
◆ m_groups
◆ m_initialized
| bool CaloCellGroupList::m_initialized |
|
private |
The documentation for this class was generated from the following files: