CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
test::GlobalNumbersAnalysis Class Reference
Inheritance diagram for test::GlobalNumbersAnalysis:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const Event &e, const EventSetup &c)
 
 GlobalNumbersAnalysis (const ParameterSet &pset)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Definition at line 32 of file testGlobalNumbers.cc.

Constructor & Destructor Documentation

test::GlobalNumbersAnalysis::GlobalNumbersAnalysis ( const ParameterSet pset)
inline

Definition at line 35 of file testGlobalNumbers.cc.

35  {
36  }

Member Function Documentation

void test::GlobalNumbersAnalysis::analyze ( const Event e,
const EventSetup c 
)
inlinevirtual

Implements edm::EDAnalyzer.

Definition at line 39 of file testGlobalNumbers.cc.

References evf::evtn::TCDSL1AHistory::l1a::bxid, gather_cfg::cout, FEDRawData::data(), AlCaHLTBitMon_QueryRunRegistry::data, TauDecayModes::dec, edm::EventID::event(), evf::evtn::evm_board_sense(), edm::EventBase::experimentType(), evf::evtn::get(), edm::Event::getByLabel(), evf::evtn::getfdlbx(), evf::evtn::getfdlpsc(), evf::evtn::getgpshigh(), evf::evtn::getgpslow(), evf::evtn::getlbn(), evf::evtn::getorbit(), test::GTEVMId, evf::evtn::gtpe_board_sense(), evf::evtn::gtpe_get(), evf::evtn::gtpe_getbx(), evf::evtn::gtpe_getlbn(), evf::evtn::gtpe_getorbit(), test::GTPEId, i, edm::EventBase::id(), edm::EventBase::luminosityBlock(), FEDNumbering::MINTCDSuTCAFEDID, evf::evtn::TCDSL1AHistory::l1a::orbithigh, evf::evtn::TCDSL1AHistory::l1a::orbitlow, lumiPlot::rawdata, record, edm::EventID::run(), FEDRawData::size(), and findQualityFiles::size.

