152 using namespace sistrip;
159 detIDs_( iConfig.getParameter< std::vector<uint32_t> >(
"detIDs")),
160 inputScopeModeRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputScopeModeRawDigiLabel" ) ),
161 inputPayloadRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputPayloadRawDigiLabel" ) ),
162 inputReorderedPayloadRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputReorderedPayloadRawDigiLabel" ) ),
163 inputReorderedModuleRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputReorderedModuleRawDigiLabel" ) ),
164 inputPedestalsLabel_( iConfig.getParameter<edm::InputTag>(
"InputPedestalsLabel" ) ),
165 inputNoisesLabel_( iConfig.getParameter<edm::InputTag>(
"InputNoisesLabel" ) ),
166 inputPostPedestalRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputPostPedestalRawDigiLabel" ) ),
167 inputPostCMRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputPostCMRawDigiLabel" ) ),
168 inputZeroSuppressedRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputZeroSuppressedRawDigiLabel" ) ),
169 inputZeroSuppressedDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputZeroSuppressedDigiLabel" ) ),
170 inputCompVirginRawDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputCompVirginRawDigiLabel" ) ),
171 inputCompZeroSuppressedDigiLabel_( iConfig.getParameter<edm::InputTag>(
"InputCompZeroSuppressedDigiLabel" ) ),
172 outputFolderName_( iConfig.getParameter<std::
string>(
"OutputFolderName" ) )
207 throw cms::Exception(
"Configuration") <<
"TFileService not available: did you configure it ?";
233 stringstream ev_dir_name;
234 ev_dir_name <<
"run" << iEvent.
id().
run() <<
"_event" << iEvent.
id().
event();
243 std::vector< edm::DetSet<SiStripDigi> >::const_iterator digis_it = czs_digis->begin();
244 for (; digis_it!=czs_digis->end(); ++digis_it) {
245 detIDs_.push_back(digis_it->detId());
251 std::vector< edm::DetSet<SiStripRawDigi> >::const_iterator digis_it = cvr_digis->begin();
252 for (; digis_it!=cvr_digis->end(); ++digis_it) {
253 detIDs_.push_back(digis_it->detId());
260 for (std::vector<uint32_t>::iterator d =
detIDs_.begin(); d!=
detIDs_.end(); ++d) {
262 const std::vector<const FedChannelConnection *> & conns = lCabling->getConnections( *d );
265 if (!(conns.size())) {
273 sss <<
"detID_" << *d;
277 for (uint32_t ch = 0; ch<conns.size(); ch++) {
280 stringstream ssss; ssss << sss.str() <<
"_APVpair_" << ch;
411 if (type==
SCOPE_MODE) hist = dir.
make<TH1S>(
"ScopeMode",
";Sample number;ADC counts / strip", 298, 0, 298);
412 else if (type==
PAYLOAD_RAW) hist = dir.
make<TH1S>(
"PayloadRaw",
";Sample number;ADC counts / strip", 256, 0, 256);
413 else if (type==
REORDERED_PAYLOAD_RAW) hist = dir.
make<TH1S>(
"ReorderedPayloadRaw",
";Sample number;ADC counts / strip", 256, 0, 256);
414 else if (type==
REORDERED_MODULE_RAW) hist = dir.
make<TH1S>(
"ReorderedModuleRaw",
";Sample number;ADC counts / strip", 768, 0, 768);
415 else if (type==
PEDESTAL_VALUES) hist = dir.
make<TH1S>(
"PedestalValues",
";Strip number;Pedestal / strip", 768, 0, 768);
416 else if (type==
POST_PEDESTAL) hist = dir.
make<TH1S>(
"PostPedestal",
";Strip number;ADC counts / strip", 768, 0, 768);
417 else if (type==
POST_COMMON_MODE) hist = dir.
make<TH1S>(
"PostCommonMode",
";Strip number;ADC counts / strip", 768, 0, 768);
418 else if (type==
ZERO_SUPPRESSED_PADDED) hist = dir.
make<TH1S>(
"ZeroSuppressedRaw" ,
";Strip number;ADC counts / strip", 768, 0, 768);
419 else if (type==
VR_COMP) hist = dir.
make<TH1S>(
"VirginRawCom" ,
";Strip number;ADC counts / strip", 768, 0, 768);
420 else {hist = 0;
return false;}
424 std::vector< edm::DetSet<SiStripRawDigi> >::const_iterator digis_it = digi_handle->find( specifier );
425 if (digis_it == digi_handle->end()) {
434 for ( ; idigi != digis_it->
data.end(); ++idigi ) {
436 hist->SetBinContent(count,static_cast<int>((*idigi).adc()));
450 if (type==
NOISE_VALUES) hist = dir.
make<TH1F>(
"NoiseValues",
";Strip number;Noise / strip",768, 0, 768);
458 std::vector< edm::DetSet<SiStripProcessedRawDigi> >::const_iterator digis_it = digi_handle->find( specifier );
459 if (digis_it == digi_handle->end()) {
468 for ( ; idigi != digis_it->
data.end(); ++idigi ) {
470 hist->SetBinContent(count,static_cast<float>((*idigi).adc()));
485 if (type==
ZERO_SUPPRESSED) hist = dir.
make<TH1S>(
"ZeroSuppressedDigi",
";Strip number;ADC counts / strip", 768, 0, 768);
486 else if (type==
ZERO_SUPPRESSED_COMP) hist = dir.
make<TH1S>(
"ZeroSuppressedDigiComp",
";Strip number;ADC counts / strip", 768, 0, 768);
487 else {hist = 0;
return false;}
490 std::vector< edm::DetSet<SiStripDigi> >::const_iterator digis_it = digi_handle->find( detID );
491 if (digis_it == digi_handle->end()) {
500 bool founddigi =
false;
501 for ( ; idigi != digis_it->
data.end(); ++idigi ) {
506 hist->SetBinContent( static_cast<int>(((*idigi).strip())) + 1,
static_cast<int>((*idigi).adc()) );
507 if ( (*idigi).adc() > 0 ) founddigi =
true;
edm::InputTag inputZeroSuppressedRawDigiLabel_
Label for the zero-suppressed, zero-padded RawDigi module input tag.
EventNumber_t event() const
edm::InputTag inputCompZeroSuppressedDigiLabel_
Zero-suppressed digis to compare (from mainline)
edm::InputTag inputPayloadRawDigiLabel_
Label for the virgin raw RawDigi collection input tag.
#define DEFINE_FWK_MODULE(type)
Bool_t MakeDigiHist_(const edm::Handle< edm::DetSetVector< SiStripDigi > > &digi_handle, uint32_t detID, const TFileDirectory &dir, FEDSpyHistogramType type)
const SiStripDetCabling * getDetCabling(const edm::EventSetup &)
Updates the det cabling object from the DB.
edm::InputTag inputReorderedPayloadRawDigiLabel_
Label for the re-ordered RawDigi module input tag.
static uint32_t fedIndex(const uint16_t &fed_id, const uint16_t &fed_ch)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::InputTag inputPostCMRawDigiLabel_
Label for the post-common mode subtraction RawDigi module input tag.
std::string outputFolderName_
Name for the folder in the TFileService file output.
SiStripSpyDisplayModule(const edm::ParameterSet &)
edm::InputTag inputPostPedestalRawDigiLabel_
Label for the post-pedestal subtraction RawDigi module input tag.
edm::InputTag inputCompVirginRawDigiLabel_
VR RawDigis to compare (from mainline)
~SiStripSpyDisplayModule()
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
edm::InputTag inputScopeModeRawDigiLabel_
Label for the scope-mode RawDigi collection input tag.
edm::InputTag inputNoisesLabel_
Label for the noises.
EDAnalyzer for the online monitoring of the FED using STT spy channel data.
edm::InputTag inputZeroSuppressedDigiLabel_
Guess what? It's the input label for the zero-suppressed digi.
T * make() const
make new ROOT object
sistrip::SpyUtilities utility_
Bool_t MakeRawDigiHist_(const edm::Handle< edm::DetSetVector< SiStripRawDigi > > &digi_handle, uint32_t specifier, const TFileDirectory &dir, FEDSpyHistogramType type)
edm::InputTag inputPedestalsLabel_
Label for the pedestals.
edm::InputTag inputReorderedModuleRawDigiLabel_
Label for the re-ordered RawDigi module input tag.
collection_type::const_iterator const_iterator
Bool_t MakeProcessedRawDigiHist_(const edm::Handle< edm::DetSetVector< SiStripProcessedRawDigi > > &digi_handle, uint32_t specifier, const TFileDirectory &dir, FEDSpyHistogramType type)
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
std::vector< uint32_t > detIDs_
Vector of detIDs that are of interest (config-specified).