16 dataTag_(conf.getParameter<edm::InputTag>(
"InputLabel")),
17 unpacker_(conf.getParameter<int>(
"CastorFirstFED"),conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"lastSample")),
18 ctdcunpacker_(conf.getParameter<int>(
"CastorFirstFED"),conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"lastSample")),
19 filter_(conf.getParameter<bool>(
"FilterDataQuality"),conf.getParameter<bool>(
"FilterDataQuality"),
false,0,0,-1),
20 fedUnpackList_(conf.getUntrackedParameter<std::vector<int> >(
"FEDs",std::vector<int>())),
21 firstFED_(conf.getParameter<int>(
"CastorFirstFED")),
22 complainEmptyData_(conf.getUntrackedParameter<bool>(
"ComplainEmptyData",
false)),
23 usingctdc_(conf.getParameter<bool>(
"CastorCtdc")),
24 unpackTTP_(conf.getParameter<bool>(
"UnpackTTP")),
25 silent_(conf.getUntrackedParameter<bool>(
"silent",
true)),
26 usenominalOrbitMessageTime_(conf.getParameter<bool>(
"UseNominalOrbitMessageTime")),
27 expectedOrbitMessageTime_(conf.getParameter<int>(
"ExpectedOrbitMessageTime"))
36 std::ostringstream
ss;
39 edm::LogInfo(
"CASTOR") <<
"CastorRawToDigi will unpack FEDs ( " << ss.str() <<
")";
42 produces<CastorDigiCollection>();
43 produces<CastorTrigPrimDigiCollection>();
44 produces<HcalUnpackerReport>();
46 produces<HcalTTPDigiCollection>();
67 std::vector<CastorDataFrame> castor;
68 std::vector<HcalTTPDigi> ttp;
69 std::vector<CastorTriggerPrimitiveDigi> htp;
86 }
else if (fed.
size()<8*3) {
96 report->addUnpacked(*
i);
102 report->addError(*
i);
111 castor_prod->swap_contents(castor);
112 htp_prod->swap_contents(htp);
118 castor_prod->
swap(filtered_castor);
131 prod->swap_contents(ttp);
140 if ( irun.
run() > 132640 ) {
142 }
else if ( irun.
run() > 132174 ) {
144 }
else if ( irun.
run() > 124371 ) {
146 }
else if ( irun.
run() > 123984 ) {
148 }
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.
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
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