39  {
40  cout << "--- Run: " << e.id().run()
41  << " LS: " << e.luminosityBlock()
42  << " Event: " << e.id().event()
43  << " Type: " << e.experimentType() << endl;
45  e.getByLabel("source",rawdata);
46  const FEDRawData& data = rawdata->FEDData(GTEVMId);
47  size_t size=data.size();
48 
49  if (size>0 ) {
50  cout << "FED# " << setw(4) << GTEVMId << " " << setw(8) << size << " bytes " << endl;
52  {
53  cout << "FED# " << setw(4) << GTEVMId << " is the real GT EVM block " << endl;
54  cout << "Event # " << evf::evtn::get(data.data(),true) << endl;
55  cout << "LS # " << evf::evtn::getlbn(data.data()) << endl;
56  cout << "ORBIT # " << evf::evtn::getorbit(data.data()) << endl;
57  cout << "GPS LOW # " << evf::evtn::getgpslow(data.data()) << endl;
58  cout << "GPS HI # " << evf::evtn::getgpshigh(data.data()) << endl;
59  cout << "BX FROM FDL 0-xing # " << evf::evtn::getfdlbx(data.data()) << endl;
60  cout << "PRESCALE INDEX FROM FDL 0-xing # " << evf::evtn::getfdlpsc(data.data()) << endl;
61  }
62  }
63 
64  const FEDRawData& data2 = rawdata->FEDData(GTPEId);
65  size=data2.size();
66 
67  if (size>0 ) {
68  cout << "FED# " << setw(4) << GTPEId << " " << setw(8) << size << " bytes " << endl;
70  {
71  cout << "FED# " << setw(4) << GTPEId << " is the real GTPE block " << endl;
72  cout << "Event # " << evf::evtn::gtpe_get(data2.data()) << endl;
73  cout << "LS # " << evf::evtn::gtpe_getlbn(data2.data()) << endl;
74  cout << "ORBIT # " << evf::evtn::gtpe_getorbit(data2.data()) << endl;
75  cout << "BX # " << evf::evtn::gtpe_getbx(data2.data()) << endl;
76  }
77  }
78 
79  const FEDRawData& data3 = rawdata->FEDData(FEDNumbering::MINTCDSuTCAFEDID);
80  size=data3.size();
81 
82  if (size>0 ) {
84  cout << "FED# " << setw(4) << FEDNumbering::MINTCDSuTCAFEDID << " "
85  << setw(8) << size << " bytes " << endl;
86  cout << "sizes: "
87  << " BGOSize " << std::hex << (unsigned int) record.getHeader().getSizes().size.BGOSize
88  << " reserved2;" << std::hex <<(unsigned int)record.getHeader().getSizes().size.reserved2
89  << " reserved1;" << std::hex <<(unsigned int) record.getHeader().getSizes().size.reserved1
90  << " reserved0;" << std::hex <<(unsigned int)record.getHeader().getSizes().size.reserved0
91  << " BSTSize;" << std::hex <<(unsigned int)record.getHeader().getSizes().size.BSTSize
92  << " L1AhistSize;" << std::hex <<(unsigned int)record.getHeader().getSizes().size.L1AhistSize
93  << " summarySize;" << std::hex <<(unsigned int)record.getHeader().getSizes().size.summarySize
94  << " headerSize;" << std::hex << (unsigned int)record.getHeader().getSizes().size.headerSize
95  << std::endl;
96 
97  std::cout << "macAddress; "
98  << hex << (uint64_t)record.getHeader().getData().header.macAddress;
99  std::cout << "\n";
100  std::cout << "sw; "
101  << hex << (unsigned int)record.getHeader().getData().header.sw;
102  std::cout << "\n";
103  std::cout << "fw; "
104  << hex <<(unsigned int)record.getHeader().getData().header.fw;
105  std::cout << "\n";
106  std::cout << "reserved0; "
107  << hex <<(unsigned int)record.getHeader().getData().header.reserved0;
108  std::cout << "\n";
109  std::cout << "format; "
110  << hex <<(unsigned int)record.getHeader().getData().header.format;
111  std::cout << "\n";
112  std::cout << "runNumber; "
113  << dec << (unsigned int)record.getHeader().getData().header.runNumber;
114  std::cout << "\n";
115  std::cout << "reserved1; "
116  << hex <<(unsigned int)record.getHeader().getData().header.reserved1;
117  std::cout << "\n";
118  std::cout << "activePartitions2; "
119  << hex <<(unsigned int)record.getHeader().getData().header.activePartitions2;
120  std::cout << "\n";
121  std::cout << "reserved2; "
122  << hex <<(unsigned int)record.getHeader().getData().header.reserved2;
123  std::cout << "\n";
124  std::cout << "activePartitions0; "
125  << hex << (unsigned int)record.getHeader().getData().header.activePartitions0;
126  std::cout << "\n";
127  std::cout << "activePartitions1; "
128  << hex <<(unsigned int)record.getHeader().getData().header.activePartitions1;
129  std::cout << "\n";
130  std::cout << "nibble; "
131  << dec << (unsigned int)record.getHeader().getData().header.nibble;
132  std::cout << "\n";
133  std::cout << "lumiSection; "
134  << dec << (unsigned int)record.getHeader().getData().header.lumiSection;
135  std::cout << "\n";
136  std::cout << "nibblesPerLumiSection;"
137  << hex <<(unsigned int)record.getHeader().getData().header.nibblesPerLumiSection;
138  std::cout << "\n";
139  std::cout << "triggerTypeFlags; "
140  << hex <<(unsigned int)record.getHeader().getData().header.triggerTypeFlags;
141  std::cout << "\n";
142  std::cout << "reserved5; "
143  << hex <<(unsigned int)record.getHeader().getData().header.reserved5;
144  std::cout << "\n";
145  std::cout << "inputs; "
146  << hex <<(unsigned int)record.getHeader().getData().header.inputs;
147  std::cout << "\n";
148  std::cout << "bcid; "
149  << dec << (unsigned int)record.getHeader().getData().header.bcid;
150  std::cout << "\n";
151  std::cout << "orbitLow; "
152  << dec << (unsigned int)record.getHeader().getData().header.orbitLow;
153  std::cout << "\n";
154  std::cout << "orbitHigh; "
155  << dec << (unsigned int)record.getHeader().getData().header.orbitHigh;
156  std::cout << "\n";
157  std::cout << "triggerCount; "
158  << dec << (uint64_t)record.getHeader().getData().header.triggerCount;
159  std::cout << "\n";
160  std::cout << "eventNumber; "
161  << dec << (uint64_t)record.getHeader().getData().header.eventNumber;
162  std::cout << "\n";
163  std::cout << std::endl;
164 
165  std::cout << "====================l1a history===================" << std::endl;
166  const evf::evtn::TCDSL1AHistory::l1a *history = record.getHistory().history().hist;
167  for(unsigned int i = 0; i < 16; i++){
168  std::cout << i << " " << hex << history[i].bxid << std::endl;
169  std::cout << i << " " << hex << history[i].orbitlow << std::endl;
170  std::cout << i << " " << hex << history[i].orbithigh << std::endl;
171  std::cout << i << " " << hex << (unsigned int)history[i].eventtype << std::endl;
172  }
173 
174  std::cout << " gpstimehigh; " << hex << record.getBST().getBST().gpstimehigh;
175  std::cout << " gpstimelow; " << hex << record.getBST().getBST().gpstimelow;
176  std::cout << " low0; " << record.getBST().getBST().low0;
177  std::cout << " high0; " << record.getBST().getBST().high0;
178  std::cout << " low1; " << record.getBST().getBST().low1;
179  std::cout << " high1; " << record.getBST().getBST().high1;
180  std::cout << " low2; " << record.getBST().getBST().low2;
181  std::cout << " high2; " << record.getBST().getBST().high2;
182  std::cout << " low3; " << record.getBST().getBST().low3;
183  std::cout << " high3; " << record.getBST().getBST().high3;
184  std::cout << " low4; " << record.getBST().getBST().low4;
185  std::cout << " high4; " << record.getBST().getBST().high4;
186  std::cout << " low5; " << record.getBST().getBST().low5;
187  std::cout << " status; " << record.getBST().getBST().status;
188  std::cout << std::endl;
189 
190  // char tmbuf[64], buf[64];
191  time_t nowtime = (time_t)record.getBST().getBST().gpstimehigh;
192  // uint32_t nowusec = record.getBST().getBST().gpstimelow;
193  std::cout << " value of nowtime " << hex << nowtime << dec <<std::endl;
194  std::cout << "GPS time " << ctime(&nowtime) << "."
195  << dec <<record.getBST().getBST().gpstimelow << std::endl;
196  }
197 
198 
199 // CPPUNIT_ASSERT(trailer.check()==true);
200 // CPPUNIT_ASSERT(trailer.lenght()==(int)data.size()/8);
201  }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
int i
Definition: DBlmapReader.cc:9
unsigned int getgpshigh(const unsigned char *)
unsigned int getfdlbx(const unsigned char *)
bool gtpe_board_sense(const unsigned char *p)
JetCorrectorParameters::Record record
Definition: classes.h:7
unsigned int get(const unsigned char *, bool)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
unsigned int getfdlpsc(const unsigned char *)
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
static const unsigned int GTEVMId
unsigned int getlbn(const unsigned char *)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:413
bool evm_board_sense(const unsigned char *p, size_t size)
unsigned int getorbit(const unsigned char *)
unsigned int gtpe_getorbit(const unsigned char *)
unsigned long long uint64_t
Definition: Time.h:15
edm::EventID id() const
Definition: EventBase.h:60
unsigned int gtpe_getbx(const unsigned char *)
static const unsigned int GTPEId
edm::EventAuxiliary::ExperimentType experimentType() const
Definition: EventBase.h:65
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
tuple cout
Definition: gather_cfg.py:121
unsigned int gtpe_get(const unsigned char *)
dictionary rawdata
Definition: lumiPlot.py:393
unsigned int gtpe_getlbn(const unsigned char *)
unsigned int getgpslow(const unsigned char *)
tuple size
Write out results.