CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BasicP_PayloadInspector.cc
Go to the documentation of this file.
6 #include <sstream>
7 
8 namespace {
9 
10  class BasicPayloadPlot_data0 {
11  public:
12  BasicPayloadPlot_data0(){
13  }
14 
15  // return the type-name of the objects we handle, so the PayloadInspector can find corresponding tags
16  std::string objectType() {
17  return "BasicPayload";
18  }
19 
20  // return a title string to be used in the PayloadInspector
21  std::string title() {
22  return "Data0 vs run number";
23  }
24 
25  std::string info() {
26  return title();
27  }
28 
29  std::string data( const boost::python::list& iovs ){
31  // TO DO: add try /catch block
32  cond::utilities::JsonPrinter jprint("Run","data0");
33  for( int i=0; i< len( iovs ); i++ ) {
34  cond::Iov_t iov = boost::python::extract<cond::Iov_t>( iovs[i] );
35  boost::shared_ptr<cond::BasicPayload> obj = reader.fetch<cond::BasicPayload>( iov.payloadId );
36  jprint.append(boost::lexical_cast<std::string>(iov.since),boost::lexical_cast<std::string>(obj->m_data0 ));
37  }
38  return jprint.print();
39  }
40  };
41 
42  class BasicPayloadPlot_data1 {
43  public:
44  BasicPayloadPlot_data1(){
45  }
46 
47  // return the type-name of the objects we handle, so the PayloadInspector can find corresponding tags
48  std::string objectType() {
49  return "BasicPayload";
50  }
51 
52  // return a title string to be used in the PayloadInspector
53  std::string title() {
54  return "Data1 trend";
55  }
56 
57  std::string info() {
58  return title();
59  }
60 
61  std::string data( const boost::python::list& iovs ){
63  // TO DO: add try /catch block
64  cond::utilities::JsonPrinter jprint("Run","data1");
65  for( int i=0; i< len( iovs ); i++ ) {
66  cond::Iov_t iov = boost::python::extract<cond::Iov_t>( iovs[i] );
67  boost::shared_ptr<cond::BasicPayload> obj = reader.fetch<cond::BasicPayload>( iov.payloadId );
68  jprint.append(boost::lexical_cast<std::string>(iov.since),boost::lexical_cast<std::string>(obj->m_data1 ));
69  }
70  return jprint.print();
71  }
72  };
73 
74 }
75 
76 PAYLOAD_INSPECTOR_MODULE( BasicPayload ){
77  PAYLOAD_INSPECTOR_CLASS( BasicPayloadPlot_data0 );
78  PAYLOAD_INSPECTOR_CLASS( BasicPayloadPlot_data1 );
79 }
int i
Definition: DBlmapReader.cc:9
static const TGPicture * info(bool iBackgroundIsBlack)
Time_t since
Definition: Types.h:56
boost::shared_ptr< T > fetch(const cond::Hash &payloadHash)
Definition: PayloadReader.h:64
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
tuple iov
Definition: o2o.py:307
Hash payloadId
Definition: Types.h:58
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run