Main Page
Namespaces
Classes
Package Documentation
DataFormats
HcalDetId
src
HcalOtherDetId.cc
Go to the documentation of this file.
1
#include "
DataFormats/HcalDetId/interface/HcalOtherDetId.h
"
2
#include "
FWCore/Utilities/interface/Exception.h
"
3
#include <iostream>
4
HcalOtherDetId::HcalOtherDetId
() {
5
}
6
7
HcalOtherDetId::HcalOtherDetId
(uint32_t rawid) :
DetId
(rawid) {
8
}
9
10
HcalOtherDetId::HcalOtherDetId
(
HcalOtherSubdetector
other_type)
11
:
DetId
(
Hcal
,
HcalOther
) {
12
id_
|= (
int
(other_type&0x1F)<<20);
13
}
14
15
HcalOtherDetId::HcalOtherDetId
(
const
DetId
&
gen
) {
16
if
(gen.
det
()!=
Hcal
|| gen.
subdetId
()!=
HcalOther
) {
17
throw
cms::Exception
(
"Invalid DetId"
) <<
"Cannot initialize HcalOtherDetId from "
<< std::hex << gen.
rawId
() <<
std::dec
;
18
}
19
id_
=gen.
rawId
();
20
}
21
22
HcalOtherDetId
&
HcalOtherDetId::operator=
(
const
DetId
&
gen
) {
23
if
(gen.
det
()!=
Hcal
|| gen.
subdetId
()!=
HcalOther
) {
24
throw
cms::Exception
(
"Invalid DetId"
) <<
"Cannot assign HcalOtherDetId from "
<< std::hex << gen.
rawId
() <<
std::dec
;
25
}
26
id_
=gen.
rawId
();
27
return
*
this
;
28
}
29
30
31
DetId::Hcal
Definition:
DetId.h:24
HcalOtherDetId::HcalOtherDetId
HcalOtherDetId()
Definition:
HcalOtherDetId.cc:4
Exception
Definition:
hltDiff.cc:292
HcalOtherDetId::operator=
HcalOtherDetId & operator=(const DetId &id)
Definition:
HcalOtherDetId.cc:22
DetId::rawId
uint32_t rawId() const
get the raw id
Definition:
DetId.h:44
HcalOtherDetId
Definition:
HcalOtherDetId.h:22
createfilelist.int
int
Definition:
createfilelist.py:10
HcalOtherSubdetector
HcalOtherSubdetector
Definition:
HcalAssistant.h:32
gen
Definition:
PythiaDecays.h:13
DetId::subdetId
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Definition:
DetId.h:38
DetId
Definition:
DetId.h:18
Exception.h
DetId::id_
uint32_t id_
Definition:
DetId.h:56
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:141
HcalOtherDetId.h
DetId::det
Detector det() const
get the detector field from this detid
Definition:
DetId.h:36
HcalOther
Definition:
HcalAssistant.h:31
Generated for CMSSW Reference Manual by
1.8.11