CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
EcalDCCHeaderDisplay Class Reference

#include <EcalDCCHeaderDisplay.h>

Inheritance diagram for EcalDCCHeaderDisplay:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 EcalDCCHeaderDisplay (const edm::ParameterSet &ps)
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Attributes

const edm::EDGetTokenT< EcalRawDataCollectionEcalDCCHeaderCollection_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

module for displaying unpacked DCCHeader information

Author
A. Ghezzi
S. Cooper
G. Franzoni

Definition at line 18 of file EcalDCCHeaderDisplay.h.

Constructor & Destructor Documentation

◆ EcalDCCHeaderDisplay()

EcalDCCHeaderDisplay::EcalDCCHeaderDisplay ( const edm::ParameterSet iConfig)

module for displaying unpacked DCCHeader information

Author
A. Ghezzi
S. Cooper
G. Franzoni

Definition at line 14 of file EcalDCCHeaderDisplay.cc.

16  consumes<EcalRawDataCollection>(iConfig.getParameter<edm::InputTag>("EcalDCCHeaderCollection"))) {}
const edm::EDGetTokenT< EcalRawDataCollection > EcalDCCHeaderCollection_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Function Documentation

◆ analyze()

void EcalDCCHeaderDisplay::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 18 of file EcalDCCHeaderDisplay.cc.

References edm::SortedCollection< T, SORT >::begin(), EcalDCCHeaderBlock::EcalDCCEventSettings::delay, MillePedeFileConverter_cfg::e, EcalDCCHeaderCollection_, edm::SortedCollection< T, SORT >::end(), dqmdumpme::k, GetRecoTauVFromDQM_MC_cff::kk, EcalDCCHeaderBlock::EcalDCCEventSettings::LaserFilter, EcalDCCHeaderBlock::EcalDCCEventSettings::LaserPower, EcalDCCHeaderBlock::EcalDCCEventSettings::MEMVinj, EcalDCCHeaderBlock::EcalDCCEventSettings::mgpa_content, EcalDCCHeaderBlock::EcalDCCEventSettings::ped_offset, edm::SortedCollection< T, SORT >::size(), optionsL1T::skip, and EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength.

18  {
19  const edm::Handle<EcalRawDataCollection>& DCCHeaders = e.getHandle(EcalDCCHeaderCollection_);
20 
21  edm::LogVerbatim("EcalTools") << "\n\n ^^^^^^^^^^^^^^^^^^ [EcalDCCHeaderDisplay] DCCHeaders collection size "
22  << DCCHeaders->size() << std::endl;
23  edm::LogVerbatim("EcalTools") << " [EcalDCCHeaderDisplay] the Header(s)\n" << std::endl;
24  //short dumpConter =0;
25 
26  for (EcalRawDataCollection::const_iterator headerItr = DCCHeaders->begin(); headerItr != DCCHeaders->end();
27  ++headerItr) {
28  // int nevt =headerItr->getLV1();
29  bool skip = false;
30 
31  if (skip) {
32  continue;
33  }
34  edm::LogVerbatim("EcalTools") << "######################################################################";
35  edm::LogVerbatim("EcalTools") << "FedId: " << headerItr->fedId();
36 
37  edm::LogVerbatim("EcalTools") << "DCCErrors: " << headerItr->getDCCErrors();
38  edm::LogVerbatim("EcalTools") << "Run Number: " << headerItr->getRunNumber();
39  edm::LogVerbatim("EcalTools") << "Event number (LV1): " << headerItr->getLV1();
40  edm::LogVerbatim("EcalTools") << "Orbit: " << headerItr->getOrbit();
41  edm::LogVerbatim("EcalTools") << "BX: " << headerItr->getBX();
42  edm::LogVerbatim("EcalTools") << "TRIGGER TYPE: " << headerItr->getBasicTriggerType();
43 
44  edm::LogVerbatim("EcalTools") << "RUNTYPE: " << headerItr->getRunType();
45  edm::LogVerbatim("EcalTools") << "Half: " << headerItr->getRtHalf();
46  edm::LogVerbatim("EcalTools") << "DCCIdInTCCCommand: " << headerItr->getDccInTCCCommand();
47  edm::LogVerbatim("EcalTools") << "MGPA gain: " << headerItr->getMgpaGain();
48  edm::LogVerbatim("EcalTools") << "MEM gain: " << headerItr->getMemGain();
49  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
50  edm::LogVerbatim("EcalTools") << "LaserPower: " << settings.LaserPower;
51  edm::LogVerbatim("EcalTools") << "LAserFilter: " << settings.LaserFilter;
52  edm::LogVerbatim("EcalTools") << "Wavelenght: " << settings.wavelength;
53  edm::LogVerbatim("EcalTools") << "delay: " << settings.delay;
54  edm::LogVerbatim("EcalTools") << "MEM Vinj: " << settings.MEMVinj;
55  edm::LogVerbatim("EcalTools") << "MGPA content: " << settings.mgpa_content;
56  edm::LogVerbatim("EcalTools") << "Ped offset dac: " << settings.ped_offset;
57 
58  edm::LogVerbatim("EcalTools") << "Selective Readout: " << headerItr->getSelectiveReadout();
59  edm::LogVerbatim("EcalTools") << "ZS: " << headerItr->getZeroSuppression();
60  edm::LogVerbatim("EcalTools") << "TZS: " << headerItr->getTestZeroSuppression();
61  edm::LogVerbatim("EcalTools") << "SRStatus: " << headerItr->getSrpStatus();
62 
63  std::vector<short> TCCStatus = headerItr->getTccStatus();
64  edm::LogVerbatim("EcalTools") << "TCC Status size: " << TCCStatus.size();
65  std::ostringstream st0;
66  st0 << "TCC Status: ";
67  for (unsigned u = 0; u < TCCStatus.size(); u++) {
68  st0 << TCCStatus[u] << " ";
69  }
70  edm::LogVerbatim("EcalTools") << st0.str();
71 
72  std::vector<short> TTStatus = headerItr->getFEStatus();
73  edm::LogVerbatim("EcalTools") << "TT Status size: " << TTStatus.size() << std::endl;
74  std::ostringstream st1[100];
75  int k(0), kk(0);
76  st1[k] << "TT Statuses: ";
77  for (unsigned u = 0; u < TTStatus.size(); u++) {
78  ++kk;
79  if (!(u % 14)) {
80  edm::LogVerbatim("EcalTools") << st1[k].str(); // TODO: add space after first six in a row
81  ++k;
82  kk = 0;
83  }
84  st1[k] << TTStatus[u] << " ";
85  }
86  if (kk > 0)
87  edm::LogVerbatim("EcalTools") << st1[k].str();
88  edm::LogVerbatim("EcalTools") << "\n######################################################################";
89  ;
90  }
91 }
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< EcalRawDataCollection > EcalDCCHeaderCollection_
size_type size() const
std::vector< T >::const_iterator const_iterator
const_iterator begin() const
const_iterator end() const

Member Data Documentation

◆ EcalDCCHeaderCollection_

const edm::EDGetTokenT<EcalRawDataCollection> EcalDCCHeaderDisplay::EcalDCCHeaderCollection_
private

Definition at line 26 of file EcalDCCHeaderDisplay.h.

Referenced by analyze().