16 dataTag_(conf.getParameter<edm::InputTag>(
"InputLabel")),
17 unpacker_(conf.getUntrackedParameter<int>(
"CastorFirstFED",
FEDNumbering::MINCASTORFEDID),conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"lastSample")),
18 ctdcunpacker_(conf.getUntrackedParameter<int>(
"CastorFirstFED",
FEDNumbering::MINCASTORFEDID),conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"lastSample")),
19 filter_(conf.getParameter<bool>(
"FilterDataQuality"),conf.getParameter<bool>(
"FilterDataQuality"),
23 fedUnpackList_(conf.getUntrackedParameter<std::vector<int> >(
"FEDs", std::vector<int>())),
24 firstFED_(conf.getUntrackedParameter<int>(
"CastorFirstFED",
FEDNumbering::MINCASTORFEDID)),
26 complainEmptyData_(conf.getUntrackedParameter<bool>(
"ComplainEmptyData",
false)),
27 usingctdc_(conf.getUntrackedParameter<bool>(
"CastorCtdc",
false)),
28 unpackTTP_(conf.getUntrackedParameter<bool>(
"UnpackTTP",
false)),
29 silent_(conf.getUntrackedParameter<bool>(
"silent",
true)),
30 usenominalOrbitMessageTime_(conf.getUntrackedParameter<bool>(
"UseNominalOrbitMessageTime",
true)),
31 expectedOrbitMessageTime_(conf.getUntrackedParameter<int>(
"ExpectedOrbitMessageTime",-1))
40 std::ostringstream ss;
43 edm::LogInfo(
"CASTOR") <<
"CastorRawToDigi will unpack FEDs ( " << ss.str() <<
")";
46 produces<CastorDigiCollection>();
47 produces<CastorTrigPrimDigiCollection>();
48 produces<HcalUnpackerReport>();
50 produces<HcalTTPDigiCollection>();
72 std::vector<CastorDataFrame> castor;
73 std::vector<HcalTTPDigi> ttp;
74 std::vector<CastorTriggerPrimitiveDigi> htp;
92 }
else if (fed.
size()<8*3) {
102 report->addUnpacked(*
i);
105 report->addError(*
i);
108 report->addError(*
i);
117 castor_prod->swap_contents(castor);
118 htp_prod->swap_contents(htp);
124 castor_prod->
swap(filtered_castor);
144 prod->swap_contents(ttp);
153 if ( irun.
run() > 132640 ) {
155 }
else if ( irun.
run() > 132174 ) {
157 }
else if ( irun.
run() > 124371 ) {
159 }
else if ( irun.
run() > 123984 ) {
161 }
else if ( irun.
run() > 123584 ) {
virtual char const * what() const
CastorDataFrameFilter filter_
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.
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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
edm::SortedCollection< CastorTriggerPrimitiveDigi > CastorTrigPrimDigiCollection
std::vector< HcalTTPDigi > * ttp