21 dataTag_(conf.getParameter<
edm::InputTag>(
"InputLabel")),
22 unpacker_(conf.getParameter<
int>(
"CastorFirstFED"),conf.getParameter<
int>(
"firstSample"),conf.getParameter<
int>(
"lastSample")),
23 zdcunpacker_(conf.getParameter<
int>(
"CastorFirstFED"),conf.getParameter<
int>(
"firstSample"),conf.getParameter<
int>(
"lastSample")),
24 ctdcunpacker_(conf.getParameter<
int>(
"CastorFirstFED"),conf.getParameter<
int>(
"firstSample"),conf.getParameter<
int>(
"lastSample")),
25 filter_(conf.getParameter<bool>(
"FilterDataQuality"),conf.getParameter<bool>(
"FilterDataQuality"),
false,0,0,-1),
26 fedUnpackList_(conf.getUntrackedParameter<
std::vector<
int> >(
"FEDs",
std::vector<
int>())),
27 firstFED_(conf.getParameter<
int>(
"CastorFirstFED")),
28 complainEmptyData_(conf.getUntrackedParameter<bool>(
"ComplainEmptyData",
false)),
29 usingctdc_(conf.getParameter<bool>(
"CastorCtdc")),
30 unpackTTP_(conf.getParameter<bool>(
"UnpackTTP")),
31 unpackZDC_(conf.getParameter<bool>(
"UnpackZDC")),
32 silent_(conf.getUntrackedParameter<bool>(
"silent",
true)),
33 usenominalOrbitMessageTime_(conf.getParameter<bool>(
"UseNominalOrbitMessageTime")),
34 expectedOrbitMessageTime_(conf.getParameter<
int>(
"ExpectedOrbitMessageTime"))
43 std::ostringstream ss;
46 edm::LogInfo(
"CASTOR") <<
"CastorRawToDigi will unpack FEDs ( " << ss.str() <<
")";
49 produces<CastorDigiCollection>();
50 produces<ZDCDigiCollection>();
51 produces<CastorTrigPrimDigiCollection>();
52 produces<HcalUnpackerReport>();
54 produces<HcalTTPDigiCollection>();
75 std::vector<CastorDataFrame>
castor;
76 std::vector<ZDCDataFrame>
zdc;
77 std::vector<HcalTTPDigi> ttp;
78 std::vector<CastorTriggerPrimitiveDigi> htp;
80 auto report = std::make_unique<HcalUnpackerReport>();
90 const int fed722size = fed722.
size();
92 const int fed693size = fed693.
size();
96 if (*
i == 693 && fed693size == 0 && fed722size != 0)
98 if (*
i == 722 && fed722size == 0 && fed693size != 0)
101 if (*
i!=693 && *
i!=722)
111 else if (fed.
size()<8*3)
179 auto castor_prod = std::make_unique<CastorDigiCollection>();
180 auto htp_prod = std::make_unique<CastorTrigPrimDigiCollection>();
182 castor_prod->swap_contents(castor);
183 htp_prod->swap_contents(htp);
189 castor_prod->
swap(filtered_castor);
199 auto zdc_prod = std::make_unique<ZDCDigiCollection>();
200 zdc_prod->swap_contents(zdc);
210 auto prod = std::make_unique<HcalTTPDigiCollection>();
211 prod->swap_contents(ttp);
220 if ( irun.
run() > 132640 ) {
222 }
else if ( irun.
run() > 132174 ) {
224 }
else if ( irun.
run() > 124371 ) {
226 }
else if ( irun.
run() > 123984 ) {
228 }
else if ( irun.
run() > 123584 ) {
virtual char const * what() const
CastorDataFrameFilter filter_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CastorDigiCollection filter(const CastorDigiCollection &incol, HcalUnpackerReport &r)
filter Castor data frames
void swap(SortedCollection &other)
CastorCtdcUnpacker ctdcunpacker_
std::vector< int > fedUnpackList_
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
size_t size() const
Lenght of the data buffer in bytes.
void unpack(const FEDRawData &raw, const CastorElectronicsMap &emap, CastorRawCollections &conts, HcalUnpackerReport &report, bool silent=false)
For histograms, no begin and end.
edm::EDGetTokenT< FEDRawDataCollection > tok_input_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void unpack(const FEDRawData &raw, const CastorElectronicsMap &emap, CastorRawCollections &conts, HcalUnpackerReport &report)
void setExpectedOrbitMessageTime(int time)
bool active() const
whether any filters are on
virtual ~CastorRawToDigi()
CastorRawToDigi(const edm::ParameterSet &ps)
std::vector< CastorDataFrame > * castorCont
const CastorElectronicsMap * getCastorMapping() const
void unpack(const FEDRawData &raw, const CastorElectronicsMap &emap, CastorRawCollections &conts, HcalUnpackerReport &report, bool silent=false)
For histograms, no begin and end.
int expectedOrbitMessageTime_
bool usenominalOrbitMessageTime_
virtual void produce(edm::Event &e, const edm::EventSetup &c) override