LDMX Software
Classes | Functions
EcalAbstractID.h File Reference

Class that serves as a parent for ECal detector IDs of various types. More...

#include "DetDescr/DetectorID.h"

Go to the source code of this file.

Classes

class  ldmx::EcalAbstractID
 Parent of precision and trigger EcalIDs. More...
 

Functions

std::ostream & operator<< (std::ostream &s, const ldmx::EcalAbstractID &id)
 

Detailed Description

Class that serves as a parent for ECal detector IDs of various types.

Author
Jeremiah Mans, University of Minnesota

Definition in file EcalAbstractID.h.

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  s,
const ldmx::EcalAbstractID id 
)

Definition at line 8 of file EcalAbstractID.cxx.

8 {
9 switch (id.cell_type()) {
10 case (ldmx::EcalAbstractID::PrecisionGlobal):
11 return s << ldmx::EcalID(id);
12 case (ldmx::EcalAbstractID::TriggerCell):
13 return s << ldmx::EcalTriggerID(id);
14 default:
15 return s << "EcalAbstractID(" << id.cell_type() << ":0x"
16 << std::setfill('0') << std::setw(6) << std::right << std::hex
17 << id.payload();
18 }
19}
Extension of DetectorID providing access to ECal layers and cell numbers in a hex grid.
Definition EcalID.h:20
Extension of DetectorID providing access to ECal trigger cell information.