22 dataTag_(conf.getParameter<edm::
InputTag>(
"InputLabel")),
23 unpacker_(conf.getParameter<int>(
"CastorFirstFED"),conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"lastSample")),
24 zdcunpacker_(conf.getParameter<int>(
"CastorFirstFED"),conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"lastSample")),
25 ctdcunpacker_(conf.getParameter<int>(
"CastorFirstFED"),conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"lastSample")),
26 filter_(conf.getParameter<bool>(
"FilterDataQuality"),conf.getParameter<bool>(
"FilterDataQuality"),
false,0,0,-1),
27 fedUnpackList_(conf.getUntrackedParameter<std::vector<int> >(
"FEDs",std::vector<int>())),
28 firstFED_(conf.getParameter<int>(
"CastorFirstFED")),
29 complainEmptyData_(conf.getUntrackedParameter<bool>(
"ComplainEmptyData",
false)),
30 usingctdc_(conf.getParameter<bool>(
"CastorCtdc")),
31 unpackTTP_(conf.getParameter<bool>(
"UnpackTTP")),
32 unpackZDC_(conf.getParameter<bool>(
"UnpackZDC")),
33 silent_(conf.getUntrackedParameter<bool>(
"silent",
true)),
34 usenominalOrbitMessageTime_(conf.getParameter<bool>(
"UseNominalOrbitMessageTime")),
35 expectedOrbitMessageTime_(conf.getParameter<int>(
"ExpectedOrbitMessageTime"))
44 std::ostringstream
ss;
47 edm::LogInfo(
"CASTOR") <<
"CastorRawToDigi will unpack FEDs ( " << ss.str() <<
")";
50 produces<CastorDigiCollection>();
51 produces<ZDCDigiCollection>();
52 produces<CastorTrigPrimDigiCollection>();
53 produces<HcalUnpackerReport>();
55 produces<HcalTTPDigiCollection>();
76 std::vector<CastorDataFrame> castor;
77 std::vector<ZDCDataFrame> zdc;
78 std::vector<HcalTTPDigi> ttp;
79 std::vector<CastorTriggerPrimitiveDigi> htp;
90 const FEDRawData& fed722 = rawraw->FEDData(722);
91 const int fed722size = fed722.
size();
92 const FEDRawData& fed693 = rawraw->FEDData(693);
93 const int fed693size = fed693.
size();
97 if (*
i == 693 && fed693size == 0 && fed722size != 0)
99 if (*
i == 722 && fed722size == 0 && fed693size != 0)
102 if (*
i!=693 && *
i!=722)
109 report->addError(*
i);
112 else if (fed.
size()<8*3)
115 report->addError(*
i);
129 report->addUnpacked(*
i);
134 report->addError(*
i);
138 report->addError(*
i);
150 report->addError(*
i);
156 report->addUnpacked(*
i);
167 report->addError(*
i);
173 report->addUnpacked(*
i);
183 castor_prod->swap_contents(castor);
184 htp_prod->swap_contents(htp);
190 castor_prod->
swap(filtered_castor);
201 zdc_prod->swap_contents(zdc);
212 prod->swap_contents(ttp);
221 if ( irun.
run() > 132640 ) {
223 }
else if ( irun.
run() > 132174 ) {
225 }
else if ( irun.
run() > 124371 ) {
227 }
else if ( irun.
run() > 123984 ) {
229 }
else if ( irun.
run() > 123584 ) {
virtual char const * what() const
CastorDataFrameFilter filter_
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.
std::vector< ZDCDataFrame > * zdcCont
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
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_
void unpack(const FEDRawData &raw, const CastorElectronicsMap &emap, CastorRawCollections &conts, HcalUnpackerReport &report)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void setExpectedOrbitMessageTime(int time)
bool active() const
whether any filters are on
virtual ~CastorRawToDigi()
CastorRawToDigi(const edm::ParameterSet &ps)
std::vector< CastorDataFrame > * castorCont
std::vector< CastorTriggerPrimitiveDigi > * tpCont
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_
edm::SortedCollection< HcalTTPDigi > HcalTTPDigiCollection
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
edm::SortedCollection< CastorDataFrame > CastorDigiCollection
volatile std::atomic< bool > shutdown_flag false
edm::SortedCollection< CastorTriggerPrimitiveDigi > CastorTrigPrimDigiCollection
std::vector< HcalTTPDigi > * ttp